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