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,1878 +1,36 @@
1
1
  gcd(c1, 6).
2
- why(
3
- gcd(c1, 6),
4
- proof(
5
- goal(gcd(c1, 6)),
6
- by(rule("gcd-bezout-identity.pl", clause(15))),
7
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3)]),
8
- uses([
9
- proof(
10
- goal(answer(c1, 6, -1, 3)),
11
- by(rule("gcd-bezout-identity.pl", clause(11))),
12
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
13
- uses([
14
- proof(
15
- goal(case(c1, 48, 18)),
16
- by(fact("gcd-bezout-identity.pl", clause(5)))
17
- ),
18
- proof(
19
- goal(extended_gcd(48, 18, 6, -1, 3)),
20
- by(builtin(extended_gcd, 5))
21
- )
22
- ])
23
- )
24
- ])
25
- )
26
- ).
27
-
28
2
  gcd(c2, 1).
29
- why(
30
- gcd(c2, 1),
31
- proof(
32
- goal(gcd(c2, 1)),
33
- by(rule("gcd-bezout-identity.pl", clause(15))),
34
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47)]),
35
- uses([
36
- proof(
37
- goal(answer(c2, 1, 215, -47)),
38
- by(rule("gcd-bezout-identity.pl", clause(11))),
39
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
40
- uses([
41
- proof(
42
- goal(case(c2, 101, 462)),
43
- by(fact("gcd-bezout-identity.pl", clause(6)))
44
- ),
45
- proof(
46
- goal(extended_gcd(101, 462, 1, 215, -47)),
47
- by(builtin(extended_gcd, 5))
48
- )
49
- ])
50
- )
51
- ])
52
- )
53
- ).
54
-
55
3
  gcd(c3, 5).
56
- why(
57
- gcd(c3, 5),
58
- proof(
59
- goal(gcd(c3, 5)),
60
- by(rule("gcd-bezout-identity.pl", clause(15))),
61
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1)]),
62
- uses([
63
- proof(
64
- goal(answer(c3, 5, 0, 1)),
65
- by(rule("gcd-bezout-identity.pl", clause(11))),
66
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
67
- uses([
68
- proof(
69
- goal(case(c3, 0, 5)),
70
- by(fact("gcd-bezout-identity.pl", clause(7)))
71
- ),
72
- proof(
73
- goal(extended_gcd(0, 5, 5, 0, 1)),
74
- by(builtin(extended_gcd, 5))
75
- )
76
- ])
77
- )
78
- ])
79
- )
80
- ).
81
-
82
4
  gcd(c4, 6).
83
- why(
84
- gcd(c4, 6),
85
- proof(
86
- goal(gcd(c4, 6)),
87
- by(rule("gcd-bezout-identity.pl", clause(15))),
88
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7)]),
89
- uses([
90
- proof(
91
- goal(answer(c4, 6, 5, -7)),
92
- by(rule("gcd-bezout-identity.pl", clause(11))),
93
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
94
- uses([
95
- proof(
96
- goal(case(c4, 270, 192)),
97
- by(fact("gcd-bezout-identity.pl", clause(8)))
98
- ),
99
- proof(
100
- goal(extended_gcd(270, 192, 6, 5, -7)),
101
- by(builtin(extended_gcd, 5))
102
- )
103
- ])
104
- )
105
- ])
106
- )
107
- ).
108
-
109
5
  gcd(c5, 9).
110
- why(
111
- gcd(c5, 9),
112
- proof(
113
- goal(gcd(c5, 9)),
114
- by(rule("gcd-bezout-identity.pl", clause(15))),
115
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1)]),
116
- uses([
117
- proof(
118
- goal(answer(c5, 9, 1, 1)),
119
- by(rule("gcd-bezout-identity.pl", clause(11))),
120
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
121
- uses([
122
- proof(
123
- goal(case(c5, -27, 36)),
124
- by(fact("gcd-bezout-identity.pl", clause(9)))
125
- ),
126
- proof(
127
- goal(extended_gcd(-27, 36, 9, 1, 1)),
128
- by(builtin(extended_gcd, 5))
129
- )
130
- ])
131
- )
132
- ])
133
- )
134
- ).
135
-
136
6
  gcd(c6, 6).
137
- why(
138
- gcd(c6, 6),
139
- proof(
140
- goal(gcd(c6, 6)),
141
- by(rule("gcd-bezout-identity.pl", clause(15))),
142
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155)]),
143
- uses([
144
- proof(
145
- goal(answer(c6, 6, -649, 10155)),
146
- by(rule("gcd-bezout-identity.pl", clause(11))),
147
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
148
- uses([
149
- proof(
150
- goal(case(c6, 123456, 7890)),
151
- by(fact("gcd-bezout-identity.pl", clause(10)))
152
- ),
153
- proof(
154
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
155
- by(builtin(extended_gcd, 5))
156
- )
157
- ])
158
- )
159
- ])
160
- )
161
- ).
162
-
163
7
  bezoutCoefficients(c1, [-1, 3]).
164
- why(
165
- bezoutCoefficients(c1, [-1, 3]),
166
- proof(
167
- goal(bezoutCoefficients(c1, [-1, 3])),
168
- by(rule("gcd-bezout-identity.pl", clause(16))),
169
- bindings([binding("Case", c1), binding("S", -1), binding("T", 3), binding("Gcd", 6)]),
170
- uses([
171
- proof(
172
- goal(answer(c1, 6, -1, 3)),
173
- by(rule("gcd-bezout-identity.pl", clause(11))),
174
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
175
- uses([
176
- proof(
177
- goal(case(c1, 48, 18)),
178
- by(fact("gcd-bezout-identity.pl", clause(5)))
179
- ),
180
- proof(
181
- goal(extended_gcd(48, 18, 6, -1, 3)),
182
- by(builtin(extended_gcd, 5))
183
- )
184
- ])
185
- )
186
- ])
187
- )
188
- ).
189
-
190
8
  bezoutCoefficients(c2, [215, -47]).
191
- why(
192
- bezoutCoefficients(c2, [215, -47]),
193
- proof(
194
- goal(bezoutCoefficients(c2, [215, -47])),
195
- by(rule("gcd-bezout-identity.pl", clause(16))),
196
- bindings([binding("Case", c2), binding("S", 215), binding("T", -47), binding("Gcd", 1)]),
197
- uses([
198
- proof(
199
- goal(answer(c2, 1, 215, -47)),
200
- by(rule("gcd-bezout-identity.pl", clause(11))),
201
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
202
- uses([
203
- proof(
204
- goal(case(c2, 101, 462)),
205
- by(fact("gcd-bezout-identity.pl", clause(6)))
206
- ),
207
- proof(
208
- goal(extended_gcd(101, 462, 1, 215, -47)),
209
- by(builtin(extended_gcd, 5))
210
- )
211
- ])
212
- )
213
- ])
214
- )
215
- ).
216
-
217
9
  bezoutCoefficients(c3, [0, 1]).
218
- why(
219
- bezoutCoefficients(c3, [0, 1]),
220
- proof(
221
- goal(bezoutCoefficients(c3, [0, 1])),
222
- by(rule("gcd-bezout-identity.pl", clause(16))),
223
- bindings([binding("Case", c3), binding("S", 0), binding("T", 1), binding("Gcd", 5)]),
224
- uses([
225
- proof(
226
- goal(answer(c3, 5, 0, 1)),
227
- by(rule("gcd-bezout-identity.pl", clause(11))),
228
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
229
- uses([
230
- proof(
231
- goal(case(c3, 0, 5)),
232
- by(fact("gcd-bezout-identity.pl", clause(7)))
233
- ),
234
- proof(
235
- goal(extended_gcd(0, 5, 5, 0, 1)),
236
- by(builtin(extended_gcd, 5))
237
- )
238
- ])
239
- )
240
- ])
241
- )
242
- ).
243
-
244
10
  bezoutCoefficients(c4, [5, -7]).
