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.
- package/README.md +19 -14
- package/SPEC.md +4 -4
- package/conformance/expected/core/001_fact_query.out +0 -8
- package/conformance/expected/core/002_rule_recursion.out +0 -41
- package/conformance/expected/core/003_terms_and_readback.out +0 -104
- package/conformance/expected/core/004_conjunction_and_parentheses.out +0 -25
- package/conformance/expected/core/005_list_deconstruction.out +0 -32
- package/conformance/expected/core/006_comma_formula_data.out +0 -15
- package/conformance/expected/core/007_anonymous_variables.out +0 -19
- package/conformance/expected/core/008_graphic_atoms.out +0 -24
- package/conformance/expected/core/009_comments_and_whitespace.out +0 -30
- package/conformance/expected/core/010_variable_scope_and_reuse.out +0 -52
- package/conformance/expected/core/011_predicate_arity.out +0 -30
- package/conformance/expected/core/012_nested_compound_unification.out +0 -30
- package/conformance/expected/core/013_multiple_clauses_order.out +0 -44
- package/conformance/expected/core/014_failure_filters_answers.out +0 -19
- package/conformance/expected/core/015_improper_list_unification.out +0 -45
- package/conformance/expected/core/016_zero_arity_compound.out +0 -15
- package/conformance/expected/core/017_three_step_recursion.out +0 -99
- package/conformance/expected/core/018_quoted_atom_readback.out +0 -45
- package/conformance/expected/core/019_parenthesized_three_conjuncts.out +0 -36
- package/conformance/expected/core/020_nested_list_terms.out +0 -30
- package/conformance/expected/extension/001_default_derived_output.out +0 -56
- package/conformance/expected/extension/002_materialize_focus.out +0 -22
- package/conformance/expected/extension/003_arithmetic_and_comparison.out +0 -148
- package/conformance/expected/extension/004_strings_and_atoms.out +0 -58
- package/conformance/expected/extension/005_lists_aggregation_ordering.out +0 -135
- package/conformance/expected/extension/006_formula_terms.out +0 -76
- package/conformance/expected/extension/007_negation_once_generators.out +0 -40
- package/conformance/expected/extension/008_equality_and_inequality.out +0 -58
- package/conformance/expected/extension/009_list_relations.out +0 -73
- package/conformance/expected/extension/010_append_splits.out +0 -45
- package/conformance/expected/extension/011_matching_and_comparison.out +0 -70
- package/conformance/expected/extension/012_memoize_declaration.out +0 -41
- package/conformance/expected/extension/013_numeric_functions.out +0 -105
- package/conformance/expected/extension/014_between_enumeration.out +0 -45
- package/conformance/expected/extension/015_smallest_divisor.out +0 -15
- package/conformance/expected/extension/016_negation_filter.out +0 -38
- package/conformance/expected/extension/017_once_user_predicate.out +0 -21
- package/conformance/expected/extension/018_findall_user_goal.out +0 -15
- package/conformance/expected/extension/019_sort_deduplicates_atoms.out +0 -15
- package/conformance/expected/extension/020_append_bound_prefix_suffix.out +0 -30
- package/conformance/expected/extension/021_nth0_index_generation.out +0 -15
- package/conformance/expected/extension/022_set_nth0_edges.out +0 -30
- package/conformance/expected/extension/023_select_duplicate_occurrences.out +0 -30
- package/conformance/expected/extension/024_not_member_filter.out +0 -19
- package/conformance/expected/extension/025_is_list_filter.out +0 -19
- package/conformance/expected/extension/026_nested_formula_terms.out +0 -114
- package/conformance/expected/extension/027_materialize_excludes_source_fact.out +0 -14
- package/conformance/expected/extension/028_numeric_and_lexical_comparison.out +0 -42
- package/conformance/expected/extension/029_string_matching_filters.out +0 -38
- package/conformance/expected/extension/030_string_and_atom_concat.out +0 -30
- package/conformance/expected/extension/031_countall_empty_and_nonempty.out +0 -18
- package/conformance/expected/extension/032_sumall_numeric_template.out +0 -8
- package/conformance/expected/extension/033_aggregate_min_template.out +0 -8
- package/conformance/expected/extension/034_aggregate_max_compound_key.out +0 -8
- package/examples/output/access-control-policy.pl +0 -156
- package/examples/output/ackermann.pl +0 -1240
- package/examples/output/age.pl +0 -69
- package/examples/output/aliases-and-namespaces.pl +0 -73
- package/examples/output/alignment-demo.pl +0 -862
- package/examples/output/allen-interval-calculus.pl +0 -9169
- package/examples/output/ancestor.pl +0 -134
- package/examples/output/animal.pl +0 -64
- package/examples/output/annotation.pl +0 -76
- package/examples/output/backward.pl +0 -21
- package/examples/output/basic-monadic.pl +0 -22770
- package/examples/output/bayes-diagnosis.pl +0 -195
- package/examples/output/bayes-therapy.pl +0 -34873
- package/examples/output/beam-deflection.pl +0 -222
- package/examples/output/blocks-world-planning.pl +0 -1339
- package/examples/output/bmi.pl +0 -1903
- package/examples/output/braking-safety-worlds.pl +0 -2452
- package/examples/output/buck-converter-design.pl +0 -663
- package/examples/output/cache-performance.pl +0 -306
- package/examples/output/canary-release.pl +0 -167
- package/examples/output/cat-koko.pl +0 -83
- package/examples/output/clinical-trial-screening.pl +0 -380
- package/examples/output/collatz-1000.pl +0 -19000
- package/examples/output/combinatorics-findall-sort.pl +0 -56
- package/examples/output/competitive-enzyme-kinetics.pl +0 -563
- package/examples/output/complex-matrix-stability.pl +0 -250
- package/examples/output/complex.pl +0 -653
- package/examples/output/composition-of-injective-functions-is-injective.pl +0 -256
- package/examples/output/context-association.pl +0 -75
- package/examples/output/control-system.pl +0 -328
- package/examples/output/cryptarithmetic-send-more-money.pl +0 -168
- package/examples/output/cyclic-path.pl +0 -504
- package/examples/output/d3-group.pl +0 -56
- package/examples/output/dairy-energy-balance.pl +0 -1034
- package/examples/output/data-negotiation.pl +0 -75
- package/examples/output/deep-taxonomy-10.pl +0 -1235
- package/examples/output/deep-taxonomy-100.pl +0 -1235
- package/examples/output/deep-taxonomy-1000.pl +0 -1235
- package/examples/output/deep-taxonomy-10000.pl +0 -2915
- package/examples/output/deep-taxonomy-100000.pl +0 -20240
- package/examples/output/delfour.pl +0 -2829
- package/examples/output/dense-hamiltonian-cycle.pl +0 -207
- package/examples/output/deontic-logic.pl +0 -105
- package/examples/output/derived-rule.pl +0 -41
- package/examples/output/diamond-property.pl +0 -303
- package/examples/output/dijkstra-findall-sort.pl +0 -484
- package/examples/output/dijkstra-risk-path.pl +0 -4841
- package/examples/output/dijkstra.pl +0 -1336
- package/examples/output/dining-philosophers.pl +0 -21646
- package/examples/output/dog.pl +0 -30
- package/examples/output/drone-corridor-planner.pl +0 -2466
- package/examples/output/easter-computus.pl +0 -5690
- package/examples/output/electrical-rc-filter.pl +0 -102
- package/examples/output/epidemic-policy.pl +0 -760
- package/examples/output/equivalence-classes-overlap-implies-same-class.pl +0 -1080
- package/examples/output/eulerian-path.pl +0 -383
- package/examples/output/ev-range-worlds.pl +0 -2294
- package/examples/output/exact-cover-sudoku.pl +0 -396
- package/examples/output/existential-rule.pl +0 -38
- package/examples/output/exoplanet-validation-worlds.pl +0 -1904
- package/examples/output/expression-eval.pl +0 -104
- package/examples/output/family-cousins.pl +0 -3852
- package/examples/output/fastpow.pl +0 -1064
- package/examples/output/fft8-numeric.pl +0 -2556
- package/examples/output/fibonacci.pl +0 -2060
- package/examples/output/field-nitrogen-balance.pl +0 -1452
- package/examples/output/floating-point.pl +0 -151
- package/examples/output/four-color-map.pl +0 -191
- package/examples/output/fundamental-theorem-arithmetic.pl +0 -1610
- package/examples/output/gcd-bezout-identity.pl +0 -1842
- package/examples/output/gd-step-certified.pl +0 -32354
- package/examples/output/gdpr-compliance.pl +0 -193
- package/examples/output/goldbach-1000.pl +0 -17490
- package/examples/output/good-cobbler.pl +0 -15
- package/examples/output/gps.pl +0 -4166
- package/examples/output/graph-reachability.pl +0 -148
- package/examples/output/gray-code-counter.pl +0 -835
- package/examples/output/greatest-lower-bound-uniqueness.pl +0 -148
- package/examples/output/group-inverse-uniqueness.pl +0 -82
- package/examples/output/hamiltonian-cycle.pl +0 -102
- package/examples/output/hamiltonian-path.pl +0 -14157
- package/examples/output/hamming-code.pl +0 -2665
- package/examples/output/hanoi.pl +0 -184
- package/examples/output/heat-loss.pl +0 -223
- package/examples/output/heron-theorem.pl +0 -253
- package/examples/output/ideal-gas-law.pl +0 -148
- package/examples/output/illegitimate-reasoning.pl +0 -530
- package/examples/output/kaprekar.pl +0 -208
- package/examples/output/law-of-cosines.pl +0 -165
- package/examples/output/least-squares-regression.pl +0 -1447
- package/examples/output/list-collection.pl +0 -49
- package/examples/output/lldm.pl +0 -17298
- package/examples/output/manufacturing-quality-control.pl +0 -562
- package/examples/output/matrix.pl +0 -206
- package/examples/output/microgrid-dispatch.pl +0 -787
- package/examples/output/monkey-bananas.pl +0 -575
- package/examples/output/n-queens.pl +0 -2046
- package/examples/output/network-sla.pl +0 -282
- package/examples/output/newton-raphson.pl +0 -756
- package/examples/output/nixon-diamond.pl +0 -176
- package/examples/output/odrl-dpv-healthcare-risk-ranked.pl +0 -6148
- package/examples/output/odrl-dpv-risk-ranked.pl +0 -12961
- package/examples/output/orbital-transfer-design.pl +0 -961
- package/examples/output/path-discovery.pl +0 -333
- package/examples/output/peano-arithmetic.pl +0 -1432
- package/examples/output/peasant.pl +0 -190
- package/examples/output/pendulum-period.pl +0 -271
- package/examples/output/polynomial.pl +0 -7952
- package/examples/output/project-portfolio-optimization.pl +0 -93
- package/examples/output/proof-contrapositive.pl +0 -75
- package/examples/output/quadratic-formula.pl +0 -454
- package/examples/output/quine-mccluskey.pl +0 -188
- package/examples/output/radioactive-decay.pl +0 -299
- package/examples/output/sat-dpll.pl +0 -121
- package/examples/output/security-incident-correlation.pl +0 -267
- package/examples/output/service-impact.pl +0 -457
- package/examples/output/sieve.pl +0 -19
- package/examples/output/skolem-functions.pl +0 -264
- package/examples/output/socket-age.pl +0 -31
- package/examples/output/socket-family.pl +0 -56
- package/examples/output/socrates.pl +0 -36
- package/examples/output/statistics-summary.pl +0 -741
- package/examples/output/sudoku.pl +0 -38
- package/examples/output/superdense-coding.pl +0 -476
- package/examples/output/traveling-salesman.pl +0 -284
- package/examples/output/turing.pl +0 -2144
- package/examples/output/vector-similarity.pl +0 -421
- package/examples/output/witch.pl +0 -209
- package/examples/output/wolf-goat-cabbage.pl +0 -900
- package/examples/output/zebra.pl +0 -401
- package/examples/proof/age.pl +71 -0
- package/examples/proof/aliases-and-namespaces.pl +78 -0
- package/examples/proof/ancestor.pl +140 -0
- package/examples/proof/animal.pl +68 -0
- package/examples/proof/annotation.pl +80 -0
- package/examples/proof/backward.pl +22 -0
- package/examples/proof/cat-koko.pl +86 -0
- package/examples/proof/data-negotiation.pl +76 -0
- package/examples/proof/derived-rule.pl +43 -0
- package/examples/proof/dog.pl +31 -0
- package/examples/proof/electrical-rc-filter.pl +105 -0
- package/examples/proof/existential-rule.pl +40 -0
- package/examples/proof/floating-point.pl +160 -0
- package/examples/proof/good-cobbler.pl +16 -0
- package/examples/proof/group-inverse-uniqueness.pl +84 -0
- package/examples/proof/list-collection.pl +52 -0
- package/examples/proof/proof-contrapositive.pl +78 -0
- package/examples/proof/socket-age.pl +32 -0
- package/examples/proof/socket-family.pl +59 -0
- package/examples/proof/socrates.pl +38 -0
- package/examples/socket-age.pl +4 -4
- package/examples/socket-family.pl +4 -4
- package/package.json +1 -1
- package/playground-worker.mjs +4 -4
- package/playground.html +15 -15
- package/src/cli.js +10 -10
- package/src/index.js +3 -2
- package/src/parser.js +130 -1
- package/src/program.js +33 -27
- package/test/run-all.js +0 -0
- package/test/run-conformance.js +0 -0
- package/test/run-examples.js +38 -8
- package/test/run-regression.js +29 -28
|
@@ -1,216 +1,8 @@
|
|
|
1
1
|
kaprekarSteps(3524, 3).
|
|
2
|
-
why(
|
|
3
|
-
kaprekarSteps(3524, 3),
|
|
4
|
-
proof(
|
|
5
|
-
goal(kaprekarSteps(3524, 3)),
|
|
6
|
-
by(rule("kaprekar.pl", clause(11))),
|
|
7
|
-
bindings([binding("N", 3524), binding("Count", 3)]),
|
|
8
|
-
uses([
|
|
9
|
-
proof(
|
|
10
|
-
goal(sample(3524)),
|
|
11
|
-
by(fact("kaprekar.pl", clause(6)))
|
|
12
|
-
),
|
|
13
|
-
proof(
|
|
14
|
-
goal(recursion_count(3524, 3)),
|
|
15
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
16
|
-
bindings([binding("N", 3524), binding("Count", 3)]),
|
|
17
|
-
uses([
|
|
18
|
-
proof(
|
|
19
|
-
goal(kaprekar_steps(3524, 3)),
|
|
20
|
-
by(builtin(kaprekar_steps, 2))
|
|
21
|
-
)
|
|
22
|
-
])
|
|
23
|
-
)
|
|
24
|
-
])
|
|
25
|
-
)
|
|
26
|
-
).
|
|
27
|
-
|
|
28
2
|
kaprekarSteps(2111, 5).
|
|
29
|
-
why(
|
|
30
|
-
kaprekarSteps(2111, 5),
|
|
31
|
-
proof(
|
|
32
|
-
goal(kaprekarSteps(2111, 5)),
|
|
33
|
-
by(rule("kaprekar.pl", clause(11))),
|
|
34
|
-
bindings([binding("N", 2111), binding("Count", 5)]),
|
|
35
|
-
uses([
|
|
36
|
-
proof(
|
|
37
|
-
goal(sample(2111)),
|
|
38
|
-
by(fact("kaprekar.pl", clause(7)))
|
|
39
|
-
),
|
|
40
|
-
proof(
|
|
41
|
-
goal(recursion_count(2111, 5)),
|
|
42
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
43
|
-
bindings([binding("N", 2111), binding("Count", 5)]),
|
|
44
|
-
uses([
|
|
45
|
-
proof(
|
|
46
|
-
goal(kaprekar_steps(2111, 5)),
|
|
47
|
-
by(builtin(kaprekar_steps, 2))
|
|
48
|
-
)
|
|
49
|
-
])
|
|
50
|
-
)
|
|
51
|
-
])
|
|
52
|
-
)
|
|
53
|
-
).
|
|
54
|
-
|
|
55
3
|
kaprekarSteps(9831, 7).
|
|
56
|
-
why(
|
|
57
|
-
kaprekarSteps(9831, 7),
|
|
58
|
-
proof(
|
|
59
|
-
goal(kaprekarSteps(9831, 7)),
|
|
60
|
-
by(rule("kaprekar.pl", clause(11))),
|
|
61
|
-
bindings([binding("N", 9831), binding("Count", 7)]),
|
|
62
|
-
uses([
|
|
63
|
-
proof(
|
|
64
|
-
goal(sample(9831)),
|
|
65
|
-
by(fact("kaprekar.pl", clause(8)))
|
|
66
|
-
),
|
|
67
|
-
proof(
|
|
68
|
-
goal(recursion_count(9831, 7)),
|
|
69
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
70
|
-
bindings([binding("N", 9831), binding("Count", 7)]),
|
|
71
|
-
uses([
|
|
72
|
-
proof(
|
|
73
|
-
goal(kaprekar_steps(9831, 7)),
|
|
74
|
-
by(builtin(kaprekar_steps, 2))
|
|
75
|
-
)
|
|
76
|
-
])
|
|
77
|
-
)
|
|
78
|
-
])
|
|
79
|
-
)
|
|
80
|
-
).
|
|
81
|
-
|
|
82
4
|
kaprekarSteps(6174, 0).
|
|
83
|
-
why(
|
|
84
|
-
kaprekarSteps(6174, 0),
|
|
85
|
-
proof(
|
|
86
|
-
goal(kaprekarSteps(6174, 0)),
|
|
87
|
-
by(rule("kaprekar.pl", clause(11))),
|
|
88
|
-
bindings([binding("N", 6174), binding("Count", 0)]),
|
|
89
|
-
uses([
|
|
90
|
-
proof(
|
|
91
|
-
goal(sample(6174)),
|
|
92
|
-
by(fact("kaprekar.pl", clause(9)))
|
|
93
|
-
),
|
|
94
|
-
proof(
|
|
95
|
-
goal(recursion_count(6174, 0)),
|
|
96
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
97
|
-
bindings([binding("N", 6174), binding("Count", 0)]),
|
|
98
|
-
uses([
|
|
99
|
-
proof(
|
|
100
|
-
goal(kaprekar_steps(6174, 0)),
|
|
101
|
-
by(builtin(kaprekar_steps, 2))
|
|
102
|
-
)
|
|
103
|
-
])
|
|
104
|
-
)
|
|
105
|
-
])
|
|
106
|
-
)
|
|
107
|
-
).
|
|
108
|
-
|
|
109
5
|
reachesConstant(kaprekar, 3524).
|
|
110
|
-
why(
|
|
111
|
-
reachesConstant(kaprekar, 3524),
|
|
112
|
-
proof(
|
|
113
|
-
goal(reachesConstant(kaprekar, 3524)),
|
|
114
|
-
by(rule("kaprekar.pl", clause(12))),
|
|
115
|
-
bindings([binding("N", 3524), binding("_Count", 3)]),
|
|
116
|
-
uses([
|
|
117
|
-
proof(
|
|
118
|
-
goal(sample(3524)),
|
|
119
|
-
by(fact("kaprekar.pl", clause(6)))
|
|
120
|
-
),
|
|
121
|
-
proof(
|
|
122
|
-
goal(recursion_count(3524, 3)),
|
|
123
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
124
|
-
bindings([binding("N", 3524), binding("Count", 3)]),
|
|
125
|
-
uses([
|
|
126
|
-
proof(
|
|
127
|
-
goal(kaprekar_steps(3524, 3)),
|
|
128
|
-
by(builtin(kaprekar_steps, 2))
|
|
129
|
-
)
|
|
130
|
-
])
|
|
131
|
-
)
|
|
132
|
-
])
|
|
133
|
-
)
|
|
134
|
-
).
|
|
135
|
-
|
|
136
6
|
reachesConstant(kaprekar, 2111).
|
|
137
|
-
why(
|
|
138
|
-
reachesConstant(kaprekar, 2111),
|
|
139
|
-
proof(
|
|
140
|
-
goal(reachesConstant(kaprekar, 2111)),
|
|
141
|
-
by(rule("kaprekar.pl", clause(12))),
|
|
142
|
-
bindings([binding("N", 2111), binding("_Count", 5)]),
|
|
143
|
-
uses([
|
|
144
|
-
proof(
|
|
145
|
-
goal(sample(2111)),
|
|
146
|
-
by(fact("kaprekar.pl", clause(7)))
|
|
147
|
-
),
|
|
148
|
-
proof(
|
|
149
|
-
goal(recursion_count(2111, 5)),
|
|
150
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
151
|
-
bindings([binding("N", 2111), binding("Count", 5)]),
|
|
152
|
-
uses([
|
|
153
|
-
proof(
|
|
154
|
-
goal(kaprekar_steps(2111, 5)),
|
|
155
|
-
by(builtin(kaprekar_steps, 2))
|
|
156
|
-
)
|
|
157
|
-
])
|
|
158
|
-
)
|
|
159
|
-
])
|
|
160
|
-
)
|
|
161
|
-
).
|
|
162
|
-
|
|
163
7
|
reachesConstant(kaprekar, 9831).
|
|
164
|
-
why(
|
|
165
|
-
reachesConstant(kaprekar, 9831),
|
|
166
|
-
proof(
|
|
167
|
-
goal(reachesConstant(kaprekar, 9831)),
|
|
168
|
-
by(rule("kaprekar.pl", clause(12))),
|
|
169
|
-
bindings([binding("N", 9831), binding("_Count", 7)]),
|
|
170
|
-
uses([
|
|
171
|
-
proof(
|
|
172
|
-
goal(sample(9831)),
|
|
173
|
-
by(fact("kaprekar.pl", clause(8)))
|
|
174
|
-
),
|
|
175
|
-
proof(
|
|
176
|
-
goal(recursion_count(9831, 7)),
|
|
177
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
178
|
-
bindings([binding("N", 9831), binding("Count", 7)]),
|
|
179
|
-
uses([
|
|
180
|
-
proof(
|
|
181
|
-
goal(kaprekar_steps(9831, 7)),
|
|
182
|
-
by(builtin(kaprekar_steps, 2))
|
|
183
|
-
)
|
|
184
|
-
])
|
|
185
|
-
)
|
|
186
|
-
])
|
|
187
|
-
)
|
|
188
|
-
).
|
|
189
|
-
|
|
190
8
|
reachesConstant(kaprekar, 6174).
|
|
191
|
-
why(
|
|
192
|
-
reachesConstant(kaprekar, 6174),
|
|
193
|
-
proof(
|
|
194
|
-
goal(reachesConstant(kaprekar, 6174)),
|
|
195
|
-
by(rule("kaprekar.pl", clause(12))),
|
|
196
|
-
bindings([binding("N", 6174), binding("_Count", 0)]),
|
|
197
|
-
uses([
|
|
198
|
-
proof(
|
|
199
|
-
goal(sample(6174)),
|
|
200
|
-
by(fact("kaprekar.pl", clause(9)))
|
|
201
|
-
),
|
|
202
|
-
proof(
|
|
203
|
-
goal(recursion_count(6174, 0)),
|
|
204
|
-
by(rule("kaprekar.pl", clause(5))),
|
|
205
|
-
bindings([binding("N", 6174), binding("Count", 0)]),
|
|
206
|
-
uses([
|
|
207
|
-
proof(
|
|
208
|
-
goal(kaprekar_steps(6174, 0)),
|
|
209
|
-
by(builtin(kaprekar_steps, 2))
|
|
210
|
-
)
|
|
211
|
-
])
|
|
212
|
-
)
|
|
213
|
-
])
|
|
214
|
-
)
|
|
215
|
-
).
|
|
216
|
-
|
|
@@ -1,168 +1,3 @@
|
|
|
1
1
|
sideCSquared(tri60, 67.0).
|
|
2
|
-
why(
|
|
3
|
-
sideCSquared(tri60, 67.0),
|
|
4
|
-
proof(
|
|
5
|
-
goal(sideCSquared(tri60, 67.0)),
|
|
6
|
-
by(rule("law-of-cosines.pl", clause(7))),
|
|
7
|
-
bindings([binding("Triangle", tri60), binding("C2", 67.0)]),
|
|
8
|
-
uses([
|
|
9
|
-
proof(
|
|
10
|
-
goal(side_c_squared(tri60, 67.0)),
|
|
11
|
-
by(rule("law-of-cosines.pl", clause(5))),
|
|
12
|
-
bindings([binding("Triangle", tri60), binding("C2", 67.0), binding("A", 7), binding("B", 9), binding("CosC", 0.5), binding("A2", 49), binding("B2", 81), binding("Sum", 130), binding("TwoA", 14), binding("TwoAB", 126), binding("Projection", 63.0)]),
|
|
13
|
-
uses([
|
|
14
|
-
proof(
|
|
15
|
-
goal(triangle(tri60, 7, 9, 0.5)),
|
|
16
|
-
by(fact("law-of-cosines.pl", clause(4)))
|
|
17
|
-
),
|
|
18
|
-
proof(
|
|
19
|
-
goal(mul(7, 7, 49)),
|
|
20
|
-
by(builtin(mul, 3))
|
|
21
|
-
),
|
|
22
|
-
proof(
|
|
23
|
-
goal(mul(9, 9, 81)),
|
|
24
|
-
by(builtin(mul, 3))
|
|
25
|
-
),
|
|
26
|
-
proof(
|
|
27
|
-
goal(add(49, 81, 130)),
|
|
28
|
-
by(builtin(add, 3))
|
|
29
|
-
),
|
|
30
|
-
proof(
|
|
31
|
-
goal(mul(2, 7, 14)),
|
|
32
|
-
by(builtin(mul, 3))
|
|
33
|
-
),
|
|
34
|
-
proof(
|
|
35
|
-
goal(mul(14, 9, 126)),
|
|
36
|
-
by(builtin(mul, 3))
|
|
37
|
-
),
|
|
38
|
-
proof(
|
|
39
|
-
goal(mul(126, 0.5, 63.0)),
|
|
40
|
-
by(builtin(mul, 3))
|
|
41
|
-
),
|
|
42
|
-
proof(
|
|
43
|
-
goal(sub(130, 63.0, 67.0)),
|
|
44
|
-
by(builtin(sub, 3))
|
|
45
|
-
)
|
|
46
|
-
])
|
|
47
|
-
)
|
|
48
|
-
])
|
|
49
|
-
)
|
|
50
|
-
).
|
|
51
|
-
|
|
52
2
|
sideC(tri60, 8.1853527718724504).
|
|
53
|
-
why(
|
|
54
|
-
sideC(tri60, 8.1853527718724504),
|
|
55
|
-
proof(
|
|
56
|
-
goal(sideC(tri60, 8.1853527718724504)),
|
|
57
|
-
by(rule("law-of-cosines.pl", clause(8))),
|
|
58
|
-
bindings([binding("Triangle", tri60), binding("C", 8.1853527718724504)]),
|
|
59
|
-
uses([
|
|
60
|
-
proof(
|
|
61
|
-
goal(side_c(tri60, 8.1853527718724504)),
|
|
62
|
-
by(rule("law-of-cosines.pl", clause(6))),
|
|
63
|
-
bindings([binding("Triangle", tri60), binding("C", 8.1853527718724504), binding("C2", 67.0)]),
|
|
64
|
-
uses([
|
|
65
|
-
proof(
|
|
66
|
-
goal(side_c_squared(tri60, 67.0)),
|
|
67
|
-
by(rule("law-of-cosines.pl", clause(5))),
|
|
68
|
-
bindings([binding("Triangle", tri60), binding("C2", 67.0), binding("A", 7), binding("B", 9), binding("CosC", 0.5), binding("A2", 49), binding("B2", 81), binding("Sum", 130), binding("TwoA", 14), binding("TwoAB", 126), binding("Projection", 63.0)]),
|
|
69
|
-
uses([
|
|
70
|
-
proof(
|
|
71
|
-
goal(triangle(tri60, 7, 9, 0.5)),
|
|
72
|
-
by(fact("law-of-cosines.pl", clause(4)))
|
|
73
|
-
),
|
|
74
|
-
proof(
|
|
75
|
-
goal(mul(7, 7, 49)),
|
|
76
|
-
by(builtin(mul, 3))
|
|
77
|
-
),
|
|
78
|
-
proof(
|
|
79
|
-
goal(mul(9, 9, 81)),
|
|
80
|
-
by(builtin(mul, 3))
|
|
81
|
-
),
|
|
82
|
-
proof(
|
|
83
|
-
goal(add(49, 81, 130)),
|
|
84
|
-
by(builtin(add, 3))
|
|
85
|
-
),
|
|
86
|
-
proof(
|
|
87
|
-
goal(mul(2, 7, 14)),
|
|
88
|
-
by(builtin(mul, 3))
|
|
89
|
-
),
|
|
90
|
-
proof(
|
|
91
|
-
goal(mul(14, 9, 126)),
|
|
92
|
-
by(builtin(mul, 3))
|
|
93
|
-
),
|
|
94
|
-
proof(
|
|
95
|
-
goal(mul(126, 0.5, 63.0)),
|
|
96
|
-
by(builtin(mul, 3))
|
|
97
|
-
),
|
|
98
|
-
proof(
|
|
99
|
-
goal(sub(130, 63.0, 67.0)),
|
|
100
|
-
by(builtin(sub, 3))
|
|
101
|
-
)
|
|
102
|
-
])
|
|
103
|
-
),
|
|
104
|
-
proof(
|
|
105
|
-
goal(pow(67.0, 0.5, 8.1853527718724504)),
|
|
106
|
-
by(builtin(pow, 3))
|
|
107
|
-
)
|
|
108
|
-
])
|
|
109
|
-
)
|
|
110
|
-
])
|
|
111
|
-
)
|
|
112
|
-
).
|
|
113
|
-
|
|
114
3
|
status(tri60, acute_triangle).
|
|
115
|
-
why(
|
|
116
|
-
status(tri60, acute_triangle),
|
|
117
|
-
proof(
|
|
118
|
-
goal(status(tri60, acute_triangle)),
|
|
119
|
-
by(rule("law-of-cosines.pl", clause(9))),
|
|
120
|
-
bindings([binding("Triangle", tri60), binding("C2", 67.0)]),
|
|
121
|
-
uses([
|
|
122
|
-
proof(
|
|
123
|
-
goal(side_c_squared(tri60, 67.0)),
|
|
124
|
-
by(rule("law-of-cosines.pl", clause(5))),
|
|
125
|
-
bindings([binding("Triangle", tri60), binding("C2", 67.0), binding("A", 7), binding("B", 9), binding("CosC", 0.5), binding("A2", 49), binding("B2", 81), binding("Sum", 130), binding("TwoA", 14), binding("TwoAB", 126), binding("Projection", 63.0)]),
|
|
126
|
-
uses([
|
|
127
|
-
proof(
|
|
128
|
-
goal(triangle(tri60, 7, 9, 0.5)),
|
|
129
|
-
by(fact("law-of-cosines.pl", clause(4)))
|
|
130
|
-
),
|
|
131
|
-
proof(
|
|
132
|
-
goal(mul(7, 7, 49)),
|
|
133
|
-
by(builtin(mul, 3))
|
|
134
|
-
),
|
|
135
|
-
proof(
|
|
136
|
-
goal(mul(9, 9, 81)),
|
|
137
|
-
by(builtin(mul, 3))
|
|
138
|
-
),
|
|
139
|
-
proof(
|
|
140
|
-
goal(add(49, 81, 130)),
|
|
141
|
-
by(builtin(add, 3))
|
|
142
|
-
),
|
|
143
|
-
proof(
|
|
144
|
-
goal(mul(2, 7, 14)),
|
|
145
|
-
by(builtin(mul, 3))
|
|
146
|
-
),
|
|
147
|
-
proof(
|
|
148
|
-
goal(mul(14, 9, 126)),
|
|
149
|
-
by(builtin(mul, 3))
|
|
150
|
-
),
|
|
151
|
-
proof(
|
|
152
|
-
goal(mul(126, 0.5, 63.0)),
|
|
153
|
-
by(builtin(mul, 3))
|
|
154
|
-
),
|
|
155
|
-
proof(
|
|
156
|
-
goal(sub(130, 63.0, 67.0)),
|
|
157
|
-
by(builtin(sub, 3))
|
|
158
|
-
)
|
|
159
|
-
])
|
|
160
|
-
),
|
|
161
|
-
proof(
|
|
162
|
-
goal(gt(67.0, 0)),
|
|
163
|
-
by(builtin(gt, 2))
|
|
164
|
-
)
|
|
165
|
-
])
|
|
166
|
-
)
|
|
167
|
-
).
|
|
168
|
-
|