eyelang 1.3.8 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/README.md +19 -14
  2. package/SPEC.md +4 -4
  3. package/conformance/expected/core/001_fact_query.out +0 -8
  4. package/conformance/expected/core/002_rule_recursion.out +0 -41
  5. package/conformance/expected/core/003_terms_and_readback.out +0 -104
  6. package/conformance/expected/core/004_conjunction_and_parentheses.out +0 -25
  7. package/conformance/expected/core/005_list_deconstruction.out +0 -32
  8. package/conformance/expected/core/006_comma_formula_data.out +0 -15
  9. package/conformance/expected/core/007_anonymous_variables.out +0 -19
  10. package/conformance/expected/core/008_graphic_atoms.out +0 -24
  11. package/conformance/expected/core/009_comments_and_whitespace.out +0 -30
  12. package/conformance/expected/core/010_variable_scope_and_reuse.out +0 -52
  13. package/conformance/expected/core/011_predicate_arity.out +0 -30
  14. package/conformance/expected/core/012_nested_compound_unification.out +0 -30
  15. package/conformance/expected/core/013_multiple_clauses_order.out +0 -44
  16. package/conformance/expected/core/014_failure_filters_answers.out +0 -19
  17. package/conformance/expected/core/015_improper_list_unification.out +0 -45
  18. package/conformance/expected/core/016_zero_arity_compound.out +0 -15
  19. package/conformance/expected/core/017_three_step_recursion.out +0 -99
  20. package/conformance/expected/core/018_quoted_atom_readback.out +0 -45
  21. package/conformance/expected/core/019_parenthesized_three_conjuncts.out +0 -36
  22. package/conformance/expected/core/020_nested_list_terms.out +0 -30
  23. package/conformance/expected/extension/001_default_derived_output.out +0 -56
  24. package/conformance/expected/extension/002_materialize_focus.out +0 -22
  25. package/conformance/expected/extension/003_arithmetic_and_comparison.out +0 -148
  26. package/conformance/expected/extension/004_strings_and_atoms.out +0 -58
  27. package/conformance/expected/extension/005_lists_aggregation_ordering.out +0 -135
  28. package/conformance/expected/extension/006_formula_terms.out +0 -76
  29. package/conformance/expected/extension/007_negation_once_generators.out +0 -40
  30. package/conformance/expected/extension/008_equality_and_inequality.out +0 -58
  31. package/conformance/expected/extension/009_list_relations.out +0 -73
  32. package/conformance/expected/extension/010_append_splits.out +0 -45
  33. package/conformance/expected/extension/011_matching_and_comparison.out +0 -70
  34. package/conformance/expected/extension/012_memoize_declaration.out +0 -41
  35. package/conformance/expected/extension/013_numeric_functions.out +0 -105
  36. package/conformance/expected/extension/014_between_enumeration.out +0 -45
  37. package/conformance/expected/extension/015_smallest_divisor.out +0 -15
  38. package/conformance/expected/extension/016_negation_filter.out +0 -38
  39. package/conformance/expected/extension/017_once_user_predicate.out +0 -21
  40. package/conformance/expected/extension/018_findall_user_goal.out +0 -15
  41. package/conformance/expected/extension/019_sort_deduplicates_atoms.out +0 -15
  42. package/conformance/expected/extension/020_append_bound_prefix_suffix.out +0 -30
  43. package/conformance/expected/extension/021_nth0_index_generation.out +0 -15
  44. package/conformance/expected/extension/022_set_nth0_edges.out +0 -30
  45. package/conformance/expected/extension/023_select_duplicate_occurrences.out +0 -30
  46. package/conformance/expected/extension/024_not_member_filter.out +0 -19
  47. package/conformance/expected/extension/025_is_list_filter.out +0 -19
  48. package/conformance/expected/extension/026_nested_formula_terms.out +0 -114
  49. package/conformance/expected/extension/027_materialize_excludes_source_fact.out +0 -14
  50. package/conformance/expected/extension/028_numeric_and_lexical_comparison.out +0 -42
  51. package/conformance/expected/extension/029_string_matching_filters.out +0 -38
  52. package/conformance/expected/extension/030_string_and_atom_concat.out +0 -30
  53. package/conformance/expected/extension/031_countall_empty_and_nonempty.out +0 -18
  54. package/conformance/expected/extension/032_sumall_numeric_template.out +0 -8
  55. package/conformance/expected/extension/033_aggregate_min_template.out +0 -8
  56. package/conformance/expected/extension/034_aggregate_max_compound_key.out +0 -8
  57. package/examples/output/access-control-policy.pl +0 -156
  58. package/examples/output/ackermann.pl +0 -1240
  59. package/examples/output/age.pl +0 -69
  60. package/examples/output/aliases-and-namespaces.pl +0 -73
  61. package/examples/output/alignment-demo.pl +0 -862
  62. package/examples/output/allen-interval-calculus.pl +0 -9169
  63. package/examples/output/ancestor.pl +0 -134
  64. package/examples/output/animal.pl +0 -64
  65. package/examples/output/annotation.pl +0 -76
  66. package/examples/output/backward.pl +0 -21
  67. package/examples/output/basic-monadic.pl +0 -22770
  68. package/examples/output/bayes-diagnosis.pl +0 -195
  69. package/examples/output/bayes-therapy.pl +0 -34873
  70. package/examples/output/beam-deflection.pl +0 -222
  71. package/examples/output/blocks-world-planning.pl +0 -1339
  72. package/examples/output/bmi.pl +0 -1903
  73. package/examples/output/braking-safety-worlds.pl +0 -2452
  74. package/examples/output/buck-converter-design.pl +0 -663
  75. package/examples/output/cache-performance.pl +0 -306
  76. package/examples/output/canary-release.pl +0 -167
  77. package/examples/output/cat-koko.pl +0 -83
  78. package/examples/output/clinical-trial-screening.pl +0 -380
  79. package/examples/output/collatz-1000.pl +0 -19000
  80. package/examples/output/combinatorics-findall-sort.pl +0 -56
  81. package/examples/output/competitive-enzyme-kinetics.pl +0 -563
  82. package/examples/output/complex-matrix-stability.pl +0 -250
  83. package/examples/output/complex.pl +0 -653
  84. package/examples/output/composition-of-injective-functions-is-injective.pl +0 -256
  85. package/examples/output/context-association.pl +0 -75
  86. package/examples/output/control-system.pl +0 -328
  87. package/examples/output/cryptarithmetic-send-more-money.pl +0 -168
  88. package/examples/output/cyclic-path.pl +0 -504
  89. package/examples/output/d3-group.pl +0 -56
  90. package/examples/output/dairy-energy-balance.pl +0 -1034
  91. package/examples/output/data-negotiation.pl +0 -75
  92. package/examples/output/deep-taxonomy-10.pl +0 -1235
  93. package/examples/output/deep-taxonomy-100.pl +0 -1235
  94. package/examples/output/deep-taxonomy-1000.pl +0 -1235
  95. package/examples/output/deep-taxonomy-10000.pl +0 -2915
  96. package/examples/output/deep-taxonomy-100000.pl +0 -20240
  97. package/examples/output/delfour.pl +0 -2829
  98. package/examples/output/dense-hamiltonian-cycle.pl +0 -207
  99. package/examples/output/deontic-logic.pl +0 -105
  100. package/examples/output/derived-rule.pl +0 -41
  101. package/examples/output/diamond-property.pl +0 -303
  102. package/examples/output/dijkstra-findall-sort.pl +0 -484
  103. package/examples/output/dijkstra-risk-path.pl +0 -4841
  104. package/examples/output/dijkstra.pl +0 -1336
  105. package/examples/output/dining-philosophers.pl +0 -21646
  106. package/examples/output/dog.pl +0 -30
  107. package/examples/output/drone-corridor-planner.pl +0 -2466
  108. package/examples/output/easter-computus.pl +0 -5690
  109. package/examples/output/electrical-rc-filter.pl +0 -102
  110. package/examples/output/epidemic-policy.pl +0 -760
  111. package/examples/output/equivalence-classes-overlap-implies-same-class.pl +0 -1080
  112. package/examples/output/eulerian-path.pl +0 -383
  113. package/examples/output/ev-range-worlds.pl +0 -2294
  114. package/examples/output/exact-cover-sudoku.pl +0 -396
  115. package/examples/output/existential-rule.pl +0 -38
  116. package/examples/output/exoplanet-validation-worlds.pl +0 -1904
  117. package/examples/output/expression-eval.pl +0 -104
  118. package/examples/output/family-cousins.pl +0 -3852
  119. package/examples/output/fastpow.pl +0 -1064
  120. package/examples/output/fft8-numeric.pl +0 -2556
  121. package/examples/output/fibonacci.pl +0 -2060
  122. package/examples/output/field-nitrogen-balance.pl +0 -1452
  123. package/examples/output/floating-point.pl +0 -151
  124. package/examples/output/four-color-map.pl +0 -191
  125. package/examples/output/fundamental-theorem-arithmetic.pl +0 -1610
  126. package/examples/output/gcd-bezout-identity.pl +0 -1842
  127. package/examples/output/gd-step-certified.pl +0 -32354
  128. package/examples/output/gdpr-compliance.pl +0 -193
  129. package/examples/output/goldbach-1000.pl +0 -17490
  130. package/examples/output/good-cobbler.pl +0 -15
  131. package/examples/output/gps.pl +0 -4166
  132. package/examples/output/graph-reachability.pl +0 -148
  133. package/examples/output/gray-code-counter.pl +0 -835
  134. package/examples/output/greatest-lower-bound-uniqueness.pl +0 -148
  135. package/examples/output/group-inverse-uniqueness.pl +0 -82
  136. package/examples/output/hamiltonian-cycle.pl +0 -102
  137. package/examples/output/hamiltonian-path.pl +0 -14157
  138. package/examples/output/hamming-code.pl +0 -2665
  139. package/examples/output/hanoi.pl +0 -184
  140. package/examples/output/heat-loss.pl +0 -223
  141. package/examples/output/heron-theorem.pl +0 -253
  142. package/examples/output/ideal-gas-law.pl +0 -148
  143. package/examples/output/illegitimate-reasoning.pl +0 -530
  144. package/examples/output/kaprekar.pl +0 -208
  145. package/examples/output/law-of-cosines.pl +0 -165
  146. package/examples/output/least-squares-regression.pl +0 -1447
  147. package/examples/output/list-collection.pl +0 -49
  148. package/examples/output/lldm.pl +0 -17298
  149. package/examples/output/manufacturing-quality-control.pl +0 -562
  150. package/examples/output/matrix.pl +0 -206
  151. package/examples/output/microgrid-dispatch.pl +0 -787
  152. package/examples/output/monkey-bananas.pl +0 -575
  153. package/examples/output/n-queens.pl +0 -2046
  154. package/examples/output/network-sla.pl +0 -282
  155. package/examples/output/newton-raphson.pl +0 -756
  156. package/examples/output/nixon-diamond.pl +0 -176
  157. package/examples/output/odrl-dpv-healthcare-risk-ranked.pl +0 -6148
  158. package/examples/output/odrl-dpv-risk-ranked.pl +0 -12961
  159. package/examples/output/orbital-transfer-design.pl +0 -961
  160. package/examples/output/path-discovery.pl +0 -333
  161. package/examples/output/peano-arithmetic.pl +0 -1432
  162. package/examples/output/peasant.pl +0 -190
  163. package/examples/output/pendulum-period.pl +0 -271
  164. package/examples/output/polynomial.pl +0 -7952
  165. package/examples/output/project-portfolio-optimization.pl +0 -93
  166. package/examples/output/proof-contrapositive.pl +0 -75
  167. package/examples/output/quadratic-formula.pl +0 -454
  168. package/examples/output/quine-mccluskey.pl +0 -188
  169. package/examples/output/radioactive-decay.pl +0 -299
  170. package/examples/output/sat-dpll.pl +0 -121
  171. package/examples/output/security-incident-correlation.pl +0 -267
  172. package/examples/output/service-impact.pl +0 -457
  173. package/examples/output/sieve.pl +0 -19
  174. package/examples/output/skolem-functions.pl +0 -264
  175. package/examples/output/socket-age.pl +0 -31
  176. package/examples/output/socket-family.pl +0 -56
  177. package/examples/output/socrates.pl +0 -36
  178. package/examples/output/statistics-summary.pl +0 -741
  179. package/examples/output/sudoku.pl +0 -38
  180. package/examples/output/superdense-coding.pl +0 -476
  181. package/examples/output/traveling-salesman.pl +0 -284
  182. package/examples/output/turing.pl +0 -2144
  183. package/examples/output/vector-similarity.pl +0 -421
  184. package/examples/output/witch.pl +0 -209
  185. package/examples/output/wolf-goat-cabbage.pl +0 -900
  186. package/examples/output/zebra.pl +0 -401
  187. package/examples/proof/age.pl +71 -0
  188. package/examples/proof/aliases-and-namespaces.pl +78 -0
  189. package/examples/proof/ancestor.pl +140 -0
  190. package/examples/proof/animal.pl +68 -0
  191. package/examples/proof/annotation.pl +80 -0
  192. package/examples/proof/backward.pl +22 -0
  193. package/examples/proof/cat-koko.pl +86 -0
  194. package/examples/proof/data-negotiation.pl +76 -0
  195. package/examples/proof/derived-rule.pl +43 -0
  196. package/examples/proof/dog.pl +31 -0
  197. package/examples/proof/electrical-rc-filter.pl +105 -0
  198. package/examples/proof/existential-rule.pl +40 -0
  199. package/examples/proof/floating-point.pl +160 -0
  200. package/examples/proof/good-cobbler.pl +16 -0
  201. package/examples/proof/group-inverse-uniqueness.pl +84 -0
  202. package/examples/proof/list-collection.pl +52 -0
  203. package/examples/proof/proof-contrapositive.pl +78 -0
  204. package/examples/proof/socket-age.pl +32 -0
  205. package/examples/proof/socket-family.pl +59 -0
  206. package/examples/proof/socrates.pl +38 -0
  207. package/examples/socket-age.pl +4 -4
  208. package/examples/socket-family.pl +4 -4
  209. package/package.json +1 -1
  210. package/playground-worker.mjs +4 -4
  211. package/playground.html +15 -15
  212. package/src/cli.js +10 -10
  213. package/src/index.js +3 -2
  214. package/src/parser.js +130 -1
  215. package/src/program.js +33 -27
  216. package/test/run-all.js +0 -0
  217. package/test/run-conformance.js +0 -0
  218. package/test/run-examples.js +38 -8
  219. package/test/run-regression.js +29 -28