245
- why(
246
- bezoutCoefficients(c4, [5, -7]),
247
- proof(
248
- goal(bezoutCoefficients(c4, [5, -7])),
249
- by(rule("gcd-bezout-identity.pl", clause(16))),
250
- bindings([binding("Case", c4), binding("S", 5), binding("T", -7), binding("Gcd", 6)]),
251
- uses([
252
- proof(
253
- goal(answer(c4, 6, 5, -7)),
254
- by(rule("gcd-bezout-identity.pl", clause(11))),
255
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
256
- uses([
257
- proof(
258
- goal(case(c4, 270, 192)),
259
- by(fact("gcd-bezout-identity.pl", clause(8)))
260
- ),
261
- proof(
262
- goal(extended_gcd(270, 192, 6, 5, -7)),
263
- by(builtin(extended_gcd, 5))
264
- )
265
- ])
266
- )
267
- ])
268
- )
269
- ).
270
-
271
11
  bezoutCoefficients(c5, [1, 1]).
272
- why(
273
- bezoutCoefficients(c5, [1, 1]),
274
- proof(
275
- goal(bezoutCoefficients(c5, [1, 1])),
276
- by(rule("gcd-bezout-identity.pl", clause(16))),
277
- bindings([binding("Case", c5), binding("S", 1), binding("T", 1), binding("Gcd", 9)]),
278
- uses([
279
- proof(
280
- goal(answer(c5, 9, 1, 1)),
281
- by(rule("gcd-bezout-identity.pl", clause(11))),
282
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
283
- uses([
284
- proof(
285
- goal(case(c5, -27, 36)),
286
- by(fact("gcd-bezout-identity.pl", clause(9)))
287
- ),
288
- proof(
289
- goal(extended_gcd(-27, 36, 9, 1, 1)),
290
- by(builtin(extended_gcd, 5))
291
- )
292
- ])
293
- )
294
- ])
295
- )
296
- ).
297
-
298
12
  bezoutCoefficients(c6, [-649, 10155]).
299
- why(
300
- bezoutCoefficients(c6, [-649, 10155]),
301
- proof(
302
- goal(bezoutCoefficients(c6, [-649, 10155])),
303
- by(rule("gcd-bezout-identity.pl", clause(16))),
304
- bindings([binding("Case", c6), binding("S", -649), binding("T", 10155), binding("Gcd", 6)]),
305
- uses([
306
- proof(
307
- goal(answer(c6, 6, -649, 10155)),
308
- by(rule("gcd-bezout-identity.pl", clause(11))),
309
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
310
- uses([
311
- proof(
312
- goal(case(c6, 123456, 7890)),
313
- by(fact("gcd-bezout-identity.pl", clause(10)))
314
- ),
315
- proof(
316
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
317
- by(builtin(extended_gcd, 5))
318
- )
319
- ])
320
- )
321
- ])
322
- )
323
- ).
324
-
325
13
  check(c1, bezout_identity).
326
- why(
327
- check(c1, bezout_identity),
328
- proof(
329
- goal(check(c1, bezout_identity)),
330
- by(rule("gcd-bezout-identity.pl", clause(17))),
331
- bindings([binding("Case", c1)]),
332
- uses([
333
- proof(
334
- goal(bezout_ok(c1)),
335
- by(rule("gcd-bezout-identity.pl", clause(12))),
336
- bindings([binding("Case", c1), binding("A", 48), binding("B", 18), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("AS", -48), binding("BT", 54)]),
337
- uses([
338
- proof(
339
- goal(case(c1, 48, 18)),
340
- by(fact("gcd-bezout-identity.pl", clause(5)))
341
- ),
342
- proof(
343
- goal(answer(c1, 6, -1, 3)),
344
- by(rule("gcd-bezout-identity.pl", clause(11))),
345
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
346
- uses([
347
- proof(
348
- goal(case(c1, 48, 18)),
349
- by(fact("gcd-bezout-identity.pl", clause(5)))
350
- ),
351
- proof(
352
- goal(extended_gcd(48, 18, 6, -1, 3)),
353
- by(builtin(extended_gcd, 5))
354
- )
355
- ])
356
- ),
357
- proof(
358
- goal(mul(48, -1, -48)),
359
- by(builtin(mul, 3))
360
- ),
361
- proof(
362
- goal(mul(18, 3, 54)),
363
- by(builtin(mul, 3))
364
- ),
365
- proof(
366
- goal(add(-48, 54, 6)),
367
- by(builtin(add, 3))
368
- )
369
- ])
370
- )
371
- ])
372
- )
373
- ).
374
-
375
14
  check(c2, bezout_identity).
376
- why(
377
- check(c2, bezout_identity),
378
- proof(
379
- goal(check(c2, bezout_identity)),
380
- by(rule("gcd-bezout-identity.pl", clause(17))),
381
- bindings([binding("Case", c2)]),
382
- uses([
383
- proof(
384
- goal(bezout_ok(c2)),
385
- by(rule("gcd-bezout-identity.pl", clause(12))),
386
- bindings([binding("Case", c2), binding("A", 101), binding("B", 462), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("AS", 21715), binding("BT", -21714)]),
387
- uses([
388
- proof(
389
- goal(case(c2, 101, 462)),
390
- by(fact("gcd-bezout-identity.pl", clause(6)))
391
- ),
392
- proof(
393
- goal(answer(c2, 1, 215, -47)),
394
- by(rule("gcd-bezout-identity.pl", clause(11))),
395
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
396
- uses([
397
- proof(
398
- goal(case(c2, 101, 462)),
399
- by(fact("gcd-bezout-identity.pl", clause(6)))
400
- ),
401
- proof(
402
- goal(extended_gcd(101, 462, 1, 215, -47)),
403
- by(builtin(extended_gcd, 5))
404
- )
405
- ])
406
- ),
407
- proof(
408
- goal(mul(101, 215, 21715)),
409
- by(builtin(mul, 3))
410
- ),
411
- proof(
412
- goal(mul(462, -47, -21714)),
413
- by(builtin(mul, 3))
414
- ),
415
- proof(
416
- goal(add(21715, -21714, 1)),
417
- by(builtin(add, 3))
418
- )
419
- ])
420
- )
421
- ])
422
- )
423
- ).
424
-
425
15
  check(c3, bezout_identity).
426
- why(
427
- check(c3, bezout_identity),
428
- proof(
429
- goal(check(c3, bezout_identity)),
430
- by(rule("gcd-bezout-identity.pl", clause(17))),
431
- bindings([binding("Case", c3)]),
432
- uses([
433
- proof(
434
- goal(bezout_ok(c3)),
435
- by(rule("gcd-bezout-identity.pl", clause(12))),
436
- bindings([binding("Case", c3), binding("A", 0), binding("B", 5), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("AS", 0), binding("BT", 5)]),
437
- uses([
438
- proof(
439
- goal(case(c3, 0, 5)),
440
- by(fact("gcd-bezout-identity.pl", clause(7)))
441
- ),
442
- proof(
443
- goal(answer(c3, 5, 0, 1)),
444
- by(rule("gcd-bezout-identity.pl", clause(11))),
445
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
446
- uses([
447
- proof(
448
- goal(case(c3, 0, 5)),
449
- by(fact("gcd-bezout-identity.pl", clause(7)))
450
- ),
451
- proof(
452
- goal(extended_gcd(0, 5, 5, 0, 1)),
453
- by(builtin(extended_gcd, 5))
454
- )
455
- ])
456
- ),
457
- proof(
458
- goal(mul(0, 0, 0)),
459
- by(builtin(mul, 3))
460
- ),
461
- proof(
462
- goal(mul(5, 1, 5)),
463
- by(builtin(mul, 3))
464
- ),
465
- proof(
466
- goal(add(0, 5, 5)),
467
- by(builtin(add, 3))
468
- )
469
- ])
470
- )
471
- ])
472
- )
473
- ).
474
-
475
16
  check(c4, bezout_identity).
