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,745 +1,4 @@
1
1
  mean(scores, 5.0).
2
- why(
3
- mean(scores, 5.0),
4
- proof(
5
- goal(mean(scores, 5.0)),
6
- by(rule("statistics-summary.pl", clause(8))),
7
- bindings([binding("Name", scores), binding("Mean", 5.0), binding("Values", [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 40.0), binding("Count", 8)]),
8
- uses([
9
- proof(
10
- goal(sample(scores, [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])),
11
- by(fact("statistics-summary.pl", clause(5)))
12
- ),
13
- proof(
14
- goal(sum([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 40.0)),
15
- by(rule("statistics-summary.pl", clause(7))),
16
- bindings([binding("X", 2.0), binding("Xs", [4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 40.0), binding("Rest", 38.0)]),
17
- uses([
18
- proof(
19
- goal(sum([4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 38.0)),
20
- by(rule("statistics-summary.pl", clause(7))),
21
- bindings([binding("X", 4.0), binding("Xs", [4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 38.0), binding("Rest", 34.0)]),
22
- uses([
23
- proof(
24
- goal(sum([4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 34.0)),
25
- by(rule("statistics-summary.pl", clause(7))),
26
- bindings([binding("X", 4.0), binding("Xs", [4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 34.0), binding("Rest", 30.0)]),
27
- uses([
28
- proof(
29
- goal(sum([4.0, 5.0, 5.0, 7.0, 9.0], 30.0)),
30
- by(rule("statistics-summary.pl", clause(7))),
31
- bindings([binding("X", 4.0), binding("Xs", [5.0, 5.0, 7.0, 9.0]), binding("Total", 30.0), binding("Rest", 26.0)]),
32
- uses([
33
- proof(
34
- goal(sum([5.0, 5.0, 7.0, 9.0], 26.0)),
35
- by(rule("statistics-summary.pl", clause(7))),
36
- bindings([binding("X", 5.0), binding("Xs", [5.0, 7.0, 9.0]), binding("Total", 26.0), binding("Rest", 21.0)]),
37
- uses([
38
- proof(
39
- goal(sum([5.0, 7.0, 9.0], 21.0)),
40
- by(rule("statistics-summary.pl", clause(7))),
41
- bindings([binding("X", 5.0), binding("Xs", [7.0, 9.0]), binding("Total", 21.0), binding("Rest", 16.0)]),
42
- uses([
43
- proof(
44
- goal(sum([7.0, 9.0], 16.0)),
45
- by(rule("statistics-summary.pl", clause(7))),
46
- bindings([binding("X", 7.0), binding("Xs", [9.0]), binding("Total", 16.0), binding("Rest", 9.0)]),
47
- uses([
48
- proof(
49
- goal(sum([9.0], 9.0)),
50
- by(rule("statistics-summary.pl", clause(7))),
51
- bindings([binding("X", 9.0), binding("Xs", []), binding("Total", 9.0), binding("Rest", 0.0)]),
52
- uses([
53
- proof(
54
- goal(sum([], 0.0)),
55
- by(fact("statistics-summary.pl", clause(6)))
56
- ),
57
- proof(
58
- goal(add(9.0, 0.0, 9.0)),
59
- by(builtin(add, 3))
60
- )
61
- ])
62
- ),
63
- proof(
64
- goal(add(7.0, 9.0, 16.0)),
65
- by(builtin(add, 3))
66
- )
67
- ])
68
- ),
69
- proof(
70
- goal(add(5.0, 16.0, 21.0)),
71
- by(builtin(add, 3))
72
- )
73
- ])
74
- ),
75
- proof(
76
- goal(add(5.0, 21.0, 26.0)),
77
- by(builtin(add, 3))
78
- )
79
- ])
80
- ),
81
- proof(
82
- goal(add(4.0, 26.0, 30.0)),
83
- by(builtin(add, 3))
84
- )
85
- ])
86
- ),
87
- proof(
88
- goal(add(4.0, 30.0, 34.0)),
89
- by(builtin(add, 3))
90
- )
91
- ])
92
- ),
93
- proof(
94
- goal(add(4.0, 34.0, 38.0)),
95
- by(builtin(add, 3))
96
- )
97
- ])
98
- ),
99
- proof(
100
- goal(add(2.0, 38.0, 40.0)),
101
- by(builtin(add, 3))
102
- )
103
- ])
104
- ),
105
- proof(
106
- goal(length([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 8)),
107
- by(builtin(length, 2))
108
- ),
109
- proof(
110
- goal(div(40.0, 8, 5.0)),
111
- by(builtin(div, 3))
112
- )
113
- ])
114
- )
115
- ).
116
-
117
2
  count(scores, 8).
118
- why(
119
- count(scores, 8),
120
- proof(
121
- goal(count(scores, 8)),
122
- by(rule("statistics-summary.pl", clause(13))),
123
- bindings([binding("Name", scores), binding("Count", 8), binding("Values", [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])]),
124
- uses([
125
- proof(
126
- goal(sample(scores, [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])),
127
- by(fact("statistics-summary.pl", clause(5)))
128
- ),
129
- proof(
130
- goal(length([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 8)),
131
- by(builtin(length, 2))
132
- )
133
- ])
134
- )
135
- ).
136
-
137
3
  populationVariance(scores, 4.0).
138
- why(
139
- populationVariance(scores, 4.0),
140
- proof(
141
- goal(populationVariance(scores, 4.0)),
142
- by(rule("statistics-summary.pl", clause(14))),
143
- bindings([binding("Name", scores), binding("Variance", 4.0)]),
144
- uses([
145
- proof(
146
- goal(population_variance(scores, 4.0)),
147
- by(rule("statistics-summary.pl", clause(11))),
148
- bindings([binding("Name", scores), binding("Variance", 4.0), binding("Values", [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("SumSquaredErrors", 32.0), binding("Count", 8)]),
149
- uses([
150
- proof(
151
- goal(sample(scores, [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])),
152
- by(fact("statistics-summary.pl", clause(5)))
153
- ),
154
- proof(
155
- goal(mean(scores, 5.0)),
156
- by(rule("statistics-summary.pl", clause(8))),
157
- bindings([binding("Name", scores), binding("Mean", 5.0), binding("Values", [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 40.0), binding("Count", 8)]),
158
- uses([
159
- proof(
160
- goal(sample(scores, [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])),
161
- by(fact("statistics-summary.pl", clause(5)))
162
- ),
163
- proof(
164
- goal(sum([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 40.0)),
165
- by(rule("statistics-summary.pl", clause(7))),
166
- bindings([binding("X", 2.0), binding("Xs", [4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 40.0), binding("Rest", 38.0)]),
167
- uses([
168
- proof(
169
- goal(sum([4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 38.0)),
170
- by(rule("statistics-summary.pl", clause(7))),
171
- bindings([binding("X", 4.0), binding("Xs", [4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 38.0), binding("Rest", 34.0)]),
172
- uses([
173
- proof(
174
- goal(sum([4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 34.0)),
175
- by(rule("statistics-summary.pl", clause(7))),
176
- bindings([binding("X", 4.0), binding("Xs", [4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 34.0), binding("Rest", 30.0)]),
177
- uses([
178
- proof(
179
- goal(sum([4.0, 5.0, 5.0, 7.0, 9.0], 30.0)),
180
- by(rule("statistics-summary.pl", clause(7))),
181
- bindings([binding("X", 4.0), binding("Xs", [5.0, 5.0, 7.0, 9.0]), binding("Total", 30.0), binding("Rest", 26.0)]),
182
- uses([
183
- proof(
184
- goal(sum([5.0, 5.0, 7.0, 9.0], 26.0)),
185
- by(rule("statistics-summary.pl", clause(7))),
186
- bindings([binding("X", 5.0), binding("Xs", [5.0, 7.0, 9.0]), binding("Total", 26.0), binding("Rest", 21.0)]),
187
- uses([
188
- proof(
189
- goal(sum([5.0, 7.0, 9.0], 21.0)),
190
- by(rule("statistics-summary.pl", clause(7))),
191
- bindings([binding("X", 5.0), binding("Xs", [7.0, 9.0]), binding("Total", 21.0), binding("Rest", 16.0)]),
192
- uses([
193
- proof(
194
- goal(sum([7.0, 9.0], 16.0)),
195
- by(rule("statistics-summary.pl", clause(7))),
196
- bindings([binding("X", 7.0), binding("Xs", [9.0]), binding("Total", 16.0), binding("Rest", 9.0)]),
197
- uses([
198
- proof(
199
- goal(sum([9.0], 9.0)),
200
- by(rule("statistics-summary.pl", clause(7))),
201
- bindings([binding("X", 9.0), binding("Xs", []), binding("Total", 9.0), binding("Rest", 0.0)]),
202
- uses([
203
- proof(
204
- goal(sum([], 0.0)),
205
- by(fact("statistics-summary.pl", clause(6)))
206
- ),
207
- proof(
208
- goal(add(9.0, 0.0, 9.0)),
209
- by(builtin(add, 3))
210
- )
211
- ])
212
- ),
213
- proof(
214
- goal(add(7.0, 9.0, 16.0)),
215
- by(builtin(add, 3))
216
- )
217
- ])
218
- ),
219
- proof(
220
- goal(add(5.0, 16.0, 21.0)),
221
- by(builtin(add, 3))
222
- )
223
- ])
224
- ),
225
- proof(
226
- goal(add(5.0, 21.0, 26.0)),
227
- by(builtin(add, 3))
228
- )
229
- ])
230
- ),
231
- proof(
232
- goal(add(4.0, 26.0, 30.0)),
233
- by(builtin(add, 3))
234
- )
235
- ])
236
- ),
237
- proof(
238
- goal(add(4.0, 30.0, 34.0)),
239
- by(builtin(add, 3))
240
- )
241
- ])
242
- ),
243
- proof(
244
- goal(add(4.0, 34.0, 38.0)),
245
- by(builtin(add, 3))
246
- )
247
- ])
248
- ),
249
- proof(
250
- goal(add(2.0, 38.0, 40.0)),
251
- by(builtin(add, 3))
252
- )
253
- ])
254
- ),
255
- proof(
256
- goal(length([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 8)),
257
- by(builtin(length, 2))
258
- ),
259
- proof(
260
- goal(div(40.0, 8, 5.0)),
261
- by(builtin(div, 3))
262
- )
263
- ])
264
- ),
265
- proof(
266
- goal(squared_error_sum([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 32.0)),
267
- by(rule("statistics-summary.pl", clause(10))),
268
- bindings([binding("X", 2.0), binding("Xs", [4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 32.0), binding("Delta", -3.0), binding("Squared", 9.0), binding("Rest", 23.0)]),
269
- uses([
270
- proof(
271
- goal(sub(2.0, 5.0, -3.0)),
272
- by(builtin(sub, 3))
273
- ),
274
- proof(
275
- goal(pow(-3.0, 2.0, 9.0)),
276
- by(builtin(pow, 3))
277
- ),
278
- proof(
279
- goal(squared_error_sum([4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 23.0)),
280
- by(rule("statistics-summary.pl", clause(10))),
281
- bindings([binding("X", 4.0), binding("Xs", [4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 23.0), binding("Delta", -1.0), binding("Squared", 1.0), binding("Rest", 22.0)]),
282
- uses([
283
- proof(
284
- goal(sub(4.0, 5.0, -1.0)),
285
- by(builtin(sub, 3))
286
- ),
287
- proof(
288
- goal(pow(-1.0, 2.0, 1.0)),
289
- by(builtin(pow, 3))
290
- ),
291
- proof(
292
- goal(squared_error_sum([4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 22.0)),
293
- by(rule("statistics-summary.pl", clause(10))),
294
- bindings([binding("X", 4.0), binding("Xs", [4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 22.0), binding("Delta", -1.0), binding("Squared", 1.0), binding("Rest", 21.0)]),
295
- uses([
296
- proof(
297
- goal(sub(4.0, 5.0, -1.0)),
298
- by(builtin(sub, 3))
299
- ),
300
- proof(
301
- goal(pow(-1.0, 2.0, 1.0)),
302
- by(builtin(pow, 3))
303
- ),
304
- proof(
305
- goal(squared_error_sum([4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 21.0)),
306
- by(rule("statistics-summary.pl", clause(10))),
307
- bindings([binding("X", 4.0), binding("Xs", [5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 21.0), binding("Delta", -1.0), binding("Squared", 1.0), binding("Rest", 20.0)]),
308
- uses([
309
- proof(
310
- goal(sub(4.0, 5.0, -1.0)),
311
- by(builtin(sub, 3))
312
- ),
313
- proof(
314
- goal(pow(-1.0, 2.0, 1.0)),
315
- by(builtin(pow, 3))
316
- ),
317
- proof(
318
- goal(squared_error_sum([5.0, 5.0, 7.0, 9.0], 5.0, 20.0)),
319
- by(rule("statistics-summary.pl", clause(10))),
320
- bindings([binding("X", 5.0), binding("Xs", [5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 20.0), binding("Delta", 0.0), binding("Squared", 0.0), binding("Rest", 20.0)]),
321
- uses([
322
- proof(
323
- goal(sub(5.0, 5.0, 0.0)),
324
- by(builtin(sub, 3))
325
- ),
326
- proof(
327
- goal(pow(0.0, 2.0, 0.0)),
328
- by(builtin(pow, 3))
329
- ),
330
- proof(
331
- goal(squared_error_sum([5.0, 7.0, 9.0], 5.0, 20.0)),
332
- by(rule("statistics-summary.pl", clause(10))),
333
- bindings([binding("X", 5.0), binding("Xs", [7.0, 9.0]), binding("Mean", 5.0), binding("Total", 20.0), binding("Delta", 0.0), binding("Squared", 0.0), binding("Rest", 20.0)]),
334
- uses([
335
- proof(
336
- goal(sub(5.0, 5.0, 0.0)),
337
- by(builtin(sub, 3))
338
- ),
339
- proof(
340
- goal(pow(0.0, 2.0, 0.0)),
341
- by(builtin(pow, 3))
342
- ),
343
- proof(
344
- goal(squared_error_sum([7.0, 9.0], 5.0, 20.0)),
345
- by(rule("statistics-summary.pl", clause(10))),
346
- bindings([binding("X", 7.0), binding("Xs", [9.0]), binding("Mean", 5.0), binding("Total", 20.0), binding("Delta", 2.0), binding("Squared", 4.0), binding("Rest", 16.0)]),
347
- uses([
348
- proof(
349
- goal(sub(7.0, 5.0, 2.0)),
350
- by(builtin(sub, 3))
351
- ),
352
- proof(
353
- goal(pow(2.0, 2.0, 4.0)),
354
- by(builtin(pow, 3))
355
- ),
356
- proof(
357
- goal(squared_error_sum([9.0], 5.0, 16.0)),
358
- by(rule("statistics-summary.pl", clause(10))),
359
- bindings([binding("X", 9.0), binding("Xs", []), binding("Mean", 5.0), binding("Total", 16.0), binding("Delta", 4.0), binding("Squared", 16.0), binding("Rest", 0.0)]),
360
- uses([
361
- proof(
362
- goal(sub(9.0, 5.0, 4.0)),
363
- by(builtin(sub, 3))
364
- ),
365
- proof(
366
- goal(pow(4.0, 2.0, 16.0)),
367
- by(builtin(pow, 3))
368
- ),
369
- proof(
370
- goal(squared_error_sum([], 5.0, 0.0)),
371
- by(fact("statistics-summary.pl", clause(9))),
372
- bindings([binding("_Mean", 5.0)])
373
- ),
374
- proof(
375
- goal(add(16.0, 0.0, 16.0)),
376
- by(builtin(add, 3))
377
- )
378
- ])
379
- ),
380
- proof(
381
- goal(add(4.0, 16.0, 20.0)),
382
- by(builtin(add, 3))
383
- )
384
- ])
385
- ),
386
- proof(
387
- goal(add(0.0, 20.0, 20.0)),
388
- by(builtin(add, 3))
389
- )
390
- ])
391
- ),
392
- proof(
393
- goal(add(0.0, 20.0, 20.0)),
394
- by(builtin(add, 3))
395
- )
396
- ])
397
- ),
398
- proof(
399
- goal(add(1.0, 20.0, 21.0)),
400
- by(builtin(add, 3))
401
- )
402
- ])
403
- ),
404
- proof(
405
- goal(add(1.0, 21.0, 22.0)),
406
- by(builtin(add, 3))
407
- )
408
- ])
409
- ),
410
- proof(
411
- goal(add(1.0, 22.0, 23.0)),
412
- by(builtin(add, 3))
413
- )
414
- ])
415
- ),
416
- proof(
417
- goal(add(9.0, 23.0, 32.0)),
418
- by(builtin(add, 3))
419
- )
420
- ])
421
- ),
422
- proof(
423
- goal(length([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 8)),
424
- by(builtin(length, 2))
425
- ),
426
- proof(
427
- goal(div(32.0, 8, 4.0)),
428
- by(builtin(div, 3))
429
- )
430
- ])
431
- )
432
- ])
433
- )
434
- ).
435
-
436
4
  populationStddev(scores, 2.0).
437
- why(
438
- populationStddev(scores, 2.0),
439
- proof(
440
- goal(populationStddev(scores, 2.0)),
441
- by(rule("statistics-summary.pl", clause(15))),
442
- bindings([binding("Name", scores), binding("Stddev", 2.0)]),
443
- uses([
444
- proof(
445
- goal(population_stddev(scores, 2.0)),
446
- by(rule("statistics-summary.pl", clause(12))),
447
- bindings([binding("Name", scores), binding("Stddev", 2.0), binding("Variance", 4.0)]),
448
- uses([
449
- proof(
450
- goal(population_variance(scores, 4.0)),
451
- by(rule("statistics-summary.pl", clause(11))),
452
- bindings([binding("Name", scores), binding("Variance", 4.0), binding("Values", [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("SumSquaredErrors", 32.0), binding("Count", 8)]),
453
- uses([
454
- proof(
455
- goal(sample(scores, [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])),
456
- by(fact("statistics-summary.pl", clause(5)))
457
- ),
458
- proof(
459
- goal(mean(scores, 5.0)),
460
- by(rule("statistics-summary.pl", clause(8))),
461
- bindings([binding("Name", scores), binding("Mean", 5.0), binding("Values", [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 40.0), binding("Count", 8)]),
462
- uses([
463
- proof(
464
- goal(sample(scores, [2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0])),
465
- by(fact("statistics-summary.pl", clause(5)))
466
- ),
467
- proof(
468
- goal(sum([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 40.0)),
469
- by(rule("statistics-summary.pl", clause(7))),
470
- bindings([binding("X", 2.0), binding("Xs", [4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 40.0), binding("Rest", 38.0)]),
471
- uses([
472
- proof(
473
- goal(sum([4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 38.0)),
474
- by(rule("statistics-summary.pl", clause(7))),
475
- bindings([binding("X", 4.0), binding("Xs", [4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 38.0), binding("Rest", 34.0)]),
476
- uses([
477
- proof(
478
- goal(sum([4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 34.0)),
479
- by(rule("statistics-summary.pl", clause(7))),
480
- bindings([binding("X", 4.0), binding("Xs", [4.0, 5.0, 5.0, 7.0, 9.0]), binding("Total", 34.0), binding("Rest", 30.0)]),
481
- uses([
482
- proof(
483
- goal(sum([4.0, 5.0, 5.0, 7.0, 9.0], 30.0)),
484
- by(rule("statistics-summary.pl", clause(7))),
485
- bindings([binding("X", 4.0), binding("Xs", [5.0, 5.0, 7.0, 9.0]), binding("Total", 30.0), binding("Rest", 26.0)]),
486
- uses([
487
- proof(
488
- goal(sum([5.0, 5.0, 7.0, 9.0], 26.0)),
489
- by(rule("statistics-summary.pl", clause(7))),
490
- bindings([binding("X", 5.0), binding("Xs", [5.0, 7.0, 9.0]), binding("Total", 26.0), binding("Rest", 21.0)]),
491
- uses([
492
- proof(
493
- goal(sum([5.0, 7.0, 9.0], 21.0)),
494
- by(rule("statistics-summary.pl", clause(7))),
495
- bindings([binding("X", 5.0), binding("Xs", [7.0, 9.0]), binding("Total", 21.0), binding("Rest", 16.0)]),
496
- uses([
497
- proof(
498
- goal(sum([7.0, 9.0], 16.0)),
499
- by(rule("statistics-summary.pl", clause(7))),
500
- bindings([binding("X", 7.0), binding("Xs", [9.0]), binding("Total", 16.0), binding("Rest", 9.0)]),
501
- uses([
502
- proof(
503
- goal(sum([9.0], 9.0)),
504
- by(rule("statistics-summary.pl", clause(7))),
505
- bindings([binding("X", 9.0), binding("Xs", []), binding("Total", 9.0), binding("Rest", 0.0)]),
506
- uses([
507
- proof(
508
- goal(sum([], 0.0)),
509
- by(fact("statistics-summary.pl", clause(6)))
510
- ),
511
- proof(
512
- goal(add(9.0, 0.0, 9.0)),
513
- by(builtin(add, 3))
514
- )
515
- ])
516
- ),
517
- proof(
518
- goal(add(7.0, 9.0, 16.0)),
519
- by(builtin(add, 3))
520
- )
521
- ])
522
- ),
523
- proof(
524
- goal(add(5.0, 16.0, 21.0)),
525
- by(builtin(add, 3))
526
- )
527
- ])
528
- ),
529
- proof(
530
- goal(add(5.0, 21.0, 26.0)),
531
- by(builtin(add, 3))
532
- )
533
- ])
534
- ),
535
- proof(
536
- goal(add(4.0, 26.0, 30.0)),
537
- by(builtin(add, 3))
538
- )
539
- ])
540
- ),
541
- proof(
542
- goal(add(4.0, 30.0, 34.0)),
543
- by(builtin(add, 3))
544
- )
545
- ])
546
- ),
547
- proof(
548
- goal(add(4.0, 34.0, 38.0)),
549
- by(builtin(add, 3))
550
- )
551
- ])
552
- ),
553
- proof(
554
- goal(add(2.0, 38.0, 40.0)),
555
- by(builtin(add, 3))
556
- )
557
- ])
558
- ),
559
- proof(
560
- goal(length([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 8)),
561
- by(builtin(length, 2))
562
- ),
563
- proof(
564
- goal(div(40.0, 8, 5.0)),
565
- by(builtin(div, 3))
566
- )
567
- ])
568
- ),
569
- proof(
570
- goal(squared_error_sum([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 32.0)),
571
- by(rule("statistics-summary.pl", clause(10))),
572
- bindings([binding("X", 2.0), binding("Xs", [4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 32.0), binding("Delta", -3.0), binding("Squared", 9.0), binding("Rest", 23.0)]),
573
- uses([
574
- proof(
575
- goal(sub(2.0, 5.0, -3.0)),
576
- by(builtin(sub, 3))
577
- ),
578
- proof(
579
- goal(pow(-3.0, 2.0, 9.0)),
580
- by(builtin(pow, 3))
581
- ),
582
- proof(
583
- goal(squared_error_sum([4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 23.0)),
584
- by(rule("statistics-summary.pl", clause(10))),
585
- bindings([binding("X", 4.0), binding("Xs", [4.0, 4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 23.0), binding("Delta", -1.0), binding("Squared", 1.0), binding("Rest", 22.0)]),
586
- uses([
587
- proof(
588
- goal(sub(4.0, 5.0, -1.0)),
589
- by(builtin(sub, 3))
590
- ),
591
- proof(
592
- goal(pow(-1.0, 2.0, 1.0)),
593
- by(builtin(pow, 3))
594
- ),
595
- proof(
596
- goal(squared_error_sum([4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 22.0)),
597
- by(rule("statistics-summary.pl", clause(10))),
598
- bindings([binding("X", 4.0), binding("Xs", [4.0, 5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 22.0), binding("Delta", -1.0), binding("Squared", 1.0), binding("Rest", 21.0)]),
599
- uses([
600
- proof(
601
- goal(sub(4.0, 5.0, -1.0)),
602
- by(builtin(sub, 3))
603
- ),
604
- proof(
605
- goal(pow(-1.0, 2.0, 1.0)),
606
- by(builtin(pow, 3))
607
- ),
608
- proof(
609
- goal(squared_error_sum([4.0, 5.0, 5.0, 7.0, 9.0], 5.0, 21.0)),
610
- by(rule("statistics-summary.pl", clause(10))),
611
- bindings([binding("X", 4.0), binding("Xs", [5.0, 5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 21.0), binding("Delta", -1.0), binding("Squared", 1.0), binding("Rest", 20.0)]),
612
- uses([
613
- proof(
614
- goal(sub(4.0, 5.0, -1.0)),
615
- by(builtin(sub, 3))
616
- ),
617
- proof(
618
- goal(pow(-1.0, 2.0, 1.0)),
619
- by(builtin(pow, 3))
620
- ),
621
- proof(
622
- goal(squared_error_sum([5.0, 5.0, 7.0, 9.0], 5.0, 20.0)),
623
- by(rule("statistics-summary.pl", clause(10))),
624
- bindings([binding("X", 5.0), binding("Xs", [5.0, 7.0, 9.0]), binding("Mean", 5.0), binding("Total", 20.0), binding("Delta", 0.0), binding("Squared", 0.0), binding("Rest", 20.0)]),
625
- uses([
626
- proof(
627
- goal(sub(5.0, 5.0, 0.0)),
628
- by(builtin(sub, 3))
629
- ),
630
- proof(
631
- goal(pow(0.0, 2.0, 0.0)),
632
- by(builtin(pow, 3))
633
- ),
634
- proof(
635
- goal(squared_error_sum([5.0, 7.0, 9.0], 5.0, 20.0)),
636
- by(rule("statistics-summary.pl", clause(10))),
637
- bindings([binding("X", 5.0), binding("Xs", [7.0, 9.0]), binding("Mean", 5.0), binding("Total", 20.0), binding("Delta", 0.0), binding("Squared", 0.0), binding("Rest", 20.0)]),
638
- uses([
639
- proof(
640
- goal(sub(5.0, 5.0, 0.0)),
641
- by(builtin(sub, 3))
642
- ),
643
- proof(
644
- goal(pow(0.0, 2.0, 0.0)),
645
- by(builtin(pow, 3))
646
- ),
647
- proof(
648
- goal(squared_error_sum([7.0, 9.0], 5.0, 20.0)),
649
- by(rule("statistics-summary.pl", clause(10))),
650
- bindings([binding("X", 7.0), binding("Xs", [9.0]), binding("Mean", 5.0), binding("Total", 20.0), binding("Delta", 2.0), binding("Squared", 4.0), binding("Rest", 16.0)]),
651
- uses([
652
- proof(
653
- goal(sub(7.0, 5.0, 2.0)),
654
- by(builtin(sub, 3))
655
- ),
656
- proof(
657
- goal(pow(2.0, 2.0, 4.0)),
658
- by(builtin(pow, 3))
659
- ),
660
- proof(
661
- goal(squared_error_sum([9.0], 5.0, 16.0)),
662
- by(rule("statistics-summary.pl", clause(10))),
663
- bindings([binding("X", 9.0), binding("Xs", []), binding("Mean", 5.0), binding("Total", 16.0), binding("Delta", 4.0), binding("Squared", 16.0), binding("Rest", 0.0)]),
664
- uses([
665
- proof(
666
- goal(sub(9.0, 5.0, 4.0)),
667
- by(builtin(sub, 3))
668
- ),
669
- proof(
670
- goal(pow(4.0, 2.0, 16.0)),
671
- by(builtin(pow, 3))
672
- ),
673
- proof(
674
- goal(squared_error_sum([], 5.0, 0.0)),
675
- by(fact("statistics-summary.pl", clause(9))),
676
- bindings([binding("_Mean", 5.0)])
677
- ),
678
- proof(
679
- goal(add(16.0, 0.0, 16.0)),
680
- by(builtin(add, 3))
681
- )
682
- ])
683
- ),
684
- proof(
685
- goal(add(4.0, 16.0, 20.0)),
686
- by(builtin(add, 3))
687
- )
688
- ])
689
- ),
690
- proof(
691
- goal(add(0.0, 20.0, 20.0)),
692
- by(builtin(add, 3))
693
- )
694
- ])
695
- ),
696
- proof(
697
- goal(add(0.0, 20.0, 20.0)),
698
- by(builtin(add, 3))
699
- )
700
- ])
701
- ),
702
- proof(
703
- goal(add(1.0, 20.0, 21.0)),
704
- by(builtin(add, 3))
705
- )
706
- ])
707
- ),
708
- proof(
709
- goal(add(1.0, 21.0, 22.0)),
710
- by(builtin(add, 3))
711
- )
712
- ])
713
- ),
714
- proof(
715
- goal(add(1.0, 22.0, 23.0)),
716
- by(builtin(add, 3))
717
- )
718
- ])
719
- ),
720
- proof(
721
- goal(add(9.0, 23.0, 32.0)),
722
- by(builtin(add, 3))
723
- )
724
- ])
725
- ),
726
- proof(
727
- goal(length([2.0, 4.0, 4.0, 4.0, 5.0, 5.0, 7.0, 9.0], 8)),
728
- by(builtin(length, 2))
729
- ),
730
- proof(
731
- goal(div(32.0, 8, 4.0)),
732
- by(builtin(div, 3))
733
- )
734
- ])
735
- ),
736
- proof(
737
- goal(pow(4.0, 0.5, 2.0)),
738
- by(builtin(pow, 3))
739
- )
740
- ])
741
- )
742
- ])
743
- )
744
- ).
745
-