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,399 +1,3 @@
|
|
|
1
1
|
status(exact_cover_sudoku, solved).
|
|
2
|
-
why(
|
|
3
|
-
status(exact_cover_sudoku, solved),
|
|
4
|
-
proof(
|
|
5
|
-
goal(status(exact_cover_sudoku, solved)),
|
|
6
|
-
by(rule("exact-cover-sudoku.pl", clause(33))),
|
|
7
|
-
bindings([binding("_Grid", [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])]),
|
|
8
|
-
uses([
|
|
9
|
-
proof(
|
|
10
|
-
goal(once(sudoku9([[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]]))),
|
|
11
|
-
by(builtin(once, 1)),
|
|
12
|
-
uses([
|
|
13
|
-
proof(
|
|
14
|
-
goal(sudoku9([[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])),
|
|
15
|
-
by(rule("exact-cover-sudoku.pl", clause(32))),
|
|
16
|
-
bindings([binding("A1", 5), binding("A2", 3), binding("A3", 4), binding("A4", 6), binding("A5", 7), binding("A6", 8), binding("A7", 9), binding("A8", 1), binding("A9", 2), binding("B1", 6), binding("B2", 7), binding("B3", 2), binding("B4", 1), binding("B5", 9), binding("B6", 5), binding("B7", 3), binding("B8", 4), binding("B9", 8), binding("C1", 1), binding("C2", 9), binding("C3", 8), binding("C4", 3), binding("C5", 4), binding("C6", 2), binding("C7", 5), binding("C8", 6), binding("C9", 7), binding("D1", 8), binding("D2", 5), binding("D3", 9), binding("D4", 7), binding("D5", 6), binding("D6", 1), binding("D7", 4), binding("D8", 2), binding("D9", 3), binding("E1", 4), binding("E2", 2), binding("E3", 6), binding("E4", 8), binding("E5", 5), binding("E6", 3), binding("E7", 7), binding("E8", 9), binding("E9", 1), binding("F1", 7), binding("F2", 1), binding("F3", 3), binding("F4", 9), binding("F5", 2), binding("F6", 4), binding("F7", 8), binding("F8", 5), binding("F9", 6), binding("G1", 9), binding("G2", 6), binding("G3", 1), binding("G4", 5), binding("G5", 3), binding("G6", 7), binding("G7", 2), binding("G8", 8), binding("G9", 4), binding("H1", 2), binding("H2", 8), binding("H3", 7), binding("H4", 4), binding("H5", 1), binding("H6", 9), binding("H7", 6), binding("H8", 3), binding("H9", 5), binding("I1", 3), binding("I2", 4), binding("I3", 5), binding("I4", 2), binding("I5", 8), binding("I6", 6), binding("I7", 1), binding("I8", 7), binding("I9", 9)]),
|
|
17
|
-
uses([
|
|
18
|
-
proof(
|
|
19
|
-
goal(row_candidate(1, [5, 3, 4, 6, 7, 8, 9, 1, 2])),
|
|
20
|
-
by(fact("exact-cover-sudoku.pl", clause(7)))
|
|
21
|
-
),
|
|
22
|
-
proof(
|
|
23
|
-
goal(row_candidate(2, [6, 7, 2, 1, 9, 5, 3, 4, 8])),
|
|
24
|
-
by(fact("exact-cover-sudoku.pl", clause(10)))
|
|
25
|
-
),
|
|
26
|
-
proof(
|
|
27
|
-
goal(row_candidate(3, [1, 9, 8, 3, 4, 2, 5, 6, 7])),
|
|
28
|
-
by(fact("exact-cover-sudoku.pl", clause(13)))
|
|
29
|
-
),
|
|
30
|
-
proof(
|
|
31
|
-
goal(row_candidate(4, [8, 5, 9, 7, 6, 1, 4, 2, 3])),
|
|
32
|
-
by(fact("exact-cover-sudoku.pl", clause(16)))
|
|
33
|
-
),
|
|
34
|
-
proof(
|
|
35
|
-
goal(row_candidate(5, [4, 2, 6, 8, 5, 3, 7, 9, 1])),
|
|
36
|
-
by(fact("exact-cover-sudoku.pl", clause(19)))
|
|
37
|
-
),
|
|
38
|
-
proof(
|
|
39
|
-
goal(row_candidate(6, [7, 1, 3, 9, 2, 4, 8, 5, 6])),
|
|
40
|
-
by(fact("exact-cover-sudoku.pl", clause(22)))
|
|
41
|
-
),
|
|
42
|
-
proof(
|
|
43
|
-
goal(row_candidate(7, [9, 6, 1, 5, 3, 7, 2, 8, 4])),
|
|
44
|
-
by(fact("exact-cover-sudoku.pl", clause(25)))
|
|
45
|
-
),
|
|
46
|
-
proof(
|
|
47
|
-
goal(row_candidate(8, [2, 8, 7, 4, 1, 9, 6, 3, 5])),
|
|
48
|
-
by(fact("exact-cover-sudoku.pl", clause(28)))
|
|
49
|
-
),
|
|
50
|
-
proof(
|
|
51
|
-
goal(row_candidate(9, [3, 4, 5, 2, 8, 6, 1, 7, 9])),
|
|
52
|
-
by(fact("exact-cover-sudoku.pl", clause(31)))
|
|
53
|
-
),
|
|
54
|
-
proof(
|
|
55
|
-
goal(cover9([5, 6, 1, 8, 4, 7, 9, 2, 3])),
|
|
56
|
-
by(builtin(cover9, 1))
|
|
57
|
-
),
|
|
58
|
-
proof(
|
|
59
|
-
goal(cover9([3, 7, 9, 5, 2, 1, 6, 8, 4])),
|
|
60
|
-
by(builtin(cover9, 1))
|
|
61
|
-
),
|
|
62
|
-
proof(
|
|
63
|
-
goal(cover9([4, 2, 8, 9, 6, 3, 1, 7, 5])),
|
|
64
|
-
by(builtin(cover9, 1))
|
|
65
|
-
),
|
|
66
|
-
proof(
|
|
67
|
-
goal(cover9([6, 1, 3, 7, 8, 9, 5, 4, 2])),
|
|
68
|
-
by(builtin(cover9, 1))
|
|
69
|
-
),
|
|
70
|
-
proof(
|
|
71
|
-
goal(cover9([7, 9, 4, 6, 5, 2, 3, 1, 8])),
|
|
72
|
-
by(builtin(cover9, 1))
|
|
73
|
-
),
|
|
74
|
-
proof(
|
|
75
|
-
goal(cover9([8, 5, 2, 1, 3, 4, 7, 9, 6])),
|
|
76
|
-
by(builtin(cover9, 1))
|
|
77
|
-
),
|
|
78
|
-
proof(
|
|
79
|
-
goal(cover9([9, 3, 5, 4, 7, 8, 2, 6, 1])),
|
|
80
|
-
by(builtin(cover9, 1))
|
|
81
|
-
),
|
|
82
|
-
proof(
|
|
83
|
-
goal(cover9([1, 4, 6, 2, 9, 5, 8, 3, 7])),
|
|
84
|
-
by(builtin(cover9, 1))
|
|
85
|
-
),
|
|
86
|
-
proof(
|
|
87
|
-
goal(cover9([2, 8, 7, 3, 1, 6, 4, 5, 9])),
|
|
88
|
-
by(builtin(cover9, 1))
|
|
89
|
-
),
|
|
90
|
-
proof(
|
|
91
|
-
goal(cover9([5, 3, 4, 6, 7, 2, 1, 9, 8])),
|
|
92
|
-
by(builtin(cover9, 1))
|
|
93
|
-
),
|
|
94
|
-
proof(
|
|
95
|
-
goal(cover9([6, 7, 8, 1, 9, 5, 3, 4, 2])),
|
|
96
|
-
by(builtin(cover9, 1))
|
|
97
|
-
),
|
|
98
|
-
proof(
|
|
99
|
-
goal(cover9([9, 1, 2, 3, 4, 8, 5, 6, 7])),
|
|
100
|
-
by(builtin(cover9, 1))
|
|
101
|
-
),
|
|
102
|
-
proof(
|
|
103
|
-
goal(cover9([8, 5, 9, 4, 2, 6, 7, 1, 3])),
|
|
104
|
-
by(builtin(cover9, 1))
|
|
105
|
-
),
|
|
106
|
-
proof(
|
|
107
|
-
goal(cover9([7, 6, 1, 8, 5, 3, 9, 2, 4])),
|
|
108
|
-
by(builtin(cover9, 1))
|
|
109
|
-
),
|
|
110
|
-
proof(
|
|
111
|
-
goal(cover9([4, 2, 3, 7, 9, 1, 8, 5, 6])),
|
|
112
|
-
by(builtin(cover9, 1))
|
|
113
|
-
),
|
|
114
|
-
proof(
|
|
115
|
-
goal(cover9([9, 6, 1, 2, 8, 7, 3, 4, 5])),
|
|
116
|
-
by(builtin(cover9, 1))
|
|
117
|
-
),
|
|
118
|
-
proof(
|
|
119
|
-
goal(cover9([5, 3, 7, 4, 1, 9, 2, 8, 6])),
|
|
120
|
-
by(builtin(cover9, 1))
|
|
121
|
-
),
|
|
122
|
-
proof(
|
|
123
|
-
goal(cover9([2, 8, 4, 6, 3, 5, 1, 7, 9])),
|
|
124
|
-
by(builtin(cover9, 1))
|
|
125
|
-
)
|
|
126
|
-
])
|
|
127
|
-
)
|
|
128
|
-
])
|
|
129
|
-
)
|
|
130
|
-
])
|
|
131
|
-
)
|
|
132
|
-
).
|
|
133
|
-
|
|
134
2
|
solution(exact_cover_sudoku, [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]]).
|
|
135
|
-
why(
|
|
136
|
-
solution(exact_cover_sudoku, [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]]),
|
|
137
|
-
proof(
|
|
138
|
-
goal(solution(exact_cover_sudoku, [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])),
|
|
139
|
-
by(rule("exact-cover-sudoku.pl", clause(34))),
|
|
140
|
-
bindings([binding("Grid", [[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])]),
|
|
141
|
-
uses([
|
|
142
|
-
proof(
|
|
143
|
-
goal(once(sudoku9([[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]]))),
|
|
144
|
-
by(builtin(once, 1)),
|
|
145
|
-
uses([
|
|
146
|
-
proof(
|
|
147
|
-
goal(sudoku9([[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])),
|
|
148
|
-
by(rule("exact-cover-sudoku.pl", clause(32))),
|
|
149
|
-
bindings([binding("A1", 5), binding("A2", 3), binding("A3", 4), binding("A4", 6), binding("A5", 7), binding("A6", 8), binding("A7", 9), binding("A8", 1), binding("A9", 2), binding("B1", 6), binding("B2", 7), binding("B3", 2), binding("B4", 1), binding("B5", 9), binding("B6", 5), binding("B7", 3), binding("B8", 4), binding("B9", 8), binding("C1", 1), binding("C2", 9), binding("C3", 8), binding("C4", 3), binding("C5", 4), binding("C6", 2), binding("C7", 5), binding("C8", 6), binding("C9", 7), binding("D1", 8), binding("D2", 5), binding("D3", 9), binding("D4", 7), binding("D5", 6), binding("D6", 1), binding("D7", 4), binding("D8", 2), binding("D9", 3), binding("E1", 4), binding("E2", 2), binding("E3", 6), binding("E4", 8), binding("E5", 5), binding("E6", 3), binding("E7", 7), binding("E8", 9), binding("E9", 1), binding("F1", 7), binding("F2", 1), binding("F3", 3), binding("F4", 9), binding("F5", 2), binding("F6", 4), binding("F7", 8), binding("F8", 5), binding("F9", 6), binding("G1", 9), binding("G2", 6), binding("G3", 1), binding("G4", 5), binding("G5", 3), binding("G6", 7), binding("G7", 2), binding("G8", 8), binding("G9", 4), binding("H1", 2), binding("H2", 8), binding("H3", 7), binding("H4", 4), binding("H5", 1), binding("H6", 9), binding("H7", 6), binding("H8", 3), binding("H9", 5), binding("I1", 3), binding("I2", 4), binding("I3", 5), binding("I4", 2), binding("I5", 8), binding("I6", 6), binding("I7", 1), binding("I8", 7), binding("I9", 9)]),
|
|
150
|
-
uses([
|
|
151
|
-
proof(
|
|
152
|
-
goal(row_candidate(1, [5, 3, 4, 6, 7, 8, 9, 1, 2])),
|
|
153
|
-
by(fact("exact-cover-sudoku.pl", clause(7)))
|
|
154
|
-
),
|
|
155
|
-
proof(
|
|
156
|
-
goal(row_candidate(2, [6, 7, 2, 1, 9, 5, 3, 4, 8])),
|
|
157
|
-
by(fact("exact-cover-sudoku.pl", clause(10)))
|
|
158
|
-
),
|
|
159
|
-
proof(
|
|
160
|
-
goal(row_candidate(3, [1, 9, 8, 3, 4, 2, 5, 6, 7])),
|
|
161
|
-
by(fact("exact-cover-sudoku.pl", clause(13)))
|
|
162
|
-
),
|
|
163
|
-
proof(
|
|
164
|
-
goal(row_candidate(4, [8, 5, 9, 7, 6, 1, 4, 2, 3])),
|
|
165
|
-
by(fact("exact-cover-sudoku.pl", clause(16)))
|
|
166
|
-
),
|
|
167
|
-
proof(
|
|
168
|
-
goal(row_candidate(5, [4, 2, 6, 8, 5, 3, 7, 9, 1])),
|
|
169
|
-
by(fact("exact-cover-sudoku.pl", clause(19)))
|
|
170
|
-
),
|
|
171
|
-
proof(
|
|
172
|
-
goal(row_candidate(6, [7, 1, 3, 9, 2, 4, 8, 5, 6])),
|
|
173
|
-
by(fact("exact-cover-sudoku.pl", clause(22)))
|
|
174
|
-
),
|
|
175
|
-
proof(
|
|
176
|
-
goal(row_candidate(7, [9, 6, 1, 5, 3, 7, 2, 8, 4])),
|
|
177
|
-
by(fact("exact-cover-sudoku.pl", clause(25)))
|
|
178
|
-
),
|
|
179
|
-
proof(
|
|
180
|
-
goal(row_candidate(8, [2, 8, 7, 4, 1, 9, 6, 3, 5])),
|
|
181
|
-
by(fact("exact-cover-sudoku.pl", clause(28)))
|
|
182
|
-
),
|
|
183
|
-
proof(
|
|
184
|
-
goal(row_candidate(9, [3, 4, 5, 2, 8, 6, 1, 7, 9])),
|
|
185
|
-
by(fact("exact-cover-sudoku.pl", clause(31)))
|
|
186
|
-
),
|
|
187
|
-
proof(
|
|
188
|
-
goal(cover9([5, 6, 1, 8, 4, 7, 9, 2, 3])),
|
|
189
|
-
by(builtin(cover9, 1))
|
|
190
|
-
),
|
|
191
|
-
proof(
|
|
192
|
-
goal(cover9([3, 7, 9, 5, 2, 1, 6, 8, 4])),
|
|
193
|
-
by(builtin(cover9, 1))
|
|
194
|
-
),
|
|
195
|
-
proof(
|
|
196
|
-
goal(cover9([4, 2, 8, 9, 6, 3, 1, 7, 5])),
|
|
197
|
-
by(builtin(cover9, 1))
|
|
198
|
-
),
|
|
199
|
-
proof(
|
|
200
|
-
goal(cover9([6, 1, 3, 7, 8, 9, 5, 4, 2])),
|
|
201
|
-
by(builtin(cover9, 1))
|
|
202
|
-
),
|
|
203
|
-
proof(
|
|
204
|
-
goal(cover9([7, 9, 4, 6, 5, 2, 3, 1, 8])),
|
|
205
|
-
by(builtin(cover9, 1))
|
|
206
|
-
),
|
|
207
|
-
proof(
|
|
208
|
-
goal(cover9([8, 5, 2, 1, 3, 4, 7, 9, 6])),
|
|
209
|
-
by(builtin(cover9, 1))
|
|
210
|
-
),
|
|
211
|
-
proof(
|
|
212
|
-
goal(cover9([9, 3, 5, 4, 7, 8, 2, 6, 1])),
|
|
213
|
-
by(builtin(cover9, 1))
|
|
214
|
-
),
|
|
215
|
-
proof(
|
|
216
|
-
goal(cover9([1, 4, 6, 2, 9, 5, 8, 3, 7])),
|
|
217
|
-
by(builtin(cover9, 1))
|
|
218
|
-
),
|
|
219
|
-
proof(
|
|
220
|
-
goal(cover9([2, 8, 7, 3, 1, 6, 4, 5, 9])),
|
|
221
|
-
by(builtin(cover9, 1))
|
|
222
|
-
),
|
|
223
|
-
proof(
|
|
224
|
-
goal(cover9([5, 3, 4, 6, 7, 2, 1, 9, 8])),
|
|
225
|
-
by(builtin(cover9, 1))
|
|
226
|
-
),
|
|
227
|
-
proof(
|
|
228
|
-
goal(cover9([6, 7, 8, 1, 9, 5, 3, 4, 2])),
|
|
229
|
-
by(builtin(cover9, 1))
|
|
230
|
-
),
|
|
231
|
-
proof(
|
|
232
|
-
goal(cover9([9, 1, 2, 3, 4, 8, 5, 6, 7])),
|
|
233
|
-
by(builtin(cover9, 1))
|
|
234
|
-
),
|
|
235
|
-
proof(
|
|
236
|
-
goal(cover9([8, 5, 9, 4, 2, 6, 7, 1, 3])),
|
|
237
|
-
by(builtin(cover9, 1))
|
|
238
|
-
),
|
|
239
|
-
proof(
|
|
240
|
-
goal(cover9([7, 6, 1, 8, 5, 3, 9, 2, 4])),
|
|
241
|
-
by(builtin(cover9, 1))
|
|
242
|
-
),
|
|
243
|
-
proof(
|
|
244
|
-
goal(cover9([4, 2, 3, 7, 9, 1, 8, 5, 6])),
|
|
245
|
-
by(builtin(cover9, 1))
|
|
246
|
-
),
|
|
247
|
-
proof(
|
|
248
|
-
goal(cover9([9, 6, 1, 2, 8, 7, 3, 4, 5])),
|
|
249
|
-
by(builtin(cover9, 1))
|
|
250
|
-
),
|
|
251
|
-
proof(
|
|
252
|
-
goal(cover9([5, 3, 7, 4, 1, 9, 2, 8, 6])),
|
|
253
|
-
by(builtin(cover9, 1))
|
|
254
|
-
),
|
|
255
|
-
proof(
|
|
256
|
-
goal(cover9([2, 8, 4, 6, 3, 5, 1, 7, 9])),
|
|
257
|
-
by(builtin(cover9, 1))
|
|
258
|
-
)
|
|
259
|
-
])
|
|
260
|
-
)
|
|
261
|
-
])
|
|
262
|
-
)
|
|
263
|
-
])
|
|
264
|
-
)
|
|
265
|
-
).
|
|
266
|
-
|
|
267
3
|
firstRow(exact_cover_sudoku, [5, 3, 4, 6, 7, 8, 9, 1, 2]).
|
|
268
|
-
why(
|
|
269
|
-
firstRow(exact_cover_sudoku, [5, 3, 4, 6, 7, 8, 9, 1, 2]),
|
|
270
|
-
proof(
|
|
271
|
-
goal(firstRow(exact_cover_sudoku, [5, 3, 4, 6, 7, 8, 9, 1, 2])),
|
|
272
|
-
by(rule("exact-cover-sudoku.pl", clause(35))),
|
|
273
|
-
bindings([binding("Row", [5, 3, 4, 6, 7, 8, 9, 1, 2]), binding("_Rows", [[6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])]),
|
|
274
|
-
uses([
|
|
275
|
-
proof(
|
|
276
|
-
goal(once(sudoku9([[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]]))),
|
|
277
|
-
by(builtin(once, 1)),
|
|
278
|
-
uses([
|
|
279
|
-
proof(
|
|
280
|
-
goal(sudoku9([[5, 3, 4, 6, 7, 8, 9, 1, 2], [6, 7, 2, 1, 9, 5, 3, 4, 8], [1, 9, 8, 3, 4, 2, 5, 6, 7], [8, 5, 9, 7, 6, 1, 4, 2, 3], [4, 2, 6, 8, 5, 3, 7, 9, 1], [7, 1, 3, 9, 2, 4, 8, 5, 6], [9, 6, 1, 5, 3, 7, 2, 8, 4], [2, 8, 7, 4, 1, 9, 6, 3, 5], [3, 4, 5, 2, 8, 6, 1, 7, 9]])),
|
|
281
|
-
by(rule("exact-cover-sudoku.pl", clause(32))),
|
|
282
|
-
bindings([binding("A1", 5), binding("A2", 3), binding("A3", 4), binding("A4", 6), binding("A5", 7), binding("A6", 8), binding("A7", 9), binding("A8", 1), binding("A9", 2), binding("B1", 6), binding("B2", 7), binding("B3", 2), binding("B4", 1), binding("B5", 9), binding("B6", 5), binding("B7", 3), binding("B8", 4), binding("B9", 8), binding("C1", 1), binding("C2", 9), binding("C3", 8), binding("C4", 3), binding("C5", 4), binding("C6", 2), binding("C7", 5), binding("C8", 6), binding("C9", 7), binding("D1", 8), binding("D2", 5), binding("D3", 9), binding("D4", 7), binding("D5", 6), binding("D6", 1), binding("D7", 4), binding("D8", 2), binding("D9", 3), binding("E1", 4), binding("E2", 2), binding("E3", 6), binding("E4", 8), binding("E5", 5), binding("E6", 3), binding("E7", 7), binding("E8", 9), binding("E9", 1), binding("F1", 7), binding("F2", 1), binding("F3", 3), binding("F4", 9), binding("F5", 2), binding("F6", 4), binding("F7", 8), binding("F8", 5), binding("F9", 6), binding("G1", 9), binding("G2", 6), binding("G3", 1), binding("G4", 5), binding("G5", 3), binding("G6", 7), binding("G7", 2), binding("G8", 8), binding("G9", 4), binding("H1", 2), binding("H2", 8), binding("H3", 7), binding("H4", 4), binding("H5", 1), binding("H6", 9), binding("H7", 6), binding("H8", 3), binding("H9", 5), binding("I1", 3), binding("I2", 4), binding("I3", 5), binding("I4", 2), binding("I5", 8), binding("I6", 6), binding("I7", 1), binding("I8", 7), binding("I9", 9)]),
|
|
283
|
-
uses([
|
|
284
|
-
proof(
|
|
285
|
-
goal(row_candidate(1, [5, 3, 4, 6, 7, 8, 9, 1, 2])),
|
|
286
|
-
by(fact("exact-cover-sudoku.pl", clause(7)))
|
|
287
|
-
),
|
|
288
|
-
proof(
|
|
289
|
-
goal(row_candidate(2, [6, 7, 2, 1, 9, 5, 3, 4, 8])),
|
|
290
|
-
by(fact("exact-cover-sudoku.pl", clause(10)))
|
|
291
|
-
),
|
|
292
|
-
proof(
|
|
293
|
-
goal(row_candidate(3, [1, 9, 8, 3, 4, 2, 5, 6, 7])),
|
|
294
|
-
by(fact("exact-cover-sudoku.pl", clause(13)))
|
|
295
|
-
),
|
|
296
|
-
proof(
|
|
297
|
-
goal(row_candidate(4, [8, 5, 9, 7, 6, 1, 4, 2, 3])),
|
|
298
|
-
by(fact("exact-cover-sudoku.pl", clause(16)))
|
|
299
|
-
),
|
|
300
|
-
proof(
|
|
301
|
-
goal(row_candidate(5, [4, 2, 6, 8, 5, 3, 7, 9, 1])),
|
|
302
|
-
by(fact("exact-cover-sudoku.pl", clause(19)))
|
|
303
|
-
),
|
|
304
|
-
proof(
|
|
305
|
-
goal(row_candidate(6, [7, 1, 3, 9, 2, 4, 8, 5, 6])),
|
|
306
|
-
by(fact("exact-cover-sudoku.pl", clause(22)))
|
|
307
|
-
),
|
|
308
|
-
proof(
|
|
309
|
-
goal(row_candidate(7, [9, 6, 1, 5, 3, 7, 2, 8, 4])),
|
|
310
|
-
by(fact("exact-cover-sudoku.pl", clause(25)))
|
|
311
|
-
),
|
|
312
|
-
proof(
|
|
313
|
-
goal(row_candidate(8, [2, 8, 7, 4, 1, 9, 6, 3, 5])),
|
|
314
|
-
by(fact("exact-cover-sudoku.pl", clause(28)))
|
|
315
|
-
),
|
|
316
|
-
proof(
|
|
317
|
-
goal(row_candidate(9, [3, 4, 5, 2, 8, 6, 1, 7, 9])),
|
|
318
|
-
by(fact("exact-cover-sudoku.pl", clause(31)))
|
|
319
|
-
),
|
|
320
|
-
proof(
|
|
321
|
-
goal(cover9([5, 6, 1, 8, 4, 7, 9, 2, 3])),
|
|
322
|
-
by(builtin(cover9, 1))
|
|
323
|
-
),
|
|
324
|
-
proof(
|
|
325
|
-
goal(cover9([3, 7, 9, 5, 2, 1, 6, 8, 4])),
|
|
326
|
-
by(builtin(cover9, 1))
|
|
327
|
-
),
|
|
328
|
-
proof(
|
|
329
|
-
goal(cover9([4, 2, 8, 9, 6, 3, 1, 7, 5])),
|
|
330
|
-
by(builtin(cover9, 1))
|
|
331
|
-
),
|
|
332
|
-
proof(
|
|
333
|
-
goal(cover9([6, 1, 3, 7, 8, 9, 5, 4, 2])),
|
|
334
|
-
by(builtin(cover9, 1))
|
|
335
|
-
),
|
|
336
|
-
proof(
|
|
337
|
-
goal(cover9([7, 9, 4, 6, 5, 2, 3, 1, 8])),
|
|
338
|
-
by(builtin(cover9, 1))
|
|
339
|
-
),
|
|
340
|
-
proof(
|
|
341
|
-
goal(cover9([8, 5, 2, 1, 3, 4, 7, 9, 6])),
|
|
342
|
-
by(builtin(cover9, 1))
|
|
343
|
-
),
|
|
344
|
-
proof(
|
|
345
|
-
goal(cover9([9, 3, 5, 4, 7, 8, 2, 6, 1])),
|
|
346
|
-
by(builtin(cover9, 1))
|
|
347
|
-
),
|
|
348
|
-
proof(
|
|
349
|
-
goal(cover9([1, 4, 6, 2, 9, 5, 8, 3, 7])),
|
|
350
|
-
by(builtin(cover9, 1))
|
|
351
|
-
),
|
|
352
|
-
proof(
|
|
353
|
-
goal(cover9([2, 8, 7, 3, 1, 6, 4, 5, 9])),
|
|
354
|
-
by(builtin(cover9, 1))
|
|
355
|
-
),
|
|
356
|
-
proof(
|
|
357
|
-
goal(cover9([5, 3, 4, 6, 7, 2, 1, 9, 8])),
|
|
358
|
-
by(builtin(cover9, 1))
|
|
359
|
-
),
|
|
360
|
-
proof(
|
|
361
|
-
goal(cover9([6, 7, 8, 1, 9, 5, 3, 4, 2])),
|
|
362
|
-
by(builtin(cover9, 1))
|
|
363
|
-
),
|
|
364
|
-
proof(
|
|
365
|
-
goal(cover9([9, 1, 2, 3, 4, 8, 5, 6, 7])),
|
|
366
|
-
by(builtin(cover9, 1))
|
|
367
|
-
),
|
|
368
|
-
proof(
|
|
369
|
-
goal(cover9([8, 5, 9, 4, 2, 6, 7, 1, 3])),
|
|
370
|
-
by(builtin(cover9, 1))
|
|
371
|
-
),
|
|
372
|
-
proof(
|
|
373
|
-
goal(cover9([7, 6, 1, 8, 5, 3, 9, 2, 4])),
|
|
374
|
-
by(builtin(cover9, 1))
|
|
375
|
-
),
|
|
376
|
-
proof(
|
|
377
|
-
goal(cover9([4, 2, 3, 7, 9, 1, 8, 5, 6])),
|
|
378
|
-
by(builtin(cover9, 1))
|
|
379
|
-
),
|
|
380
|
-
proof(
|
|
381
|
-
goal(cover9([9, 6, 1, 2, 8, 7, 3, 4, 5])),
|
|
382
|
-
by(builtin(cover9, 1))
|
|
383
|
-
),
|
|
384
|
-
proof(
|
|
385
|
-
goal(cover9([5, 3, 7, 4, 1, 9, 2, 8, 6])),
|
|
386
|
-
by(builtin(cover9, 1))
|
|
387
|
-
),
|
|
388
|
-
proof(
|
|
389
|
-
goal(cover9([2, 8, 4, 6, 3, 5, 1, 7, 9])),
|
|
390
|
-
by(builtin(cover9, 1))
|
|
391
|
-
)
|
|
392
|
-
])
|
|
393
|
-
)
|
|
394
|
-
])
|
|
395
|
-
)
|
|
396
|
-
])
|
|
397
|
-
)
|
|
398
|
-
).
|
|
399
|
-
|
|
@@ -1,40 +1,2 @@
|
|
|
1
1
|
is(socrates, sk_0).
|
|
2
|
-
why(
|
|
3
|
-
is(socrates, sk_0),
|
|
4
|
-
proof(
|
|
5
|
-
goal(is(socrates, sk_0)),
|
|
6
|
-
by(rule("existential-rule.pl", clause(6))),
|
|
7
|
-
bindings([binding("Person", socrates), binding("Witness", sk_0)]),
|
|
8
|
-
uses([
|
|
9
|
-
proof(
|
|
10
|
-
goal(type(socrates, human)),
|
|
11
|
-
by(fact("existential-rule.pl", clause(2)))
|
|
12
|
-
),
|
|
13
|
-
proof(
|
|
14
|
-
goal(witness(socrates, sk_0)),
|
|
15
|
-
by(fact("existential-rule.pl", clause(4)))
|
|
16
|
-
)
|
|
17
|
-
])
|
|
18
|
-
)
|
|
19
|
-
).
|
|
20
|
-
|
|
21
2
|
is(plato, sk_1).
|
|
22
|
-
why(
|
|
23
|
-
is(plato, sk_1),
|
|
24
|
-
proof(
|
|
25
|
-
goal(is(plato, sk_1)),
|
|
26
|
-
by(rule("existential-rule.pl", clause(6))),
|
|
27
|
-
bindings([binding("Person", plato), binding("Witness", sk_1)]),
|
|
28
|
-
uses([
|
|
29
|
-
proof(
|
|
30
|
-
goal(type(plato, human)),
|
|
31
|
-
by(fact("existential-rule.pl", clause(3)))
|
|
32
|
-
),
|
|
33
|
-
proof(
|
|
34
|
-
goal(witness(plato, sk_1)),
|
|
35
|
-
by(fact("existential-rule.pl", clause(5)))
|
|
36
|
-
)
|
|
37
|
-
])
|
|
38
|
-
)
|
|
39
|
-
).
|
|
40
|
-
|