476
- why(
477
- check(c4, bezout_identity),
478
- proof(
479
- goal(check(c4, bezout_identity)),
480
- by(rule("gcd-bezout-identity.pl", clause(17))),
481
- bindings([binding("Case", c4)]),
482
- uses([
483
- proof(
484
- goal(bezout_ok(c4)),
485
- by(rule("gcd-bezout-identity.pl", clause(12))),
486
- bindings([binding("Case", c4), binding("A", 270), binding("B", 192), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("AS", 1350), binding("BT", -1344)]),
487
- uses([
488
- proof(
489
- goal(case(c4, 270, 192)),
490
- by(fact("gcd-bezout-identity.pl", clause(8)))
491
- ),
492
- proof(
493
- goal(answer(c4, 6, 5, -7)),
494
- by(rule("gcd-bezout-identity.pl", clause(11))),
495
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
496
- uses([
497
- proof(
498
- goal(case(c4, 270, 192)),
499
- by(fact("gcd-bezout-identity.pl", clause(8)))
500
- ),
501
- proof(
502
- goal(extended_gcd(270, 192, 6, 5, -7)),
503
- by(builtin(extended_gcd, 5))
504
- )
505
- ])
506
- ),
507
- proof(
508
- goal(mul(270, 5, 1350)),
509
- by(builtin(mul, 3))
510
- ),
511
- proof(
512
- goal(mul(192, -7, -1344)),
513
- by(builtin(mul, 3))
514
- ),
515
- proof(
516
- goal(add(1350, -1344, 6)),
517
- by(builtin(add, 3))
518
- )
519
- ])
520
- )
521
- ])
522
- )
523
- ).
524
-
525
17
  check(c5, bezout_identity).
526
- why(
527
- check(c5, bezout_identity),
528
- proof(
529
- goal(check(c5, bezout_identity)),
530
- by(rule("gcd-bezout-identity.pl", clause(17))),
531
- bindings([binding("Case", c5)]),
532
- uses([
533
- proof(
534
- goal(bezout_ok(c5)),
535
- by(rule("gcd-bezout-identity.pl", clause(12))),
536
- bindings([binding("Case", c5), binding("A", -27), binding("B", 36), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("AS", -27), binding("BT", 36)]),
537
- uses([
538
- proof(
539
- goal(case(c5, -27, 36)),
540
- by(fact("gcd-bezout-identity.pl", clause(9)))
541
- ),
542
- proof(
543
- goal(answer(c5, 9, 1, 1)),
544
- by(rule("gcd-bezout-identity.pl", clause(11))),
545
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
546
- uses([
547
- proof(
548
- goal(case(c5, -27, 36)),
549
- by(fact("gcd-bezout-identity.pl", clause(9)))
550
- ),
551
- proof(
552
- goal(extended_gcd(-27, 36, 9, 1, 1)),
553
- by(builtin(extended_gcd, 5))
554
- )
555
- ])
556
- ),
557
- proof(
558
- goal(mul(-27, 1, -27)),
559
- by(builtin(mul, 3))
560
- ),
561
- proof(
562
- goal(mul(36, 1, 36)),
563
- by(builtin(mul, 3))
564
- ),
565
- proof(
566
- goal(add(-27, 36, 9)),
567
- by(builtin(add, 3))
568
- )
569
- ])
570
- )
571
- ])
572
- )
573
- ).
574
-
575
18
  check(c6, bezout_identity).
576
- why(
577
- check(c6, bezout_identity),
578
- proof(
579
- goal(check(c6, bezout_identity)),
580
- by(rule("gcd-bezout-identity.pl", clause(17))),
581
- bindings([binding("Case", c6)]),
582
- uses([
583
- proof(
584
- goal(bezout_ok(c6)),
585
- by(rule("gcd-bezout-identity.pl", clause(12))),
586
- bindings([binding("Case", c6), binding("A", 123456), binding("B", 7890), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("AS", -80122944), binding("BT", 80122950)]),
587
- uses([
588
- proof(
589
- goal(case(c6, 123456, 7890)),
590
- by(fact("gcd-bezout-identity.pl", clause(10)))
591
- ),
592
- proof(
593
- goal(answer(c6, 6, -649, 10155)),
594
- by(rule("gcd-bezout-identity.pl", clause(11))),
595
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
596
- uses([
597
- proof(
598
- goal(case(c6, 123456, 7890)),
599
- by(fact("gcd-bezout-identity.pl", clause(10)))
600
- ),
601
- proof(
602
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
603
- by(builtin(extended_gcd, 5))
604
- )
605
- ])
606
- ),
607
- proof(
608
- goal(mul(123456, -649, -80122944)),
609
- by(builtin(mul, 3))
610
- ),
611
- proof(
612
- goal(mul(7890, 10155, 80122950)),
613
- by(builtin(mul, 3))
614
- ),
615
- proof(
616
- goal(add(-80122944, 80122950, 6)),
617
- by(builtin(add, 3))
618
- )
619
- ])
620
- )
621
- ])
622
- )
623
- ).
624
-
625
19
  check(c1, divides_inputs).
626
- why(
627
- check(c1, divides_inputs),
628
- proof(
629
- goal(check(c1, divides_inputs)),
630
- by(rule("gcd-bezout-identity.pl", clause(18))),
631
- bindings([binding("Case", c1)]),
632
- uses([
633
- proof(
634
- goal(divides_ok(c1)),
635
- by(rule("gcd-bezout-identity.pl", clause(13))),
636
- bindings([binding("Case", c1), binding("A", 48), binding("B", 18), binding("Gcd", 6), binding("S", -1), binding("T", 3)]),
637
- uses([
638
- proof(
639
- goal(case(c1, 48, 18)),
640
- by(fact("gcd-bezout-identity.pl", clause(5)))
641
- ),
642
- proof(
643
- goal(answer(c1, 6, -1, 3)),
644
- by(rule("gcd-bezout-identity.pl", clause(11))),
645
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
646
- uses([
647
- proof(
648
- goal(case(c1, 48, 18)),
649
- by(fact("gcd-bezout-identity.pl", clause(5)))
650
- ),
651
- proof(
652
- goal(extended_gcd(48, 18, 6, -1, 3)),
653
- by(builtin(extended_gcd, 5))
654
- )
655
- ])
656
- ),
657
- proof(
658
- goal(mod(48, 6, 0)),
659
- by(builtin(mod, 3))
660
- ),
661
- proof(
662
- goal(mod(18, 6, 0)),
663
- by(builtin(mod, 3))
664
- )
665
- ])
666
- )
667
- ])
668
- )
669
- ).
670
-
671
20
  check(c2, divides_inputs).
672
- why(
673
- check(c2, divides_inputs),
674
- proof(
675
- goal(check(c2, divides_inputs)),
676
- by(rule("gcd-bezout-identity.pl", clause(18))),
677
- bindings([binding("Case", c2)]),
678
- uses([
679
- proof(
680
- goal(divides_ok(c2)),
681
- by(rule("gcd-bezout-identity.pl", clause(13))),
682
- bindings([binding("Case", c2), binding("A", 101), binding("B", 462), binding("Gcd", 1), binding("S", 215), binding("T", -47)]),
683
- uses([
684
- proof(
685
- goal(case(c2, 101, 462)),
686
- by(fact("gcd-bezout-identity.pl", clause(6)))
687
- ),
688
- proof(
689
- goal(answer(c2, 1, 215, -47)),
690
- by(rule("gcd-bezout-identity.pl", clause(11))),
691
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
692
- uses([
693
- proof(
694
- goal(case(c2, 101, 462)),
695
- by(fact("gcd-bezout-identity.pl", clause(6)))
696
- ),
697
- proof(
698
- goal(extended_gcd(101, 462, 1, 215, -47)),
699
- by(builtin(extended_gcd, 5))
700
- )
701
- ])
702
- ),
703
- proof(
704
- goal(mod(101, 1, 0)),
705
- by(builtin(mod, 3))
706
- ),
707
- proof(
708
- goal(mod(462, 1, 0)),
709
- by(builtin(mod, 3))
710
- )
711
- ])
712
- )
713
- ])
714
- )
715
- ).
716
-
717
21
  check(c3, divides_inputs).
