eyelang 1.3.9 → 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/package.json +1 -1
- package/playground-worker.mjs +4 -4
- package/playground.html +15 -15
- package/src/cli.js +9 -9
- package/src/index.js +3 -2
- package/test/run-examples.js +38 -8
- package/test/run-regression.js +29 -37
|
@@ -1,40 +1,2 @@
|
|
|
1
1
|
solution(classic, [[1, 6, 2, 8, 5, 7, 4, 9, 3], [5, 3, 4, 1, 2, 9, 6, 7, 8], [7, 8, 9, 6, 4, 3, 5, 2, 1], [4, 7, 5, 3, 1, 2, 9, 8, 6], [9, 1, 3, 5, 8, 6, 7, 4, 2], [6, 2, 8, 7, 9, 4, 1, 3, 5], [3, 5, 6, 4, 7, 8, 2, 1, 9], [2, 4, 1, 9, 3, 5, 8, 6, 7], [8, 9, 7, 2, 6, 1, 3, 5, 4]]).
|
|
2
|
-
why(
|
|
3
|
-
solution(classic, [[1, 6, 2, 8, 5, 7, 4, 9, 3], [5, 3, 4, 1, 2, 9, 6, 7, 8], [7, 8, 9, 6, 4, 3, 5, 2, 1], [4, 7, 5, 3, 1, 2, 9, 8, 6], [9, 1, 3, 5, 8, 6, 7, 4, 2], [6, 2, 8, 7, 9, 4, 1, 3, 5], [3, 5, 6, 4, 7, 8, 2, 1, 9], [2, 4, 1, 9, 3, 5, 8, 6, 7], [8, 9, 7, 2, 6, 1, 3, 5, 4]]),
|
|
4
|
-
proof(
|
|
5
|
-
goal(solution(classic, [[1, 6, 2, 8, 5, 7, 4, 9, 3], [5, 3, 4, 1, 2, 9, 6, 7, 8], [7, 8, 9, 6, 4, 3, 5, 2, 1], [4, 7, 5, 3, 1, 2, 9, 8, 6], [9, 1, 3, 5, 8, 6, 7, 4, 2], [6, 2, 8, 7, 9, 4, 1, 3, 5], [3, 5, 6, 4, 7, 8, 2, 1, 9], [2, 4, 1, 9, 3, 5, 8, 6, 7], [8, 9, 7, 2, 6, 1, 3, 5, 4]])),
|
|
6
|
-
by(rule("sudoku.pl", clause(4))),
|
|
7
|
-
bindings([binding("Name", classic), binding("Rows", [[1, 6, 2, 8, 5, 7, 4, 9, 3], [5, 3, 4, 1, 2, 9, 6, 7, 8], [7, 8, 9, 6, 4, 3, 5, 2, 1], [4, 7, 5, 3, 1, 2, 9, 8, 6], [9, 1, 3, 5, 8, 6, 7, 4, 2], [6, 2, 8, 7, 9, 4, 1, 3, 5], [3, 5, 6, 4, 7, 8, 2, 1, 9], [2, 4, 1, 9, 3, 5, 8, 6, 7], [8, 9, 7, 2, 6, 1, 3, 5, 4]]), binding("Grid", "100007090030129008009600500005300900010080002600794000350408219240005867897201304")]),
|
|
8
|
-
uses([
|
|
9
|
-
proof(
|
|
10
|
-
goal(puzzle(classic, "100007090030129008009600500005300900010080002600794000350408219240005867897201304")),
|
|
11
|
-
by(fact("sudoku.pl", clause(2)))
|
|
12
|
-
),
|
|
13
|
-
proof(
|
|
14
|
-
goal(sudoku("100007090030129008009600500005300900010080002600794000350408219240005867897201304", [[1, 6, 2, 8, 5, 7, 4, 9, 3], [5, 3, 4, 1, 2, 9, 6, 7, 8], [7, 8, 9, 6, 4, 3, 5, 2, 1], [4, 7, 5, 3, 1, 2, 9, 8, 6], [9, 1, 3, 5, 8, 6, 7, 4, 2], [6, 2, 8, 7, 9, 4, 1, 3, 5], [3, 5, 6, 4, 7, 8, 2, 1, 9], [2, 4, 1, 9, 3, 5, 8, 6, 7], [8, 9, 7, 2, 6, 1, 3, 5, 4]])),
|
|
15
|
-
by(builtin(sudoku, 2))
|
|
16
|
-
)
|
|
17
|
-
])
|
|
18
|
-
)
|
|
19
|
-
).
|
|
20
|
-
|
|
21
2
|
solution(third, [[4, 7, 8, 2, 6, 9, 1, 3, 5], [2, 9, 5, 1, 7, 3, 4, 8, 6], [1, 3, 6, 4, 5, 8, 7, 9, 2], [9, 4, 2, 6, 3, 5, 8, 7, 1], [8, 1, 7, 9, 4, 2, 5, 6, 3], [6, 5, 3, 8, 1, 7, 2, 4, 9], [7, 2, 1, 3, 9, 4, 6, 5, 8], [5, 6, 9, 7, 8, 1, 3, 2, 4], [3, 8, 4, 5, 2, 6, 9, 1, 7]]).
|
|
22
|
-
why(
|
|
23
|
-
solution(third, [[4, 7, 8, 2, 6, 9, 1, 3, 5], [2, 9, 5, 1, 7, 3, 4, 8, 6], [1, 3, 6, 4, 5, 8, 7, 9, 2], [9, 4, 2, 6, 3, 5, 8, 7, 1], [8, 1, 7, 9, 4, 2, 5, 6, 3], [6, 5, 3, 8, 1, 7, 2, 4, 9], [7, 2, 1, 3, 9, 4, 6, 5, 8], [5, 6, 9, 7, 8, 1, 3, 2, 4], [3, 8, 4, 5, 2, 6, 9, 1, 7]]),
|
|
24
|
-
proof(
|
|
25
|
-
goal(solution(third, [[4, 7, 8, 2, 6, 9, 1, 3, 5], [2, 9, 5, 1, 7, 3, 4, 8, 6], [1, 3, 6, 4, 5, 8, 7, 9, 2], [9, 4, 2, 6, 3, 5, 8, 7, 1], [8, 1, 7, 9, 4, 2, 5, 6, 3], [6, 5, 3, 8, 1, 7, 2, 4, 9], [7, 2, 1, 3, 9, 4, 6, 5, 8], [5, 6, 9, 7, 8, 1, 3, 2, 4], [3, 8, 4, 5, 2, 6, 9, 1, 7]])),
|
|
26
|
-
by(rule("sudoku.pl", clause(4))),
|
|
27
|
-
bindings([binding("Name", third), binding("Rows", [[4, 7, 8, 2, 6, 9, 1, 3, 5], [2, 9, 5, 1, 7, 3, 4, 8, 6], [1, 3, 6, 4, 5, 8, 7, 9, 2], [9, 4, 2, 6, 3, 5, 8, 7, 1], [8, 1, 7, 9, 4, 2, 5, 6, 3], [6, 5, 3, 8, 1, 7, 2, 4, 9], [7, 2, 1, 3, 9, 4, 6, 5, 8], [5, 6, 9, 7, 8, 1, 3, 2, 4], [3, 8, 4, 5, 2, 6, 9, 1, 7]]), binding("Grid", "078200000005000400100400092000035070007000500050810000720004008009000300000006910")]),
|
|
28
|
-
uses([
|
|
29
|
-
proof(
|
|
30
|
-
goal(puzzle(third, "078200000005000400100400092000035070007000500050810000720004008009000300000006910")),
|
|
31
|
-
by(fact("sudoku.pl", clause(3)))
|
|
32
|
-
),
|
|
33
|
-
proof(
|
|
34
|
-
goal(sudoku("078200000005000400100400092000035070007000500050810000720004008009000300000006910", [[4, 7, 8, 2, 6, 9, 1, 3, 5], [2, 9, 5, 1, 7, 3, 4, 8, 6], [1, 3, 6, 4, 5, 8, 7, 9, 2], [9, 4, 2, 6, 3, 5, 8, 7, 1], [8, 1, 7, 9, 4, 2, 5, 6, 3], [6, 5, 3, 8, 1, 7, 2, 4, 9], [7, 2, 1, 3, 9, 4, 6, 5, 8], [5, 6, 9, 7, 8, 1, 3, 2, 4], [3, 8, 4, 5, 2, 6, 9, 1, 7]])),
|
|
35
|
-
by(builtin(sudoku, 2))
|
|
36
|
-
)
|
|
37
|
-
])
|
|
38
|
-
)
|
|
39
|
-
).
|
|
40
|
-
|
|
@@ -1,482 +1,6 @@
|
|
|
1
1
|
decodesAs(message(1), 1).
|
|
2
|
-
why(
|
|
3
|
-
decodesAs(message(1), 1),
|
|
4
|
-
proof(
|
|
5
|
-
goal(decodesAs(message(1), 1)),
|
|
6
|
-
by(rule("superdense-coding.pl", clause(26))),
|
|
7
|
-
bindings([binding("N", 1), binding("M", 1)]),
|
|
8
|
-
uses([
|
|
9
|
-
proof(
|
|
10
|
-
goal(sdcoding(1, 1)),
|
|
11
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
12
|
-
bindings([binding("N", 1), binding("M", 1), binding("Proof", path(false, false, true))]),
|
|
13
|
-
uses([
|
|
14
|
-
proof(
|
|
15
|
-
goal(sdc_path(1, 1, path(false, false, true))),
|
|
16
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
17
|
-
bindings([binding("N", 1), binding("M", 1), binding("X", false), binding("Y", false), binding("B", true)]),
|
|
18
|
-
uses([
|
|
19
|
-
proof(
|
|
20
|
-
goal(r(false, false)),
|
|
21
|
-
by(fact("superdense-coding.pl", clause(4)))
|
|
22
|
-
),
|
|
23
|
-
proof(
|
|
24
|
-
goal(alice(1, false, true)),
|
|
25
|
-
by(rule("superdense-coding.pl", clause(16))),
|
|
26
|
-
bindings([binding("X", false), binding("Y", true)]),
|
|
27
|
-
uses([
|
|
28
|
-
proof(
|
|
29
|
-
goal(g(false, true)),
|
|
30
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
31
|
-
)
|
|
32
|
-
])
|
|
33
|
-
),
|
|
34
|
-
proof(
|
|
35
|
-
goal(bob(true, false, 1)),
|
|
36
|
-
by(rule("superdense-coding.pl", clause(20))),
|
|
37
|
-
bindings([binding("X", true), binding("Y", false)]),
|
|
38
|
-
uses([
|
|
39
|
-
proof(
|
|
40
|
-
goal(k(true, false)),
|
|
41
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
42
|
-
)
|
|
43
|
-
])
|
|
44
|
-
)
|
|
45
|
-
])
|
|
46
|
-
),
|
|
47
|
-
proof(
|
|
48
|
-
goal(not(duplicate_sdc_path(1, 1, path(false, false, true)))),
|
|
49
|
-
by(builtin(not, 1))
|
|
50
|
-
)
|
|
51
|
-
])
|
|
52
|
-
)
|
|
53
|
-
])
|
|
54
|
-
)
|
|
55
|
-
).
|
|
56
|
-
|
|
57
2
|
decodesAs(message(3), 3).
|
|
58
|
-
why(
|
|
59
|
-
decodesAs(message(3), 3),
|
|
60
|
-
proof(
|
|
61
|
-
goal(decodesAs(message(3), 3)),
|
|
62
|
-
by(rule("superdense-coding.pl", clause(26))),
|
|
63
|
-
bindings([binding("N", 3), binding("M", 3)]),
|
|
64
|
-
uses([
|
|
65
|
-
proof(
|
|
66
|
-
goal(sdcoding(3, 3)),
|
|
67
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
68
|
-
bindings([binding("N", 3), binding("M", 3), binding("Proof", path(false, false, false))]),
|
|
69
|
-
uses([
|
|
70
|
-
proof(
|
|
71
|
-
goal(sdc_path(3, 3, path(false, false, false))),
|
|
72
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
73
|
-
bindings([binding("N", 3), binding("M", 3), binding("X", false), binding("Y", false), binding("B", false)]),
|
|
74
|
-
uses([
|
|
75
|
-
proof(
|
|
76
|
-
goal(r(false, false)),
|
|
77
|
-
by(fact("superdense-coding.pl", clause(4)))
|
|
78
|
-
),
|
|
79
|
-
proof(
|
|
80
|
-
goal(alice(3, false, false)),
|
|
81
|
-
by(rule("superdense-coding.pl", clause(18))),
|
|
82
|
-
bindings([binding("X", false), binding("Y", false)]),
|
|
83
|
-
uses([
|
|
84
|
-
proof(
|
|
85
|
-
goal(kg(false, false)),
|
|
86
|
-
by(rule("superdense-coding.pl", clause(13))),
|
|
87
|
-
bindings([binding("X", false), binding("Y", false), binding("Z", true)]),
|
|
88
|
-
uses([
|
|
89
|
-
proof(
|
|
90
|
-
goal(g(false, true)),
|
|
91
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
92
|
-
),
|
|
93
|
-
proof(
|
|
94
|
-
goal(k(true, false)),
|
|
95
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
96
|
-
)
|
|
97
|
-
])
|
|
98
|
-
)
|
|
99
|
-
])
|
|
100
|
-
),
|
|
101
|
-
proof(
|
|
102
|
-
goal(bob(false, false, 3)),
|
|
103
|
-
by(rule("superdense-coding.pl", clause(22))),
|
|
104
|
-
bindings([binding("X", false), binding("Y", false)]),
|
|
105
|
-
uses([
|
|
106
|
-
proof(
|
|
107
|
-
goal(identity(false, false)),
|
|
108
|
-
by(fact("superdense-coding.pl", clause(6)))
|
|
109
|
-
)
|
|
110
|
-
])
|
|
111
|
-
)
|
|
112
|
-
])
|
|
113
|
-
),
|
|
114
|
-
proof(
|
|
115
|
-
goal(not(duplicate_sdc_path(3, 3, path(false, false, false)))),
|
|
116
|
-
by(builtin(not, 1))
|
|
117
|
-
)
|
|
118
|
-
])
|
|
119
|
-
)
|
|
120
|
-
])
|
|
121
|
-
)
|
|
122
|
-
).
|
|
123
|
-
|
|
124
3
|
decodesAs(message(0), 0).
|
|
125
|
-
why(
|
|
126
|
-
decodesAs(message(0), 0),
|
|
127
|
-
proof(
|
|
128
|
-
goal(decodesAs(message(0), 0)),
|
|
129
|
-
by(rule("superdense-coding.pl", clause(26))),
|
|
130
|
-
bindings([binding("N", 0), binding("M", 0)]),
|
|
131
|
-
uses([
|
|
132
|
-
proof(
|
|
133
|
-
goal(sdcoding(0, 0)),
|
|
134
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
135
|
-
bindings([binding("N", 0), binding("M", 0), binding("Proof", path(true, true, true))]),
|
|
136
|
-
uses([
|
|
137
|
-
proof(
|
|
138
|
-
goal(sdc_path(0, 0, path(true, true, true))),
|
|
139
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
140
|
-
bindings([binding("N", 0), binding("M", 0), binding("X", true), binding("Y", true), binding("B", true)]),
|
|
141
|
-
uses([
|
|
142
|
-
proof(
|
|
143
|
-
goal(r(true, true)),
|
|
144
|
-
by(fact("superdense-coding.pl", clause(5)))
|
|
145
|
-
),
|
|
146
|
-
proof(
|
|
147
|
-
goal(alice(0, true, true)),
|
|
148
|
-
by(rule("superdense-coding.pl", clause(15))),
|
|
149
|
-
bindings([binding("X", true), binding("Y", true)]),
|
|
150
|
-
uses([
|
|
151
|
-
proof(
|
|
152
|
-
goal(identity(true, true)),
|
|
153
|
-
by(fact("superdense-coding.pl", clause(7)))
|
|
154
|
-
)
|
|
155
|
-
])
|
|
156
|
-
),
|
|
157
|
-
proof(
|
|
158
|
-
goal(bob(true, true, 0)),
|
|
159
|
-
by(rule("superdense-coding.pl", clause(19))),
|
|
160
|
-
bindings([binding("X", true), binding("Y", true)]),
|
|
161
|
-
uses([
|
|
162
|
-
proof(
|
|
163
|
-
goal(gk(true, true)),
|
|
164
|
-
by(rule("superdense-coding.pl", clause(14))),
|
|
165
|
-
bindings([binding("X", true), binding("Y", true), binding("Z", false)]),
|
|
166
|
-
uses([
|
|
167
|
-
proof(
|
|
168
|
-
goal(k(true, false)),
|
|
169
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
170
|
-
),
|
|
171
|
-
proof(
|
|
172
|
-
goal(g(false, true)),
|
|
173
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
174
|
-
)
|
|
175
|
-
])
|
|
176
|
-
)
|
|
177
|
-
])
|
|
178
|
-
)
|
|
179
|
-
])
|
|
180
|
-
),
|
|
181
|
-
proof(
|
|
182
|
-
goal(not(duplicate_sdc_path(0, 0, path(true, true, true)))),
|
|
183
|
-
by(builtin(not, 1))
|
|
184
|
-
)
|
|
185
|
-
])
|
|
186
|
-
)
|
|
187
|
-
])
|
|
188
|
-
)
|
|
189
|
-
).
|
|
190
|
-
|
|
191
4
|
decodesAs(message(2), 2).
|
|
192
|
-
why(
|
|
193
|
-
decodesAs(message(2), 2),
|
|
194
|
-
proof(
|
|
195
|
-
goal(decodesAs(message(2), 2)),
|
|
196
|
-
by(rule("superdense-coding.pl", clause(26))),
|
|
197
|
-
bindings([binding("N", 2), binding("M", 2)]),
|
|
198
|
-
uses([
|
|
199
|
-
proof(
|
|
200
|
-
goal(sdcoding(2, 2)),
|
|
201
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
202
|
-
bindings([binding("N", 2), binding("M", 2), binding("Proof", path(true, true, false))]),
|
|
203
|
-
uses([
|
|
204
|
-
proof(
|
|
205
|
-
goal(sdc_path(2, 2, path(true, true, false))),
|
|
206
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
207
|
-
bindings([binding("N", 2), binding("M", 2), binding("X", true), binding("Y", true), binding("B", false)]),
|
|
208
|
-
uses([
|
|
209
|
-
proof(
|
|
210
|
-
goal(r(true, true)),
|
|
211
|
-
by(fact("superdense-coding.pl", clause(5)))
|
|
212
|
-
),
|
|
213
|
-
proof(
|
|
214
|
-
goal(alice(2, true, false)),
|
|
215
|
-
by(rule("superdense-coding.pl", clause(17))),
|
|
216
|
-
bindings([binding("X", true), binding("Y", false)]),
|
|
217
|
-
uses([
|
|
218
|
-
proof(
|
|
219
|
-
goal(k(true, false)),
|
|
220
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
221
|
-
)
|
|
222
|
-
])
|
|
223
|
-
),
|
|
224
|
-
proof(
|
|
225
|
-
goal(bob(false, true, 2)),
|
|
226
|
-
by(rule("superdense-coding.pl", clause(21))),
|
|
227
|
-
bindings([binding("X", false), binding("Y", true)]),
|
|
228
|
-
uses([
|
|
229
|
-
proof(
|
|
230
|
-
goal(g(false, true)),
|
|
231
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
232
|
-
)
|
|
233
|
-
])
|
|
234
|
-
)
|
|
235
|
-
])
|
|
236
|
-
),
|
|
237
|
-
proof(
|
|
238
|
-
goal(not(duplicate_sdc_path(2, 2, path(true, true, false)))),
|
|
239
|
-
by(builtin(not, 1))
|
|
240
|
-
)
|
|
241
|
-
])
|
|
242
|
-
)
|
|
243
|
-
])
|
|
244
|
-
)
|
|
245
|
-
).
|
|
246
|
-
|
|
247
5
|
preservesMessage(protocol, true).
|
|
248
|
-
why(
|
|
249
|
-
preservesMessage(protocol, true),
|
|
250
|
-
proof(
|
|
251
|
-
goal(preservesMessage(protocol, true)),
|
|
252
|
-
by(rule("superdense-coding.pl", clause(27))),
|
|
253
|
-
uses([
|
|
254
|
-
proof(
|
|
255
|
-
goal(sdcoding(0, 0)),
|
|
256
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
257
|
-
bindings([binding("N", 0), binding("M", 0), binding("Proof", path(true, true, true))]),
|
|
258
|
-
uses([
|
|
259
|
-
proof(
|
|
260
|
-
goal(sdc_path(0, 0, path(true, true, true))),
|
|
261
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
262
|
-
bindings([binding("N", 0), binding("M", 0), binding("X", true), binding("Y", true), binding("B", true)]),
|
|
263
|
-
uses([
|
|
264
|
-
proof(
|
|
265
|
-
goal(r(true, true)),
|
|
266
|
-
by(fact("superdense-coding.pl", clause(5)))
|
|
267
|
-
),
|
|
268
|
-
proof(
|
|
269
|
-
goal(alice(0, true, true)),
|
|
270
|
-
by(rule("superdense-coding.pl", clause(15))),
|
|
271
|
-
bindings([binding("X", true), binding("Y", true)]),
|
|
272
|
-
uses([
|
|
273
|
-
proof(
|
|
274
|
-
goal(identity(true, true)),
|
|
275
|
-
by(fact("superdense-coding.pl", clause(7)))
|
|
276
|
-
)
|
|
277
|
-
])
|
|
278
|
-
),
|
|
279
|
-
proof(
|
|
280
|
-
goal(bob(true, true, 0)),
|
|
281
|
-
by(rule("superdense-coding.pl", clause(19))),
|
|
282
|
-
bindings([binding("X", true), binding("Y", true)]),
|
|
283
|
-
uses([
|
|
284
|
-
proof(
|
|
285
|
-
goal(gk(true, true)),
|
|
286
|
-
by(rule("superdense-coding.pl", clause(14))),
|
|
287
|
-
bindings([binding("X", true), binding("Y", true), binding("Z", false)]),
|
|
288
|
-
uses([
|
|
289
|
-
proof(
|
|
290
|
-
goal(k(true, false)),
|
|
291
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
292
|
-
),
|
|
293
|
-
proof(
|
|
294
|
-
goal(g(false, true)),
|
|
295
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
296
|
-
)
|
|
297
|
-
])
|
|
298
|
-
)
|
|
299
|
-
])
|
|
300
|
-
)
|
|
301
|
-
])
|
|
302
|
-
),
|
|
303
|
-
proof(
|
|
304
|
-
goal(not(duplicate_sdc_path(0, 0, path(true, true, true)))),
|
|
305
|
-
by(builtin(not, 1))
|
|
306
|
-
)
|
|
307
|
-
])
|
|
308
|
-
),
|
|
309
|
-
proof(
|
|
310
|
-
goal(sdcoding(1, 1)),
|
|
311
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
312
|
-
bindings([binding("N", 1), binding("M", 1), binding("Proof", path(false, false, true))]),
|
|
313
|
-
uses([
|
|
314
|
-
proof(
|
|
315
|
-
goal(sdc_path(1, 1, path(false, false, true))),
|
|
316
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
317
|
-
bindings([binding("N", 1), binding("M", 1), binding("X", false), binding("Y", false), binding("B", true)]),
|
|
318
|
-
uses([
|
|
319
|
-
proof(
|
|
320
|
-
goal(r(false, false)),
|
|
321
|
-
by(fact("superdense-coding.pl", clause(4)))
|
|
322
|
-
),
|
|
323
|
-
proof(
|
|
324
|
-
goal(alice(1, false, true)),
|
|
325
|
-
by(rule("superdense-coding.pl", clause(16))),
|
|
326
|
-
bindings([binding("X", false), binding("Y", true)]),
|
|
327
|
-
uses([
|
|
328
|
-
proof(
|
|
329
|
-
goal(g(false, true)),
|
|
330
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
331
|
-
)
|
|
332
|
-
])
|
|
333
|
-
),
|
|
334
|
-
proof(
|
|
335
|
-
goal(bob(true, false, 1)),
|
|
336
|
-
by(rule("superdense-coding.pl", clause(20))),
|
|
337
|
-
bindings([binding("X", true), binding("Y", false)]),
|
|
338
|
-
uses([
|
|
339
|
-
proof(
|
|
340
|
-
goal(k(true, false)),
|
|
341
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
342
|
-
)
|
|
343
|
-
])
|
|
344
|
-
)
|
|
345
|
-
])
|
|
346
|
-
),
|
|
347
|
-
proof(
|
|
348
|
-
goal(not(duplicate_sdc_path(1, 1, path(false, false, true)))),
|
|
349
|
-
by(builtin(not, 1))
|
|
350
|
-
)
|
|
351
|
-
])
|
|
352
|
-
),
|
|
353
|
-
proof(
|
|
354
|
-
goal(sdcoding(2, 2)),
|
|
355
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
356
|
-
bindings([binding("N", 2), binding("M", 2), binding("Proof", path(true, true, false))]),
|
|
357
|
-
uses([
|
|
358
|
-
proof(
|
|
359
|
-
goal(sdc_path(2, 2, path(true, true, false))),
|
|
360
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
361
|
-
bindings([binding("N", 2), binding("M", 2), binding("X", true), binding("Y", true), binding("B", false)]),
|
|
362
|
-
uses([
|
|
363
|
-
proof(
|
|
364
|
-
goal(r(true, true)),
|
|
365
|
-
by(fact("superdense-coding.pl", clause(5)))
|
|
366
|
-
),
|
|
367
|
-
proof(
|
|
368
|
-
goal(alice(2, true, false)),
|
|
369
|
-
by(rule("superdense-coding.pl", clause(17))),
|
|
370
|
-
bindings([binding("X", true), binding("Y", false)]),
|
|
371
|
-
uses([
|
|
372
|
-
proof(
|
|
373
|
-
goal(k(true, false)),
|
|
374
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
375
|
-
)
|
|
376
|
-
])
|
|
377
|
-
),
|
|
378
|
-
proof(
|
|
379
|
-
goal(bob(false, true, 2)),
|
|
380
|
-
by(rule("superdense-coding.pl", clause(21))),
|
|
381
|
-
bindings([binding("X", false), binding("Y", true)]),
|
|
382
|
-
uses([
|
|
383
|
-
proof(
|
|
384
|
-
goal(g(false, true)),
|
|
385
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
386
|
-
)
|
|
387
|
-
])
|
|
388
|
-
)
|
|
389
|
-
])
|
|
390
|
-
),
|
|
391
|
-
proof(
|
|
392
|
-
goal(not(duplicate_sdc_path(2, 2, path(true, true, false)))),
|
|
393
|
-
by(builtin(not, 1))
|
|
394
|
-
)
|
|
395
|
-
])
|
|
396
|
-
),
|
|
397
|
-
proof(
|
|
398
|
-
goal(sdcoding(3, 3)),
|
|
399
|
-
by(rule("superdense-coding.pl", clause(25))),
|
|
400
|
-
bindings([binding("N", 3), binding("M", 3), binding("Proof", path(false, false, false))]),
|
|
401
|
-
uses([
|
|
402
|
-
proof(
|
|
403
|
-
goal(sdc_path(3, 3, path(false, false, false))),
|
|
404
|
-
by(rule("superdense-coding.pl", clause(23))),
|
|
405
|
-
bindings([binding("N", 3), binding("M", 3), binding("X", false), binding("Y", false), binding("B", false)]),
|
|
406
|
-
uses([
|
|
407
|
-
proof(
|
|
408
|
-
goal(r(false, false)),
|
|
409
|
-
by(fact("superdense-coding.pl", clause(4)))
|
|
410
|
-
),
|
|
411
|
-
proof(
|
|
412
|
-
goal(alice(3, false, false)),
|
|
413
|
-
by(rule("superdense-coding.pl", clause(18))),
|
|
414
|
-
bindings([binding("X", false), binding("Y", false)]),
|
|
415
|
-
uses([
|
|
416
|
-
proof(
|
|
417
|
-
goal(kg(false, false)),
|
|
418
|
-
by(rule("superdense-coding.pl", clause(13))),
|
|
419
|
-
bindings([binding("X", false), binding("Y", false), binding("Z", true)]),
|
|
420
|
-
uses([
|
|
421
|
-
proof(
|
|
422
|
-
goal(g(false, true)),
|
|
423
|
-
by(fact("superdense-coding.pl", clause(8)))
|
|
424
|
-
),
|
|
425
|
-
proof(
|
|
426
|
-
goal(k(true, false)),
|
|
427
|
-
by(fact("superdense-coding.pl", clause(11)))
|
|
428
|
-
)
|
|
429
|
-
])
|
|
430
|
-
)
|
|
431
|
-
])
|
|
432
|
-
),
|
|
433
|
-
proof(
|
|
434
|
-
goal(bob(false, false, 3)),
|
|
435
|
-
by(rule("superdense-coding.pl", clause(22))),
|
|
436
|
-
bindings([binding("X", false), binding("Y", false)]),
|
|
437
|
-
uses([
|
|
438
|
-
proof(
|
|
439
|
-
goal(identity(false, false)),
|
|
440
|
-
by(fact("superdense-coding.pl", clause(6)))
|
|
441
|
-
)
|
|
442
|
-
])
|
|
443
|
-
)
|
|
444
|
-
])
|
|
445
|
-
),
|
|
446
|
-
proof(
|
|
447
|
-
goal(not(duplicate_sdc_path(3, 3, path(false, false, false)))),
|
|
448
|
-
by(builtin(not, 1))
|
|
449
|
-
)
|
|
450
|
-
])
|
|
451
|
-
)
|
|
452
|
-
])
|
|
453
|
-
)
|
|
454
|
-
).
|
|
455
|
-
|
|
456
6
|
cancelsCrossTalk(protocol, true).
|
|
457
|
-
why(
|
|
458
|
-
cancelsCrossTalk(protocol, true),
|
|
459
|
-
proof(
|
|
460
|
-
goal(cancelsCrossTalk(protocol, true)),
|
|
461
|
-
by(rule("superdense-coding.pl", clause(28))),
|
|
462
|
-
uses([
|
|
463
|
-
proof(
|
|
464
|
-
goal(not(sdcoding(0, 1))),
|
|
465
|
-
by(builtin(not, 1))
|
|
466
|
-
),
|
|
467
|
-
proof(
|
|
468
|
-
goal(not(sdcoding(1, 0))),
|
|
469
|
-
by(builtin(not, 1))
|
|
470
|
-
),
|
|
471
|
-
proof(
|
|
472
|
-
goal(not(sdcoding(2, 3))),
|
|
473
|
-
by(builtin(not, 1))
|
|
474
|
-
),
|
|
475
|
-
proof(
|
|
476
|
-
goal(not(sdcoding(3, 2))),
|
|
477
|
-
by(builtin(not, 1))
|
|
478
|
-
)
|
|
479
|
-
])
|
|
480
|
-
)
|
|
481
|
-
).
|
|
482
|
-
|