@@ -1,2156 +1,12 @@
1
1
  input(case1, [1, 0, 1, 0, 0, 1]).
2
- why(
3
- input(case1, [1, 0, 1, 0, 0, 1]),
4
- proof(
5
- goal(input(case1, [1, 0, 1, 0, 0, 1])),
6
- by(rule("turing.pl", clause(27))),
7
- bindings([binding("Case", case1), binding("InTape", [1, 0, 1, 0, 0, 1])]),
8
- uses([
9
- proof(
10
- goal(case(case1, [1, 0, 1, 0, 0, 1])),
11
- by(fact("turing.pl", clause(23)))
12
- )
13
- ])
14
- )
15
- ).
16
-
17
2
  input(case2, [1, 0, 1, 1, 1, 1]).
18
- why(
19
- input(case2, [1, 0, 1, 1, 1, 1]),
20
- proof(
21
- goal(input(case2, [1, 0, 1, 1, 1, 1])),
22
- by(rule("turing.pl", clause(27))),
23
- bindings([binding("Case", case2), binding("InTape", [1, 0, 1, 1, 1, 1])]),
24
- uses([
25
- proof(
26
- goal(case(case2, [1, 0, 1, 1, 1, 1])),
27
- by(fact("turing.pl", clause(24)))
28
- )
29
- ])
30
- )
31
- ).
32
-
33
3
  input(case3, [1, 1, 1, 1, 1, 1]).
34
- why(
35
- input(case3, [1, 1, 1, 1, 1, 1]),
36
- proof(
37
- goal(input(case3, [1, 1, 1, 1, 1, 1])),
38
- by(rule("turing.pl", clause(27))),
39
- bindings([binding("Case", case3), binding("InTape", [1, 1, 1, 1, 1, 1])]),
40
- uses([
41
- proof(
42
- goal(case(case3, [1, 1, 1, 1, 1, 1])),
43
- by(fact("turing.pl", clause(25)))
44
- )
45
- ])
46
- )
47
- ).
48
-
49
4
  input(case4, []).