718
- why(
719
- check(c3, divides_inputs),
720
- proof(
721
- goal(check(c3, divides_inputs)),
722
- by(rule("gcd-bezout-identity.pl", clause(18))),
723
- bindings([binding("Case", c3)]),
724
- uses([
725
- proof(
726
- goal(divides_ok(c3)),
727
- by(rule("gcd-bezout-identity.pl", clause(13))),
728
- bindings([binding("Case", c3), binding("A", 0), binding("B", 5), binding("Gcd", 5), binding("S", 0), binding("T", 1)]),
729
- uses([
730
- proof(
731
- goal(case(c3, 0, 5)),
732
- by(fact("gcd-bezout-identity.pl", clause(7)))
733
- ),
734
- proof(
735
- goal(answer(c3, 5, 0, 1)),
736
- by(rule("gcd-bezout-identity.pl", clause(11))),
737
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
738
- uses([
739
- proof(
740
- goal(case(c3, 0, 5)),
741
- by(fact("gcd-bezout-identity.pl", clause(7)))
742
- ),
743
- proof(
744
- goal(extended_gcd(0, 5, 5, 0, 1)),
745
- by(builtin(extended_gcd, 5))
746
- )
747
- ])
748
- ),
749
- proof(
750
- goal(mod(0, 5, 0)),
751
- by(builtin(mod, 3))
752
- ),
753
- proof(
754
- goal(mod(5, 5, 0)),
755
- by(builtin(mod, 3))
756
- )
757
- ])
758
- )
759
- ])
760
- )
761
- ).
762
-
763
22
  check(c4, divides_inputs).
764
- why(
765
- check(c4, divides_inputs),
766
- proof(
767
- goal(check(c4, divides_inputs)),
768
- by(rule("gcd-bezout-identity.pl", clause(18))),
769
- bindings([binding("Case", c4)]),
770
- uses([
771
- proof(
772
- goal(divides_ok(c4)),
773
- by(rule("gcd-bezout-identity.pl", clause(13))),
774
- bindings([binding("Case", c4), binding("A", 270), binding("B", 192), binding("Gcd", 6), binding("S", 5), binding("T", -7)]),
775
- uses([
776
- proof(
777
- goal(case(c4, 270, 192)),
778
- by(fact("gcd-bezout-identity.pl", clause(8)))
779
- ),
780
- proof(
781
- goal(answer(c4, 6, 5, -7)),
782
- by(rule("gcd-bezout-identity.pl", clause(11))),
783
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
784
- uses([
785
- proof(
786
- goal(case(c4, 270, 192)),
787
- by(fact("gcd-bezout-identity.pl", clause(8)))
788
- ),
789
- proof(
790
- goal(extended_gcd(270, 192, 6, 5, -7)),
791
- by(builtin(extended_gcd, 5))
792
- )
793
- ])
794
- ),
795
- proof(
796
- goal(mod(270, 6, 0)),
797
- by(builtin(mod, 3))
798
- ),
799
- proof(
800
- goal(mod(192, 6, 0)),
801
- by(builtin(mod, 3))
802
- )
803
- ])
804
- )
805
- ])
806
- )
807
- ).
808
-
809
23
  check(c5, divides_inputs).
810
- why(
811
- check(c5, divides_inputs),
812
- proof(
813
- goal(check(c5, divides_inputs)),
814
- by(rule("gcd-bezout-identity.pl", clause(18))),
815
- bindings([binding("Case", c5)]),
816
- uses([
817
- proof(
818
- goal(divides_ok(c5)),
819
- by(rule("gcd-bezout-identity.pl", clause(13))),
820
- bindings([binding("Case", c5), binding("A", -27), binding("B", 36), binding("Gcd", 9), binding("S", 1), binding("T", 1)]),
821
- uses([
822
- proof(
823
- goal(case(c5, -27, 36)),
824
- by(fact("gcd-bezout-identity.pl", clause(9)))
825
- ),
826
- proof(
827
- goal(answer(c5, 9, 1, 1)),
828
- by(rule("gcd-bezout-identity.pl", clause(11))),
829
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
830
- uses([
831
- proof(
832
- goal(case(c5, -27, 36)),
833
- by(fact("gcd-bezout-identity.pl", clause(9)))
834
- ),
835
- proof(
836
- goal(extended_gcd(-27, 36, 9, 1, 1)),
837
- by(builtin(extended_gcd, 5))
838
- )
839
- ])
840
- ),
841
- proof(
842
- goal(mod(-27, 9, 0)),
843
- by(builtin(mod, 3))
844
- ),
845
- proof(
846
- goal(mod(36, 9, 0)),
847
- by(builtin(mod, 3))
848
- )
849
- ])
850
- )
851
- ])
852
- )
853
- ).
854
-
855
24
  check(c6, divides_inputs).
856
- why(
857
- check(c6, divides_inputs),
858
- proof(
859
- goal(check(c6, divides_inputs)),
860
- by(rule("gcd-bezout-identity.pl", clause(18))),
861
- bindings([binding("Case", c6)]),
862
- uses([
863
- proof(
864
- goal(divides_ok(c6)),
865
- by(rule("gcd-bezout-identity.pl", clause(13))),
866
- bindings([binding("Case", c6), binding("A", 123456), binding("B", 7890), binding("Gcd", 6), binding("S", -649), binding("T", 10155)]),
867
- uses([
868
- proof(
869
- goal(case(c6, 123456, 7890)),
870
- by(fact("gcd-bezout-identity.pl", clause(10)))
871
- ),
872
- proof(
873
- goal(answer(c6, 6, -649, 10155)),
874
- by(rule("gcd-bezout-identity.pl", clause(11))),
875
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
876
- uses([
877
- proof(
878
- goal(case(c6, 123456, 7890)),
879
- by(fact("gcd-bezout-identity.pl", clause(10)))
880
- ),
881
- proof(
882
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
883
- by(builtin(extended_gcd, 5))
884
- )
885
- ])
886
- ),
887
- proof(
888
- goal(mod(123456, 6, 0)),
889
- by(builtin(mod, 3))
890
- ),
891
- proof(
892
- goal(mod(7890, 6, 0)),
893
- by(builtin(mod, 3))
894
- )
895
- ])
896
- )
897
- ])
898
- )
899
- ).
900
-
901
25
  check(c1, nonnegative_gcd).
902
- why(
903
- check(c1, nonnegative_gcd),
904
- proof(
905
- goal(check(c1, nonnegative_gcd)),
906
- by(rule("gcd-bezout-identity.pl", clause(19))),
907
- bindings([binding("Case", c1)]),
908
- uses([
909
- proof(
910
- goal(nonnegative_ok(c1)),
911
- by(rule("gcd-bezout-identity.pl", clause(14))),
912
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3)]),
913
- uses([
914
- proof(
915
- goal(answer(c1, 6, -1, 3)),
916
- by(rule("gcd-bezout-identity.pl", clause(11))),
917
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
918
- uses([
919
- proof(
920
- goal(case(c1, 48, 18)),
921
- by(fact("gcd-bezout-identity.pl", clause(5)))
922
- ),
923
- proof(
924
- goal(extended_gcd(48, 18, 6, -1, 3)),
925
- by(builtin(extended_gcd, 5))
926
- )
927
- ])
928
- ),
929
- proof(
930
- goal(ge(6, 0)),
931
- by(builtin(ge, 2))
932
- )
933
- ])
934
- )
935
- ])
936
- )
937
- ).
938
-
939
26
  check(c2, nonnegative_gcd).
940
- why(
941
- check(c2, nonnegative_gcd),
942
- proof(
943
- goal(check(c2, nonnegative_gcd)),
944
- by(rule("gcd-bezout-identity.pl", clause(19))),
945
- bindings([binding("Case", c2)]),
946
- uses([
947
- proof(
948
- goal(nonnegative_ok(c2)),
949
- by(rule("gcd-bezout-identity.pl", clause(14))),
950
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47)]),
951
- uses([
952
- proof(
953
- goal(answer(c2, 1, 215, -47)),
954
- by(rule("gcd-bezout-identity.pl", clause(11))),
955
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
956
- uses([
957
- proof(
958
- goal(case(c2, 101, 462)),
959
- by(fact("gcd-bezout-identity.pl", clause(6)))
960
- ),
961
- proof(
962
- goal(extended_gcd(101, 462, 1, 215, -47)),
963
- by(builtin(extended_gcd, 5))
964
- )
965
- ])
966
- ),
967
- proof(
968
- goal(ge(1, 0)),
969
- by(builtin(ge, 2))
970
- )
971
- ])
972
- )
973
- ])
974
- )
975
- ).
976
-
977
27
  check(c3, nonnegative_gcd).
978
- why(
979
- check(c3, nonnegative_gcd),
980
- proof(
981
- goal(check(c3, nonnegative_gcd)),
982
- by(rule("gcd-bezout-identity.pl", clause(19))),
983
- bindings([binding("Case", c3)]),
984
- uses([
985
- proof(
986
- goal(nonnegative_ok(c3)),
987
- by(rule("gcd-bezout-identity.pl", clause(14))),
988
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1)]),
989
- uses([
990
- proof(
991
- goal(answer(c3, 5, 0, 1)),
992
- by(rule("gcd-bezout-identity.pl", clause(11))),
993
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
994
- uses([
995
- proof(
996
- goal(case(c3, 0, 5)),
997
- by(fact("gcd-bezout-identity.pl", clause(7)))
998
- ),
999
- proof(
1000
- goal(extended_gcd(0, 5, 5, 0, 1)),
1001
- by(builtin(extended_gcd, 5))
1002
- )
1003
- ])
1004
- ),
1005
- proof(
1006
- goal(ge(5, 0)),
1007
- by(builtin(ge, 2))
1008
- )
1009
- ])
1010
- )
1011
- ])
1012
- )
1013
- ).
1014
-
1015
28
  check(c4, nonnegative_gcd).
1016
- why(
1017
- check(c4, nonnegative_gcd),
1018
- proof(
1019
- goal(check(c4, nonnegative_gcd)),
1020
- by(rule("gcd-bezout-identity.pl", clause(19))),
1021
- bindings([binding("Case", c4)]),
1022
- uses([
1023
- proof(
1024
- goal(nonnegative_ok(c4)),
1025
- by(rule("gcd-bezout-identity.pl", clause(14))),
1026
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7)]),
1027
- uses([
1028
- proof(
1029
- goal(answer(c4, 6, 5, -7)),
1030
- by(rule("gcd-bezout-identity.pl", clause(11))),
1031
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
1032
- uses([
1033
- proof(
1034
- goal(case(c4, 270, 192)),
1035
- by(fact("gcd-bezout-identity.pl", clause(8)))
1036
- ),
1037
- proof(
1038
- goal(extended_gcd(270, 192, 6, 5, -7)),
1039
- by(builtin(extended_gcd, 5))
1040
- )
1041
- ])
1042
- ),
1043
- proof(
1044
- goal(ge(6, 0)),
1045
- by(builtin(ge, 2))
1046
- )
1047
- ])
1048
- )
1049
- ])
1050
- )
1051
- ).
1052
-
1053
29
  check(c5, nonnegative_gcd).
1054
- why(
1055
- check(c5, nonnegative_gcd),
1056
- proof(
1057
- goal(check(c5, nonnegative_gcd)),
1058
- by(rule("gcd-bezout-identity.pl", clause(19))),
1059
- bindings([binding("Case", c5)]),
1060
- uses([
1061
- proof(
1062
- goal(nonnegative_ok(c5)),
1063
- by(rule("gcd-bezout-identity.pl", clause(14))),
1064
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1)]),
1065
- uses([
1066
- proof(
1067
- goal(answer(c5, 9, 1, 1)),
1068
- by(rule("gcd-bezout-identity.pl", clause(11))),
1069
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
1070
- uses([
1071
- proof(
1072
- goal(case(c5, -27, 36)),
1073
- by(fact("gcd-bezout-identity.pl", clause(9)))
1074
- ),
1075
- proof(
1076
- goal(extended_gcd(-27, 36, 9, 1, 1)),
1077
- by(builtin(extended_gcd, 5))
1078
- )
1079
- ])
1080
- ),
1081
- proof(
1082
- goal(ge(9, 0)),
1083
- by(builtin(ge, 2))
1084
- )
1085
- ])
1086
- )
1087
- ])
1088
- )
1089
- ).
1090
-
1091
30
  check(c6, nonnegative_gcd).
1092
- why(
1093
- check(c6, nonnegative_gcd),
1094
- proof(
1095
- goal(check(c6, nonnegative_gcd)),
1096
- by(rule("gcd-bezout-identity.pl", clause(19))),
1097
- bindings([binding("Case", c6)]),
1098
- uses([
1099
- proof(
1100
- goal(nonnegative_ok(c6)),
1101
- by(rule("gcd-bezout-identity.pl", clause(14))),
1102
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155)]),
1103
- uses([
1104
- proof(
1105
- goal(answer(c6, 6, -649, 10155)),
1106
- by(rule("gcd-bezout-identity.pl", clause(11))),
1107
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
1108
- uses([
1109
- proof(
1110
- goal(case(c6, 123456, 7890)),
1111
- by(fact("gcd-bezout-identity.pl", clause(10)))
1112
- ),
1113
- proof(
1114
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
1115
- by(builtin(extended_gcd, 5))
1116
- )
1117
- ])
1118
- ),
1119
- proof(
1120
- goal(ge(6, 0)),
1121
- by(builtin(ge, 2))
1122
- )
1123
- ])
1124
- )
1125
- ])
1126
- )
1127
- ).
1128
-
1129
31
  status(c1, done).
1130
- why(
1131
- status(c1, done),
1132
- proof(
1133
- goal(status(c1, done)),
1134
- by(rule("gcd-bezout-identity.pl", clause(20))),
1135
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3)]),
1136
- uses([
1137
- proof(
1138
- goal(answer(c1, 6, -1, 3)),
1139
- by(rule("gcd-bezout-identity.pl", clause(11))),
1140
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
1141
- uses([
1142
- proof(
1143
- goal(case(c1, 48, 18)),
1144
- by(fact("gcd-bezout-identity.pl", clause(5)))
1145
- ),
1146
- proof(
1147
- goal(extended_gcd(48, 18, 6, -1, 3)),
1148
- by(builtin(extended_gcd, 5))
1149
- )
1150
- ])
1151
- ),
1152
- proof(
1153
- goal(bezout_ok(c1)),
1154
- by(rule("gcd-bezout-identity.pl", clause(12))),
1155
- bindings([binding("Case", c1), binding("A", 48), binding("B", 18), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("AS", -48), binding("BT", 54)]),
1156
- uses([
1157
- proof(
1158
- goal(case(c1, 48, 18)),
1159
- by(fact("gcd-bezout-identity.pl", clause(5)))
1160
- ),
1161
- proof(
1162
- goal(answer(c1, 6, -1, 3)),
1163
- by(rule("gcd-bezout-identity.pl", clause(11))),
1164
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
1165
- uses([
1166
- proof(
1167
- goal(case(c1, 48, 18)),
1168
- by(fact("gcd-bezout-identity.pl", clause(5)))
1169
- ),
1170
- proof(
1171
- goal(extended_gcd(48, 18, 6, -1, 3)),
1172
- by(builtin(extended_gcd, 5))
1173
- )
1174
- ])
1175
- ),
1176
- proof(
1177
- goal(mul(48, -1, -48)),
1178
- by(builtin(mul, 3))
1179
- ),
1180
- proof(
1181
- goal(mul(18, 3, 54)),
1182
- by(builtin(mul, 3))
1183
- ),
1184
- proof(
1185
- goal(add(-48, 54, 6)),
1186
- by(builtin(add, 3))
1187
- )
1188
- ])
1189
- ),
1190
- proof(
1191
- goal(divides_ok(c1)),
1192
- by(rule("gcd-bezout-identity.pl", clause(13))),
1193
- bindings([binding("Case", c1), binding("A", 48), binding("B", 18), binding("Gcd", 6), binding("S", -1), binding("T", 3)]),
1194
- uses([
1195
- proof(
1196
- goal(case(c1, 48, 18)),
1197
- by(fact("gcd-bezout-identity.pl", clause(5)))
1198
- ),
1199
- proof(
1200
- goal(answer(c1, 6, -1, 3)),
1201
- by(rule("gcd-bezout-identity.pl", clause(11))),
1202
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
1203
- uses([
1204
- proof(
1205
- goal(case(c1, 48, 18)),
1206
- by(fact("gcd-bezout-identity.pl", clause(5)))
1207
- ),
1208
- proof(
1209
- goal(extended_gcd(48, 18, 6, -1, 3)),
1210
- by(builtin(extended_gcd, 5))
1211
- )
1212
- ])
1213
- ),
1214
- proof(
1215
- goal(mod(48, 6, 0)),
1216
- by(builtin(mod, 3))
1217
- ),
1218
- proof(
1219
- goal(mod(18, 6, 0)),
1220
- by(builtin(mod, 3))
1221
- )
1222
- ])
1223
- ),
1224
- proof(
1225
- goal(nonnegative_ok(c1)),
1226
- by(rule("gcd-bezout-identity.pl", clause(14))),
1227
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3)]),
1228
- uses([
1229
- proof(
1230
- goal(answer(c1, 6, -1, 3)),
1231
- by(rule("gcd-bezout-identity.pl", clause(11))),
1232
- bindings([binding("Case", c1), binding("Gcd", 6), binding("S", -1), binding("T", 3), binding("A", 48), binding("B", 18)]),
1233
- uses([
1234
- proof(
1235
- goal(case(c1, 48, 18)),
1236
- by(fact("gcd-bezout-identity.pl", clause(5)))
1237
- ),
1238
- proof(
1239
- goal(extended_gcd(48, 18, 6, -1, 3)),
1240
- by(builtin(extended_gcd, 5))
1241
- )
1242
- ])
1243
- ),
1244
- proof(
1245
- goal(ge(6, 0)),
1246
- by(builtin(ge, 2))
1247
- )
1248
- ])
1249
- )
1250
- ])
1251
- )
1252
- ).
1253
-
1254
32
  status(c2, done).