50
- why(
51
- input(case4, []),
52
- proof(
53
- goal(input(case4, [])),
54
- by(rule("turing.pl", clause(27))),
55
- bindings([binding("Case", case4), binding("InTape", [])]),
56
- uses([
57
- proof(
58
- goal(case(case4, [])),
59
- by(fact("turing.pl", clause(26)))
60
- )
61
- ])
62
- )
63
- ).
64
-
65
5
  output(case1, [1, 0, 1, 0, 1, 0, #]).
66
- why(
67
- output(case1, [1, 0, 1, 0, 1, 0, #]),
68
- proof(
69
- goal(output(case1, [1, 0, 1, 0, 1, 0, #])),
70
- by(rule("turing.pl", clause(28))),
71
- bindings([binding("Case", case1), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("InTape", [1, 0, 1, 0, 0, 1])]),
72
- uses([
73
- proof(
74
- goal(case(case1, [1, 0, 1, 0, 0, 1])),
75
- by(fact("turing.pl", clause(23)))
76
- ),
77
- proof(
78
- goal(compute([1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
79
- by(rule("turing.pl", clause(5))),
80
- bindings([binding("Head", 1), binding("Tail", [0, 1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("_Machine", add1), binding("I", 0)]),
81
- uses([
82
- proof(
83
- goal(start(add1, 0)),
84
- by(fact("turing.pl", clause(16)))
85
- ),
86
- proof(
87
- goal(find(0, [], 1, [0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
88
- by(rule("turing.pl", clause(6))),
89
- bindings([binding("State", 0), binding("Left", []), binding("Cell", 1), binding("Right", [0, 1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1]), binding("B", 0), binding("C", [1, 0, 0, 1])]),
90
- uses([
91
- proof(
92
- goal(t([0, 1, 1, r], 0)),
93
- by(fact("turing.pl", clause(18)))
94
- ),
95
- proof(
96
- goal(move(r, [], 1, [0, 1, 0, 0, 1], [1], 0, [1, 0, 0, 1])),
97
- by(fact("turing.pl", clause(13))),
98
- bindings([binding("Left", []), binding("Cell", 1), binding("Head", 0), binding("Tail", [1, 0, 0, 1])])
99
- ),
100
- proof(
101
- goal(continue(0, [1], 0, [1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
102
- by(rule("turing.pl", clause(8))),
103
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
104
- uses([
105
- proof(
106
- goal(find(0, [1], 0, [1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
107
- by(rule("turing.pl", clause(6))),
108
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 1]), binding("B", 1), binding("C", [0, 0, 1])]),
109
- uses([
110
- proof(
111
- goal(t([0, 0, 0, r], 0)),
112
- by(fact("turing.pl", clause(17)))
113
- ),
114
- proof(
115
- goal(move(r, [1], 0, [1, 0, 0, 1], [0, 1], 1, [0, 0, 1])),
116
- by(fact("turing.pl", clause(13))),
117
- bindings([binding("Left", [1]), binding("Cell", 0), binding("Head", 1), binding("Tail", [0, 0, 1])])
118
- ),
119
- proof(
120
- goal(continue(0, [0, 1], 1, [0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
121
- by(rule("turing.pl", clause(8))),
122
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
123
- uses([
124
- proof(
125
- goal(find(0, [0, 1], 1, [0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
126
- by(rule("turing.pl", clause(6))),
127
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 0, 1]), binding("B", 0), binding("C", [0, 1])]),
128
- uses([
129
- proof(
130
- goal(t([0, 1, 1, r], 0)),
131
- by(fact("turing.pl", clause(18)))
132
- ),
133
- proof(
134
- goal(move(r, [0, 1], 1, [0, 0, 1], [1, 0, 1], 0, [0, 1])),
135
- by(fact("turing.pl", clause(13))),
136
- bindings([binding("Left", [0, 1]), binding("Cell", 1), binding("Head", 0), binding("Tail", [0, 1])])
137
- ),
138
- proof(
139
- goal(continue(0, [1, 0, 1], 0, [0, 1], [1, 0, 1, 0, 1, 0, #])),
140
- by(rule("turing.pl", clause(8))),
141
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 0), binding("Right", [0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
142
- uses([
143
- proof(
144
- goal(find(0, [1, 0, 1], 0, [0, 1], [1, 0, 1, 0, 1, 0, #])),
145
- by(rule("turing.pl", clause(6))),
146
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 0), binding("Right", [0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 1, 0, 1]), binding("B", 0), binding("C", [1])]),
147
- uses([
148
- proof(
149
- goal(t([0, 0, 0, r], 0)),
150
- by(fact("turing.pl", clause(17)))
151
- ),
152
- proof(
153
- goal(move(r, [1, 0, 1], 0, [0, 1], [0, 1, 0, 1], 0, [1])),
154
- by(fact("turing.pl", clause(13))),
155
- bindings([binding("Left", [1, 0, 1]), binding("Cell", 0), binding("Head", 0), binding("Tail", [1])])
156
- ),
157
- proof(
158
- goal(continue(0, [0, 1, 0, 1], 0, [1], [1, 0, 1, 0, 1, 0, #])),
159
- by(rule("turing.pl", clause(8))),
160
- bindings([binding("State", 0), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
161
- uses([
162
- proof(
163
- goal(find(0, [0, 1, 0, 1], 0, [1], [1, 0, 1, 0, 1, 0, #])),
164
- by(rule("turing.pl", clause(6))),
165
- bindings([binding("State", 0), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 0, 1, 0, 1]), binding("B", 1), binding("C", [])]),
166
- uses([
167
- proof(
168
- goal(t([0, 0, 0, r], 0)),
169
- by(fact("turing.pl", clause(17)))
170
- ),
171
- proof(
172
- goal(move(r, [0, 1, 0, 1], 0, [1], [0, 0, 1, 0, 1], 1, [])),
173
- by(fact("turing.pl", clause(13))),
174
- bindings([binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Head", 1), binding("Tail", [])])
175
- ),
176
- proof(
177
- goal(continue(0, [0, 0, 1, 0, 1], 1, [], [1, 0, 1, 0, 1, 0, #])),
178
- by(rule("turing.pl", clause(8))),
179
- bindings([binding("State", 0), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
180
- uses([
181
- proof(
182
- goal(find(0, [0, 0, 1, 0, 1], 1, [], [1, 0, 1, 0, 1, 0, #])),
183
- by(rule("turing.pl", clause(6))),
184
- bindings([binding("State", 0), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 0, 0, 1, 0, 1]), binding("B", #), binding("C", [])]),
185
- uses([
186
- proof(
187
- goal(t([0, 1, 1, r], 0)),
188
- by(fact("turing.pl", clause(18)))
189
- ),
190
- proof(
191
- goal(move(r, [0, 0, 1, 0, 1], 1, [], [1, 0, 0, 1, 0, 1], #, [])),
192
- by(fact("turing.pl", clause(12))),
193
- bindings([binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1)])
194
- ),
195
- proof(
196
- goal(continue(0, [1, 0, 0, 1, 0, 1], #, [], [1, 0, 1, 0, 1, 0, #])),
197
- by(rule("turing.pl", clause(8))),
198
- bindings([binding("State", 0), binding("Left", [1, 0, 0, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
199
- uses([
200
- proof(
201
- goal(find(0, [1, 0, 0, 1, 0, 1], #, [], [1, 0, 1, 0, 1, 0, #])),
202
- by(rule("turing.pl", clause(6))),
203
- bindings([binding("State", 0), binding("Left", [1, 0, 0, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", [0, 0, 1, 0, 1]), binding("B", 1), binding("C", [#])]),
204
- uses([
205
- proof(
206
- goal(t([0, #, #, l], 1)),
207
- by(fact("turing.pl", clause(19)))
208
- ),
209
- proof(
210
- goal(move(l, [1, 0, 0, 1, 0, 1], #, [], [0, 0, 1, 0, 1], 1, [#])),
211
- by(fact("turing.pl", clause(10))),
212
- bindings([binding("Head", 1), binding("Tail", [0, 0, 1, 0, 1]), binding("Cell", #), binding("Right", [])])
213
- ),
214
- proof(
215
- goal(continue(1, [0, 0, 1, 0, 1], 1, [#], [1, 0, 1, 0, 1, 0, #])),
216
- by(rule("turing.pl", clause(8))),
217
- bindings([binding("State", 1), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
218
- uses([
219
- proof(
220
- goal(find(1, [0, 0, 1, 0, 1], 1, [#], [1, 0, 1, 0, 1, 0, #])),
221
- by(rule("turing.pl", clause(6))),
222
- bindings([binding("State", 1), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [0, 1, 0, 1]), binding("B", 0), binding("C", [0, #])]),
223
- uses([
224
- proof(
225
- goal(t([1, 1, 0, l], 1)),
226
- by(fact("turing.pl", clause(21)))
227
- ),
228
- proof(
229
- goal(move(l, [0, 0, 1, 0, 1], 0, [#], [0, 1, 0, 1], 0, [0, #])),
230
- by(fact("turing.pl", clause(10))),
231
- bindings([binding("Head", 0), binding("Tail", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [#])])
232
- ),
233
- proof(
234
- goal(continue(1, [0, 1, 0, 1], 0, [0, #], [1, 0, 1, 0, 1, 0, #])),
235
- by(rule("turing.pl", clause(8))),
236
- bindings([binding("State", 1), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [0, #]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
237
- uses([
238
- proof(
239
- goal(find(1, [0, 1, 0, 1], 0, [0, #], [1, 0, 1, 0, 1, 0, #])),
240
- by(rule("turing.pl", clause(6))),
241
- bindings([binding("State", 1), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [0, #]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", [0, 1, 0, 1]), binding("B", 1), binding("C", [0, #])]),
242
- uses([
243
- proof(
244
- goal(t([1, 0, 1, s], halt)),
245
- by(fact("turing.pl", clause(20)))
246
- ),
247
- proof(
248
- goal(move(s, [0, 1, 0, 1], 1, [0, #], [0, 1, 0, 1], 1, [0, #])),
249
- by(fact("turing.pl", clause(11))),
250
- bindings([binding("Left", [0, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #])])
251
- ),
252
- proof(
253
- goal(continue(halt, [0, 1, 0, 1], 1, [0, #], [1, 0, 1, 0, 1, 0, #])),
254
- by(rule("turing.pl", clause(7))),
255
- bindings([binding("Left", [0, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("R", [1, 0, 1, 0])]),
256
- uses([
257
- proof(
258
- goal(rever([0, 1, 0, 1], [1, 0, 1, 0])),
259
- by(rule("turing.pl", clause(15))),
260
- bindings([binding("A", 0), binding("B", [1, 0, 1]), binding("C", [1, 0, 1, 0]), binding("D", [1, 0, 1])]),
261
- uses([
262
- proof(
263
- goal(rever([1, 0, 1], [1, 0, 1])),
264
- by(rule("turing.pl", clause(15))),
265
- bindings([binding("A", 1), binding("B", [0, 1]), binding("C", [1, 0, 1]), binding("D", [1, 0])]),
266
- uses([
267
- proof(
268
- goal(rever([0, 1], [1, 0])),
269
- by(rule("turing.pl", clause(15))),
270
- bindings([binding("A", 0), binding("B", [1]), binding("C", [1, 0]), binding("D", [1])]),
271
- uses([
272
- proof(
273
- goal(rever([1], [1])),
274
- by(rule("turing.pl", clause(15))),
275
- bindings([binding("A", 1), binding("B", []), binding("C", [1]), binding("D", [])]),
276
- uses([
277
- proof(
278
- goal(rever([], [])),
279
- by(fact("turing.pl", clause(14)))
280
- ),
281
- proof(
282
- goal(append([], [1], [1])),
283
- by(builtin(append, 3))
284
- )
285
- ])
286
- ),
287
- proof(
288
- goal(append([1], [0], [1, 0])),
289
- by(builtin(append, 3))
290
- )
291
- ])
292
- ),
293
- proof(
294
- goal(append([1, 0], [1], [1, 0, 1])),
295
- by(builtin(append, 3))
296
- )
297
- ])
298
- ),
299
- proof(
300
- goal(append([1, 0, 1], [0], [1, 0, 1, 0])),
301
- by(builtin(append, 3))
302
- )
303
- ])
304
- ),
305
- proof(
306
- goal(append([1, 0, 1, 0], [1, 0, #], [1, 0, 1, 0, 1, 0, #])),
307
- by(builtin(append, 3))
308
- )
309
- ])
310
- )
311
- ])
312
- )
313
- ])
314
- )
315
- ])
316
- )
317
- ])
318
- )
319
- ])
320
- )
321
- ])
322
- )
323
- ])
324
- )
325
- ])
326
- )
327
- ])
328
- )
329
- ])
330
- )
331
- ])
332
- )
333
- ])
334
- )
335
- ])
336
- )
337
- ])
338
- )
339
- ])
340
- )
341
- ])
342
- )
343
- ])
344
- )
345
- ])
346
- )
347
- ])
348
- )
349
- ).
350
-
351
6
  output(case2, [1, 1, 0, 0, 0, 0, #]).
352
- why(
353
- output(case2, [1, 1, 0, 0, 0, 0, #]),
354
- proof(
355
- goal(output(case2, [1, 1, 0, 0, 0, 0, #])),
356
- by(rule("turing.pl", clause(28))),
357
- bindings([binding("Case", case2), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("InTape", [1, 0, 1, 1, 1, 1])]),
358
- uses([
359
- proof(
360
- goal(case(case2, [1, 0, 1, 1, 1, 1])),
361
- by(fact("turing.pl", clause(24)))
362
- ),
363
- proof(
364
- goal(compute([1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
365
- by(rule("turing.pl", clause(5))),
366
- bindings([binding("Head", 1), binding("Tail", [0, 1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("_Machine", add1), binding("I", 0)]),
367
- uses([
368
- proof(
369
- goal(start(add1, 0)),
370
- by(fact("turing.pl", clause(16)))
371
- ),
372
- proof(
373
- goal(find(0, [], 1, [0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
374
- by(rule("turing.pl", clause(6))),
375
- bindings([binding("State", 0), binding("Left", []), binding("Cell", 1), binding("Right", [0, 1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1]), binding("B", 0), binding("C", [1, 1, 1, 1])]),
376
- uses([
377
- proof(
378
- goal(t([0, 1, 1, r], 0)),
379
- by(fact("turing.pl", clause(18)))
380
- ),
381
- proof(
382
- goal(move(r, [], 1, [0, 1, 1, 1, 1], [1], 0, [1, 1, 1, 1])),
383
- by(fact("turing.pl", clause(13))),
384
- bindings([binding("Left", []), binding("Cell", 1), binding("Head", 0), binding("Tail", [1, 1, 1, 1])])
385
- ),
386
- proof(
387
- goal(continue(0, [1], 0, [1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
388
- by(rule("turing.pl", clause(8))),
389
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
390
- uses([
391
- proof(
392
- goal(find(0, [1], 0, [1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
393
- by(rule("turing.pl", clause(6))),
394
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 1]), binding("B", 1), binding("C", [1, 1, 1])]),
395
- uses([
396
- proof(
397
- goal(t([0, 0, 0, r], 0)),
398
- by(fact("turing.pl", clause(17)))
399
- ),
400
- proof(
401
- goal(move(r, [1], 0, [1, 1, 1, 1], [0, 1], 1, [1, 1, 1])),
402
- by(fact("turing.pl", clause(13))),
403
- bindings([binding("Left", [1]), binding("Cell", 0), binding("Head", 1), binding("Tail", [1, 1, 1])])
404
- ),
405
- proof(
406
- goal(continue(0, [0, 1], 1, [1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
407
- by(rule("turing.pl", clause(8))),
408
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
409
- uses([
410
- proof(
411
- goal(find(0, [0, 1], 1, [1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
412
- by(rule("turing.pl", clause(6))),
413
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 0, 1]), binding("B", 1), binding("C", [1, 1])]),
414
- uses([
415
- proof(
416
- goal(t([0, 1, 1, r], 0)),
417
- by(fact("turing.pl", clause(18)))
418
- ),
419
- proof(
420
- goal(move(r, [0, 1], 1, [1, 1, 1], [1, 0, 1], 1, [1, 1])),
421
- by(fact("turing.pl", clause(13))),
422
- bindings([binding("Left", [0, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1])])
423
- ),
424
- proof(
425
- goal(continue(0, [1, 0, 1], 1, [1, 1], [1, 1, 0, 0, 0, 0, #])),
426
- by(rule("turing.pl", clause(8))),
427
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
428
- uses([
429
- proof(
430
- goal(find(0, [1, 0, 1], 1, [1, 1], [1, 1, 0, 0, 0, 0, #])),
431
- by(rule("turing.pl", clause(6))),
432
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 0, 1]), binding("B", 1), binding("C", [1])]),
433
- uses([
434
- proof(
435
- goal(t([0, 1, 1, r], 0)),
436
- by(fact("turing.pl", clause(18)))
437
- ),
438
- proof(
439
- goal(move(r, [1, 0, 1], 1, [1, 1], [1, 1, 0, 1], 1, [1])),
440
- by(fact("turing.pl", clause(13))),
441
- bindings([binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1])])
442
- ),
443
- proof(
444
- goal(continue(0, [1, 1, 0, 1], 1, [1], [1, 1, 0, 0, 0, 0, #])),
445
- by(rule("turing.pl", clause(8))),
446
- bindings([binding("State", 0), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
447
- uses([
448
- proof(
449
- goal(find(0, [1, 1, 0, 1], 1, [1], [1, 1, 0, 0, 0, 0, #])),
450
- by(rule("turing.pl", clause(6))),
451
- bindings([binding("State", 0), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 0, 1]), binding("B", 1), binding("C", [])]),
452
- uses([
453
- proof(
454
- goal(t([0, 1, 1, r], 0)),
455
- by(fact("turing.pl", clause(18)))
456
- ),
457
- proof(
458
- goal(move(r, [1, 1, 0, 1], 1, [1], [1, 1, 1, 0, 1], 1, [])),
459
- by(fact("turing.pl", clause(13))),
460
- bindings([binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [])])
461
- ),
462
- proof(
463
- goal(continue(0, [1, 1, 1, 0, 1], 1, [], [1, 1, 0, 0, 0, 0, #])),
464
- by(rule("turing.pl", clause(8))),
465
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
466
- uses([
467
- proof(
468
- goal(find(0, [1, 1, 1, 0, 1], 1, [], [1, 1, 0, 0, 0, 0, #])),
469
- by(rule("turing.pl", clause(6))),
470
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1, 0, 1]), binding("B", #), binding("C", [])]),
471
- uses([
472
- proof(
473
- goal(t([0, 1, 1, r], 0)),
474
- by(fact("turing.pl", clause(18)))
475
- ),
476
- proof(
477
- goal(move(r, [1, 1, 1, 0, 1], 1, [], [1, 1, 1, 1, 0, 1], #, [])),
478
- by(fact("turing.pl", clause(12))),
479
- bindings([binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1)])
480
- ),
481
- proof(
482
- goal(continue(0, [1, 1, 1, 1, 0, 1], #, [], [1, 1, 0, 0, 0, 0, #])),
483
- by(rule("turing.pl", clause(8))),
484
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
485
- uses([
486
- proof(
487
- goal(find(0, [1, 1, 1, 1, 0, 1], #, [], [1, 1, 0, 0, 0, 0, #])),
488
- by(rule("turing.pl", clause(6))),
489
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1, 0, 1]), binding("B", 1), binding("C", [#])]),
490
- uses([
491
- proof(
492
- goal(t([0, #, #, l], 1)),
493
- by(fact("turing.pl", clause(19)))
494
- ),
495
- proof(
496
- goal(move(l, [1, 1, 1, 1, 0, 1], #, [], [1, 1, 1, 0, 1], 1, [#])),
497
- by(fact("turing.pl", clause(10))),
498
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 0, 1]), binding("Cell", #), binding("Right", [])])
499
- ),
500
- proof(
501
- goal(continue(1, [1, 1, 1, 0, 1], 1, [#], [1, 1, 0, 0, 0, 0, #])),
502
- by(rule("turing.pl", clause(8))),
503
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
504
- uses([
505
- proof(
506
- goal(find(1, [1, 1, 1, 0, 1], 1, [#], [1, 1, 0, 0, 0, 0, #])),
507
- by(rule("turing.pl", clause(6))),
508
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 0, 1]), binding("B", 1), binding("C", [0, #])]),
509
- uses([
510
- proof(
511
- goal(t([1, 1, 0, l], 1)),
512
- by(fact("turing.pl", clause(21)))
513
- ),
514
- proof(
515
- goal(move(l, [1, 1, 1, 0, 1], 0, [#], [1, 1, 0, 1], 1, [0, #])),
516
- by(fact("turing.pl", clause(10))),
517
- bindings([binding("Head", 1), binding("Tail", [1, 1, 0, 1]), binding("Cell", 0), binding("Right", [#])])
518
- ),
519
- proof(
520
- goal(continue(1, [1, 1, 0, 1], 1, [0, #], [1, 1, 0, 0, 0, 0, #])),
521
- by(rule("turing.pl", clause(8))),
522
- bindings([binding("State", 1), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
523
- uses([
524
- proof(
525
- goal(find(1, [1, 1, 0, 1], 1, [0, #], [1, 1, 0, 0, 0, 0, #])),
526
- by(rule("turing.pl", clause(6))),
527
- bindings([binding("State", 1), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 0, 1]), binding("B", 1), binding("C", [0, 0, #])]),
528
- uses([
529
- proof(
530
- goal(t([1, 1, 0, l], 1)),
531
- by(fact("turing.pl", clause(21)))
532
- ),
533
- proof(
534
- goal(move(l, [1, 1, 0, 1], 0, [0, #], [1, 0, 1], 1, [0, 0, #])),
535
- by(fact("turing.pl", clause(10))),
536
- bindings([binding("Head", 1), binding("Tail", [1, 0, 1]), binding("Cell", 0), binding("Right", [0, #])])
537
- ),
538
- proof(
539
- goal(continue(1, [1, 0, 1], 1, [0, 0, #], [1, 1, 0, 0, 0, 0, #])),
540
- by(rule("turing.pl", clause(8))),
541
- bindings([binding("State", 1), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
542
- uses([
543
- proof(
544
- goal(find(1, [1, 0, 1], 1, [0, 0, #], [1, 1, 0, 0, 0, 0, #])),
545
- by(rule("turing.pl", clause(6))),
546
- bindings([binding("State", 1), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [0, 1]), binding("B", 1), binding("C", [0, 0, 0, #])]),
547
- uses([
548
- proof(
549
- goal(t([1, 1, 0, l], 1)),
550
- by(fact("turing.pl", clause(21)))
551
- ),
552
- proof(
553
- goal(move(l, [1, 0, 1], 0, [0, 0, #], [0, 1], 1, [0, 0, 0, #])),
554
- by(fact("turing.pl", clause(10))),
555
- bindings([binding("Head", 1), binding("Tail", [0, 1]), binding("Cell", 0), binding("Right", [0, 0, #])])
556
- ),
557
- proof(
558
- goal(continue(1, [0, 1], 1, [0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
559
- by(rule("turing.pl", clause(8))),
560
- bindings([binding("State", 1), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
561
- uses([
562
- proof(
563
- goal(find(1, [0, 1], 1, [0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
564
- by(rule("turing.pl", clause(6))),
565
- bindings([binding("State", 1), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1]), binding("B", 0), binding("C", [0, 0, 0, 0, #])]),
566
- uses([
567
- proof(
568
- goal(t([1, 1, 0, l], 1)),
569
- by(fact("turing.pl", clause(21)))
570
- ),
571
- proof(
572
- goal(move(l, [0, 1], 0, [0, 0, 0, #], [1], 0, [0, 0, 0, 0, #])),
573
- by(fact("turing.pl", clause(10))),
574
- bindings([binding("Head", 0), binding("Tail", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, #])])
575
- ),
576
- proof(
577
- goal(continue(1, [1], 0, [0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
578
- by(rule("turing.pl", clause(8))),
579
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
580
- uses([
581
- proof(
582
- goal(find(1, [1], 0, [0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
583
- by(rule("turing.pl", clause(6))),
584
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", [1]), binding("B", 1), binding("C", [0, 0, 0, 0, #])]),
585
- uses([
586
- proof(
587
- goal(t([1, 0, 1, s], halt)),
588
- by(fact("turing.pl", clause(20)))
589
- ),
590
- proof(
591
- goal(move(s, [1], 1, [0, 0, 0, 0, #], [1], 1, [0, 0, 0, 0, #])),
592
- by(fact("turing.pl", clause(11))),
593
- bindings([binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #])])
594
- ),
595
- proof(
596
- goal(continue(halt, [1], 1, [0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
597
- by(rule("turing.pl", clause(7))),
598
- bindings([binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("R", [1])]),
599
- uses([
600
- proof(
601
- goal(rever([1], [1])),
602
- by(rule("turing.pl", clause(15))),
603
- bindings([binding("A", 1), binding("B", []), binding("C", [1]), binding("D", [])]),
604
- uses([
605
- proof(
606
- goal(rever([], [])),
607
- by(fact("turing.pl", clause(14)))
608
- ),
609
- proof(
610
- goal(append([], [1], [1])),
611
- by(builtin(append, 3))
612
- )
613
- ])
614
- ),
615
- proof(
616
- goal(append([1], [1, 0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
617
- by(builtin(append, 3))
618
- )
619
- ])
620
- )
621
- ])
622
- )
623
- ])
624
- )
625
- ])
626
- )
627
- ])
628
- )
629
- ])
630
- )
631
- ])
632
- )
633
- ])
634
- )
635
- ])
636
- )
637
- ])
638
- )
639
- ])
640
- )
641
- ])
642
- )
643
- ])
644
- )
645
- ])
646
- )
647
- ])
648
- )
649
- ])
650
- )
651
- ])
652
- )
653
- ])
654
- )
655
- ])
656
- )
657
- ])
658
- )
659
- ])
660
- )
661
- ])
662
- )
663
- ])
664
- )
665
- ])
666
- )
667
- ])
668
- )
669
- ])
670
- )
671
- ).
672
-
673
7
  output(case3, [1, 0, 0, 0, 0, 0, 0, #]).
674
- why(
675
- output(case3, [1, 0, 0, 0, 0, 0, 0, #]),
676
- proof(
677
- goal(output(case3, [1, 0, 0, 0, 0, 0, 0, #])),
678
- by(rule("turing.pl", clause(28))),
679
- bindings([binding("Case", case3), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("InTape", [1, 1, 1, 1, 1, 1])]),
680
- uses([
681
- proof(
682
- goal(case(case3, [1, 1, 1, 1, 1, 1])),
683
- by(fact("turing.pl", clause(25)))
684
- ),
685
- proof(
686
- goal(compute([1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
687
- by(rule("turing.pl", clause(5))),
688
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("_Machine", add1), binding("I", 0)]),
689
- uses([
690
- proof(
691
- goal(start(add1, 0)),
692
- by(fact("turing.pl", clause(16)))
693
- ),
694
- proof(
695
- goal(find(0, [], 1, [1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
696
- by(rule("turing.pl", clause(6))),
697
- bindings([binding("State", 0), binding("Left", []), binding("Cell", 1), binding("Right", [1, 1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1]), binding("B", 1), binding("C", [1, 1, 1, 1])]),
698
- uses([
699
- proof(
700
- goal(t([0, 1, 1, r], 0)),
701
- by(fact("turing.pl", clause(18)))
702
- ),
703
- proof(
704
- goal(move(r, [], 1, [1, 1, 1, 1, 1], [1], 1, [1, 1, 1, 1])),
705
- by(fact("turing.pl", clause(13))),
706
- bindings([binding("Left", []), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1, 1, 1])])
707
- ),
708
- proof(
709
- goal(continue(0, [1], 1, [1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
710
- by(rule("turing.pl", clause(8))),
711
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 1), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
712
- uses([
713
- proof(
714
- goal(find(0, [1], 1, [1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
715
- by(rule("turing.pl", clause(6))),
716
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 1), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1]), binding("B", 1), binding("C", [1, 1, 1])]),
717
- uses([
718
- proof(
719
- goal(t([0, 1, 1, r], 0)),
720
- by(fact("turing.pl", clause(18)))
721
- ),
722
- proof(
723
- goal(move(r, [1], 1, [1, 1, 1, 1], [1, 1], 1, [1, 1, 1])),
724
- by(fact("turing.pl", clause(13))),
725
- bindings([binding("Left", [1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1, 1])])
726
- ),
727
- proof(
728
- goal(continue(0, [1, 1], 1, [1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
729
- by(rule("turing.pl", clause(8))),
730
- bindings([binding("State", 0), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
731
- uses([
732
- proof(
733
- goal(find(0, [1, 1], 1, [1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
734
- by(rule("turing.pl", clause(6))),
735
- bindings([binding("State", 0), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1]), binding("B", 1), binding("C", [1, 1])]),
736
- uses([
737
- proof(
738
- goal(t([0, 1, 1, r], 0)),
739
- by(fact("turing.pl", clause(18)))
740
- ),
741
- proof(
742
- goal(move(r, [1, 1], 1, [1, 1, 1], [1, 1, 1], 1, [1, 1])),
743
- by(fact("turing.pl", clause(13))),
744
- bindings([binding("Left", [1, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1])])
745
- ),
746
- proof(
747
- goal(continue(0, [1, 1, 1], 1, [1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
748
- by(rule("turing.pl", clause(8))),
749
- bindings([binding("State", 0), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
750
- uses([
751
- proof(
752
- goal(find(0, [1, 1, 1], 1, [1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
753
- by(rule("turing.pl", clause(6))),
754
- bindings([binding("State", 0), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1]), binding("B", 1), binding("C", [1])]),
755
- uses([
756
- proof(
757
- goal(t([0, 1, 1, r], 0)),
758
- by(fact("turing.pl", clause(18)))
759
- ),
760
- proof(
761
- goal(move(r, [1, 1, 1], 1, [1, 1], [1, 1, 1, 1], 1, [1])),
762
- by(fact("turing.pl", clause(13))),
763
- bindings([binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1])])
764
- ),
765
- proof(
766
- goal(continue(0, [1, 1, 1, 1], 1, [1], [1, 0, 0, 0, 0, 0, 0, #])),
767
- by(rule("turing.pl", clause(8))),
768
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
769
- uses([
770
- proof(
771
- goal(find(0, [1, 1, 1, 1], 1, [1], [1, 0, 0, 0, 0, 0, 0, #])),
772
- by(rule("turing.pl", clause(6))),
773
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1, 1]), binding("B", 1), binding("C", [])]),
774
- uses([
775
- proof(
776
- goal(t([0, 1, 1, r], 0)),
777
- by(fact("turing.pl", clause(18)))
778
- ),
779
- proof(
780
- goal(move(r, [1, 1, 1, 1], 1, [1], [1, 1, 1, 1, 1], 1, [])),
781
- by(fact("turing.pl", clause(13))),
782
- bindings([binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [])])
783
- ),
784
- proof(
785
- goal(continue(0, [1, 1, 1, 1, 1], 1, [], [1, 0, 0, 0, 0, 0, 0, #])),
786
- by(rule("turing.pl", clause(8))),
787
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
788
- uses([
789
- proof(
790
- goal(find(0, [1, 1, 1, 1, 1], 1, [], [1, 0, 0, 0, 0, 0, 0, #])),
791
- by(rule("turing.pl", clause(6))),
792
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1, 1, 1]), binding("B", #), binding("C", [])]),
793
- uses([
794
- proof(
795
- goal(t([0, 1, 1, r], 0)),
796
- by(fact("turing.pl", clause(18)))
797
- ),
798
- proof(
799
- goal(move(r, [1, 1, 1, 1, 1], 1, [], [1, 1, 1, 1, 1, 1], #, [])),
800
- by(fact("turing.pl", clause(12))),
801
- bindings([binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1)])
802
- ),
803
- proof(
804
- goal(continue(0, [1, 1, 1, 1, 1, 1], #, [], [1, 0, 0, 0, 0, 0, 0, #])),
805
- by(rule("turing.pl", clause(8))),
806
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
807
- uses([
808
- proof(
809
- goal(find(0, [1, 1, 1, 1, 1, 1], #, [], [1, 0, 0, 0, 0, 0, 0, #])),
810
- by(rule("turing.pl", clause(6))),
811
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1, 1, 1]), binding("B", 1), binding("C", [#])]),
812
- uses([
813
- proof(
814
- goal(t([0, #, #, l], 1)),
815
- by(fact("turing.pl", clause(19)))
816
- ),
817
- proof(
818
- goal(move(l, [1, 1, 1, 1, 1, 1], #, [], [1, 1, 1, 1, 1], 1, [#])),
819
- by(fact("turing.pl", clause(10))),
820
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 1, 1]), binding("Cell", #), binding("Right", [])])
821
- ),
822
- proof(
823
- goal(continue(1, [1, 1, 1, 1, 1], 1, [#], [1, 0, 0, 0, 0, 0, 0, #])),
824
- by(rule("turing.pl", clause(8))),
825
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
826
- uses([
827
- proof(
828
- goal(find(1, [1, 1, 1, 1, 1], 1, [#], [1, 0, 0, 0, 0, 0, 0, #])),
829
- by(rule("turing.pl", clause(6))),
830
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1, 1]), binding("B", 1), binding("C", [0, #])]),
831
- uses([
832
- proof(
833
- goal(t([1, 1, 0, l], 1)),
834
- by(fact("turing.pl", clause(21)))
835
- ),
836
- proof(
837
- goal(move(l, [1, 1, 1, 1, 1], 0, [#], [1, 1, 1, 1], 1, [0, #])),
838
- by(fact("turing.pl", clause(10))),
839
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 1]), binding("Cell", 0), binding("Right", [#])])
840
- ),
841
- proof(
842
- goal(continue(1, [1, 1, 1, 1], 1, [0, #], [1, 0, 0, 0, 0, 0, 0, #])),
843
- by(rule("turing.pl", clause(8))),
844
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
845
- uses([
846
- proof(
847
- goal(find(1, [1, 1, 1, 1], 1, [0, #], [1, 0, 0, 0, 0, 0, 0, #])),
848
- by(rule("turing.pl", clause(6))),
849
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1]), binding("B", 1), binding("C", [0, 0, #])]),
850
- uses([
851
- proof(
852
- goal(t([1, 1, 0, l], 1)),
853
- by(fact("turing.pl", clause(21)))
854
- ),
855
- proof(
856
- goal(move(l, [1, 1, 1, 1], 0, [0, #], [1, 1, 1], 1, [0, 0, #])),
857
- by(fact("turing.pl", clause(10))),
858
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1]), binding("Cell", 0), binding("Right", [0, #])])
859
- ),
860
- proof(
861
- goal(continue(1, [1, 1, 1], 1, [0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
862
- by(rule("turing.pl", clause(8))),
863
- bindings([binding("State", 1), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
864
- uses([
865
- proof(
866
- goal(find(1, [1, 1, 1], 1, [0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
867
- by(rule("turing.pl", clause(6))),
868
- bindings([binding("State", 1), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1]), binding("B", 1), binding("C", [0, 0, 0, #])]),
869
- uses([
870
- proof(
871
- goal(t([1, 1, 0, l], 1)),
872
- by(fact("turing.pl", clause(21)))
873
- ),
874
- proof(
875
- goal(move(l, [1, 1, 1], 0, [0, 0, #], [1, 1], 1, [0, 0, 0, #])),
876
- by(fact("turing.pl", clause(10))),
877
- bindings([binding("Head", 1), binding("Tail", [1, 1]), binding("Cell", 0), binding("Right", [0, 0, #])])
878
- ),
879
- proof(
880
- goal(continue(1, [1, 1], 1, [0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
881
- by(rule("turing.pl", clause(8))),
882
- bindings([binding("State", 1), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
883
- uses([
884
- proof(
885
- goal(find(1, [1, 1], 1, [0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
886
- by(rule("turing.pl", clause(6))),
887
- bindings([binding("State", 1), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1]), binding("B", 1), binding("C", [0, 0, 0, 0, #])]),
888
- uses([
889
- proof(
890
- goal(t([1, 1, 0, l], 1)),
891
- by(fact("turing.pl", clause(21)))
892
- ),
893
- proof(
894
- goal(move(l, [1, 1], 0, [0, 0, 0, #], [1], 1, [0, 0, 0, 0, #])),
895
- by(fact("turing.pl", clause(10))),
896
- bindings([binding("Head", 1), binding("Tail", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, #])])
897
- ),
898
- proof(
899
- goal(continue(1, [1], 1, [0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
900
- by(rule("turing.pl", clause(8))),
901
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
902
- uses([
903
- proof(
904
- goal(find(1, [1], 1, [0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
905
- by(rule("turing.pl", clause(6))),
906
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", []), binding("B", 1), binding("C", [0, 0, 0, 0, 0, #])]),
907
- uses([
908
- proof(
909
- goal(t([1, 1, 0, l], 1)),
910
- by(fact("turing.pl", clause(21)))
911
- ),
912
- proof(
913
- goal(move(l, [1], 0, [0, 0, 0, 0, #], [], 1, [0, 0, 0, 0, 0, #])),
914
- by(fact("turing.pl", clause(10))),
915
- bindings([binding("Head", 1), binding("Tail", []), binding("Cell", 0), binding("Right", [0, 0, 0, 0, #])])
916
- ),
917
- proof(
918
- goal(continue(1, [], 1, [0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
919
- by(rule("turing.pl", clause(8))),
920
- bindings([binding("State", 1), binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
921
- uses([
922
- proof(
923
- goal(find(1, [], 1, [0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
924
- by(rule("turing.pl", clause(6))),
925
- bindings([binding("State", 1), binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", []), binding("B", #), binding("C", [0, 0, 0, 0, 0, 0, #])]),
926
- uses([
927
- proof(
928
- goal(t([1, 1, 0, l], 1)),
929
- by(fact("turing.pl", clause(21)))
930
- ),
931
- proof(
932
- goal(move(l, [], 0, [0, 0, 0, 0, 0, #], [], #, [0, 0, 0, 0, 0, 0, #])),
933
- by(fact("turing.pl", clause(9))),
934
- bindings([binding("Cell", 0), binding("Right", [0, 0, 0, 0, 0, #])])
935
- ),
936
- proof(
937
- goal(continue(1, [], #, [0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
938
- by(rule("turing.pl", clause(8))),
939
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [0, 0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
940
- uses([
941
- proof(
942
- goal(find(1, [], #, [0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
943
- by(rule("turing.pl", clause(6))),
944
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [0, 0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", []), binding("B", 1), binding("C", [0, 0, 0, 0, 0, 0, #])]),
945
- uses([
946
- proof(
947
- goal(t([1, #, 1, s], halt)),
948
- by(fact("turing.pl", clause(22)))
949
- ),
950
- proof(
951
- goal(move(s, [], 1, [0, 0, 0, 0, 0, 0, #], [], 1, [0, 0, 0, 0, 0, 0, #])),
952
- by(fact("turing.pl", clause(11))),
953
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, 0, #])])
954
- ),
955
- proof(
956
- goal(continue(halt, [], 1, [0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
957
- by(rule("turing.pl", clause(7))),
958
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("R", [])]),
959
- uses([
960
- proof(
961
- goal(rever([], [])),
962
- by(fact("turing.pl", clause(14)))
963
- ),
964
- proof(
965
- goal(append([], [1, 0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
966
- by(builtin(append, 3))
967
- )
968
- ])
969
- )
970
- ])
971
- )
972
- ])
973
- )
974
- ])
975
- )
976
- ])
977
- )
978
- ])
979
- )
980
- ])
981
- )
982
- ])
983
- )
984
- ])
985
- )
986
- ])
987
- )
988
- ])
989
- )
990
- ])
991
- )
992
- ])
993
- )
994
- ])
995
- )
996
- ])
997
- )
998
- ])
999
- )
1000
- ])
1001
- )
1002
- ])
1003
- )
1004
- ])
1005
- )
1006
- ])
1007
- )
1008
- ])
1009
- )
1010
- ])
1011
- )
1012
- ])
1013
- )
1014
- ])
1015
- )
1016
- ])
1017
- )
1018
- ])
1019
- )
1020
- ])
1021
- )
1022
- ])
1023
- )
1024
- ])
1025
- )
1026
- ])
1027
- )
1028
- ).
1029
-
1030
8
  output(case4, [1, #]).
1031
- why(
1032
- output(case4, [1, #]),
1033
- proof(
1034
- goal(output(case4, [1, #])),
1035
- by(rule("turing.pl", clause(28))),
1036
- bindings([binding("Case", case4), binding("OutTape", [1, #]), binding("InTape", [])]),
1037
- uses([
1038
- proof(
1039
- goal(case(case4, [])),
1040
- by(fact("turing.pl", clause(26)))
1041
- ),
1042
- proof(
1043
- goal(compute([], [1, #])),
1044
- by(rule("turing.pl", clause(4))),
1045
- bindings([binding("OutTape", [1, #]), binding("_Machine", add1), binding("I", 0)]),
1046
- uses([
1047
- proof(
1048
- goal(start(add1, 0)),
1049
- by(fact("turing.pl", clause(16)))
1050
- ),
1051
- proof(
1052
- goal(find(0, [], #, [], [1, #])),
1053
- by(rule("turing.pl", clause(6))),
1054
- bindings([binding("State", 0), binding("Left", []), binding("Cell", #), binding("Right", []), binding("OutTape", [1, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", []), binding("B", #), binding("C", [#])]),
1055
- uses([
1056
- proof(
1057
- goal(t([0, #, #, l], 1)),
1058
- by(fact("turing.pl", clause(19)))
1059
- ),
1060
- proof(
1061
- goal(move(l, [], #, [], [], #, [#])),
1062
- by(fact("turing.pl", clause(9))),
1063
- bindings([binding("Cell", #), binding("Right", [])])
1064
- ),
1065
- proof(
1066
- goal(continue(1, [], #, [#], [1, #])),
1067
- by(rule("turing.pl", clause(8))),
1068
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [#]), binding("OutTape", [1, #])]),
1069
- uses([
1070
- proof(
1071
- goal(find(1, [], #, [#], [1, #])),
1072
- by(rule("turing.pl", clause(6))),
1073
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [#]), binding("OutTape", [1, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", []), binding("B", 1), binding("C", [#])]),
1074
- uses([
1075
- proof(
1076
- goal(t([1, #, 1, s], halt)),
1077
- by(fact("turing.pl", clause(22)))
1078
- ),
1079
- proof(
1080
- goal(move(s, [], 1, [#], [], 1, [#])),
1081
- by(fact("turing.pl", clause(11))),
1082
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [#])])
1083
- ),
1084
- proof(
1085
- goal(continue(halt, [], 1, [#], [1, #])),
1086
- by(rule("turing.pl", clause(7))),
1087
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, #]), binding("R", [])]),
1088
- uses([
1089
- proof(
1090
- goal(rever([], [])),
1091
- by(fact("turing.pl", clause(14)))
1092
- ),
1093
- proof(
1094
- goal(append([], [1, #], [1, #])),
1095
- by(builtin(append, 3))
1096
- )
1097
- ])
1098
- )
1099
- ])
1100
- )
1101
- ])
1102
- )
1103
- ])
1104
- )
1105
- ])
1106
- )
1107
- ])
1108
- )
1109
- ).
1110
-
1111
9
  addsOne(case1, true).
1112
- why(
1113
- addsOne(case1, true),
1114
- proof(
1115
- goal(addsOne(case1, true)),
1116
- by(rule("turing.pl", clause(29))),
1117
- bindings([binding("Case", case1), binding("InTape", [1, 0, 1, 0, 0, 1]), binding("_OutTape", [1, 0, 1, 0, 1, 0, #])]),
1118
- uses([
1119
- proof(
1120
- goal(case(case1, [1, 0, 1, 0, 0, 1])),
1121
- by(fact("turing.pl", clause(23)))
1122
- ),
1123
- proof(
1124
- goal(compute([1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
1125
- by(rule("turing.pl", clause(5))),
1126
- bindings([binding("Head", 1), binding("Tail", [0, 1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("_Machine", add1), binding("I", 0)]),
1127
- uses([
1128
- proof(
1129
- goal(start(add1, 0)),
1130
- by(fact("turing.pl", clause(16)))
1131
- ),
1132
- proof(
1133
- goal(find(0, [], 1, [0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
1134
- by(rule("turing.pl", clause(6))),
1135
- bindings([binding("State", 0), binding("Left", []), binding("Cell", 1), binding("Right", [0, 1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1]), binding("B", 0), binding("C", [1, 0, 0, 1])]),
1136
- uses([
1137
- proof(
1138
- goal(t([0, 1, 1, r], 0)),
1139
- by(fact("turing.pl", clause(18)))
1140
- ),
1141
- proof(
1142
- goal(move(r, [], 1, [0, 1, 0, 0, 1], [1], 0, [1, 0, 0, 1])),
1143
- by(fact("turing.pl", clause(13))),
1144
- bindings([binding("Left", []), binding("Cell", 1), binding("Head", 0), binding("Tail", [1, 0, 0, 1])])
1145
- ),
1146
- proof(
1147
- goal(continue(0, [1], 0, [1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
1148
- by(rule("turing.pl", clause(8))),
1149
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1150
- uses([
1151
- proof(
1152
- goal(find(0, [1], 0, [1, 0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
1153
- by(rule("turing.pl", clause(6))),
1154
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 1]), binding("B", 1), binding("C", [0, 0, 1])]),
1155
- uses([
1156
- proof(
1157
- goal(t([0, 0, 0, r], 0)),
1158
- by(fact("turing.pl", clause(17)))
1159
- ),
1160
- proof(
1161
- goal(move(r, [1], 0, [1, 0, 0, 1], [0, 1], 1, [0, 0, 1])),
1162
- by(fact("turing.pl", clause(13))),
1163
- bindings([binding("Left", [1]), binding("Cell", 0), binding("Head", 1), binding("Tail", [0, 0, 1])])
1164
- ),
1165
- proof(
1166
- goal(continue(0, [0, 1], 1, [0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
1167
- by(rule("turing.pl", clause(8))),
1168
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1169
- uses([
1170
- proof(
1171
- goal(find(0, [0, 1], 1, [0, 0, 1], [1, 0, 1, 0, 1, 0, #])),
1172
- by(rule("turing.pl", clause(6))),
1173
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 0, 1]), binding("B", 0), binding("C", [0, 1])]),
1174
- uses([
1175
- proof(
1176
- goal(t([0, 1, 1, r], 0)),
1177
- by(fact("turing.pl", clause(18)))
1178
- ),
1179
- proof(
1180
- goal(move(r, [0, 1], 1, [0, 0, 1], [1, 0, 1], 0, [0, 1])),
1181
- by(fact("turing.pl", clause(13))),
1182
- bindings([binding("Left", [0, 1]), binding("Cell", 1), binding("Head", 0), binding("Tail", [0, 1])])
1183
- ),
1184
- proof(
1185
- goal(continue(0, [1, 0, 1], 0, [0, 1], [1, 0, 1, 0, 1, 0, #])),
1186
- by(rule("turing.pl", clause(8))),
1187
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 0), binding("Right", [0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1188
- uses([
1189
- proof(
1190
- goal(find(0, [1, 0, 1], 0, [0, 1], [1, 0, 1, 0, 1, 0, #])),
1191
- by(rule("turing.pl", clause(6))),
1192
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 0), binding("Right", [0, 1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 1, 0, 1]), binding("B", 0), binding("C", [1])]),
1193
- uses([
1194
- proof(
1195
- goal(t([0, 0, 0, r], 0)),
1196
- by(fact("turing.pl", clause(17)))
1197
- ),
1198
- proof(
1199
- goal(move(r, [1, 0, 1], 0, [0, 1], [0, 1, 0, 1], 0, [1])),
1200
- by(fact("turing.pl", clause(13))),
1201
- bindings([binding("Left", [1, 0, 1]), binding("Cell", 0), binding("Head", 0), binding("Tail", [1])])
1202
- ),
1203
- proof(
1204
- goal(continue(0, [0, 1, 0, 1], 0, [1], [1, 0, 1, 0, 1, 0, #])),
1205
- by(rule("turing.pl", clause(8))),
1206
- bindings([binding("State", 0), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1207
- uses([
1208
- proof(
1209
- goal(find(0, [0, 1, 0, 1], 0, [1], [1, 0, 1, 0, 1, 0, #])),
1210
- by(rule("turing.pl", clause(6))),
1211
- bindings([binding("State", 0), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [1]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 0, 1, 0, 1]), binding("B", 1), binding("C", [])]),
1212
- uses([
1213
- proof(
1214
- goal(t([0, 0, 0, r], 0)),
1215
- by(fact("turing.pl", clause(17)))
1216
- ),
1217
- proof(
1218
- goal(move(r, [0, 1, 0, 1], 0, [1], [0, 0, 1, 0, 1], 1, [])),
1219
- by(fact("turing.pl", clause(13))),
1220
- bindings([binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Head", 1), binding("Tail", [])])
1221
- ),
1222
- proof(
1223
- goal(continue(0, [0, 0, 1, 0, 1], 1, [], [1, 0, 1, 0, 1, 0, #])),
1224
- by(rule("turing.pl", clause(8))),
1225
- bindings([binding("State", 0), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1226
- uses([
1227
- proof(
1228
- goal(find(0, [0, 0, 1, 0, 1], 1, [], [1, 0, 1, 0, 1, 0, #])),
1229
- by(rule("turing.pl", clause(6))),
1230
- bindings([binding("State", 0), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 0, 0, 1, 0, 1]), binding("B", #), binding("C", [])]),
1231
- uses([
1232
- proof(
1233
- goal(t([0, 1, 1, r], 0)),
1234
- by(fact("turing.pl", clause(18)))
1235
- ),
1236
- proof(
1237
- goal(move(r, [0, 0, 1, 0, 1], 1, [], [1, 0, 0, 1, 0, 1], #, [])),
1238
- by(fact("turing.pl", clause(12))),
1239
- bindings([binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1)])
1240
- ),
1241
- proof(
1242
- goal(continue(0, [1, 0, 0, 1, 0, 1], #, [], [1, 0, 1, 0, 1, 0, #])),
1243
- by(rule("turing.pl", clause(8))),
1244
- bindings([binding("State", 0), binding("Left", [1, 0, 0, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1245
- uses([
1246
- proof(
1247
- goal(find(0, [1, 0, 0, 1, 0, 1], #, [], [1, 0, 1, 0, 1, 0, #])),
1248
- by(rule("turing.pl", clause(6))),
1249
- bindings([binding("State", 0), binding("Left", [1, 0, 0, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", [0, 0, 1, 0, 1]), binding("B", 1), binding("C", [#])]),
1250
- uses([
1251
- proof(
1252
- goal(t([0, #, #, l], 1)),
1253
- by(fact("turing.pl", clause(19)))
1254
- ),
1255
- proof(
1256
- goal(move(l, [1, 0, 0, 1, 0, 1], #, [], [0, 0, 1, 0, 1], 1, [#])),
1257
- by(fact("turing.pl", clause(10))),
1258
- bindings([binding("Head", 1), binding("Tail", [0, 0, 1, 0, 1]), binding("Cell", #), binding("Right", [])])
1259
- ),
1260
- proof(
1261
- goal(continue(1, [0, 0, 1, 0, 1], 1, [#], [1, 0, 1, 0, 1, 0, #])),
1262
- by(rule("turing.pl", clause(8))),
1263
- bindings([binding("State", 1), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1264
- uses([
1265
- proof(
1266
- goal(find(1, [0, 0, 1, 0, 1], 1, [#], [1, 0, 1, 0, 1, 0, #])),
1267
- by(rule("turing.pl", clause(6))),
1268
- bindings([binding("State", 1), binding("Left", [0, 0, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [0, 1, 0, 1]), binding("B", 0), binding("C", [0, #])]),
1269
- uses([
1270
- proof(
1271
- goal(t([1, 1, 0, l], 1)),
1272
- by(fact("turing.pl", clause(21)))
1273
- ),
1274
- proof(
1275
- goal(move(l, [0, 0, 1, 0, 1], 0, [#], [0, 1, 0, 1], 0, [0, #])),
1276
- by(fact("turing.pl", clause(10))),
1277
- bindings([binding("Head", 0), binding("Tail", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [#])])
1278
- ),
1279
- proof(
1280
- goal(continue(1, [0, 1, 0, 1], 0, [0, #], [1, 0, 1, 0, 1, 0, #])),
1281
- by(rule("turing.pl", clause(8))),
1282
- bindings([binding("State", 1), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [0, #]), binding("OutTape", [1, 0, 1, 0, 1, 0, #])]),
1283
- uses([
1284
- proof(
1285
- goal(find(1, [0, 1, 0, 1], 0, [0, #], [1, 0, 1, 0, 1, 0, #])),
1286
- by(rule("turing.pl", clause(6))),
1287
- bindings([binding("State", 1), binding("Left", [0, 1, 0, 1]), binding("Cell", 0), binding("Right", [0, #]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", [0, 1, 0, 1]), binding("B", 1), binding("C", [0, #])]),
1288
- uses([
1289
- proof(
1290
- goal(t([1, 0, 1, s], halt)),
1291
- by(fact("turing.pl", clause(20)))
1292
- ),
1293
- proof(
1294
- goal(move(s, [0, 1, 0, 1], 1, [0, #], [0, 1, 0, 1], 1, [0, #])),
1295
- by(fact("turing.pl", clause(11))),
1296
- bindings([binding("Left", [0, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #])])
1297
- ),
1298
- proof(
1299
- goal(continue(halt, [0, 1, 0, 1], 1, [0, #], [1, 0, 1, 0, 1, 0, #])),
1300
- by(rule("turing.pl", clause(7))),
1301
- bindings([binding("Left", [0, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 0, 1, 0, 1, 0, #]), binding("R", [1, 0, 1, 0])]),
1302
- uses([
1303
- proof(
1304
- goal(rever([0, 1, 0, 1], [1, 0, 1, 0])),
1305
- by(rule("turing.pl", clause(15))),
1306
- bindings([binding("A", 0), binding("B", [1, 0, 1]), binding("C", [1, 0, 1, 0]), binding("D", [1, 0, 1])]),
1307
- uses([
1308
- proof(
1309
- goal(rever([1, 0, 1], [1, 0, 1])),
1310
- by(rule("turing.pl", clause(15))),
1311
- bindings([binding("A", 1), binding("B", [0, 1]), binding("C", [1, 0, 1]), binding("D", [1, 0])]),
1312
- uses([
1313
- proof(
1314
- goal(rever([0, 1], [1, 0])),
1315
- by(rule("turing.pl", clause(15))),
1316
- bindings([binding("A", 0), binding("B", [1]), binding("C", [1, 0]), binding("D", [1])]),
1317
- uses([
1318
- proof(
1319
- goal(rever([1], [1])),
1320
- by(rule("turing.pl", clause(15))),
1321
- bindings([binding("A", 1), binding("B", []), binding("C", [1]), binding("D", [])]),
1322
- uses([
1323
- proof(
1324
- goal(rever([], [])),
1325
- by(fact("turing.pl", clause(14)))
1326
- ),
1327
- proof(
1328
- goal(append([], [1], [1])),
1329
- by(builtin(append, 3))
1330
- )
1331
- ])
1332
- ),
1333
- proof(
1334
- goal(append([1], [0], [1, 0])),
1335
- by(builtin(append, 3))
1336
- )
1337
- ])
1338
- ),
1339
- proof(
1340
- goal(append([1, 0], [1], [1, 0, 1])),
1341
- by(builtin(append, 3))
1342
- )
1343
- ])
1344
- ),
1345
- proof(
1346
- goal(append([1, 0, 1], [0], [1, 0, 1, 0])),
1347
- by(builtin(append, 3))
1348
- )
1349
- ])
1350
- ),
1351
- proof(
1352
- goal(append([1, 0, 1, 0], [1, 0, #], [1, 0, 1, 0, 1, 0, #])),
1353
- by(builtin(append, 3))
1354
- )
1355
- ])
1356
- )
1357
- ])
1358
- )
1359
- ])
1360
- )
1361
- ])
1362
- )
1363
- ])
1364
- )
1365
- ])
1366
- )
1367
- ])
1368
- )
1369
- ])
1370
- )
1371
- ])
1372
- )
1373
- ])
1374
- )
1375
- ])
1376
- )
1377
- ])
1378
- )
1379
- ])
1380
- )
1381
- ])
1382
- )
1383
- ])
1384
- )
1385
- ])
1386
- )
1387
- ])
1388
- )
1389
- ])
1390
- )
1391
- ])
1392
- )
1393
- ])
1394
- )
1395
- ).
1396
-
1397
10
  addsOne(case2, true).
1398
- why(
1399
- addsOne(case2, true),
1400
- proof(
1401
- goal(addsOne(case2, true)),
1402
- by(rule("turing.pl", clause(29))),
1403
- bindings([binding("Case", case2), binding("InTape", [1, 0, 1, 1, 1, 1]), binding("_OutTape", [1, 1, 0, 0, 0, 0, #])]),
1404
- uses([
1405
- proof(
1406
- goal(case(case2, [1, 0, 1, 1, 1, 1])),
1407
- by(fact("turing.pl", clause(24)))
1408
- ),
1409
- proof(
1410
- goal(compute([1, 0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
1411
- by(rule("turing.pl", clause(5))),
1412
- bindings([binding("Head", 1), binding("Tail", [0, 1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("_Machine", add1), binding("I", 0)]),
1413
- uses([
1414
- proof(
1415
- goal(start(add1, 0)),
1416
- by(fact("turing.pl", clause(16)))
1417
- ),
1418
- proof(
1419
- goal(find(0, [], 1, [0, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
1420
- by(rule("turing.pl", clause(6))),
1421
- bindings([binding("State", 0), binding("Left", []), binding("Cell", 1), binding("Right", [0, 1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1]), binding("B", 0), binding("C", [1, 1, 1, 1])]),
1422
- uses([
1423
- proof(
1424
- goal(t([0, 1, 1, r], 0)),
1425
- by(fact("turing.pl", clause(18)))
1426
- ),
1427
- proof(
1428
- goal(move(r, [], 1, [0, 1, 1, 1, 1], [1], 0, [1, 1, 1, 1])),
1429
- by(fact("turing.pl", clause(13))),
1430
- bindings([binding("Left", []), binding("Cell", 1), binding("Head", 0), binding("Tail", [1, 1, 1, 1])])
1431
- ),
1432
- proof(
1433
- goal(continue(0, [1], 0, [1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
1434
- by(rule("turing.pl", clause(8))),
1435
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1436
- uses([
1437
- proof(
1438
- goal(find(0, [1], 0, [1, 1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
1439
- by(rule("turing.pl", clause(6))),
1440
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 0), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", r), binding("Next", 0), binding("A", [0, 1]), binding("B", 1), binding("C", [1, 1, 1])]),
1441
- uses([
1442
- proof(
1443
- goal(t([0, 0, 0, r], 0)),
1444
- by(fact("turing.pl", clause(17)))
1445
- ),
1446
- proof(
1447
- goal(move(r, [1], 0, [1, 1, 1, 1], [0, 1], 1, [1, 1, 1])),
1448
- by(fact("turing.pl", clause(13))),
1449
- bindings([binding("Left", [1]), binding("Cell", 0), binding("Head", 1), binding("Tail", [1, 1, 1])])
1450
- ),
1451
- proof(
1452
- goal(continue(0, [0, 1], 1, [1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
1453
- by(rule("turing.pl", clause(8))),
1454
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1455
- uses([
1456
- proof(
1457
- goal(find(0, [0, 1], 1, [1, 1, 1], [1, 1, 0, 0, 0, 0, #])),
1458
- by(rule("turing.pl", clause(6))),
1459
- bindings([binding("State", 0), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 0, 1]), binding("B", 1), binding("C", [1, 1])]),
1460
- uses([
1461
- proof(
1462
- goal(t([0, 1, 1, r], 0)),
1463
- by(fact("turing.pl", clause(18)))
1464
- ),
1465
- proof(
1466
- goal(move(r, [0, 1], 1, [1, 1, 1], [1, 0, 1], 1, [1, 1])),
1467
- by(fact("turing.pl", clause(13))),
1468
- bindings([binding("Left", [0, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1])])
1469
- ),
1470
- proof(
1471
- goal(continue(0, [1, 0, 1], 1, [1, 1], [1, 1, 0, 0, 0, 0, #])),
1472
- by(rule("turing.pl", clause(8))),
1473
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1474
- uses([
1475
- proof(
1476
- goal(find(0, [1, 0, 1], 1, [1, 1], [1, 1, 0, 0, 0, 0, #])),
1477
- by(rule("turing.pl", clause(6))),
1478
- bindings([binding("State", 0), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 0, 1]), binding("B", 1), binding("C", [1])]),
1479
- uses([
1480
- proof(
1481
- goal(t([0, 1, 1, r], 0)),
1482
- by(fact("turing.pl", clause(18)))
1483
- ),
1484
- proof(
1485
- goal(move(r, [1, 0, 1], 1, [1, 1], [1, 1, 0, 1], 1, [1])),
1486
- by(fact("turing.pl", clause(13))),
1487
- bindings([binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1])])
1488
- ),
1489
- proof(
1490
- goal(continue(0, [1, 1, 0, 1], 1, [1], [1, 1, 0, 0, 0, 0, #])),
1491
- by(rule("turing.pl", clause(8))),
1492
- bindings([binding("State", 0), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1493
- uses([
1494
- proof(
1495
- goal(find(0, [1, 1, 0, 1], 1, [1], [1, 1, 0, 0, 0, 0, #])),
1496
- by(rule("turing.pl", clause(6))),
1497
- bindings([binding("State", 0), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 0, 1]), binding("B", 1), binding("C", [])]),
1498
- uses([
1499
- proof(
1500
- goal(t([0, 1, 1, r], 0)),
1501
- by(fact("turing.pl", clause(18)))
1502
- ),
1503
- proof(
1504
- goal(move(r, [1, 1, 0, 1], 1, [1], [1, 1, 1, 0, 1], 1, [])),
1505
- by(fact("turing.pl", clause(13))),
1506
- bindings([binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [])])
1507
- ),
1508
- proof(
1509
- goal(continue(0, [1, 1, 1, 0, 1], 1, [], [1, 1, 0, 0, 0, 0, #])),
1510
- by(rule("turing.pl", clause(8))),
1511
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1512
- uses([
1513
- proof(
1514
- goal(find(0, [1, 1, 1, 0, 1], 1, [], [1, 1, 0, 0, 0, 0, #])),
1515
- by(rule("turing.pl", clause(6))),
1516
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1, 0, 1]), binding("B", #), binding("C", [])]),
1517
- uses([
1518
- proof(
1519
- goal(t([0, 1, 1, r], 0)),
1520
- by(fact("turing.pl", clause(18)))
1521
- ),
1522
- proof(
1523
- goal(move(r, [1, 1, 1, 0, 1], 1, [], [1, 1, 1, 1, 0, 1], #, [])),
1524
- by(fact("turing.pl", clause(12))),
1525
- bindings([binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1)])
1526
- ),
1527
- proof(
1528
- goal(continue(0, [1, 1, 1, 1, 0, 1], #, [], [1, 1, 0, 0, 0, 0, #])),
1529
- by(rule("turing.pl", clause(8))),
1530
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1531
- uses([
1532
- proof(
1533
- goal(find(0, [1, 1, 1, 1, 0, 1], #, [], [1, 1, 0, 0, 0, 0, #])),
1534
- by(rule("turing.pl", clause(6))),
1535
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 0, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1, 0, 1]), binding("B", 1), binding("C", [#])]),
1536
- uses([
1537
- proof(
1538
- goal(t([0, #, #, l], 1)),
1539
- by(fact("turing.pl", clause(19)))
1540
- ),
1541
- proof(
1542
- goal(move(l, [1, 1, 1, 1, 0, 1], #, [], [1, 1, 1, 0, 1], 1, [#])),
1543
- by(fact("turing.pl", clause(10))),
1544
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 0, 1]), binding("Cell", #), binding("Right", [])])
1545
- ),
1546
- proof(
1547
- goal(continue(1, [1, 1, 1, 0, 1], 1, [#], [1, 1, 0, 0, 0, 0, #])),
1548
- by(rule("turing.pl", clause(8))),
1549
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1550
- uses([
1551
- proof(
1552
- goal(find(1, [1, 1, 1, 0, 1], 1, [#], [1, 1, 0, 0, 0, 0, #])),
1553
- by(rule("turing.pl", clause(6))),
1554
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 0, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 0, 1]), binding("B", 1), binding("C", [0, #])]),
1555
- uses([
1556
- proof(
1557
- goal(t([1, 1, 0, l], 1)),
1558
- by(fact("turing.pl", clause(21)))
1559
- ),
1560
- proof(
1561
- goal(move(l, [1, 1, 1, 0, 1], 0, [#], [1, 1, 0, 1], 1, [0, #])),
1562
- by(fact("turing.pl", clause(10))),
1563
- bindings([binding("Head", 1), binding("Tail", [1, 1, 0, 1]), binding("Cell", 0), binding("Right", [#])])
1564
- ),
1565
- proof(
1566
- goal(continue(1, [1, 1, 0, 1], 1, [0, #], [1, 1, 0, 0, 0, 0, #])),
1567
- by(rule("turing.pl", clause(8))),
1568
- bindings([binding("State", 1), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1569
- uses([
1570
- proof(
1571
- goal(find(1, [1, 1, 0, 1], 1, [0, #], [1, 1, 0, 0, 0, 0, #])),
1572
- by(rule("turing.pl", clause(6))),
1573
- bindings([binding("State", 1), binding("Left", [1, 1, 0, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 0, 1]), binding("B", 1), binding("C", [0, 0, #])]),
1574
- uses([
1575
- proof(
1576
- goal(t([1, 1, 0, l], 1)),
1577
- by(fact("turing.pl", clause(21)))
1578
- ),
1579
- proof(
1580
- goal(move(l, [1, 1, 0, 1], 0, [0, #], [1, 0, 1], 1, [0, 0, #])),
1581
- by(fact("turing.pl", clause(10))),
1582
- bindings([binding("Head", 1), binding("Tail", [1, 0, 1]), binding("Cell", 0), binding("Right", [0, #])])
1583
- ),
1584
- proof(
1585
- goal(continue(1, [1, 0, 1], 1, [0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1586
- by(rule("turing.pl", clause(8))),
1587
- bindings([binding("State", 1), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1588
- uses([
1589
- proof(
1590
- goal(find(1, [1, 0, 1], 1, [0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1591
- by(rule("turing.pl", clause(6))),
1592
- bindings([binding("State", 1), binding("Left", [1, 0, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [0, 1]), binding("B", 1), binding("C", [0, 0, 0, #])]),
1593
- uses([
1594
- proof(
1595
- goal(t([1, 1, 0, l], 1)),
1596
- by(fact("turing.pl", clause(21)))
1597
- ),
1598
- proof(
1599
- goal(move(l, [1, 0, 1], 0, [0, 0, #], [0, 1], 1, [0, 0, 0, #])),
1600
- by(fact("turing.pl", clause(10))),
1601
- bindings([binding("Head", 1), binding("Tail", [0, 1]), binding("Cell", 0), binding("Right", [0, 0, #])])
1602
- ),
1603
- proof(
1604
- goal(continue(1, [0, 1], 1, [0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1605
- by(rule("turing.pl", clause(8))),
1606
- bindings([binding("State", 1), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1607
- uses([
1608
- proof(
1609
- goal(find(1, [0, 1], 1, [0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1610
- by(rule("turing.pl", clause(6))),
1611
- bindings([binding("State", 1), binding("Left", [0, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1]), binding("B", 0), binding("C", [0, 0, 0, 0, #])]),
1612
- uses([
1613
- proof(
1614
- goal(t([1, 1, 0, l], 1)),
1615
- by(fact("turing.pl", clause(21)))
1616
- ),
1617
- proof(
1618
- goal(move(l, [0, 1], 0, [0, 0, 0, #], [1], 0, [0, 0, 0, 0, #])),
1619
- by(fact("turing.pl", clause(10))),
1620
- bindings([binding("Head", 0), binding("Tail", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, #])])
1621
- ),
1622
- proof(
1623
- goal(continue(1, [1], 0, [0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1624
- by(rule("turing.pl", clause(8))),
1625
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #])]),
1626
- uses([
1627
- proof(
1628
- goal(find(1, [1], 0, [0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1629
- by(rule("turing.pl", clause(6))),
1630
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", [1]), binding("B", 1), binding("C", [0, 0, 0, 0, #])]),
1631
- uses([
1632
- proof(
1633
- goal(t([1, 0, 1, s], halt)),
1634
- by(fact("turing.pl", clause(20)))
1635
- ),
1636
- proof(
1637
- goal(move(s, [1], 1, [0, 0, 0, 0, #], [1], 1, [0, 0, 0, 0, #])),
1638
- by(fact("turing.pl", clause(11))),
1639
- bindings([binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #])])
1640
- ),
1641
- proof(
1642
- goal(continue(halt, [1], 1, [0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1643
- by(rule("turing.pl", clause(7))),
1644
- bindings([binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 1, 0, 0, 0, 0, #]), binding("R", [1])]),
1645
- uses([
1646
- proof(
1647
- goal(rever([1], [1])),
1648
- by(rule("turing.pl", clause(15))),
1649
- bindings([binding("A", 1), binding("B", []), binding("C", [1]), binding("D", [])]),
1650
- uses([
1651
- proof(
1652
- goal(rever([], [])),
1653
- by(fact("turing.pl", clause(14)))
1654
- ),
1655
- proof(
1656
- goal(append([], [1], [1])),
1657
- by(builtin(append, 3))
1658
- )
1659
- ])
1660
- ),
1661
- proof(
1662
- goal(append([1], [1, 0, 0, 0, 0, #], [1, 1, 0, 0, 0, 0, #])),
1663
- by(builtin(append, 3))
1664
- )
1665
- ])
1666
- )
1667
- ])
1668
- )
1669
- ])
1670
- )
1671
- ])
1672
- )
1673
- ])
1674
- )
1675
- ])
1676
- )
1677
- ])
1678
- )
1679
- ])
1680
- )
1681
- ])
1682
- )
1683
- ])
1684
- )
1685
- ])
1686
- )
1687
- ])
1688
- )
1689
- ])
1690
- )
1691
- ])
1692
- )
1693
- ])
1694
- )
1695
- ])
1696
- )
1697
- ])
1698
- )
1699
- ])
1700
- )
1701
- ])
1702
- )
1703
- ])
1704
- )
1705
- ])
1706
- )
1707
- ])
1708
- )
1709
- ])
1710
- )
1711
- ])
1712
- )
1713
- ])
1714
- )
1715
- ])
1716
- )
1717
- ).
1718
-
1719
11
  addsOne(case3, true).
1720
- why(
1721
- addsOne(case3, true),
1722
- proof(
1723
- goal(addsOne(case3, true)),
1724
- by(rule("turing.pl", clause(29))),
1725
- bindings([binding("Case", case3), binding("InTape", [1, 1, 1, 1, 1, 1]), binding("_OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1726
- uses([
1727
- proof(
1728
- goal(case(case3, [1, 1, 1, 1, 1, 1])),
1729
- by(fact("turing.pl", clause(25)))
1730
- ),
1731
- proof(
1732
- goal(compute([1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1733
- by(rule("turing.pl", clause(5))),
1734
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("_Machine", add1), binding("I", 0)]),
1735
- uses([
1736
- proof(
1737
- goal(start(add1, 0)),
1738
- by(fact("turing.pl", clause(16)))
1739
- ),
1740
- proof(
1741
- goal(find(0, [], 1, [1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1742
- by(rule("turing.pl", clause(6))),
1743
- bindings([binding("State", 0), binding("Left", []), binding("Cell", 1), binding("Right", [1, 1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1]), binding("B", 1), binding("C", [1, 1, 1, 1])]),
1744
- uses([
1745
- proof(
1746
- goal(t([0, 1, 1, r], 0)),
1747
- by(fact("turing.pl", clause(18)))
1748
- ),
1749
- proof(
1750
- goal(move(r, [], 1, [1, 1, 1, 1, 1], [1], 1, [1, 1, 1, 1])),
1751
- by(fact("turing.pl", clause(13))),
1752
- bindings([binding("Left", []), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1, 1, 1])])
1753
- ),
1754
- proof(
1755
- goal(continue(0, [1], 1, [1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1756
- by(rule("turing.pl", clause(8))),
1757
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 1), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1758
- uses([
1759
- proof(
1760
- goal(find(0, [1], 1, [1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1761
- by(rule("turing.pl", clause(6))),
1762
- bindings([binding("State", 0), binding("Left", [1]), binding("Cell", 1), binding("Right", [1, 1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1]), binding("B", 1), binding("C", [1, 1, 1])]),
1763
- uses([
1764
- proof(
1765
- goal(t([0, 1, 1, r], 0)),
1766
- by(fact("turing.pl", clause(18)))
1767
- ),
1768
- proof(
1769
- goal(move(r, [1], 1, [1, 1, 1, 1], [1, 1], 1, [1, 1, 1])),
1770
- by(fact("turing.pl", clause(13))),
1771
- bindings([binding("Left", [1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1, 1])])
1772
- ),
1773
- proof(
1774
- goal(continue(0, [1, 1], 1, [1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1775
- by(rule("turing.pl", clause(8))),
1776
- bindings([binding("State", 0), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1777
- uses([
1778
- proof(
1779
- goal(find(0, [1, 1], 1, [1, 1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1780
- by(rule("turing.pl", clause(6))),
1781
- bindings([binding("State", 0), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [1, 1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1]), binding("B", 1), binding("C", [1, 1])]),
1782
- uses([
1783
- proof(
1784
- goal(t([0, 1, 1, r], 0)),
1785
- by(fact("turing.pl", clause(18)))
1786
- ),
1787
- proof(
1788
- goal(move(r, [1, 1], 1, [1, 1, 1], [1, 1, 1], 1, [1, 1])),
1789
- by(fact("turing.pl", clause(13))),
1790
- bindings([binding("Left", [1, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1, 1])])
1791
- ),
1792
- proof(
1793
- goal(continue(0, [1, 1, 1], 1, [1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1794
- by(rule("turing.pl", clause(8))),
1795
- bindings([binding("State", 0), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1796
- uses([
1797
- proof(
1798
- goal(find(0, [1, 1, 1], 1, [1, 1], [1, 0, 0, 0, 0, 0, 0, #])),
1799
- by(rule("turing.pl", clause(6))),
1800
- bindings([binding("State", 0), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [1, 1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1]), binding("B", 1), binding("C", [1])]),
1801
- uses([
1802
- proof(
1803
- goal(t([0, 1, 1, r], 0)),
1804
- by(fact("turing.pl", clause(18)))
1805
- ),
1806
- proof(
1807
- goal(move(r, [1, 1, 1], 1, [1, 1], [1, 1, 1, 1], 1, [1])),
1808
- by(fact("turing.pl", clause(13))),
1809
- bindings([binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [1])])
1810
- ),
1811
- proof(
1812
- goal(continue(0, [1, 1, 1, 1], 1, [1], [1, 0, 0, 0, 0, 0, 0, #])),
1813
- by(rule("turing.pl", clause(8))),
1814
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1815
- uses([
1816
- proof(
1817
- goal(find(0, [1, 1, 1, 1], 1, [1], [1, 0, 0, 0, 0, 0, 0, #])),
1818
- by(rule("turing.pl", clause(6))),
1819
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [1]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1, 1]), binding("B", 1), binding("C", [])]),
1820
- uses([
1821
- proof(
1822
- goal(t([0, 1, 1, r], 0)),
1823
- by(fact("turing.pl", clause(18)))
1824
- ),
1825
- proof(
1826
- goal(move(r, [1, 1, 1, 1], 1, [1], [1, 1, 1, 1, 1], 1, [])),
1827
- by(fact("turing.pl", clause(13))),
1828
- bindings([binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Head", 1), binding("Tail", [])])
1829
- ),
1830
- proof(
1831
- goal(continue(0, [1, 1, 1, 1, 1], 1, [], [1, 0, 0, 0, 0, 0, 0, #])),
1832
- by(rule("turing.pl", clause(8))),
1833
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1834
- uses([
1835
- proof(
1836
- goal(find(0, [1, 1, 1, 1, 1], 1, [], [1, 0, 0, 0, 0, 0, 0, #])),
1837
- by(rule("turing.pl", clause(6))),
1838
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", r), binding("Next", 0), binding("A", [1, 1, 1, 1, 1, 1]), binding("B", #), binding("C", [])]),
1839
- uses([
1840
- proof(
1841
- goal(t([0, 1, 1, r], 0)),
1842
- by(fact("turing.pl", clause(18)))
1843
- ),
1844
- proof(
1845
- goal(move(r, [1, 1, 1, 1, 1], 1, [], [1, 1, 1, 1, 1, 1], #, [])),
1846
- by(fact("turing.pl", clause(12))),
1847
- bindings([binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1)])
1848
- ),
1849
- proof(
1850
- goal(continue(0, [1, 1, 1, 1, 1, 1], #, [], [1, 0, 0, 0, 0, 0, 0, #])),
1851
- by(rule("turing.pl", clause(8))),
1852
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1853
- uses([
1854
- proof(
1855
- goal(find(0, [1, 1, 1, 1, 1, 1], #, [], [1, 0, 0, 0, 0, 0, 0, #])),
1856
- by(rule("turing.pl", clause(6))),
1857
- bindings([binding("State", 0), binding("Left", [1, 1, 1, 1, 1, 1]), binding("Cell", #), binding("Right", []), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1, 1, 1]), binding("B", 1), binding("C", [#])]),
1858
- uses([
1859
- proof(
1860
- goal(t([0, #, #, l], 1)),
1861
- by(fact("turing.pl", clause(19)))
1862
- ),
1863
- proof(
1864
- goal(move(l, [1, 1, 1, 1, 1, 1], #, [], [1, 1, 1, 1, 1], 1, [#])),
1865
- by(fact("turing.pl", clause(10))),
1866
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 1, 1]), binding("Cell", #), binding("Right", [])])
1867
- ),
1868
- proof(
1869
- goal(continue(1, [1, 1, 1, 1, 1], 1, [#], [1, 0, 0, 0, 0, 0, 0, #])),
1870
- by(rule("turing.pl", clause(8))),
1871
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1872
- uses([
1873
- proof(
1874
- goal(find(1, [1, 1, 1, 1, 1], 1, [#], [1, 0, 0, 0, 0, 0, 0, #])),
1875
- by(rule("turing.pl", clause(6))),
1876
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1, 1]), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1, 1]), binding("B", 1), binding("C", [0, #])]),
1877
- uses([
1878
- proof(
1879
- goal(t([1, 1, 0, l], 1)),
1880
- by(fact("turing.pl", clause(21)))
1881
- ),
1882
- proof(
1883
- goal(move(l, [1, 1, 1, 1, 1], 0, [#], [1, 1, 1, 1], 1, [0, #])),
1884
- by(fact("turing.pl", clause(10))),
1885
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1, 1]), binding("Cell", 0), binding("Right", [#])])
1886
- ),
1887
- proof(
1888
- goal(continue(1, [1, 1, 1, 1], 1, [0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1889
- by(rule("turing.pl", clause(8))),
1890
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1891
- uses([
1892
- proof(
1893
- goal(find(1, [1, 1, 1, 1], 1, [0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1894
- by(rule("turing.pl", clause(6))),
1895
- bindings([binding("State", 1), binding("Left", [1, 1, 1, 1]), binding("Cell", 1), binding("Right", [0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1, 1]), binding("B", 1), binding("C", [0, 0, #])]),
1896
- uses([
1897
- proof(
1898
- goal(t([1, 1, 0, l], 1)),
1899
- by(fact("turing.pl", clause(21)))
1900
- ),
1901
- proof(
1902
- goal(move(l, [1, 1, 1, 1], 0, [0, #], [1, 1, 1], 1, [0, 0, #])),
1903
- by(fact("turing.pl", clause(10))),
1904
- bindings([binding("Head", 1), binding("Tail", [1, 1, 1]), binding("Cell", 0), binding("Right", [0, #])])
1905
- ),
1906
- proof(
1907
- goal(continue(1, [1, 1, 1], 1, [0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1908
- by(rule("turing.pl", clause(8))),
1909
- bindings([binding("State", 1), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1910
- uses([
1911
- proof(
1912
- goal(find(1, [1, 1, 1], 1, [0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1913
- by(rule("turing.pl", clause(6))),
1914
- bindings([binding("State", 1), binding("Left", [1, 1, 1]), binding("Cell", 1), binding("Right", [0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1, 1]), binding("B", 1), binding("C", [0, 0, 0, #])]),
1915
- uses([
1916
- proof(
1917
- goal(t([1, 1, 0, l], 1)),
1918
- by(fact("turing.pl", clause(21)))
1919
- ),
1920
- proof(
1921
- goal(move(l, [1, 1, 1], 0, [0, 0, #], [1, 1], 1, [0, 0, 0, #])),
1922
- by(fact("turing.pl", clause(10))),
1923
- bindings([binding("Head", 1), binding("Tail", [1, 1]), binding("Cell", 0), binding("Right", [0, 0, #])])
1924
- ),
1925
- proof(
1926
- goal(continue(1, [1, 1], 1, [0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1927
- by(rule("turing.pl", clause(8))),
1928
- bindings([binding("State", 1), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1929
- uses([
1930
- proof(
1931
- goal(find(1, [1, 1], 1, [0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1932
- by(rule("turing.pl", clause(6))),
1933
- bindings([binding("State", 1), binding("Left", [1, 1]), binding("Cell", 1), binding("Right", [0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", [1]), binding("B", 1), binding("C", [0, 0, 0, 0, #])]),
1934
- uses([
1935
- proof(
1936
- goal(t([1, 1, 0, l], 1)),
1937
- by(fact("turing.pl", clause(21)))
1938
- ),
1939
- proof(
1940
- goal(move(l, [1, 1], 0, [0, 0, 0, #], [1], 1, [0, 0, 0, 0, #])),
1941
- by(fact("turing.pl", clause(10))),
1942
- bindings([binding("Head", 1), binding("Tail", [1]), binding("Cell", 0), binding("Right", [0, 0, 0, #])])
1943
- ),
1944
- proof(
1945
- goal(continue(1, [1], 1, [0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1946
- by(rule("turing.pl", clause(8))),
1947
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1948
- uses([
1949
- proof(
1950
- goal(find(1, [1], 1, [0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1951
- by(rule("turing.pl", clause(6))),
1952
- bindings([binding("State", 1), binding("Left", [1]), binding("Cell", 1), binding("Right", [0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", []), binding("B", 1), binding("C", [0, 0, 0, 0, 0, #])]),
1953
- uses([
1954
- proof(
1955
- goal(t([1, 1, 0, l], 1)),
1956
- by(fact("turing.pl", clause(21)))
1957
- ),
1958
- proof(
1959
- goal(move(l, [1], 0, [0, 0, 0, 0, #], [], 1, [0, 0, 0, 0, 0, #])),
1960
- by(fact("turing.pl", clause(10))),
1961
- bindings([binding("Head", 1), binding("Tail", []), binding("Cell", 0), binding("Right", [0, 0, 0, 0, #])])
1962
- ),
1963
- proof(
1964
- goal(continue(1, [], 1, [0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1965
- by(rule("turing.pl", clause(8))),
1966
- bindings([binding("State", 1), binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1967
- uses([
1968
- proof(
1969
- goal(find(1, [], 1, [0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1970
- by(rule("turing.pl", clause(6))),
1971
- bindings([binding("State", 1), binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 0), binding("Move", l), binding("Next", 1), binding("A", []), binding("B", #), binding("C", [0, 0, 0, 0, 0, 0, #])]),
1972
- uses([
1973
- proof(
1974
- goal(t([1, 1, 0, l], 1)),
1975
- by(fact("turing.pl", clause(21)))
1976
- ),
1977
- proof(
1978
- goal(move(l, [], 0, [0, 0, 0, 0, 0, #], [], #, [0, 0, 0, 0, 0, 0, #])),
1979
- by(fact("turing.pl", clause(9))),
1980
- bindings([binding("Cell", 0), binding("Right", [0, 0, 0, 0, 0, #])])
1981
- ),
1982
- proof(
1983
- goal(continue(1, [], #, [0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1984
- by(rule("turing.pl", clause(8))),
1985
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [0, 0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #])]),
1986
- uses([
1987
- proof(
1988
- goal(find(1, [], #, [0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
1989
- by(rule("turing.pl", clause(6))),
1990
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [0, 0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", []), binding("B", 1), binding("C", [0, 0, 0, 0, 0, 0, #])]),
1991
- uses([
1992
- proof(
1993
- goal(t([1, #, 1, s], halt)),
1994
- by(fact("turing.pl", clause(22)))
1995
- ),
1996
- proof(
1997
- goal(move(s, [], 1, [0, 0, 0, 0, 0, 0, #], [], 1, [0, 0, 0, 0, 0, 0, #])),
1998
- by(fact("turing.pl", clause(11))),
1999
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, 0, #])])
2000
- ),
2001
- proof(
2002
- goal(continue(halt, [], 1, [0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
2003
- by(rule("turing.pl", clause(7))),
2004
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [0, 0, 0, 0, 0, 0, #]), binding("OutTape", [1, 0, 0, 0, 0, 0, 0, #]), binding("R", [])]),
2005
- uses([
2006
- proof(
2007
- goal(rever([], [])),
2008
- by(fact("turing.pl", clause(14)))
2009
- ),
2010
- proof(
2011
- goal(append([], [1, 0, 0, 0, 0, 0, 0, #], [1, 0, 0, 0, 0, 0, 0, #])),
2012
- by(builtin(append, 3))
2013
- )
2014
- ])
2015
- )
2016
- ])
2017
- )
2018
- ])
2019
- )
2020
- ])
2021
- )
2022
- ])
2023
- )
2024
- ])
2025
- )
2026
- ])
2027
- )
2028
- ])
2029
- )
2030
- ])
2031
- )
2032
- ])
2033
- )
2034
- ])
2035
- )
2036
- ])
2037
- )
2038
- ])
2039
- )
2040
- ])
2041
- )
2042
- ])
2043
- )
2044
- ])
2045
- )
2046
- ])
2047
- )
2048
- ])
2049
- )
2050
- ])
2051
- )
2052
- ])
2053
- )
2054
- ])
2055
- )
2056
- ])
2057
- )
2058
- ])
2059
- )
2060
- ])
2061
- )
2062
- ])
2063
- )
2064
- ])
2065
- )
2066
- ])
2067
- )
2068
- ])
2069
- )
2070
- ])
2071
- )
2072
- ])
2073
- )
2074
- ).
2075
-
2076
12
  addsOne(case4, true).
2077
- why(
2078
- addsOne(case4, true),
2079
- proof(
2080
- goal(addsOne(case4, true)),
2081
- by(rule("turing.pl", clause(29))),
2082
- bindings([binding("Case", case4), binding("InTape", []), binding("_OutTape", [1, #])]),
2083
- uses([
2084
- proof(
2085
- goal(case(case4, [])),
2086
- by(fact("turing.pl", clause(26)))
2087
- ),
2088
- proof(
2089
- goal(compute([], [1, #])),
2090
- by(rule("turing.pl", clause(4))),
2091
- bindings([binding("OutTape", [1, #]), binding("_Machine", add1), binding("I", 0)]),
2092
- uses([
2093
- proof(
2094
- goal(start(add1, 0)),
2095
- by(fact("turing.pl", clause(16)))
2096
- ),
2097
- proof(
2098
- goal(find(0, [], #, [], [1, #])),
2099
- by(rule("turing.pl", clause(6))),
2100
- bindings([binding("State", 0), binding("Left", []), binding("Cell", #), binding("Right", []), binding("OutTape", [1, #]), binding("Write", #), binding("Move", l), binding("Next", 1), binding("A", []), binding("B", #), binding("C", [#])]),
2101
- uses([
2102
- proof(
2103
- goal(t([0, #, #, l], 1)),
2104
- by(fact("turing.pl", clause(19)))
2105
- ),
2106
- proof(
2107
- goal(move(l, [], #, [], [], #, [#])),
2108
- by(fact("turing.pl", clause(9))),
2109
- bindings([binding("Cell", #), binding("Right", [])])
2110
- ),
2111
- proof(
2112
- goal(continue(1, [], #, [#], [1, #])),
2113
- by(rule("turing.pl", clause(8))),
2114
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [#]), binding("OutTape", [1, #])]),
2115
- uses([
2116
- proof(
2117
- goal(find(1, [], #, [#], [1, #])),
2118
- by(rule("turing.pl", clause(6))),
2119
- bindings([binding("State", 1), binding("Left", []), binding("Cell", #), binding("Right", [#]), binding("OutTape", [1, #]), binding("Write", 1), binding("Move", s), binding("Next", halt), binding("A", []), binding("B", 1), binding("C", [#])]),
2120
- uses([
2121
- proof(
2122
- goal(t([1, #, 1, s], halt)),
2123
- by(fact("turing.pl", clause(22)))
2124
- ),
2125
- proof(
2126
- goal(move(s, [], 1, [#], [], 1, [#])),
2127
- by(fact("turing.pl", clause(11))),
2128
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [#])])
2129
- ),
2130
- proof(
2131
- goal(continue(halt, [], 1, [#], [1, #])),
2132
- by(rule("turing.pl", clause(7))),
2133
- bindings([binding("Left", []), binding("Cell", 1), binding("Right", [#]), binding("OutTape", [1, #]), binding("R", [])]),
2134
- uses([
2135
- proof(
2136
- goal(rever([], [])),
2137
- by(fact("turing.pl", clause(14)))
2138
- ),
2139
- proof(
2140
- goal(append([], [1, #], [1, #])),
2141
- by(builtin(append, 3))
2142
- )
2143
- ])
2144
- )
2145
- ])
2146
- )
2147
- ])
2148
- )
2149
- ])
2150
- )
2151
- ])
2152
- )
2153
- ])
2154
- )
2155
- ).
2156
-