1255
- why(
1256
- status(c2, done),
1257
- proof(
1258
- goal(status(c2, done)),
1259
- by(rule("gcd-bezout-identity.pl", clause(20))),
1260
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47)]),
1261
- uses([
1262
- proof(
1263
- goal(answer(c2, 1, 215, -47)),
1264
- by(rule("gcd-bezout-identity.pl", clause(11))),
1265
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
1266
- uses([
1267
- proof(
1268
- goal(case(c2, 101, 462)),
1269
- by(fact("gcd-bezout-identity.pl", clause(6)))
1270
- ),
1271
- proof(
1272
- goal(extended_gcd(101, 462, 1, 215, -47)),
1273
- by(builtin(extended_gcd, 5))
1274
- )
1275
- ])
1276
- ),
1277
- proof(
1278
- goal(bezout_ok(c2)),
1279
- by(rule("gcd-bezout-identity.pl", clause(12))),
1280
- bindings([binding("Case", c2), binding("A", 101), binding("B", 462), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("AS", 21715), binding("BT", -21714)]),
1281
- uses([
1282
- proof(
1283
- goal(case(c2, 101, 462)),
1284
- by(fact("gcd-bezout-identity.pl", clause(6)))
1285
- ),
1286
- proof(
1287
- goal(answer(c2, 1, 215, -47)),
1288
- by(rule("gcd-bezout-identity.pl", clause(11))),
1289
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
1290
- uses([
1291
- proof(
1292
- goal(case(c2, 101, 462)),
1293
- by(fact("gcd-bezout-identity.pl", clause(6)))
1294
- ),
1295
- proof(
1296
- goal(extended_gcd(101, 462, 1, 215, -47)),
1297
- by(builtin(extended_gcd, 5))
1298
- )
1299
- ])
1300
- ),
1301
- proof(
1302
- goal(mul(101, 215, 21715)),
1303
- by(builtin(mul, 3))
1304
- ),
1305
- proof(
1306
- goal(mul(462, -47, -21714)),
1307
- by(builtin(mul, 3))
1308
- ),
1309
- proof(
1310
- goal(add(21715, -21714, 1)),
1311
- by(builtin(add, 3))
1312
- )
1313
- ])
1314
- ),
1315
- proof(
1316
- goal(divides_ok(c2)),
1317
- by(rule("gcd-bezout-identity.pl", clause(13))),
1318
- bindings([binding("Case", c2), binding("A", 101), binding("B", 462), binding("Gcd", 1), binding("S", 215), binding("T", -47)]),
1319
- uses([
1320
- proof(
1321
- goal(case(c2, 101, 462)),
1322
- by(fact("gcd-bezout-identity.pl", clause(6)))
1323
- ),
1324
- proof(
1325
- goal(answer(c2, 1, 215, -47)),
1326
- by(rule("gcd-bezout-identity.pl", clause(11))),
1327
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
1328
- uses([
1329
- proof(
1330
- goal(case(c2, 101, 462)),
1331
- by(fact("gcd-bezout-identity.pl", clause(6)))
1332
- ),
1333
- proof(
1334
- goal(extended_gcd(101, 462, 1, 215, -47)),
1335
- by(builtin(extended_gcd, 5))
1336
- )
1337
- ])
1338
- ),
1339
- proof(
1340
- goal(mod(101, 1, 0)),
1341
- by(builtin(mod, 3))
1342
- ),
1343
- proof(
1344
- goal(mod(462, 1, 0)),
1345
- by(builtin(mod, 3))
1346
- )
1347
- ])
1348
- ),
1349
- proof(
1350
- goal(nonnegative_ok(c2)),
1351
- by(rule("gcd-bezout-identity.pl", clause(14))),
1352
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47)]),
1353
- uses([
1354
- proof(
1355
- goal(answer(c2, 1, 215, -47)),
1356
- by(rule("gcd-bezout-identity.pl", clause(11))),
1357
- bindings([binding("Case", c2), binding("Gcd", 1), binding("S", 215), binding("T", -47), binding("A", 101), binding("B", 462)]),
1358
- uses([
1359
- proof(
1360
- goal(case(c2, 101, 462)),
1361
- by(fact("gcd-bezout-identity.pl", clause(6)))
1362
- ),
1363
- proof(
1364
- goal(extended_gcd(101, 462, 1, 215, -47)),
1365
- by(builtin(extended_gcd, 5))
1366
- )
1367
- ])
1368
- ),
1369
- proof(
1370
- goal(ge(1, 0)),
1371
- by(builtin(ge, 2))
1372
- )
1373
- ])
1374
- )
1375
- ])
1376
- )
1377
- ).
1378
-
1379
33
  status(c3, done).
1380
- why(
1381
- status(c3, done),
1382
- proof(
1383
- goal(status(c3, done)),
1384
- by(rule("gcd-bezout-identity.pl", clause(20))),
1385
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1)]),
1386
- uses([
1387
- proof(
1388
- goal(answer(c3, 5, 0, 1)),
1389
- by(rule("gcd-bezout-identity.pl", clause(11))),
1390
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
1391
- uses([
1392
- proof(
1393
- goal(case(c3, 0, 5)),
1394
- by(fact("gcd-bezout-identity.pl", clause(7)))
1395
- ),
1396
- proof(
1397
- goal(extended_gcd(0, 5, 5, 0, 1)),
1398
- by(builtin(extended_gcd, 5))
1399
- )
1400
- ])
1401
- ),
1402
- proof(
1403
- goal(bezout_ok(c3)),
1404
- by(rule("gcd-bezout-identity.pl", clause(12))),
1405
- bindings([binding("Case", c3), binding("A", 0), binding("B", 5), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("AS", 0), binding("BT", 5)]),
1406
- uses([
1407
- proof(
1408
- goal(case(c3, 0, 5)),
1409
- by(fact("gcd-bezout-identity.pl", clause(7)))
1410
- ),
1411
- proof(
1412
- goal(answer(c3, 5, 0, 1)),
1413
- by(rule("gcd-bezout-identity.pl", clause(11))),
1414
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
1415
- uses([
1416
- proof(
1417
- goal(case(c3, 0, 5)),
1418
- by(fact("gcd-bezout-identity.pl", clause(7)))
1419
- ),
1420
- proof(
1421
- goal(extended_gcd(0, 5, 5, 0, 1)),
1422
- by(builtin(extended_gcd, 5))
1423
- )
1424
- ])
1425
- ),
1426
- proof(
1427
- goal(mul(0, 0, 0)),
1428
- by(builtin(mul, 3))
1429
- ),
1430
- proof(
1431
- goal(mul(5, 1, 5)),
1432
- by(builtin(mul, 3))
1433
- ),
1434
- proof(
1435
- goal(add(0, 5, 5)),
1436
- by(builtin(add, 3))
1437
- )
1438
- ])
1439
- ),
1440
- proof(
1441
- goal(divides_ok(c3)),
1442
- by(rule("gcd-bezout-identity.pl", clause(13))),
1443
- bindings([binding("Case", c3), binding("A", 0), binding("B", 5), binding("Gcd", 5), binding("S", 0), binding("T", 1)]),
1444
- uses([
1445
- proof(
1446
- goal(case(c3, 0, 5)),
1447
- by(fact("gcd-bezout-identity.pl", clause(7)))
1448
- ),
1449
- proof(
1450
- goal(answer(c3, 5, 0, 1)),
1451
- by(rule("gcd-bezout-identity.pl", clause(11))),
1452
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
1453
- uses([
1454
- proof(
1455
- goal(case(c3, 0, 5)),
1456
- by(fact("gcd-bezout-identity.pl", clause(7)))
1457
- ),
1458
- proof(
1459
- goal(extended_gcd(0, 5, 5, 0, 1)),
1460
- by(builtin(extended_gcd, 5))
1461
- )
1462
- ])
1463
- ),
1464
- proof(
1465
- goal(mod(0, 5, 0)),
1466
- by(builtin(mod, 3))
1467
- ),
1468
- proof(
1469
- goal(mod(5, 5, 0)),
1470
- by(builtin(mod, 3))
1471
- )
1472
- ])
1473
- ),
1474
- proof(
1475
- goal(nonnegative_ok(c3)),
1476
- by(rule("gcd-bezout-identity.pl", clause(14))),
1477
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1)]),
1478
- uses([
1479
- proof(
1480
- goal(answer(c3, 5, 0, 1)),
1481
- by(rule("gcd-bezout-identity.pl", clause(11))),
1482
- bindings([binding("Case", c3), binding("Gcd", 5), binding("S", 0), binding("T", 1), binding("A", 0), binding("B", 5)]),
1483
- uses([
1484
- proof(
1485
- goal(case(c3, 0, 5)),
1486
- by(fact("gcd-bezout-identity.pl", clause(7)))
1487
- ),
1488
- proof(
1489
- goal(extended_gcd(0, 5, 5, 0, 1)),
1490
- by(builtin(extended_gcd, 5))
1491
- )
1492
- ])
1493
- ),
1494
- proof(
1495
- goal(ge(5, 0)),
1496
- by(builtin(ge, 2))
1497
- )
1498
- ])
1499
- )
1500
- ])
1501
- )
1502
- ).
1503
-
1504
34
  status(c4, done).
1505
- why(
1506
- status(c4, done),
1507
- proof(
1508
- goal(status(c4, done)),
1509
- by(rule("gcd-bezout-identity.pl", clause(20))),
1510
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7)]),
1511
- uses([
1512
- proof(
1513
- goal(answer(c4, 6, 5, -7)),
1514
- by(rule("gcd-bezout-identity.pl", clause(11))),
1515
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
1516
- uses([
1517
- proof(
1518
- goal(case(c4, 270, 192)),
1519
- by(fact("gcd-bezout-identity.pl", clause(8)))
1520
- ),
1521
- proof(
1522
- goal(extended_gcd(270, 192, 6, 5, -7)),
1523
- by(builtin(extended_gcd, 5))
1524
- )
1525
- ])
1526
- ),
1527
- proof(
1528
- goal(bezout_ok(c4)),
1529
- by(rule("gcd-bezout-identity.pl", clause(12))),
1530
- bindings([binding("Case", c4), binding("A", 270), binding("B", 192), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("AS", 1350), binding("BT", -1344)]),
1531
- uses([
1532
- proof(
1533
- goal(case(c4, 270, 192)),
1534
- by(fact("gcd-bezout-identity.pl", clause(8)))
1535
- ),
1536
- proof(
1537
- goal(answer(c4, 6, 5, -7)),
1538
- by(rule("gcd-bezout-identity.pl", clause(11))),
1539
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
1540
- uses([
1541
- proof(
1542
- goal(case(c4, 270, 192)),
1543
- by(fact("gcd-bezout-identity.pl", clause(8)))
1544
- ),
1545
- proof(
1546
- goal(extended_gcd(270, 192, 6, 5, -7)),
1547
- by(builtin(extended_gcd, 5))
1548
- )
1549
- ])
1550
- ),
1551
- proof(
1552
- goal(mul(270, 5, 1350)),
1553
- by(builtin(mul, 3))
1554
- ),
1555
- proof(
1556
- goal(mul(192, -7, -1344)),
1557
- by(builtin(mul, 3))
1558
- ),
1559
- proof(
1560
- goal(add(1350, -1344, 6)),
1561
- by(builtin(add, 3))
1562
- )
1563
- ])
1564
- ),
1565
- proof(
1566
- goal(divides_ok(c4)),
1567
- by(rule("gcd-bezout-identity.pl", clause(13))),
1568
- bindings([binding("Case", c4), binding("A", 270), binding("B", 192), binding("Gcd", 6), binding("S", 5), binding("T", -7)]),
1569
- uses([
1570
- proof(
1571
- goal(case(c4, 270, 192)),
1572
- by(fact("gcd-bezout-identity.pl", clause(8)))
1573
- ),
1574
- proof(
1575
- goal(answer(c4, 6, 5, -7)),
1576
- by(rule("gcd-bezout-identity.pl", clause(11))),
1577
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
1578
- uses([
1579
- proof(
1580
- goal(case(c4, 270, 192)),
1581
- by(fact("gcd-bezout-identity.pl", clause(8)))
1582
- ),
1583
- proof(
1584
- goal(extended_gcd(270, 192, 6, 5, -7)),
1585
- by(builtin(extended_gcd, 5))
1586
- )
1587
- ])
1588
- ),
1589
- proof(
1590
- goal(mod(270, 6, 0)),
1591
- by(builtin(mod, 3))
1592
- ),
1593
- proof(
1594
- goal(mod(192, 6, 0)),
1595
- by(builtin(mod, 3))
1596
- )
1597
- ])
1598
- ),
1599
- proof(
1600
- goal(nonnegative_ok(c4)),
1601
- by(rule("gcd-bezout-identity.pl", clause(14))),
1602
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7)]),
1603
- uses([
1604
- proof(
1605
- goal(answer(c4, 6, 5, -7)),
1606
- by(rule("gcd-bezout-identity.pl", clause(11))),
1607
- bindings([binding("Case", c4), binding("Gcd", 6), binding("S", 5), binding("T", -7), binding("A", 270), binding("B", 192)]),
1608
- uses([
1609
- proof(
1610
- goal(case(c4, 270, 192)),
1611
- by(fact("gcd-bezout-identity.pl", clause(8)))
1612
- ),
1613
- proof(
1614
- goal(extended_gcd(270, 192, 6, 5, -7)),
1615
- by(builtin(extended_gcd, 5))
1616
- )
1617
- ])
1618
- ),
1619
- proof(
1620
- goal(ge(6, 0)),
1621
- by(builtin(ge, 2))
1622
- )
1623
- ])
1624
- )
1625
- ])
1626
- )
1627
- ).
1628
-
1629
35
  status(c5, done).
1630
- why(
1631
- status(c5, done),
1632
- proof(
1633
- goal(status(c5, done)),
1634
- by(rule("gcd-bezout-identity.pl", clause(20))),
1635
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1)]),
1636
- uses([
1637
- proof(
1638
- goal(answer(c5, 9, 1, 1)),
1639
- by(rule("gcd-bezout-identity.pl", clause(11))),
1640
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
1641
- uses([
1642
- proof(
1643
- goal(case(c5, -27, 36)),
1644
- by(fact("gcd-bezout-identity.pl", clause(9)))
1645
- ),
1646
- proof(
1647
- goal(extended_gcd(-27, 36, 9, 1, 1)),
1648
- by(builtin(extended_gcd, 5))
1649
- )
1650
- ])
1651
- ),
1652
- proof(
1653
- goal(bezout_ok(c5)),
1654
- by(rule("gcd-bezout-identity.pl", clause(12))),
1655
- bindings([binding("Case", c5), binding("A", -27), binding("B", 36), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("AS", -27), binding("BT", 36)]),
1656
- uses([
1657
- proof(
1658
- goal(case(c5, -27, 36)),
1659
- by(fact("gcd-bezout-identity.pl", clause(9)))
1660
- ),
1661
- proof(
1662
- goal(answer(c5, 9, 1, 1)),
1663
- by(rule("gcd-bezout-identity.pl", clause(11))),
1664
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
1665
- uses([
1666
- proof(
1667
- goal(case(c5, -27, 36)),
1668
- by(fact("gcd-bezout-identity.pl", clause(9)))
1669
- ),
1670
- proof(
1671
- goal(extended_gcd(-27, 36, 9, 1, 1)),
1672
- by(builtin(extended_gcd, 5))
1673
- )
1674
- ])
1675
- ),
1676
- proof(
1677
- goal(mul(-27, 1, -27)),
1678
- by(builtin(mul, 3))
1679
- ),
1680
- proof(
1681
- goal(mul(36, 1, 36)),
1682
- by(builtin(mul, 3))
1683
- ),
1684
- proof(
1685
- goal(add(-27, 36, 9)),
1686
- by(builtin(add, 3))
1687
- )
1688
- ])
1689
- ),
1690
- proof(
1691
- goal(divides_ok(c5)),
1692
- by(rule("gcd-bezout-identity.pl", clause(13))),
1693
- bindings([binding("Case", c5), binding("A", -27), binding("B", 36), binding("Gcd", 9), binding("S", 1), binding("T", 1)]),
1694
- uses([
1695
- proof(
1696
- goal(case(c5, -27, 36)),
1697
- by(fact("gcd-bezout-identity.pl", clause(9)))
1698
- ),
1699
- proof(
1700
- goal(answer(c5, 9, 1, 1)),
1701
- by(rule("gcd-bezout-identity.pl", clause(11))),
1702
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
1703
- uses([
1704
- proof(
1705
- goal(case(c5, -27, 36)),
1706
- by(fact("gcd-bezout-identity.pl", clause(9)))
1707
- ),
1708
- proof(
1709
- goal(extended_gcd(-27, 36, 9, 1, 1)),
1710
- by(builtin(extended_gcd, 5))
1711
- )
1712
- ])
1713
- ),
1714
- proof(
1715
- goal(mod(-27, 9, 0)),
1716
- by(builtin(mod, 3))
1717
- ),
1718
- proof(
1719
- goal(mod(36, 9, 0)),
1720
- by(builtin(mod, 3))
1721
- )
1722
- ])
1723
- ),
1724
- proof(
1725
- goal(nonnegative_ok(c5)),
1726
- by(rule("gcd-bezout-identity.pl", clause(14))),
1727
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1)]),
1728
- uses([
1729
- proof(
1730
- goal(answer(c5, 9, 1, 1)),
1731
- by(rule("gcd-bezout-identity.pl", clause(11))),
1732
- bindings([binding("Case", c5), binding("Gcd", 9), binding("S", 1), binding("T", 1), binding("A", -27), binding("B", 36)]),
1733
- uses([
1734
- proof(
1735
- goal(case(c5, -27, 36)),
1736
- by(fact("gcd-bezout-identity.pl", clause(9)))
1737
- ),
1738
- proof(
1739
- goal(extended_gcd(-27, 36, 9, 1, 1)),
1740
- by(builtin(extended_gcd, 5))
1741
- )
1742
- ])
1743
- ),
1744
- proof(
1745
- goal(ge(9, 0)),
1746
- by(builtin(ge, 2))
1747
- )
1748
- ])
1749
- )
1750
- ])
1751
- )
1752
- ).
1753
-
1754
36
  status(c6, done).
1755
- why(
1756
- status(c6, done),
1757
- proof(
1758
- goal(status(c6, done)),
1759
- by(rule("gcd-bezout-identity.pl", clause(20))),
1760
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155)]),
1761
- uses([
1762
- proof(
1763
- goal(answer(c6, 6, -649, 10155)),
1764
- by(rule("gcd-bezout-identity.pl", clause(11))),
1765
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
1766
- uses([
1767
- proof(
1768
- goal(case(c6, 123456, 7890)),
1769
- by(fact("gcd-bezout-identity.pl", clause(10)))
1770
- ),
1771
- proof(
1772
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
1773
- by(builtin(extended_gcd, 5))
1774
- )
1775
- ])
1776
- ),
1777
- proof(
1778
- goal(bezout_ok(c6)),
1779
- by(rule("gcd-bezout-identity.pl", clause(12))),
1780
- bindings([binding("Case", c6), binding("A", 123456), binding("B", 7890), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("AS", -80122944), binding("BT", 80122950)]),
1781
- uses([
1782
- proof(
1783
- goal(case(c6, 123456, 7890)),
1784
- by(fact("gcd-bezout-identity.pl", clause(10)))
1785
- ),
1786
- proof(
1787
- goal(answer(c6, 6, -649, 10155)),
1788
- by(rule("gcd-bezout-identity.pl", clause(11))),
1789
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
1790
- uses([
1791
- proof(
1792
- goal(case(c6, 123456, 7890)),
1793
- by(fact("gcd-bezout-identity.pl", clause(10)))
1794
- ),
1795
- proof(
1796
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
1797
- by(builtin(extended_gcd, 5))
1798
- )
1799
- ])
1800
- ),
1801
- proof(
1802
- goal(mul(123456, -649, -80122944)),
1803
- by(builtin(mul, 3))
1804
- ),
1805
- proof(
1806
- goal(mul(7890, 10155, 80122950)),
1807
- by(builtin(mul, 3))
1808
- ),
1809
- proof(
1810
- goal(add(-80122944, 80122950, 6)),
1811
- by(builtin(add, 3))
1812
- )
1813
- ])
1814
- ),
1815
- proof(
1816
- goal(divides_ok(c6)),
1817
- by(rule("gcd-bezout-identity.pl", clause(13))),
1818
- bindings([binding("Case", c6), binding("A", 123456), binding("B", 7890), binding("Gcd", 6), binding("S", -649), binding("T", 10155)]),
1819
- uses([
1820
- proof(
1821
- goal(case(c6, 123456, 7890)),
1822
- by(fact("gcd-bezout-identity.pl", clause(10)))
1823
- ),
1824
- proof(
1825
- goal(answer(c6, 6, -649, 10155)),
1826
- by(rule("gcd-bezout-identity.pl", clause(11))),
1827
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
1828
- uses([
1829
- proof(
1830
- goal(case(c6, 123456, 7890)),
1831
- by(fact("gcd-bezout-identity.pl", clause(10)))
1832
- ),
1833
- proof(
1834
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
1835
- by(builtin(extended_gcd, 5))
1836
- )
1837
- ])
1838
- ),
1839
- proof(
1840
- goal(mod(123456, 6, 0)),
1841
- by(builtin(mod, 3))
1842
- ),
1843
- proof(
1844
- goal(mod(7890, 6, 0)),
1845
- by(builtin(mod, 3))
1846
- )
1847
- ])
1848
- ),
1849
- proof(
1850
- goal(nonnegative_ok(c6)),
1851
- by(rule("gcd-bezout-identity.pl", clause(14))),
1852
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155)]),
1853
- uses([
1854
- proof(
1855
- goal(answer(c6, 6, -649, 10155)),
1856
- by(rule("gcd-bezout-identity.pl", clause(11))),
1857
- bindings([binding("Case", c6), binding("Gcd", 6), binding("S", -649), binding("T", 10155), binding("A", 123456), binding("B", 7890)]),
1858
- uses([
1859
- proof(
1860
- goal(case(c6, 123456, 7890)),
1861
- by(fact("gcd-bezout-identity.pl", clause(10)))
1862
- ),
1863
- proof(
1864
- goal(extended_gcd(123456, 7890, 6, -649, 10155)),
1865
- by(builtin(extended_gcd, 5))
1866
- )
1867
- ])
1868
- ),
1869
- proof(
1870
- goal(ge(6, 0)),
1871
- by(builtin(ge, 2))
1872
- )
1873
- ])
1874
- )
1875
- ])
1876
- )
1877
- ).
1878
-