diff --git a/_sources/playground.rst.txt b/_sources/playground.rst.txt index 12492dd91..fba9c679d 100644 --- a/_sources/playground.rst.txt +++ b/_sources/playground.rst.txt @@ -215,7 +215,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -241,7 +241,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -337,7 +337,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -363,7 +363,7 @@ Test Bed Compilation time: 0.001 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -391,7 +391,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -417,7 +417,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -462,7 +462,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -488,7 +488,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -917,7 +917,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -969,7 +969,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -995,7 +995,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1075,7 +1075,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1101,7 +1101,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1127,7 +1127,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1153,7 +1153,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Fatal error: Unification problem outside the pattern fragment. ((Data.Term.App (f, (Data.Term.Const x), [])) == (Data.Term.AppUVar ( { Data.Term.contents = please extend this printer; uid_private = 2 }, 0, @@ -1210,7 +1210,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1453,7 +1453,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: @@ -1762,7 +1762,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1792,7 +1792,7 @@ Test Bed Success: - Time: 1.810 + Time: 1.792 Constraints: @@ -1840,7 +1840,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1866,7 +1866,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -1892,11 +1892,11 @@ Test Bed Compilation time: 0.001 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: - Time: 0.314 + Time: 0.331 Constraints: @@ -1951,7 +1951,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2198,7 +2198,7 @@ Test Bed .. code-block:: console - Parsing time: 0.000 + Parsing time: 0.001 Compilation time: 0.000 @@ -2223,7 +2223,7 @@ Test Bed .. code-block:: console - 1.313348 + 0.056941 + 0.939354 + 1.303534 + 0.058142 + 0.914749 .. code-block:: console @@ -2237,7 +2237,7 @@ Test Bed Success: - Time: 2.529 + Time: 2.497 Constraints: @@ -2254,7 +2254,7 @@ Test Bed .. code-block:: console - 6.328652 + 2.882384 + 0.401003 + 6.401275 + 2.926368 + 0.387892 .. code-block:: console @@ -2268,7 +2268,7 @@ Test Bed Success: - Time: 9.618 + Time: 9.722 Constraints: @@ -2285,7 +2285,7 @@ Test Bed .. code-block:: console - 5.764627 + 2.731453 + 0.231218 + 5.701716 + 2.697709 + 0.228060 .. code-block:: console @@ -2299,7 +2299,7 @@ Test Bed Success: - Time: 8.733 + Time: 8.633 Constraints: @@ -2382,7 +2382,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2408,7 +2408,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2434,7 +2434,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2458,9 +2458,9 @@ Test Bed Parsing time: 0.000 - Compilation time: 0.000 + Compilation time: 0.001 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2486,7 +2486,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2512,7 +2512,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2797,7 +2797,7 @@ Test Bed Warning: File "/home/runner/work/elpi/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 66, characters 3524-3526: F4 is linear: name it _F4 (discard) or F4_ (fresh variable) - Compilation time: 0.000 + Compilation time: 0.001 Typechecking time: 0.002 @@ -2901,7 +2901,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -2941,7 +2941,7 @@ Test Bed Success: - Time: 1.578 + Time: 1.617 Constraints: @@ -2975,7 +2975,7 @@ Test Bed .. code-block:: console - 3 + 2 .. code-block:: console @@ -2985,7 +2985,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3028,7 +3028,7 @@ Test Bed Success: - Time: 0.251 + Time: 0.265 Constraints: @@ -3067,7 +3067,7 @@ Test Bed Success: - Time: 1.592 + Time: 1.714 Constraints: @@ -3215,7 +3215,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3245,7 +3245,7 @@ Test Bed Success: - Time: 0.138 + Time: 0.145 Constraints: @@ -3265,13 +3265,13 @@ Test Bed Parsing time: 0.000 - Compilation time: 0.000 + Compilation time: 0.001 Typechecking time: 0.002 Success: - Time: 0.141 + Time: 0.144 Constraints: @@ -3293,7 +3293,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3340,7 +3340,7 @@ Test Bed .. code-block:: console - 1.102111 + 0.052648 + 0.774574 + 1.094963 + 0.052925 + 0.764467 .. code-block:: console @@ -3354,7 +3354,7 @@ Test Bed Success: - Time: 2.018 + Time: 2.003 Constraints: @@ -3376,7 +3376,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3402,7 +3402,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3428,7 +3428,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 **../../tests/sources/shorten_aux2.elpi :** @@ -3470,7 +3470,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3533,7 +3533,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3590,7 +3590,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: @@ -3616,7 +3616,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3647,7 +3647,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3673,7 +3673,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3730,7 +3730,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: @@ -3756,7 +3756,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: @@ -3782,7 +3782,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: @@ -3808,7 +3808,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.002 + Typechecking time: 0.001 Success: @@ -3890,7 +3890,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3916,7 +3916,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -3996,7 +3996,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -4022,7 +4022,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: @@ -4048,7 +4048,7 @@ Test Bed Compilation time: 0.000 - Typechecking time: 0.001 + Typechecking time: 0.002 Success: diff --git a/_static/pygments.css b/_static/pygments.css index 84ab3030a..6f8b210a1 100644 --- a/_static/pygments.css +++ b/_static/pygments.css @@ -6,9 +6,9 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .hll { background-color: #ffffcc } .highlight { background: #f8f8f8; } .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .err { border: 1px solid #F00 } /* Error */ .highlight .k { color: #008000; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ +.highlight .o { color: #666 } /* Operator */ .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ .highlight .cp { color: #9C6500 } /* Comment.Preproc */ @@ -25,34 +25,34 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .gt { color: #04D } /* Generic.Traceback */ .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008000 } /* Keyword.Pseudo */ .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #B00040 } /* Keyword.Type */ -.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .m { color: #666 } /* Literal.Number */ .highlight .s { color: #BA2121 } /* Literal.String */ .highlight .na { color: #687822 } /* Name.Attribute */ .highlight .nb { color: #008000 } /* Name.Builtin */ -.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -.highlight .no { color: #880000 } /* Name.Constant */ -.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */ +.highlight .no { color: #800 } /* Name.Constant */ +.highlight .nd { color: #A2F } /* Name.Decorator */ .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nf { color: #00F } /* Name.Function */ .highlight .nl { color: #767600 } /* Name.Label */ -.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */ .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #19177C } /* Name.Variable */ -.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mb { color: #666666 } /* Literal.Number.Bin */ -.highlight .mf { color: #666666 } /* Literal.Number.Float */ -.highlight .mh { color: #666666 } /* Literal.Number.Hex */ -.highlight .mi { color: #666666 } /* Literal.Number.Integer */ -.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #BBB } /* Text.Whitespace */ +.highlight .mb { color: #666 } /* Literal.Number.Bin */ +.highlight .mf { color: #666 } /* Literal.Number.Float */ +.highlight .mh { color: #666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666 } /* Literal.Number.Oct */ .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ .highlight .sc { color: #BA2121 } /* Literal.String.Char */ @@ -67,9 +67,9 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ .highlight .ss { color: #19177C } /* Literal.String.Symbol */ .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #0000FF } /* Name.Function.Magic */ +.highlight .fm { color: #00F } /* Name.Function.Magic */ .highlight .vc { color: #19177C } /* Name.Variable.Class */ .highlight .vg { color: #19177C } /* Name.Variable.Global */ .highlight .vi { color: #19177C } /* Name.Variable.Instance */ .highlight .vm { color: #19177C } /* Name.Variable.Magic */ -.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file +.highlight .il { color: #666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/about.html b/about.html index 28af873a6..843dec934 100644 --- a/about.html +++ b/about.html @@ -7,7 +7,7 @@
The injection engine:
@@ -198,10 +198,10 @@1type s num -> num.
2type zero num.
3pred ack i:num, i:num, o:num.
-4ack zero N V :- !, V = (s N).
-5ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
-6ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
-7main :- ack (s (s (s zero))) (s zero) V, print "V =" V.
+4ack zero N V :- !, V = (s N).
+5ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
+6ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
+7main :- ack (s (s (s zero))) (s zero) V, print "V =" V.
Injection failure: result did not pass regexp check (V = s \(.*\))
This one should fail validation, only a message stating the regexp matching error will be printed:
@@ -214,10 +214,10 @@1type s num -> num.
2type zero num.
3pred ack i:num, i:num, o:num.
-4ack zero N V :- !, V = (s N).
-5ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
-6ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
-7main :- ack (s (s (s zero))) (s zero) V, print "V =" V.
+4ack zero N V :- !, V = (s N).
+5ack M zero V :- !, (s M2) = M, ack M2 (s zero) V.
+6ack M N V :- (s M2) = M, (s N2) = N, ack M N2 V2, ack M2 V2 V.
+7main :- ack (s (s (s zero))) (s zero) V, print "V =" V.
Injection failure: result did not pass regexp check (/(?!)/)
Parsing time: 0.000
@@ -324,13 +324,13 @@ Test Bed
2type lam (tm -> tm) -> tm.
3
4pred hard i:tm.
- 5hard (lam x\ _ as P) :- print P.
+ 5hard (lam x\ _ as P) :- print P.
6
7pred simple i:int.
- 8simple (1 as P) :- print P.
+ 8simple (1 as P) :- print P.
9
10main :-
-11 simple 1, hard (lam x\ x).
+11 simple 1, hard (lam x\ x).
compat [term c1 (uvar frozen--389 []), term c0 (uvar frozen--390 [])] |-
@@ -488,7 +488,7 @@ Test Bed
3type group-1 group.
4type group-2 group.
5
- 6gcd A (uvar as B) :- !, declare_constraint (gcd A B) [B].
+ 6gcd A (uvar as B) :- !, declare_constraint (gcd A B) [B].
7
8% assert result is OK
9gcd 11 group-1 :- print "group 1 solved".
@@ -498,10 +498,10 @@ Test Bed
13 % we then force a resumption to check only GCDs are there
14 X = group-1, Y = group-2.
15
-16constraint gcd {
-17 rule (gcd A _) \ (gcd B _) | (A = B).
-18 rule (gcd A _) \ (gcd B X) | (A < B) <=> (C is (B - A), gcd C X).
-19}
+16constraint gcd {
+17 rule (gcd A _) \ (gcd B _) | (A = B).
+18 rule (gcd A _) \ (gcd B X) | (A < B) <=> (C is (B - A), gcd C X).
+19}
group 1 solved
@@ -512,7 +512,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -527,41 +527,41 @@ Test Bed
../../tests/sources/chrLEQ.elpi
:
1pred leq i:int, i:int.
- 2leq (uvar as A) (uvar as B) :- !, declare_constraint (leq A B) [A,B].
- 3leq A (uvar as B) :- !, declare_constraint (leq A B) [B].
- 4leq (uvar as A) B :- !, declare_constraint (leq A B) [A].
+ 2leq (uvar as A) (uvar as B) :- !, declare_constraint (leq A B) [A,B].
+ 3leq A (uvar as B) :- !, declare_constraint (leq A B) [B].
+ 4leq (uvar as A) B :- !, declare_constraint (leq A B) [A].
5
6pred ltn i:int, i:int.
- 7ltn (uvar as A) (uvar as B) :- !, declare_constraint (ltn A B) [A,B].
- 8ltn A (uvar as B) :- !, declare_constraint (ltn A B) [B].
- 9ltn (uvar as A) B :- !, declare_constraint (ltn A B) [A].
+ 7ltn (uvar as A) (uvar as B) :- !, declare_constraint (ltn A B) [A,B].
+ 8ltn A (uvar as B) :- !, declare_constraint (ltn A B) [B].
+ 9ltn (uvar as A) B :- !, declare_constraint (ltn A B) [A].
10
11main :-
-12 leq A B, leq B C, not (ltn C A), ltn A B, not(A = C).
+12 leq A B, leq B C, not (ltn C A), ltn A B, not(A = C).
13
-14constraint leq ltn {
+14constraint leq ltn {
15 % incompat (FIRST!!)
-16 rule (leq X Y) (ltn Y X) <=> false.
-17 rule (ltn X Y) (ltn Y X) <=> false.
-18 rule (ltn X X) <=> false.
+16 rule (leq X Y) (ltn Y X) <=> false.
+17 rule (ltn X Y) (ltn Y X) <=> false.
+18 rule (ltn X X) <=> false.
19
20 % refl
-21 rule \ (leq X X).
+21 rule \ (leq X X).
22
23 % atisym
-24 rule (leq X Y) \ (leq Y X) <=> (Y = X).
+24 rule (leq X Y) \ (leq Y X) <=> (Y = X).
25
26 % trans
-27 rule (leq X Y) (leq Y Z) <=> (leq X Z).
-28 rule (leq X Y) (ltn Y Z) <=> (ltn X Z).
-29 rule (ltn X Y) (leq Y Z) <=> (ltn X Z).
-30 rule (ltn X Y) (ltn Y Z) <=> (ltn X Z).
+27 rule (leq X Y) (leq Y Z) <=> (leq X Z).
+28 rule (leq X Y) (ltn Y Z) <=> (ltn X Z).
+29 rule (ltn X Y) (leq Y Z) <=> (ltn X Z).
+30 rule (ltn X Y) (ltn Y Z) <=> (ltn X Z).
31
32 % idempotence
-33 rule (leq X Y) \ (leq X Y).
-34 rule (ltn X Y) \ (ltn X Y).
+33 rule (leq X Y) \ (leq X Y).
+34 rule (ltn X Y) \ (ltn X Y).
35
-36}
+36}
37
38% vim:set ft=lprolog:
@@ -570,7 +570,7 @@ Test Bed
Compilation time: 0.001
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -588,23 +588,23 @@ Test Bed
:
1type test int -> prop.
2
- 3main :- declare_constraint (test 1) [_], declare_constraint (test 2) [_].
+ 3main :- declare_constraint (test 1) [_], declare_constraint (test 2) [_].
4
- 5constraint test {
+ 5constraint test {
6
7 :name "fst"
- 8 rule (test 1) \ (test 2).
+ 8 rule (test 1) \ (test 2).
9
-10 rule (test 2) <=> fail.
+10 rule (test 2) <=> fail.
11
-12}
+12}
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -621,16 +621,16 @@ Test Bed
1type foo any.
2type bar any -> any.
3
-4main :- declare_constraint foo [], declare_constraint (bar X) [], X.
+4main :- declare_constraint foo [], declare_constraint (bar X) [], X.
5
-6constraint foo bar { rule foo (bar _) <=> false. rule (bar X) <=> (X = true). }
+6constraint foo bar { rule foo (bar _) <=> false. rule (bar X) <=> (X = true). }
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -644,11 +644,11 @@ Test Bed
../../tests/sources/chr_not_clique.elpi
:
-1constraint a {
+1constraint a {
2
3 rule b.
4
-5}
+5}
Parsing time: 0.000
@@ -664,11 +664,11 @@ Test Bed
4 declare_constraint b [_],
5 declare_constraint d [_].
6
- 7constraint a b c d {
- 8 rule a (d) \ b b <=> (print c, declare_constraint c [_]).
+ 7constraint a b c d {
+ 8 rule a (d) \ b b <=> (print c, declare_constraint c [_]).
9 rule c c <=> fail.
10
-11}
+11}
c
@@ -678,7 +678,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -704,7 +704,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -718,14 +718,14 @@ Test Bed
../../tests/sources/ctx_loading.elpi
:
- 1constraint a b c d1 d2 d3 d11 d22 d33 {
- 2 rule (C ?- d1 X) | (print C) <=> (C ?- declare_constraint (d11 X) [X]).
- 3 rule (C ?- d2 X) | (print C) <=> (C ?- declare_constraint (d22 X) [X]).
- 4 rule (C ?- d3 X) | (print C) <=> (C ?- declare_constraint (d33 X) [X]).
- 5 rule \ (C ?- d1 X) (C ?- d11 X).
- 6 rule \ (C ?- d2 X) (C ?- d22 X).
- 7 rule \ (C ?- d3 X) (C ?- d33 X).
- 8}
+ 1constraint a b c d1 d2 d3 d11 d22 d33 {
+ 2 rule (C ?- d1 X) | (print C) <=> (C ?- declare_constraint (d11 X) [X]).
+ 3 rule (C ?- d2 X) | (print C) <=> (C ?- declare_constraint (d22 X) [X]).
+ 4 rule (C ?- d3 X) | (print C) <=> (C ?- declare_constraint (d33 X) [X]).
+ 5 rule \ (C ?- d1 X) (C ?- d11 X).
+ 6 rule \ (C ?- d2 X) (C ?- d22 X).
+ 7 rule \ (C ?- d3 X) (C ?- d33 X).
+ 8}
9type p prop -> prop.
10type a prop.
11type b prop.
@@ -735,10 +735,10 @@ Test Bed
15main :-
16 p b => p a => p W, !, W = a,
17 [p a, p b] => p Y, !, Y = a,
-18 (p a, p b) => p Z, !, Z = a,
-19 [a, b, c] => declare_constraint (d1 X) [X],
-20 c => b => a => declare_constraint (d2 X) [X],
-21 (a, b, c) => declare_constraint (d3 X) [X],
+18 (p a, p b) => p Z, !, Z = a,
+19 [a, b, c] => declare_constraint (d1 X) [X],
+20 c => b => a => declare_constraint (d2 X) [X],
+21 (a, b, c) => declare_constraint (d3 X) [X],
22 X = a.
23
@@ -1149,7 +1149,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1203,11 +1203,11 @@ Test Bed
../../tests/sources/cut2.elpi
:
1/* To test run q X; the only expected result is X=ok.
- 2 This is different from the brain-damaged semantics of Teyjus
- 3 and consistent with the implicit declaration
- 4 ; A B :- A.
- 5 ; A B :- B
- 6*/
+ 2 This is different from the brain-damaged semantics of Teyjus
+ 3 and consistent with the implicit declaration
+ 4 ; A B :- A.
+ 5 ; A B :- B
+ 6*/
7kind i type.
8type one i.
9type x i -> diagnostic -> prop.
@@ -1235,7 +1235,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1276,7 +1276,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1381,7 +1381,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1402,23 +1402,23 @@ Test Bed
5type f term -> term.
6type g term.
7
- 8:index(3)
+ 8:index(3)
9pred find i:term.
10find g.
-11find (f g).
-12find (f (f g)).
-13find (f (f (f g))).
-14find (f (f (f (f g)))).
+11find (f g).
+12find (f (f g)).
+13find (f (f (f g))).
+14find (f (f (f (f g)))).
15
16
-17main :- find (f (f (f g))).
+17main :- find (f (f (f g))).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1447,7 +1447,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1461,14 +1461,14 @@ Test Bed
../../tests/sources/elpi_only_llam.elpi
:
-1:untyped main :- p (F X) F X => p (f x) f x.
+1:untyped main :- p (F X) F X => p (f x) f x.
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Fatal error:
Unification problem outside the pattern fragment. ((Data.Term.App (f, (Data.Term.Const x), [])) == (Data.Term.AppUVar (
{ Data.Term.contents = please extend this printer; uid_private = 2 }, 0,
@@ -1505,35 +1505,35 @@ Test Bed
:
1kind tm type.
2type c (tm -> A) -> tm.
- 3macro @ctx A :- c (_\ A). % to have depth > 0 in unif
+ 3macro @ctx A :- c (_\ A). % to have depth > 0 in unif
4
5% to test the indexing
- 6:untyped k1 (x\ g x).
+ 6:untyped k1 (x\ g x).
7:untyped k2 g.
8
9%mode (foo i i).
10pred foo i:(X -> X), i:(X -> X -> X).
-11foo X (x1 \ (x2 \ X x2)) :- (print X).
+11foo X (x1 \ (x2 \ X x2)) :- (print X).
12%% Fails, but should output `y`
13
14:untyped main :-
15 pi f y\
16 % 4 branches in unif
-17 @ctx (x\ f x) = @ctx f,
-18 @ctx f = @ctx (x\ f x),
-19 @ctx (x\ f y x) = @ctx (f y),
-20 @ctx (f y) = @ctx (x\ f y x),
+17 @ctx (x\ f x) = @ctx f,
+18 @ctx f = @ctx (x\ f x),
+19 @ctx (x\ f y x) = @ctx (f y),
+20 @ctx (f y) = @ctx (x\ f y x),
21
22 % put some uvar around
-23 @ctx (f (X y)) = @ctx (x\ f y x), print X,
-24 @ctx (x\ f y x) = @ctx (f (Y y)), print Y,
+23 @ctx (f (X y)) = @ctx (x\ f y x), print X,
+24 @ctx (x\ f y x) = @ctx (f (Y y)), print Y,
25
26 % index + adepth=2 <> bdepth=0
27 k1 g,
-28 k2 (x\ g x),
+28 k2 (x\ g x),
29
30 % regression #135
-31 foo y (x1 \ (x2 \ y x2))
+31 foo y (x1 \ (x2 \ y x2))
32.
@@ -1546,7 +1546,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -1579,90 +1579,90 @@ Test Bed
17
18type bar variadic any any.
19type c variadic any any.
- 20uvar_1 (bar (uvar K Args)) :- std.assert! (var K) "uvar_1 bar X, not a var", print K Args.
- 21uvar_2 (bar X) :- std.assert! (var X K Args) "uvar_2 bar X, not a var", print K Args.
- 22uvar_3 (uvar K) :- std.assert! (var K) "uvar_3 X, not a var", print K.
- 23uvar_4 (uvar K Args) :- std.assert! (var K) "uvar_4 X, not a var", std.assert! (distinct_names Args) "uvar_4 not in pattern".
- 24uvar_5 (uvar K Args) :- std.assert! (var K) "uvar_5 X, not a var", distinct_names Args.
+ 20uvar_1 (bar (uvar K Args)) :- std.assert! (var K) "uvar_1 bar X, not a var", print K Args.
+ 21uvar_2 (bar X) :- std.assert! (var X K Args) "uvar_2 bar X, not a var", print K Args.
+ 22uvar_3 (uvar K) :- std.assert! (var K) "uvar_3 X, not a var", print K.
+ 23uvar_4 (uvar K Args) :- std.assert! (var K) "uvar_4 X, not a var", std.assert! (distinct_names Args) "uvar_4 not in pattern".
+ 24uvar_5 (uvar K Args) :- std.assert! (var K) "uvar_5 X, not a var", distinct_names Args.
25
26uvar_6 X :- fail.
- 27uvar_6 (uvar as X) :- print X.
+ 27uvar_6 (uvar as X) :- print X.
28
- 29as_1 (bar (uvar as K)) :- std.assert! (var K) "bar (uvar as_1 X), not a var", print K.
- 30as_2 (uvar as K) :- std.assert! (var K) "uvar as_2 X, not a var", print K.
- 31as_3 (uvar as K) :- std.assert! (var K) "uvar as_3 X, not a var", print K.
+ 29as_1 (bar (uvar as K)) :- std.assert! (var K) "bar (uvar as_1 X), not a var", print K.
+ 30as_2 (uvar as K) :- std.assert! (var K) "uvar as_2 X, not a var", print K.
+ 31as_3 (uvar as K) :- std.assert! (var K) "uvar as_3 X, not a var", print K.
32
33pred unif_1 o:any.
34pred unif_2 o:any.
35
- 36unif_1 (x\ X x).
- 37unif_2 (x\ y\ X x y).
+ 36unif_1 (x\ X x).
+ 37unif_2 (x\ y\ X x y).
38
39type u any.
40
41tests-uvar :-
42 print "--------- uvar_1",
- 43 not(uvar_1 (bar (x \ u))),
+ 43 not(uvar_1 (bar (x \ u))),
44 print "--------- uvar_2",
- 45 (pi x \ (uvar_2 (bar (X x)))),
+ 45 (pi x \ (uvar_2 (bar (X x)))),
46 print "--------- uvar_3",
- 47 not (uvar_3 (x \ X0)),
+ 47 not (uvar_3 (x \ X0)),
48 print "--------- uvar_3 bis",
- 49 uvar_3 (x \ y\ X01 x y),
+ 49 uvar_3 (x \ y\ X01 x y),
50 print "--------- uvar_4",
51 uvar_4 X1,
52 print "--------- uvar_4 bis",
- 53 not(uvar_4 (x \ X2)),
+ 53 not(uvar_4 (x \ X2)),
54 print "--------- uvar_4 ter",
- 55 uvar_4 (x \ X3 x),
+ 55 uvar_4 (x \ X3 x),
56 print "--------- uvar_4 quater",
- 57 (pi u\ uvar_4 (x \ X4 u x)),
+ 57 (pi u\ uvar_4 (x \ X4 u x)),
58 print "--------- uvar_5",
- 59 not (uvar_5 (x \ X5 u x)),
+ 59 not (uvar_5 (x \ X5 u x)),
60 print "--------- uvar_6",
- 61 uvar_6 (x \ X6 x), var X6.
+ 61 uvar_6 (x \ X6 x), var X6.
62
63tests-as :-
64 print "---------- as_1",
- 65 not(as_1 (x \ bar u)), % fails because (bar (uvar as K) x ==!== bar u)
+ 65 not(as_1 (x \ bar u)), % fails because (bar (uvar as K) x ==!== bar u)
66 print "---------- as_1 bis",
- 67 not(as_1 (x \ bar u x)), % fails because u is not flexible (input mode)
+ 67 not(as_1 (x \ bar u x)), % fails because u is not flexible (input mode)
68 print "---------- as_1 ter",
- 69 (as_1 (x \ bar (X2 x) x)), % works but X2 is pruned
- 70 (pi a\ var (X2 a) _ []), % assert pruning of X2
+ 69 (as_1 (x \ bar (X2 x) x)), % works but X2 is pruned
+ 70 (pi a\ var (X2 a) _ []), % assert pruning of X2
71 print "---------- as_2",
- 72 (as_2 (x \ X1 x)) , % works
- 73 (pi a\ var (X1 a) _ [a]), % assert X1 was not pruned
+ 72 (as_2 (x \ X1 x)) , % works
+ 73 (pi a\ var (X1 a) _ [a]), % assert X1 was not pruned
74 print "---------- as_3",
- 75 not (as_3 (x \ X0)).
+ 75 not (as_3 (x \ X0)).
76
77tests-unif :-
78 print "---------- unif_1",
79 unif_1 X,
80 print "---------- unif_1 bis",
- 81 unif_1 (x\ X1 x),
+ 81 unif_1 (x\ X1 x),
82 print "---------- unif_1 ter",
- 83 unif_1 (x\ y\ X2 x y),
+ 83 unif_1 (x\ y\ X2 x y),
84 print "---------- unif_2",
85 unif_2 X3,
86 print "---------- unif_2 bis",
- 87 unif_2 (x\ X4 x),
+ 87 unif_2 (x\ X4 x),
88 print "---------- unif_2 ter",
- 89 unif_2 (x\ y\ X5 x y),
+ 89 unif_2 (x\ y\ X5 x y),
90 print "---------- unif_zero",
- 91 (x\ X6 x) = X6.
+ 91 (x\ X6 x) = X6.
92
93tests-var :-
94 print "---------- var 1",
- 95 pi x \ (var (y \ X x y)),
+ 95 pi x \ (var (y \ X x y)),
96 print "---------- var 2",
- 97 pi x \ (var (y \ X c y)),
+ 97 pi x \ (var (y \ X c y)),
98 print "---------- var 3",
- 99 pi x z \ (var (y \ X x y)).
+ 99 pi x z \ (var (y \ X x y)).
100
101tests-declare-constraint :-
102 declare_constraint false [x\ X x],
-103 not(X = _\1).
+103 not(X = _\1).
104
105main :- tests-uvar, tests-as, tests-unif, tests-var, tests-declare-constraint.
@@ -1762,21 +1762,21 @@ Test Bed
7pred double i:nat, o:nat.
8
9even zero.
-10odd (succ X) :- even X.
-11even (succ X) :- odd X.
-12even X :- var X, declare_constraint (even X) [X].
-13odd X :- var X, declare_constraint (odd X) [X].
+10odd (succ X) :- even X.
+11even (succ X) :- odd X.
+12even X :- var X, declare_constraint (even X) [X].
+13odd X :- var X, declare_constraint (odd X) [X].
14
15double zero zero.
-16double (succ X) (succ (succ Y)) :- double X Y.
-17double X Y :- var X, declare_constraint (double X Y) [X].
+16double (succ X) (succ (succ Y)) :- double X Y.
+17double X Y :- var X, declare_constraint (double X Y) [X].
18
-19main :- odd X, not(X = zero), not(double Z X).
+19main :- odd X, not(X = zero), not(double Z X).
20
-21constraint even odd double {
-22 rule (even X) (odd X) <=> fail.
-23 rule (double _ Y) <=> (even Y).
-24}
+21constraint even odd double {
+22 rule (even X) (odd X) <=> fail.
+23 rule (double _ Y) <=> (even Y).
+24}
Parsing time: 0.000
@@ -1807,21 +1807,21 @@ Test Bed
6
7type test1, test2, test3, test4, test5 prop.
8
- 9test1 :- std.findall (p A B) [p 1 1, p 1 2, p 2 2].
-10test2 :- std.findall (p _ _) [p X 1, p 1 2, p 2 2], not(var X).
+ 9test1 :- std.findall (p A B) [p 1 1, p 1 2, p 2 2].
+10test2 :- std.findall (p _ _) [p X 1, p 1 2, p 2 2], not(var X).
11test3 :-
12 pi q\
13 q 1 1 =>
14 q 1 2 =>
15 q 2 2 =>
-16 (std.findall (q _ _) [q X 2, q 1 2, q 1 1], not (var X)).
+16 (std.findall (q _ _) [q X 2, q 1 2, q 1 1], not (var X)).
17
18
19test4 :-
20 pi q\
21 q 1 A =>
22 q 2 A =>
-23 (std.findall (q _ _) [q 2 X, q 1 Y], not(same_var X Y)).
+23 (std.findall (q _ _) [q 2 X, q 1 Y], not(same_var X Y)).
24% this is super tricky but hard to implement differently.
25% q _ _ -> q A^1 B^1
26% q A^1 B^1 == q 1 X0 --restrict--> X0 := X1, A1 := _\X1
@@ -1831,7 +1831,7 @@ Test Bed
30 pi q\
31 q 1 A =>
32 q 2 A =>
-33 (std.findall (q _ Z) [q 2 X, q 1 Y], same_var X Y).
+33 (std.findall (q _ Z) [q 2 X, q 1 Y], same_var X Y).
34% this works because there is no restriction
35
36main :- test1, print 1,
@@ -1874,7 +1874,7 @@ Test Bed
:
1:untyped q Y :- pi d\ r Y.
2:untyped r _.
-3:untyped main :- pi c\ q (x\ X c x).
+3:untyped main :- pi c\ q (x\ X c x).
Parsing time: 0.000
@@ -1896,7 +1896,7 @@ Test Bed
../../tests/sources/fragment_exit2.elpi
:
1:untyped ignore _.
-2:untyped main :- pi c\ Y c = (x\ X c x), ignore (Y c d).
+2:untyped main :- pi c\ Y c = (x\ X c x), ignore (Y c d).
Parsing time: 0.000
@@ -1918,14 +1918,14 @@ Test Bed
../../tests/sources/fragment_exit3.elpi
:
1:untyped ignore _.
-2:untyped main :- (pi c\ sigma Y\ X c = Y), ignore (X (f d)).
+2:untyped main :- (pi c\ sigma Y\ X c = Y), ignore (X (f d)).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
@@ -1947,8 +1947,8 @@ Test Bed
6c.
7ignore _.
8foo P :- pi d\ ignore P.
- 9main :- app (x\x) c, F = (y\y), F c, (pi d\ F c),
-10 foo (G c).
+ 9main :- app (x\x) c, F = (y\y), F c, (pi d\ F c),
+10 foo (G c).
../../tests/sources/general_case2.elpi
:
-1:untyped p F :- F (x\ c x).
-2:untyped q (x\ c x).
-3:untyped main :- p (y\ pi z\ q y).
+1:untyped p F :- F (x\ c x).
+2:untyped q (x\ c x).
+3:untyped main :- p (y\ pi z\ q y).
Parsing time: 0.000
@@ -1995,7 +1995,7 @@ Test Bed
../../tests/sources/general_case3.elpi
:
1:untyped main :-
-2 (pi c\ sigma X\ pi d\ (X d = f c d, Y c = X)),
+2 (pi c\ sigma X\ pi d\ (X d = f c d, Y c = X)),
3 Y = c\ d\ f c d.
@@ -2018,10 +2018,10 @@ Test Bed
../../tests/sources/hc_interp.elpi
:
1/*
- 2 * An interpreter for the logic of Horn clauses. This code illustrates
- 3 * the usefulness of beta reduction in realizing substitution. Also note
- 4 * the use of the logic variable in the third clause for try_clause.
- 5 */
+ 2 * An interpreter for the logic of Horn clauses. This code illustrates
+ 3 * the usefulness of beta reduction in realizing substitution. Also note
+ 4 * the use of the logic variable in the third clause for try_clause.
+ 5 */
6
7%module hc_interp.
8
@@ -2051,13 +2051,13 @@ Test Bed
32type and i -> i -> i.
33type all (i -> i) -> i.
34
-35copy (and B1 C1) (and B2 C2) :- copy B1 B2, copy C1 C2.
-36copy (or B1 C1) (or B2 C2) :- copy B1 B2, copy C1 C2.
-37copy (box F1) (box F2) :- pi x\ copy x x => copy (F1 x) (F2 x).
+35copy (and B1 C1) (and B2 C2) :- copy B1 B2, copy C1 C2.
+36copy (or B1 C1) (or B2 C2) :- copy B1 B2, copy C1 C2.
+37copy (box F1) (box F2) :- pi x\ copy x x => copy (F1 x) (F2 x).
38copy a a.
39copy b b.
40copy c c.
-41copy (f X) (f Y) :- copy X Y.
+41copy (f X) (f Y) :- copy X Y.
42copy tru tru.
43copy perp perp.
44
@@ -2065,32 +2065,32 @@ Test Bed
46
47% b[t/b] = t
48
-49subst B T B1 :- pi x\ copy x T => (copy (B x) (B2 x), B2 x = B1).
+49subst B T B1 :- pi x\ copy x T => (copy (B x) (B2 x), B2 x = B1).
50
51% perp is a fail.
52% hc_interp Cs G means Cs |- G
53%hc_interp _ tru.
54
55%hc_interp Cs (box B) :- !, hc_interp Cs (B T).
-56hc_interp Cs (box B) :- !, subst B T B1, hc_interp Cs B1.
-57hc_interp Cs (and B C) :- !, hc_interp Cs B , hc_interp Cs C.
-58hc_interp Cs (or B C) :- !, (hc_interp Cs B ; hc_interp Cs C).
+56hc_interp Cs (box B) :- !, subst B T B1, hc_interp Cs B1.
+57hc_interp Cs (and B C) :- !, hc_interp Cs B , hc_interp Cs C.
+58hc_interp Cs (or B C) :- !, (hc_interp Cs B ; hc_interp Cs C).
59hc_interp Cs A :- backchain Cs A.
60% why there is no rule in teyjus: hc_interp Cs (all B) :- .... ?
61
62backchain Cs A :- memb D Cs, try_clause Cs D A.
63
-64memb X (xcons X _).
-65memb X (xcons Y L) :- memb X L.
+64memb X (xcons X _).
+65memb X (xcons Y L) :- memb X L.
66
67
68% try_clause Cs A B means Cs, A |- B
-69try_clause Cs (and D1 D2) A :-
-70 !, (try_clause Cs D1 A ; try_clause Cs D2 A).
+69try_clause Cs (and D1 D2) A :-
+70 !, (try_clause Cs D1 A ; try_clause Cs D2 A).
71% try_clause Cs (all D) A :- !, try_clause Cs (D T) A.
-72try_clause Cs (all D) A :- !, subst D T D1, try_clause Cs D1 A.
+72try_clause Cs (all D) A :- !, subst D T D1, try_clause Cs D1 A.
73try_clause Cs A A.
-74try_clause Cs (imp G A) A :- hc_interp Cs G.
+74try_clause Cs (imp G A) A :- hc_interp Cs G.
75
76%prog (xcons (adj a b) (xcons (adj b c) (xcons (adj c (f c))
77% (xcons (all X\ (all Y\ (imp (adj X Y) (path X Y))))
@@ -2101,10 +2101,10 @@ Test Bed
82
83test1 :- %Cs = (xcons a (xcons b (xcons c xnil))),
84 %try_clause Cs (and a (or b c)) (or (and a b) (and a c)).
-85 hc_interp (xcons a (xcons (imp b c) (xcons (imp a b) xnil))) c.
+85 hc_interp (xcons a (xcons (imp b c) (xcons (imp a b) xnil))) c.
86
-87test2 :- Cs = xcons (f a) xnil,
-88 hc_interp Cs (box f).
+87test2 :- Cs = xcons (f a) xnil,
+88 hc_interp Cs (box f).
89
90main :- test1, test2.
@@ -2143,14 +2143,14 @@ Test Bed
6type p (foo -> foo) -> foo -> prop.
7type q (foo -> foo) -> foo -> prop.
8
- 9p K (a f\ K (f 0)).
-10q K R :- R = (a f\ K (f 0)).
+ 9p K (a f\ K (f 0)).
+10q K R :- R = (a f\ K (f 0)).
11
12main :-
-13 (pi y\ p b (F y)),
-14 (pi y\ q b (F y)),
-15 (pi x y\ q b (F y)),
-16 (pi x y\ p b (F y)).
+13 (pi y\ p b (F y)),
+14 (pi y\ q b (F y)),
+15 (pi x y\ q b (F y)),
+16 (pi x y\ p b (F y)).
Parsing time: 0.000
@@ -2174,7 +2174,7 @@ Test Bed
1main :-
2 X = [_,2],
3 X = [1,2],
-4 not(X = [2,2]),
+4 not(X = [2,2]),
5 pi a b\ Y b = [_], b = _.
@@ -2201,12 +2201,12 @@ Test Bed
1% q(a): OK; q(b): FAIL; q(X): exception; q(a,a): OK; q(true): OK.
2
3pred q i:(pred).
-4q(X) :- X.
+4q(X) :- X.
5
6pred a.
7a.
8
-9main :- q a, q (a,a), q true.
+9main :- q a, q (a,a), q true.
Parsing time: 0.000
@@ -2228,32 +2228,32 @@ Test Bed
../../tests/sources/hollight.elpi
:
1/* Untrusted predicates called from the kernel:
- 2 * next_object next object to check
- 3 * callback_proved proof completed
- 4 * next_tactic next tactic to use
- 5 * update_certificate get new certificate after tactic application
- 6 * end_of_proof is the certificate/proof empty?
- 7 * ppterm for pretty-printing messages
- 8 * deftac tactic definition
- 9 */
+ 2 * next_object next object to check
+ 3 * callback_proved proof completed
+ 4 * next_tactic next tactic to use
+ 5 * update_certificate get new certificate after tactic application
+ 6 * end_of_proof is the certificate/proof empty?
+ 7 * ppterm for pretty-printing messages
+ 8 * deftac tactic definition
+ 9 */
10
11/* Predicates exported from the trusted library:
- 12 * append
- 13 * fold2_append
- 14 * put_binds
- 15 */
+ 12 * append
+ 13 * fold2_append
+ 14 * put_binds
+ 15 */
16
17/* Predicates exported from the kernel:
- 18 * proves
- 19 * check
- 20 */
+ 18 * proves
+ 19 * check
+ 20 */
21
22{ /***** Trusted code base *******/
23
24/***** Trusted library functions *****/
25
26/* The names with ' at the end are trusted; the ones without are
- 27 exported and therefore untrusted. */
+ 27 exported and therefore untrusted. */
28local append', fold2_append', put_binds'.
29
30append' [] L L.
@@ -2284,79 +2284,79 @@ Test Bed
55typ T :- !. % this line temporarily drops checking of well-formedness for types
56 % to avoid too much slow down. It is ultimately due to re-typing
57 % terms that should be recognized as already well typed.
- 58typ T :- var T, !, declare_constraint (typ T) [ T ].
+ 58typ T :- var T, !, declare_constraint (typ T) [ T ].
59typ T :- typ' T.
60typ' prop.
- 61typ' (univ ## A ## B) :- typ A, typ B.
- 62typ' (A --> B) :- typ A, typ B.
- 63typ' (disj_union ## A ## B) :- typ A, typ B.
+ 61typ' (univ ## A ## B) :- typ A, typ B.
+ 62typ' (A --> B) :- typ A, typ B.
+ 63typ' (disj_union ## A ## B) :- typ A, typ B.
64
65pred term i:A, o:B.
- 66term (lam A F) (A --> B) :- typ A, pi x\ term x A => term (F x) B.
- 67term (F # T) B :- term F (A --> B), term T A.
- 68term (eq ## A) (A --> A --> prop) :- typ A.
- 69term (uvar as T) TY :- declare_constraint (term T TY) T.
+ 66term (lam A F) (A --> B) :- typ A, pi x\ term x A => term (F x) B.
+ 67term (F # T) B :- term F (A --> B), term T A.
+ 68term (eq ## A) (A --> A --> prop) :- typ A.
+ 69term (uvar as T) TY :- declare_constraint (term T TY) T.
70
71/* like term, but on terms that are already known to be well-typed */
72pred reterm i:A, o:B.
- 73reterm (lam A F) (A --> B) :- pi x\ reterm x A => reterm (F x) B.
- 74reterm (F # T) B :- reterm F (A --> B).
- 75reterm (eq ## A) (A --> A --> prop).
- 76reterm (uvar as T) TY :- declare_constraint (reterm T TY) T.
+ 73reterm (lam A F) (A --> B) :- pi x\ reterm x A => reterm (F x) B.
+ 74reterm (F # T) B :- reterm F (A --> B).
+ 75reterm (eq ## A) (A --> A --> prop).
+ 76reterm (uvar as T) TY :- declare_constraint (reterm T TY) T.
77
- 78constraint term reterm { /* No propagation rules for now */}
+ 78constraint term reterm { /* No propagation rules for now */}
79
80% thm : bounded tactic -> bounded sequent -> list (bounded sequent) -> o
- 81thm C (seq Gamma G) _ :- debug, print Gamma "|- " G " := " C, fail.
+ 81thm C (seq Gamma G) _ :- debug, print Gamma "|- " G " := " C, fail.
82
83/* << HACKS FOR DEBUGGING */
- 84thm daemon (seq Gamma F) [].
+ 84thm daemon (seq Gamma F) [].
85/* >> HACKS FOR DEBUGGING */
86
- 87thm r (seq Gamma (eq ## _ # X # X)) [].
- 88thm (t Y) (seq Gamma (eq ## A # X # Z))
- 89 [ seq Gamma (eq ## A # X # Y), seq Gamma (eq ## A # Y # Z) ] :- term Y A.
- 90thm (m P) (seq Gamma Q) [ seq Gamma (eq ## prop # P # Q), seq Gamma P ] :- term P prop.
- 91thm b (seq Gamma (eq ## _ # ((lam _ F) # X) # (F X))) [].
- 92thm c (seq Gamma (eq ## B # (F # X) # (G # Y)))
- 93 [ seq Gamma (eq ## (A --> B) # F # G) , seq Gamma (eq ## A # X # Y) ] :- reterm X A, reterm Y A.
- 94thm k (seq Gamma (eq ## (A --> B) # (lam A S) # (lam A T)))
- 95 [ bind A x \ seq Gamma (eq ## B # (S x) # (T x)) ].
- 96thm s (seq Gamma (eq ## prop # P # Q)) [ seq (P :: Gamma) Q, seq (Q :: Gamma) P ].
- 97thm (h IGN) (seq Gamma P) [] :- append' IGN [ P | Gamma2 ] Gamma.
+ 87thm r (seq Gamma (eq ## _ # X # X)) [].
+ 88thm (t Y) (seq Gamma (eq ## A # X # Z))
+ 89 [ seq Gamma (eq ## A # X # Y), seq Gamma (eq ## A # Y # Z) ] :- term Y A.
+ 90thm (m P) (seq Gamma Q) [ seq Gamma (eq ## prop # P # Q), seq Gamma P ] :- term P prop.
+ 91thm b (seq Gamma (eq ## _ # ((lam _ F) # X) # (F X))) [].
+ 92thm c (seq Gamma (eq ## B # (F # X) # (G # Y)))
+ 93 [ seq Gamma (eq ## (A --> B) # F # G) , seq Gamma (eq ## A # X # Y) ] :- reterm X A, reterm Y A.
+ 94thm k (seq Gamma (eq ## (A --> B) # (lam A S) # (lam A T)))
+ 95 [ bind A x \ seq Gamma (eq ## B # (S x) # (T x)) ].
+ 96thm s (seq Gamma (eq ## prop # P # Q)) [ seq (P :: Gamma) Q, seq (Q :: Gamma) P ].
+ 97thm (h IGN) (seq Gamma P) [] :- append' IGN [ P | Gamma2 ] Gamma.
98
- 99thm d (seq Gamma (eq ## _ # C # A)) [] :- def0 C A.
- 100thm (th NAME) (seq _ G) [] :- provable NAME G.
+ 99thm d (seq Gamma (eq ## _ # C # A)) [] :- def0 C A.
+ 100thm (th NAME) (seq _ G) [] :- provable NAME G.
101
- 102thm (thenll TAC1 TACN) SEQ SEQS :-
+ 102thm (thenll TAC1 TACN) SEQ SEQS :-
103 thm TAC1 SEQ NEW,
104 deftacl TACN NEW TACL,
105 fold2_append' TACL NEW thm SEQS.
106
107/*debprint _ (then _ _) :- !.
- 108debprint _ (thenl _ _) :- !.
- 109debprint O T :- print O T.*/
+ 108debprint _ (thenl _ _) :- !.
+ 109debprint O T :- print O T.*/
110
111thm TAC SEQ SEQS :-
112 deftac TAC SEQ XTAC,
113 /*debprint "<<" TAC,
- 114 (*/ thm XTAC SEQ SEQS /*, debprint ">>" TAC
- 115 ; debprint "XX" TAC, fail)*/.
+ 114 (*/ thm XTAC SEQ SEQS /*, debprint ">>" TAC
+ 115 ; debprint "XX" TAC, fail)*/.
116
- 117thm (! TAC) SEQ SEQS :-
+ 117thm (! TAC) SEQ SEQS :-
118 thm TAC SEQ SEQS,
119 !.
120
121thm id SEQ [ SEQ ].
122
- 123thm (wl Gamma1) (seq Gamma F) [ seq WGamma F ] :-
+ 123thm (wl Gamma1) (seq Gamma F) [ seq WGamma F ] :-
124 append' Gamma1 [ P | Gamma2 ] Gamma,
125 append' Gamma1 Gamma2 WGamma.
126
- 127thm (bind A TAC) (bind A SEQ) NEWL :-
- 128 pi x \ term x A => reterm x A => thm (TAC x) (SEQ x) (NEW x), put_binds' (NEW x) x A NEWL.
+ 127thm (bind A TAC) (bind A SEQ) NEWL :-
+ 128 pi x \ term x A => reterm x A => thm (TAC x) (SEQ x) (NEW x), put_binds' (NEW x) x A NEWL.
129
- 130thm ww (bind A x \ SEQ) [ SEQ ].
+ 130thm ww (bind A x \ SEQ) [ SEQ ].
131
132/* debuggin only, remove it */
133%thm A B C :- print "FAILED " (thm A B C), fail.
@@ -2372,82 +2372,82 @@ Test Bed
143 loop SEQS NEW_CERTIFICATE.
144
145prove G TACS :-
- 146 (term G prop, ! ; ppterm PG G, print "Bad statement:" PG, fail),
+ 146 (term G prop, ! ; ppterm PG G, print "Bad statement:" PG, fail),
147% (TACS = (false,_), ! ;
148 loop [ seq [] G ] TACS
149. % ).
150
151not_defined P NAME :-
- 152 not (P NAME _) ; print "Error:" NAME already defined, fail.
+ 152 not (P NAME _) ; print "Error:" NAME already defined, fail.
153
- 154check_hyps HS (typ' TYPE) :-
- 155 (not (typ' TYPE) ; print "Error:" TYPE already defined, fail), print HS new TYPE.
- 156check_hyps HS (def0 NAME DEF) :- ppterm PDEF DEF, print HS NAME "=" PDEF.
- 157check_hyps HS (term NAME TYPE) :-
+ 154check_hyps HS (typ' TYPE) :-
+ 155 (not (typ' TYPE) ; print "Error:" TYPE already defined, fail), print HS new TYPE.
+ 156check_hyps HS (def0 NAME DEF) :- ppterm PDEF DEF, print HS NAME "=" PDEF.
+ 157check_hyps HS (term NAME TYPE) :-
158 not_defined term NAME, ppterm PTYPE TYPE, print HS NAME ":" PTYPE.
- 159check_hyps HS (reterm _ _).
- 160check_hyps HS (provable NAME TYPE) :-
+ 159check_hyps HS (reterm _ _).
+ 160check_hyps HS (provable NAME TYPE) :-
161 not_defined provable NAME, ppterm PTYPE TYPE, print HS NAME ":" PTYPE.
- 162check_hyps HS (H1,H2) :- check_hyps HS H1, check_hyps HS H2.
- 163check_hyps HS (pi H) :- pi x \ typ' x => check_hyps [x | HS] (H x).
- 164check_hyps HS (_ => H2) :- check_hyps HS H2.
+ 162check_hyps HS (H1,H2) :- check_hyps HS H1, check_hyps HS H2.
+ 163check_hyps HS (pi H) :- pi x \ typ' x => check_hyps [x | HS] (H x).
+ 164check_hyps HS (_ => H2) :- check_hyps HS H2.
165
166/* check1 I O
- 167 checks the declaration I
- 168 returns the new assumption O */
- 169check1 (theorem NAME GOALTACTICS) HYPS :- check1thm NAME GOALTACTICS HYPS, !.
- 170check1 (axiom NAME ST) HYPS :- check1axm NAME ST HYPS, !.
- 171check1 (new_basic_type TYPE REP ABS REPABS ABSREP PREPH P_TACTICS) HYPS :- check1nbt TYPE REP ABS REPABS ABSREP PREPH P_TACTICS true HYPS, !.
- 172check1 (def NAME TYPDEF) HYPS :- check1def NAME TYPDEF true HYPS, !.
- 173check1 (decl NAME TYP) HYPS :- check1decl NAME TYP true HYPS, !.
+ 167 checks the declaration I
+ 168 returns the new assumption O */
+ 169check1 (theorem NAME GOALTACTICS) HYPS :- check1thm NAME GOALTACTICS HYPS, !.
+ 170check1 (axiom NAME ST) HYPS :- check1axm NAME ST HYPS, !.
+ 171check1 (new_basic_type TYPE REP ABS REPABS ABSREP PREPH P_TACTICS) HYPS :- check1nbt TYPE REP ABS REPABS ABSREP PREPH P_TACTICS true HYPS, !.
+ 172check1 (def NAME TYPDEF) HYPS :- check1def NAME TYPDEF true HYPS, !.
+ 173check1 (decl NAME TYP) HYPS :- check1decl NAME TYP true HYPS, !.
174
- 175check1def NAME (pi I) HYPSUCHTHAT (pi HYPS) :-
- 176 pi x \ typ' x => check1def (NAME ## x) (I x) (HYPSUCHTHAT, typ x) (HYPS x).
- 177check1def NAME (TYP,DEF) HYPSUCHTHAT HYPS :-
+ 175check1def NAME (pi I) HYPSUCHTHAT (pi HYPS) :-
+ 176 pi x \ typ' x => check1def (NAME ## x) (I x) (HYPSUCHTHAT, typ x) (HYPS x).
+ 177check1def NAME (TYP,DEF) HYPSUCHTHAT HYPS :-
178 typ TYP, term DEF TYP,
- 179 HYPS = ((HYPSUCHTHAT => term NAME TYP), reterm NAME TYP, def0 NAME DEF).
+ 179 HYPS = ((HYPSUCHTHAT => term NAME TYP), reterm NAME TYP, def0 NAME DEF).
180
- 181check1decl NAME (pi I) HYPSUCHTHAT (pi HYPS) :-
- 182 pi x \ typ' x => check1decl (NAME ## x) (I x) (HYPSUCHTHAT, typ x) (HYPS x).
+ 181check1decl NAME (pi I) HYPSUCHTHAT (pi HYPS) :-
+ 182 pi x \ typ' x => check1decl (NAME ## x) (I x) (HYPSUCHTHAT, typ x) (HYPS x).
183check1decl NAME TYP HYPSUCHTHAT HYPS :-
- 184 typ TYP, HYPS = ((HYPSUCHTHAT => term NAME TYP), reterm NAME TYP).
+ 184 typ TYP, HYPS = ((HYPSUCHTHAT => term NAME TYP), reterm NAME TYP).
185
- 186check1thm NAME (pi I) (pi HYPS) :-
- 187 pi x \ typ' x => check1thm NAME (I x) (HYPS x).
- 188check1thm NAME (GOAL,TACTICS) (provable NAME GOAL) :-
+ 186check1thm NAME (pi I) (pi HYPS) :-
+ 187 pi x \ typ' x => check1thm NAME (I x) (HYPS x).
+ 188check1thm NAME (GOAL,TACTICS) (provable NAME GOAL) :-
189 prove GOAL TACTICS,
190 callback_proved NAME GOAL TACTICS.
191
- 192check1axm NAME (pi I) (pi HYPS) :- !,
- 193 pi x \ typ' x => check1axm NAME (I x) (HYPS x).
- 194check1axm NAME GOAL (provable NAME GOAL) :-
+ 192check1axm NAME (pi I) (pi HYPS) :- !,
+ 193 pi x \ typ' x => check1axm NAME (I x) (HYPS x).
+ 194check1axm NAME GOAL (provable NAME GOAL) :-
195 term GOAL prop, ! ; ppterm PGOAL GOAL, print "Bad statement:" PGOAL, fail.
196
- 197check1nbt TYPE REP ABS REPABS ABSREP PREPH (pi P_TACTICS) HYPSUCHTHAT (pi HYPS) :-
- 198 pi x \ typ' x => check1nbt (TYPE ## x) (REP ## x) (ABS ## x) REPABS ABSREP PREPH (P_TACTICS x) (HYPSUCHTHAT, typ x) (HYPS x).
- 199check1nbt TYPE REP ABS REPABS ABSREP PREPH (P,TACTICS) HYPSUCHTHAT HYPS :-
- 200 term P (X --> prop),
- 201 prove (exists ## _ # P ) TACTICS,
- 202 callback_proved existence_condition (exists ## _ # P) TACTICS,
- 203 REPTYP = (TYPE --> X),
- 204 ABSTYP = (X --> TYPE),
- 205 ABSREPTYP = (forall ## TYPE # lam TYPE x \ eq ## TYPE # (ABS # (REP # x)) # x),
- 206 REPABSTYP = (forall ## X # lam X x \ impl # (P # x) # (eq ## X # (REP # (ABS # x)) # x)),
- 207 PREPHTYP = (forall ## TYPE # lam TYPE x \ (P # (REP # x))),
+ 197check1nbt TYPE REP ABS REPABS ABSREP PREPH (pi P_TACTICS) HYPSUCHTHAT (pi HYPS) :-
+ 198 pi x \ typ' x => check1nbt (TYPE ## x) (REP ## x) (ABS ## x) REPABS ABSREP PREPH (P_TACTICS x) (HYPSUCHTHAT, typ x) (HYPS x).
+ 199check1nbt TYPE REP ABS REPABS ABSREP PREPH (P,TACTICS) HYPSUCHTHAT HYPS :-
+ 200 term P (X --> prop),
+ 201 prove (exists ## _ # P ) TACTICS,
+ 202 callback_proved existence_condition (exists ## _ # P) TACTICS,
+ 203 REPTYP = (TYPE --> X),
+ 204 ABSTYP = (X --> TYPE),
+ 205 ABSREPTYP = (forall ## TYPE # lam TYPE x \ eq ## TYPE # (ABS # (REP # x)) # x),
+ 206 REPABSTYP = (forall ## X # lam X x \ impl # (P # x) # (eq ## X # (REP # (ABS # x)) # x)),
+ 207 PREPHTYP = (forall ## TYPE # lam TYPE x \ (P # (REP # x))),
208 !,
209 HYPS =
- 210 ( (HYPSUCHTHAT => typ' TYPE)
- 211 , (HYPSUCHTHAT => term REP REPTYP), reterm REP REPTYP
- 212 , (HYPSUCHTHAT => term ABS ABSTYP), reterm ABS ABSTYP
+ 210 ( (HYPSUCHTHAT => typ' TYPE)
+ 211 , (HYPSUCHTHAT => term REP REPTYP), reterm REP REPTYP
+ 212 , (HYPSUCHTHAT => term ABS ABSTYP), reterm ABS ABSTYP
213 , provable ABSREP ABSREPTYP
- 214 , provable REPABS REPABSTYP, provable PREPH PREPHTYP).
+ 214 , provable REPABS REPABSTYP, provable PREPH PREPHTYP).
215
216check WHAT :-
217 next_object WHAT C CONT,
- 218 (C = stop, !, K = true ; check1 C H , check_hyps [] H, print_constraints, K = (H => check CONT)),
+ 218 (C = stop, !, K = true ; check1 C H , check_hyps [] H, print_constraints, K = (H => check CONT)),
219 !, K.
220
- 221}
+ 221}
222
223/************ parsing and pretty-printing ********/
224% ppterm/parseterm
@@ -2457,85 +2457,85 @@ Test Bed
228%ppp X (F # G # H) :- var X, (var F ; var G ; var H), !,
229% X = (F # G # H).
230
- 231mode (ppp o i) xas ppterm, (ppp i o) xas parseterm.
+ 231mode (ppp o i) xas ppterm, (ppp i o) xas parseterm.
232
- 233ppp (! F2) (forall ## _ # lam _ F1) :- !, pi x \ ppp (F2 x) (F1 x).
- 234ppp (! TY F2) (forall ## TY # lam TY F1) :- !, pi x \ ppp (F2 x) (F1 x).
- 235ppp (? F2) (exists ## _ # lam _ F1) :- !, pi x \ ppp (F2 x) (F1 x).
- 236ppp (? TY F2) (exists ## TY # lam TY F1) :- !, pi x \ ppp (F2 x) (F1 x).
- 237ppp (F2 <=> G2) (eq ## prop # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 238ppp (F2 = G2) (eq ## _ # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 239ppp (F2 && G2) (and # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 240ppp (F2 || G2) (or # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 241ppp (F2 ==> G2) (impl # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 242ppp (X2 #in S2) (in ## _ # X1 # S1) :- !, ppp X2 X1, ppp S2 S1.
- 243ppp (U2 <<= V2) (subseteq ## _ # U1 # V1) :- !, ppp U2 U1, ppp V2 V1.
- 244ppp (F2 + G2) (plus # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 245ppp (F2 # G2) (F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
- 246ppp (lam A F2) (lam A F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 233ppp (! F2) (forall ## _ # lam _ F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 234ppp (! TY F2) (forall ## TY # lam TY F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 235ppp (? F2) (exists ## _ # lam _ F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 236ppp (? TY F2) (exists ## TY # lam TY F1) :- !, pi x \ ppp (F2 x) (F1 x).
+ 237ppp (F2 <=> G2) (eq ## prop # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 238ppp (F2 = G2) (eq ## _ # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 239ppp (F2 && G2) (and # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 240ppp (F2 || G2) (or # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 241ppp (F2 ==> G2) (impl # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 242ppp (X2 #in S2) (in ## _ # X1 # S1) :- !, ppp X2 X1, ppp S2 S1.
+ 243ppp (U2 <<= V2) (subseteq ## _ # U1 # V1) :- !, ppp U2 U1, ppp V2 V1.
+ 244ppp (F2 + G2) (plus # F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 245ppp (F2 # G2) (F1 # G1) :- !, ppp F2 F1, ppp G2 G1.
+ 246ppp (lam A F2) (lam A F1) :- !, pi x \ ppp (F2 x) (F1 x).
247ppp A A.
248
249/* safe_list_map that unifies the two lists if they are both flexible
- 250 probably only useful for parsing/pretty-printing */
+ 250 probably only useful for parsing/pretty-printing */
251safe_list_map L1 _ L2 :- var L1, var L2, !, L1 = L2.
252safe_list_map L1 F L2 :- list_map L1 F L2.
253
254% pptac(ppterm)/parsetac(parseterm)
255% pptac X Y :- ppptac X Y. parsetac X Y :- ppptac X Y.
256
- 257mode (ppptac i o) xas parsetac(ppp -> parseterm),
- 258 (ppptac o i) xas pptac(ppp -> ppterm).
+ 257mode (ppptac i o) xas parsetac(ppp -> parseterm),
+ 258 (ppptac o i) xas pptac(ppp -> ppterm).
259
260ppptac daemon daemon.
261ppptac r r.
- 262ppptac (t Y) (t PY) :- ppp Y PY.
- 263ppptac (m Y) (m PY) :- ppp Y PY.
+ 262ppptac (t Y) (t PY) :- ppp Y PY.
+ 263ppptac (m Y) (m PY) :- ppp Y PY.
264ppptac b b.
265ppptac c c.
266ppptac k k.
267ppptac s s.
- 268ppptac (h Gamma) (h PGamma) :- safe_list_map Gamma ppp PGamma.
+ 268ppptac (h Gamma) (h PGamma) :- safe_list_map Gamma ppp PGamma.
269ppptac d d.
- 270ppptac (th NAME) (th NAME).
- 271ppptac (thenll TAC1 TACN) (thenll PTAC1 PTACN) :-
+ 270ppptac (th NAME) (th NAME).
+ 271ppptac (thenll TAC1 TACN) (thenll PTAC1 PTACN) :-
272 ppptac TAC1 PTAC1, ppptac TACN PTACN.
- 273ppptac (! TAC) (! PTAC) :- ppptac TAC PTAC.
+ 273ppptac (! TAC) (! PTAC) :- ppptac TAC PTAC.
274ppptac id id.
- 275ppptac (wl Gamma) (wl PGamma) :- safe_list_map Gamma ppp PGamma.
- 276ppptac (bind A TAC) (bind PA PTAC) :-
- 277 ppp A PA, pi x \ ppptac (TAC x) (PTAC x).
+ 275ppptac (wl Gamma) (wl PGamma) :- safe_list_map Gamma ppp PGamma.
+ 276ppptac (bind A TAC) (bind PA PTAC) :-
+ 277 ppp A PA, pi x \ ppptac (TAC x) (PTAC x).
278ppptac ww ww.
279
280/************ interactive and non interactive loops ********/
281
282ppptac interactive interactive.
283
- 284parse_obj (theorem NAME PSTTAC) [theorem NAME STTAC] :-
+ 284parse_obj (theorem NAME PSTTAC) [theorem NAME STTAC] :-
285 parse_thm NAME PSTTAC STTAC.
- 286parse_obj (axiom NAME PTYP) [axiom NAME TYP] :- parse_axiom PTYP TYP.
- 287parse_obj (new_basic_type TYPE REP ABS REPABS ABSREP PREP PP_TACTICS)
+ 286parse_obj (axiom NAME PTYP) [axiom NAME TYP] :- parse_axiom PTYP TYP.
+ 287parse_obj (new_basic_type TYPE REP ABS REPABS ABSREP PREP PP_TACTICS)
288 [new_basic_type TYPE REP ABS REPABS ABSREP PREP P_TACTICS] :- parse_nbt PP_TACTICS P_TACTICS.
- 289parse_obj (def NAME PTYBO) [def NAME TYBO] :- parse_def PTYBO TYBO.
- 290parse_obj (decl NAME TY) [decl NAME TY].
- 291parse_obj (inductive_def PRED PREDF PREDF_MON PRED_I PRED_E0 PRED_E K) EXP :-
+ 289parse_obj (def NAME PTYBO) [def NAME TYBO] :- parse_def PTYBO TYBO.
+ 290parse_obj (decl NAME TY) [decl NAME TY].
+ 291parse_obj (inductive_def PRED PREDF PREDF_MON PRED_I PRED_E0 PRED_E K) EXP :-
292 inductive_def_pkg PRED PREDF PREDF_MON PRED_I PRED_E0 PRED_E K EXP.
293parse_obj stop [stop].
294
- 295parse_def (pi I) (pi O) :- pi x \ parse_def (I x) (O x).
- 296parse_def (TY,PB) (TY,B) :- parseterm PB B.
+ 295parse_def (pi I) (pi O) :- pi x \ parse_def (I x) (O x).
+ 296parse_def (TY,PB) (TY,B) :- parseterm PB B.
297
- 298parse_axiom (pi I) (pi O) :- !, pi x \ parse_axiom (I x) (O x).
+ 298parse_axiom (pi I) (pi O) :- !, pi x \ parse_axiom (I x) (O x).
299parse_axiom PST ST :- parseterm PST ST.
300
- 301parse_thm NAME (pi I) (pi O) :- pi x \ parse_thm NAME (I x) (O x).
- 302parse_thm _ (PST,TAC) (ST,(false,TAC)) :- !, parseterm PST ST.
- 303parse_thm NAME PST (ST,(true,[_])) :-
- 304 (not (proves NAME _) ; print "Error:" NAME already defined, fail),
+ 301parse_thm NAME (pi I) (pi O) :- pi x \ parse_thm NAME (I x) (O x).
+ 302parse_thm _ (PST,TAC) (ST,(false,TAC)) :- !, parseterm PST ST.
+ 303parse_thm NAME PST (ST,(true,[_])) :-
+ 304 (not (proves NAME _) ; print "Error:" NAME already defined, fail),
305 parseterm PST ST.
306
- 307parse_nbt (pi I) (pi O) :- !, pi x \ parse_nbt (I x) (O x).
- 308parse_nbt (PP,TACTICS) (P,(false,TACTICS)) :- parseterm PP P.
- 309parse_nbt PP (P,(true,[_])) :- parseterm PP P.
+ 307parse_nbt (pi I) (pi O) :- !, pi x \ parse_nbt (I x) (O x).
+ 308parse_nbt (PP,TACTICS) (P,(false,TACTICS)) :- parseterm PP P.
+ 309parse_nbt PP (P,(true,[_])) :- parseterm PP P.
310
311next_object [ C | NEXT ] CT CONTNEXT :-
312 parse_obj C [ CT | CONT ], append CONT NEXT CONTNEXT.
@@ -2552,214 +2552,214 @@ Test Bed
323
324toplevel_loop G :-
325 read_cmd H,
- 326 ( H = stop, !, G = [stop]
- 327 ; parse_obj H PH, !, (append PH toplevel G ; print "error", toplevel_loop G)
- 328 ; print "bad command", toplevel_loop G ).
+ 326 ( H = stop, !, G = [stop]
+ 327 ; parse_obj H PH, !, (append PH toplevel G ; print "error", toplevel_loop G)
+ 328 ; print "bad command", toplevel_loop G ).
329
- 330callback_proved _ _ (false,_).
- 331callback_proved NAME G (true, [ TAC ]) :-
+ 330callback_proved _ _ (false,_).
+ 331callback_proved NAME G (true, [ TAC ]) :-
332 canonical TAC CANONICALTAC,
333 pptac PCANONICALTAC CANONICALTAC,
334 ppterm PG G,
- 335 print (theorem NAME (PG , [ PCANONICALTAC ] )).
+ 335 print (theorem NAME (PG , [ PCANONICALTAC ] )).
336
- 337end_of_proof (true, []) :- print "proof completed".
- 338end_of_proof (false, []).
+ 337end_of_proof (true, []) :- print "proof completed".
+ 338end_of_proof (false, []).
339
- 340next_tactic0 [ SEQ | OLD ] (true, [ _ | _ ]) ITAC :-
+ 340next_tactic0 [ SEQ | OLD ] (true, [ _ | _ ]) ITAC :-
341 print,
342 list_iter_rev [ SEQ | OLD ] print_sequent,
343 read_in_context SEQ ITAC BACKTRACK,
344 BACKTRACK.
- 345next_tactic0 SEQS (true, CERT) ITAC :-
+ 345next_tactic0 SEQS (true, CERT) ITAC :-
346 print "error",
- 347 next_tactic SEQS (true, CERT) ITAC.
- 348next_tactic0 SEQS (true_then_false, (_,INT_TACS,_)) ITAC :-
- 349 next_tactic0 SEQS (true, INT_TACS) ITAC.
- 350next_tactic0 SEQS (false, [ interactive | _ ]) ITAC :-
- 351 next_tactic0 SEQS (true, [ _ ]) ITAC.
- 352next_tactic0 [ SEQ | OLD ] (false, [ TAC | _ ]) TAC.
- 353next_tactic0 _ (false, _) ITAC :-
+ 347 next_tactic SEQS (true, CERT) ITAC.
+ 348next_tactic0 SEQS (true_then_false, (_,INT_TACS,_)) ITAC :-
+ 349 next_tactic0 SEQS (true, INT_TACS) ITAC.
+ 350next_tactic0 SEQS (false, [ interactive | _ ]) ITAC :-
+ 351 next_tactic0 SEQS (true, [ _ ]) ITAC.
+ 352next_tactic0 [ SEQ | OLD ] (false, [ TAC | _ ]) TAC.
+ 353next_tactic0 _ (false, _) ITAC :-
354 print "aborted",
355 halt.
356
357next_tactic SEQS CERT TAC :- next_tactic0 SEQS CERT PTAC, parsetac PTAC TAC.
358
- 359update_certificate (true, [ TAC | OTHER_TACS ]) ITAC NEW (true, TACS) :-
+ 359update_certificate (true, [ TAC | OTHER_TACS ]) ITAC NEW (true, TACS) :-
360 mk_script ITAC NEW NEW_TACS TAC,
361 append NEW_TACS OTHER_TACS TACS.
- 362update_certificate (false, [ interactive | NON_INTERACTIVE_TACS ]) ITAC NEW CERTIFICATE :-
- 363 update_certificate (true_then_false, (SCRIPT, [ SCRIPT ], NON_INTERACTIVE_TACS)) ITAC NEW CERTIFICATE.
- 364update_certificate (true_then_false, (SCRIPT,[ TAC | OTHER_TACS ],NON_INTERACTIVE_TACS)) ITAC NEW CERTIFICATE :- !,
+ 362update_certificate (false, [ interactive | NON_INTERACTIVE_TACS ]) ITAC NEW CERTIFICATE :-
+ 363 update_certificate (true_then_false, (SCRIPT, [ SCRIPT ], NON_INTERACTIVE_TACS)) ITAC NEW CERTIFICATE.
+ 364update_certificate (true_then_false, (SCRIPT,[ TAC | OTHER_TACS ],NON_INTERACTIVE_TACS)) ITAC NEW CERTIFICATE :- !,
365 mk_script ITAC NEW NEW_INTERACTIVE_TACS TAC,
366 append NEW_INTERACTIVE_TACS OTHER_TACS INTERACTIVE_TACS,
- 367 ( INTERACTIVE_TACS = [ _ | _ ], !,
+ 367 ( INTERACTIVE_TACS = [ _ | _ ], !,
368 CERTIFICATE =
- 369 (true_then_false, (SCRIPT,INTERACTIVE_TACS,NON_INTERACTIVE_TACS))
- 370 ; CERTIFICATE = (false, NON_INTERACTIVE_TACS),
+ 369 (true_then_false, (SCRIPT,INTERACTIVE_TACS,NON_INTERACTIVE_TACS))
+ 370 ; CERTIFICATE = (false, NON_INTERACTIVE_TACS),
371 print "INTERACTIVE SUBPROOF COMPLETED",
372 canonical SCRIPT CSCRIPT,
373 pptac PSCRIPT CSCRIPT,
- 374 print PSCRIPT).
- 375update_certificate (false, [ _ | OTHER_TACS ]) _ _ (false, OTHER_TACS).
+ 374 print PSCRIPT).
+ 375update_certificate (false, [ _ | OTHER_TACS ]) _ _ (false, OTHER_TACS).
376
- 377mk_script (bind A T) NEW NEW_TACS (bind A T2) :- !,
+ 377mk_script (bind A T) NEW NEW_TACS (bind A T2) :- !,
378 pi x \
- 379 put_binds (NEW2 x) x A NEW,
- 380 mk_script (T x) (NEW2 x) (NEWT x) (T2 x),
- 381 put_binds (NEWT x) x A NEW_TACS.
- 382mk_script ITAC NEW NEW_TACS (thenl ITAC NEW_TACS) :-
+ 379 put_binds (NEW2 x) x A NEW,
+ 380 mk_script (T x) (NEW2 x) (NEWT x) (T2 x),
+ 381 put_binds (NEWT x) x A NEW_TACS.
+ 382mk_script ITAC NEW NEW_TACS (thenl ITAC NEW_TACS) :-
383 mk_list_of_bounded_fresh NEW NEW_TACS.
384
- 385read_in_context (bind A K) (bind A TAC) BACKTRACK :-
- 386 pi x \ /* term x A => reterm # x A => */ read_in_context (K x) (TAC x) BACKTRACK.
- 387read_in_context (seq A B) TAC BACKTRACK :-
+ 385read_in_context (bind A K) (bind A TAC) BACKTRACK :-
+ 386 pi x \ /* term x A => reterm # x A => */ read_in_context (K x) (TAC x) BACKTRACK.
+ 387read_in_context (seq A B) TAC BACKTRACK :-
388 flush std_out, $readterm std_in TAC,
- 389 (TAC = backtrack, !, BACKTRACK = (!, fail) ; BACKTRACK = true).
+ 389 (TAC = backtrack, !, BACKTRACK = (!, fail) ; BACKTRACK = true).
390
- 391print_sequent (seq Gamma G) :-
+ 391print_sequent (seq Gamma G) :-
392 print,
- 393 list_iter_rev Gamma (x \ sigma PX \ ppterm PX x, print PX),
+ 393 list_iter_rev Gamma (x \ sigma PX \ ppterm PX x, print PX),
394 print "|------------------",
395 ppterm PG G, print PG.
- 396print_sequent (bind A F) :- pi x \ print_sequent (F x).
+ 396print_sequent (bind A F) :- pi x \ print_sequent (F x).
397
398/* turns thenl into then */
- 399canonical (bind A T1) (bind A T2) :- !,
- 400 pi x \ canonical (T1 x) (T2 x).
- 401canonical (thenl T L) OTAC :- !,
+ 399canonical (bind A T1) (bind A T2) :- !,
+ 400 pi x \ canonical (T1 x) (T2 x).
+ 401canonical (thenl T L) OTAC :- !,
402 list_map L canonical L2,
- 403 (mk_constant_list L2 S L2, !,
- 404 (S = [], !, OTAC = T ; OTAC = then T S)
- 405 ; OTAC = thenl T L2).
+ 403 (mk_constant_list L2 S L2, !,
+ 404 (S = [], !, OTAC = T ; OTAC = then T S)
+ 405 ; OTAC = thenl T L2).
406canonical T T.
407
408/************ inductive_def package ********/
- 409parse_inductive_def_spec (pi F) (pi PF) :- !,
- 410 pi A \ parse_inductive_def_spec (F A) (PF A).
- 411parse_inductive_def_spec (param TY F) (param PTY PF) :- !,
- 412 ppp TY PTY, pi x \ parse_inductive_def_spec (F x) (PF x).
+ 409parse_inductive_def_spec (pi F) (pi PF) :- !,
+ 410 pi A \ parse_inductive_def_spec (F A) (PF A).
+ 411parse_inductive_def_spec (param TY F) (param PTY PF) :- !,
+ 412 ppp TY PTY, pi x \ parse_inductive_def_spec (F x) (PF x).
413parse_inductive_def_spec L PL :-
- 414 (pi p \ list_map (L p)
- 415 (x \ px \ sigma A \ sigma B \ sigma PB \ x = (A, B), parseterm B PB, px = (A, PB))
- 416 (PL p)).
+ 414 (pi p \ list_map (L p)
+ 415 (x \ px \ sigma A \ sigma B \ sigma PB \ x = (A, B), parseterm B PB, px = (A, PB))
+ 416 (PL p)).
417
- 418build_quantified_predicate (pi I) (pi O) :- !,
- 419 pi A \ build_quantified_predicate (I A) (O A).
- 420build_quantified_predicate (param TY I) (TY --> TYP, lam TY BO) :- !,
- 421 pi x \ build_quantified_predicate (I x) (TYP, BO x).
- 422build_quantified_predicate L (_, lam _ p \ lam _ x \ P p x) :-
- 423 pi p \ pi x \ build_predicate (L p) p x (P p x).
+ 418build_quantified_predicate (pi I) (pi O) :- !,
+ 419 pi A \ build_quantified_predicate (I A) (O A).
+ 420build_quantified_predicate (param TY I) (TY --> TYP, lam TY BO) :- !,
+ 421 pi x \ build_quantified_predicate (I x) (TYP, BO x).
+ 422build_quantified_predicate L (_, lam _ p \ lam _ x \ P p x) :-
+ 423 pi p \ pi x \ build_predicate (L p) p x (P p x).
424
- 425build_predicate [ (_,K) ] P X R :- !,
+ 425build_predicate [ (_,K) ] P X R :- !,
426 process_constructor K P X R.
- 427build_predicate [ (_,K) | REST ] P X (or # Q # R) :-
+ 427build_predicate [ (_,K) | REST ] P X (or # Q # R) :-
428 process_constructor K P X Q,
429 build_predicate REST P X R.
430
- 431process_constructor (forall ## TY # lam TY Q) P X (exists ## TY # lam TY R) :-
- 432 pi y \ process_constructor (Q y) P X (R y).
- 433process_constructor (impl # H # K) P X (and # H # R) :-
+ 431process_constructor (forall ## TY # lam TY Q) P X (exists ## TY # lam TY R) :-
+ 432 pi y \ process_constructor (Q y) P X (R y).
+ 433process_constructor (impl # H # K) P X (and # H # R) :-
434 process_constructor K P X R.
- 435process_constructor (P # T) P X (eq ## _ # X # T).
+ 435process_constructor (P # T) P X (eq ## _ # X # T).
436
- 437prove_monotonicity_thm (pi F) PREDF APREDF (pi THM) :- !,
- 438 pi A \ prove_monotonicity_thm (F A) PREDF (APREDF ## A) (THM A).
- 439prove_monotonicity_thm (param TY F) PREDF APREDF (forall ## TY # lam TY STM, PROOF) :- !,
- 440 pi x \ prove_monotonicity_thm (F x) PREDF (APREDF # x) (STM x, PROOF).
+ 437prove_monotonicity_thm (pi F) PREDF APREDF (pi THM) :- !,
+ 438 pi A \ prove_monotonicity_thm (F A) PREDF (APREDF ## A) (THM A).
+ 439prove_monotonicity_thm (param TY F) PREDF APREDF (forall ## TY # lam TY STM, PROOF) :- !,
+ 440 pi x \ prove_monotonicity_thm (F x) PREDF (APREDF # x) (STM x, PROOF).
441prove_monotonicity_thm _ PREDF APREDF THM :-
442 THM =
- 443 (monotone ## _ # APREDF,
- 444 [ then inv (bind* (then (conv (depth_tac (dd [PREDF]))) auto_monotone)) ]).
+ 443 (monotone ## _ # APREDF,
+ 444 [ then inv (bind* (then (conv (depth_tac (dd [PREDF]))) auto_monotone)) ]).
445
- 446state_fixpoint_def (pi F) PREDF (pi DEF) :- !,
- 447 pi A \ state_fixpoint_def (F A) (PREDF ## A) (DEF A).
- 448state_fixpoint_def (param TY F) PREDF (_, lam TY BO) :- !,
- 449 pi x \ state_fixpoint_def (F x) (PREDF # x) (_, BO x).
- 450state_fixpoint_def _ PREDF (_, fixpoint ## _ # PREDF).
+ 446state_fixpoint_def (pi F) PREDF (pi DEF) :- !,
+ 447 pi A \ state_fixpoint_def (F A) (PREDF ## A) (DEF A).
+ 448state_fixpoint_def (param TY F) PREDF (_, lam TY BO) :- !,
+ 449 pi x \ state_fixpoint_def (F x) (PREDF # x) (_, BO x).
+ 450state_fixpoint_def _ PREDF (_, fixpoint ## _ # PREDF).
451
- 452prove_fix_intro_thm (pi F) PREDF PRED PREDF_MONOTONE (pi THM) :- !,
- 453 pi A \ prove_fix_intro_thm (F A) (PREDF ## A) (PRED ## A) PREDF_MONOTONE (THM A).
- 454prove_fix_intro_thm (param TY F) PREDF PRED PREDF_MONOTONE (forall ## TY # lam TY STM, [ then forall_i (bind _ PROOF) ]) :- !,
- 455 pi x \ prove_fix_intro_thm (F x) (PREDF # x) (PRED # x) PREDF_MONOTONE (STM x, [ PROOF x ]).
+ 452prove_fix_intro_thm (pi F) PREDF PRED PREDF_MONOTONE (pi THM) :- !,
+ 453 pi A \ prove_fix_intro_thm (F A) (PREDF ## A) (PRED ## A) PREDF_MONOTONE (THM A).
+ 454prove_fix_intro_thm (param TY F) PREDF PRED PREDF_MONOTONE (forall ## TY # lam TY STM, [ then forall_i (bind _ PROOF) ]) :- !,
+ 455 pi x \ prove_fix_intro_thm (F x) (PREDF # x) (PRED # x) PREDF_MONOTONE (STM x, [ PROOF x ]).
456prove_fix_intro_thm _ PREDF PRED PREDF_MONOTONE THM :-
457 THM =
- 458 ((! x \ PREDF # PRED # x ==> PRED # x),
+ 458 ((! x \ PREDF # PRED # x ==> PRED # x),
459 [then forall_i
- 460 (bind _ x13 \
- 461 then (conv (rand_tac (rator_tac dd)))
- 462 (then (conv (land_tac (rator_tac (rand_tac dd))))
- 463 (then inv
- 464 (then (cutth fixpoint_is_prefixpoint)
- 465 (then (lforall PREDF)
- 466 (thenl lapply [applyth PREDF_MONOTONE,
+ 460 (bind _ x13 \
+ 461 then (conv (rand_tac (rator_tac dd)))
+ 462 (then (conv (land_tac (rator_tac (rand_tac dd))))
+ 463 (then inv
+ 464 (then (cutth fixpoint_is_prefixpoint)
+ 465 (then (lforall PREDF)
+ 466 (thenl lapply [applyth PREDF_MONOTONE,
467 then
- 468 (g
- 469 (subseteq ## _ '
- 470 (PREDF # (fixpoint ## _ # PREDF)) '
- 471 (fixpoint ## _ # PREDF)))
- 472 (then (conv (depth_tac (dd [subseteq])))
- 473 (then (conv (depth_tac (dd [in])))
- 474 (then (conv (depth_tac (dd [in])))(itaut 4))))]))))))]).
+ 468 (g
+ 469 (subseteq ## _ '
+ 470 (PREDF # (fixpoint ## _ # PREDF)) '
+ 471 (fixpoint ## _ # PREDF)))
+ 472 (then (conv (depth_tac (dd [subseteq])))
+ 473 (then (conv (depth_tac (dd [in])))
+ 474 (then (conv (depth_tac (dd [in])))(itaut 4))))]))))))]).
475
- 476prove_fix_elim_thm (pi F) PREDF PRED OPRED (pi THM) :- !,
- 477 pi A \ prove_fix_elim_thm (F A) (PREDF ## A) (PRED ## A) OPRED (THM A).
- 478prove_fix_elim_thm (param TY F) PREDF PRED OPRED (forall ## TY # lam TY STM, [ then forall_i (bind _ PROOF) ]) :- !,
- 479 pi x \ prove_fix_elim_thm (F x) (PREDF # x) (PRED # x) OPRED (STM x, [ PROOF x ]).
+ 476prove_fix_elim_thm (pi F) PREDF PRED OPRED (pi THM) :- !,
+ 477 pi A \ prove_fix_elim_thm (F A) (PREDF ## A) (PRED ## A) OPRED (THM A).
+ 478prove_fix_elim_thm (param TY F) PREDF PRED OPRED (forall ## TY # lam TY STM, [ then forall_i (bind _ PROOF) ]) :- !,
+ 479 pi x \ prove_fix_elim_thm (F x) (PREDF # x) (PRED # x) OPRED (STM x, [ PROOF x ]).
480prove_fix_elim_thm _ PREDF PRED OPRED THM :-
481 THM =
- 482 ((! x13 \
- 483 (! x14 \ PREDF # x13 # x14 ==> x13 # x14) ==>
- 484 (! x14 \ PRED # x14 ==> x13 # x14)) ,
+ 482 ((! x13 \
+ 483 (! x14 \ PREDF # x13 # x14 ==> x13 # x14) ==>
+ 484 (! x14 \ PRED # x14 ==> x13 # x14)) ,
485 [then forall_i
- 486 (bind _ x23 \
- 487 then (cutth fixpoint_subseteq_any_prefixpoint)
- 488 (then (lforall PREDF)
- 489 (then (lforall x23)
- 490 (then (conv (depth_tac (dd [OPRED])))
- 491 (then inv
- 492 (bind _ x24 \
+ 486 (bind _ x23 \
+ 487 then (cutth fixpoint_subseteq_any_prefixpoint)
+ 488 (then (lforall PREDF)
+ 489 (then (lforall x23)
+ 490 (then (conv (depth_tac (dd [OPRED])))
+ 491 (then inv
+ 492 (bind _ x24 \
493 then
- 494 (g
- 495 (impl # (subseteq ## _ # (PREDF # x23) # x23) '
- 496 (subseteq ## _ # (fixpoint ## _ # PREDF) # x23)))
- 497 (then (conv (depth_tac (dd [subseteq])))
- 498 (then (conv (depth_tac (dd [subseteq])))
- 499 (then (conv (depth_tac (dd [in])))
- 500 (then (conv (depth_tac (dd [in])))
- 501 (then (conv (depth_tac (dd [in])))
- 502 (then (conv (depth_tac (dd [in])))
- 503 (then
- 504 (w
- 505 (impl '
- 506 (subseteq ## _ # (PREDF # x23) # x23) '
- 507 (subseteq ## _ '
- 508 (fixpoint ## _ # PREDF) # x23)))
- 509 (then inv
- 510 (thenl lapply_last [h,
- 511 then (lforall_last x24)
- 512 (then lapply_last h)])))))))))))))))]).
+ 494 (g
+ 495 (impl # (subseteq ## _ # (PREDF # x23) # x23) '
+ 496 (subseteq ## _ # (fixpoint ## _ # PREDF) # x23)))
+ 497 (then (conv (depth_tac (dd [subseteq])))
+ 498 (then (conv (depth_tac (dd [subseteq])))
+ 499 (then (conv (depth_tac (dd [in])))
+ 500 (then (conv (depth_tac (dd [in])))
+ 501 (then (conv (depth_tac (dd [in])))
+ 502 (then (conv (depth_tac (dd [in])))
+ 503 (then
+ 504 (w
+ 505 (impl '
+ 506 (subseteq ## _ # (PREDF # x23) # x23) '
+ 507 (subseteq ## _ '
+ 508 (fixpoint ## _ # PREDF) # x23)))
+ 509 (then inv
+ 510 (thenl lapply_last [h,
+ 511 then (lforall_last x24)
+ 512 (then lapply_last h)])))))))))))))))]).
513
- 514prove_intro_thms (pi F) PRED PRED_I INTROTHMS :- !,
+ 514prove_intro_thms (pi F) PRED PRED_I INTROTHMS :- !,
515 pi A \
- 516 prove_intro_thms (F A) (PRED ## A) PRED_I (OUT A),
- 517 list_map (OUT A)
- 518 (i \ o \ sigma Y \ i = (theorem NAME (P A)), o = theorem NAME (pi P))
+ 516 prove_intro_thms (F A) (PRED ## A) PRED_I (OUT A),
+ 517 list_map (OUT A)
+ 518 (i \ o \ sigma Y \ i = (theorem NAME (P A)), o = theorem NAME (pi P))
519 INTROTHMS.
- 520prove_intro_thms (param TY F) PRED PRED_I INTROTHMS :- !,
+ 520prove_intro_thms (param TY F) PRED PRED_I INTROTHMS :- !,
521 pi x \
- 522 prove_intro_thms (F x) (PRED # x) PRED_I (OUT x),
- 523 list_map (OUT x)
- 524 (i \ o \ sigma Y \
- 525 i = (theorem NAME (STM x, [ PROOF x ])),
- 526 o = theorem NAME (forall ## TY # lam TY STM, [ then forall_i (bind TY PROOF) ]))
+ 522 prove_intro_thms (F x) (PRED # x) PRED_I (OUT x),
+ 523 list_map (OUT x)
+ 524 (i \ o \ sigma Y \
+ 525 i = (theorem NAME (STM x, [ PROOF x ])),
+ 526 o = theorem NAME (forall ## TY # lam TY STM, [ then forall_i (bind TY PROOF) ]))
527 INTROTHMS.
528prove_intro_thms L PRED PRED_I INTROTHMS :-
- 529 list_map (L PRED) (mk_intro_thm PRED_I) INTROTHMS.
+ 529 list_map (L PRED) (mk_intro_thm PRED_I) INTROTHMS.
530
- 531mk_intro_thm PRED_I (NAME,ST)
- 532 (theorem NAME (ST,
- 533 [ daemon /*(then inv (bind* (then (applyth PRED_I) (then (conv dd) (itauteq 6)))))*/ /* TOO MANY GOALS DELAYED ON typ (?): USE daemon INSTEAD */ ])).
+ 531mk_intro_thm PRED_I (NAME,ST)
+ 532 (theorem NAME (ST,
+ 533 [ daemon /*(then inv (bind* (then (applyth PRED_I) (then (conv dd) (itauteq 6)))))*/ /* TOO MANY GOALS DELAYED ON typ (?): USE daemon INSTEAD */ ])).
534
535inductive_def_pkg PRED PREDF PREDF_MONOTONE PRED_I PRED_E0 PRED_E L OUT :-
536 parse_inductive_def_spec L PL,
@@ -2778,7 +2778,7 @@ Test Bed
549 append OUT1 INTROTHMS OUT.
550
551/************ library of basic data types ********/
- 552mk_bounded_fresh (bind _ F) (bind _ G) :- !, pi x\ mk_bounded_fresh (F x) (G x).
+ 552mk_bounded_fresh (bind _ F) (bind _ G) :- !, pi x\ mk_bounded_fresh (F x) (G x).
553mk_bounded_fresh _ X.
554
555mk_list_of_bounded_fresh [] [].
@@ -2806,86 +2806,86 @@ Test Bed
577% BUG in runtime.ml if the sigma is uncommented out. It does not matter btw.
578/*sigma ff \*/ deftac fail SEQ ff.
579
- 580ppptac (constant_tacl TACL) (constant_tacl PTACL) :-
+ 580ppptac (constant_tacl TACL) (constant_tacl PTACL) :-
581 list_map TACL ppptac PTACL.
- 582deftacl (constant_tacl TACL) SEQS TACL.
+ 582deftacl (constant_tacl TACL) SEQS TACL.
583
- 584ppptac (thenl TAC TACL) (thenl PTAC PTACL) :-
+ 584ppptac (thenl TAC TACL) (thenl PTAC PTACL) :-
585 ppptac TAC PTAC, list_map TACL ppptac PTACL.
- 586deftac (thenl TAC TACL) SEQ XTAC :-
- 587 XTAC = thenll TAC (constant_tacl TACL).
+ 586deftac (thenl TAC TACL) SEQ XTAC :-
+ 587 XTAC = thenll TAC (constant_tacl TACL).
588
- 589ppptac (all_equals_list TAC) (all_equals_list PTAC) :- ppptac TAC PTAC.
- 590deftacl (all_equals_list TAC2) SEQS TACL :-
+ 589ppptac (all_equals_list TAC) (all_equals_list PTAC) :- ppptac TAC PTAC.
+ 590deftacl (all_equals_list TAC2) SEQS TACL :-
591 mk_constant_list SEQS TAC2 TACL.
592
- 593ppptac (then TAC1 TAC2) (then PTAC1 PTAC2) :-
+ 593ppptac (then TAC1 TAC2) (then PTAC1 PTAC2) :-
594 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
- 595deftac (then TAC1 TAC2) SEQ XTAC :-
- 596 XTAC = thenll TAC1 (all_equals_list TAC2).
+ 595deftac (then TAC1 TAC2) SEQ XTAC :-
+ 596 XTAC = thenll TAC1 (all_equals_list TAC2).
597
- 598ppptac (then! TAC1 TAC2) (then! PTAC1 PTAC2) :-
+ 598ppptac (then! TAC1 TAC2) (then! PTAC1 PTAC2) :-
599 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
- 600deftac (then! TAC1 TAC2) _ (then (! TAC1) TAC2).
+ 600deftac (then! TAC1 TAC2) _ (then (! TAC1) TAC2).
601
- 602ppptac (orelse TAC1 TAC2) (orelse PTAC1 PTAC2) :-
+ 602ppptac (orelse TAC1 TAC2) (orelse PTAC1 PTAC2) :-
603 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
- 604deftac (orelse TAC1 TAC2) SEQ XTAC :-
+ 604deftac (orelse TAC1 TAC2) SEQ XTAC :-
605 XTAC = TAC1 ; XTAC = TAC2.
606
- 607ppptac (orelse! TAC1 TAC2) (orelse! PTAC1 PTAC2) :-
+ 607ppptac (orelse! TAC1 TAC2) (orelse! PTAC1 PTAC2) :-
608 ppptac TAC1 PTAC1, ppptac TAC2 PTAC2.
- 609deftac (orelse! TAC1 TAC2) _ (orelse (! TAC1) TAC2).
+ 609deftac (orelse! TAC1 TAC2) _ (orelse (! TAC1) TAC2).
610
- 611ppptac (bind* TAC) (bind* PTAC) :- ppptac TAC PTAC.
- 612deftac (bind* TAC) SEQ (orelse! (bind _ x \ bind* TAC) TAC).
+ 611ppptac (bind* TAC) (bind* PTAC) :- ppptac TAC PTAC.
+ 612deftac (bind* TAC) SEQ (orelse! (bind _ x \ bind* TAC) TAC).
613
- 614ppptac (repeat TAC) (repeat PTAC) :- ppptac TAC PTAC.
- 615deftac (repeat TAC) SEQ XTAC :-
- 616 ( XTAC = then TAC (repeat (bind* TAC))
- 617 ; XTAC = id).
+ 614ppptac (repeat TAC) (repeat PTAC) :- ppptac TAC PTAC.
+ 615deftac (repeat TAC) SEQ XTAC :-
+ 616 ( XTAC = then TAC (repeat (bind* TAC))
+ 617 ; XTAC = id).
618
- 619ppptac (repeat! TAC) (repeat! PTAC) :- ppptac TAC PTAC.
- 620deftac (repeat! TAC) SEQ (orelse! (then! TAC (repeat! (bind* TAC))) id).
+ 619ppptac (repeat! TAC) (repeat! PTAC) :- ppptac TAC PTAC.
+ 620deftac (repeat! TAC) SEQ (orelse! (then! TAC (repeat! (bind* TAC))) id).
621
- 622ppptac (pptac TAC) (pptac PTAC) :- ppptac TAC PTAC.
- 623deftac (pptac TAC) SEQ TAC :-
+ 622ppptac (pptac TAC) (pptac PTAC) :- ppptac TAC PTAC.
+ 623deftac (pptac TAC) SEQ TAC :-
624 print "SEQ" SEQ ":=" TAC.
625
- 626ppptac (time TAC) (time PTAC) :- ppptac TAC PTAC.
- 627deftac (time TAC) SEQ XTAC :-
+ 626ppptac (time TAC) (time PTAC) :- ppptac TAC PTAC.
+ 627deftac (time TAC) SEQ XTAC :-
628 $gettimeofday B,
- 629 XTAC = thenll TAC (time_after TAC B).
+ 629 XTAC = thenll TAC (time_after TAC B).
630
- 631ppptac (time_after TAC B) (time_after PTAC B) :- ppptac TAC PTAC.
- 632deftacl (time_after TAC B) SEQS TACL :-
+ 631ppptac (time_after TAC B) (time_after PTAC B) :- ppptac TAC PTAC.
+ 632deftacl (time_after TAC B) SEQS TACL :-
633 $gettimeofday A,
634 D is A - B,
635 mk_constant_list SEQS id TACL,
636 print "TIME SPENT " D "FOR" TAC.
637
638/* For debugging only (?) For capturing metavariables */
- 639ppptac (inspect (seq Gamma F) TAC) (inspect (seq PGamma PF) PTAC) :-
+ 639ppptac (inspect (seq Gamma F) TAC) (inspect (seq PGamma PF) PTAC) :-
640 list_map SEQ ppp PSEQ, ppp F PF, ppptac TAC PTAC.
- 641deftac (inspect SEQ TAC) SEQ TAC.
+ 641deftac (inspect SEQ TAC) SEQ TAC.
642
643/********** tactics ********/
644
- 645ppptac (w G) (w PG) :- ppp G PG.
- 646deftac (w G) (seq Gamma _) (wl Gamma1) :-
+ 645ppptac (w G) (w PG) :- ppp G PG.
+ 646deftac (w G) (seq Gamma _) (wl Gamma1) :-
647 append Gamma1 [ G | _ ] Gamma.
648
649ppptac h h.
- 650deftac h SEQ (h L).
+ 650deftac h SEQ (h L).
651
652/*** eq ***/
653
654ppptac sym sym.
- 655deftac sym (seq Gamma (eq ## T # L # R)) TAC :-
- 656 TAC = thenl (m (eq ## T # R # R)) [ thenl c [ thenl c [ r , id ] , r ] , r ].
+ 655deftac sym (seq Gamma (eq ## T # L # R)) TAC :-
+ 656 TAC = thenl (m (eq ## T # R # R)) [ thenl c [ thenl c [ r , id ] , r ] , r ].
657
658ppptac eq_true_intro eq_true_intro.
- 659deftac eq_true_intro (seq Gamma (eq ## prop # P # tt)) TAC :-
+ 659deftac eq_true_intro (seq Gamma (eq ## prop # P # tt)) TAC :-
660 TAC = thenl s [ th tt_intro, wl [] ].
661
662/*** true ***/
@@ -2893,90 +2893,90 @@ Test Bed
664/*** and ***/
665
666ppptac conj conj.
- 667deftac conj (seq Gamma (and # P # Q)) TAC :-
+ 667deftac conj (seq Gamma (and # P # Q)) TAC :-
668 TAC =
669 then
- 670 (then (conv dd)
- 671 (then k (bind _ x \
+ 670 (then (conv dd)
+ 671 (then k (bind _ x \
672 thenl c
673 [ thenl c [ r, eq_true_intro ] ,
- 674 eq_true_intro ])))
+ 674 eq_true_intro ])))
675 ww.
676
677/* Gamma "|-" q ---> Gamma "|-" and # p # q*/
- 678ppptac (andr P) (andr PP) :- ppp P PP.
- 679deftac (andr P) (seq Gamma Q) TAC :-
+ 678ppptac (andr P) (andr PP) :- ppp P PP.
+ 679deftac (andr P) (seq Gamma Q) TAC :-
680 TAC =
- 681 (thenl (m ((lam _ f \ f # P # Q) # (lam _ x \ lam _ y \ y)))
+ 681 (thenl (m ((lam _ f \ f # P # Q) # (lam _ x \ lam _ y \ y)))
682 [ then
683 %(repeat (conv (depth_tac b))) ROBUS VERSION LINE BELOW
- 684 (then (conv (land_tac b)) (then (conv (land_tac (rator_tac b))) (conv (land_tac b))))
+ 684 (then (conv (land_tac b)) (then (conv (land_tac (rator_tac b))) (conv (land_tac b))))
685 r
- 686 , thenl (conv (rator_tac id))
- 687 [ then (thenl (t (lam _ f \ f # tt # tt)) [ id, r ])
- 688 (thenl (m (and # P # Q)) [ dd , id ])
- 689 , then (repeat (conv (depth_tac b))) (th tt_intro) ]]).
+ 686 , thenl (conv (rator_tac id))
+ 687 [ then (thenl (t (lam _ f \ f # tt # tt)) [ id, r ])
+ 688 (thenl (m (and # P # Q)) [ dd , id ])
+ 689 , then (repeat (conv (depth_tac b))) (th tt_intro) ]]).
690
691/* (and # p # q) :: nil "|-" q */
692ppptac andr andr.
- 693deftac andr (seq Gamma Q) TAC :-
- 694 mem Gamma (and # P # Q),
- 695 TAC = then (andr P) h.
+ 693deftac andr (seq Gamma Q) TAC :-
+ 694 mem Gamma (and # P # Q),
+ 695 TAC = then (andr P) h.
696
697/* Gamma "|-" p ---> Gamma "|-" and # p # q*/
- 698ppptac (andl P) (andl PP) :- ppp P PP.
- 699deftac (andl Q) (seq Gamma P) TAC :-
+ 698ppptac (andl P) (andl PP) :- ppp P PP.
+ 699deftac (andl Q) (seq Gamma P) TAC :-
700 TAC =
- 701 (thenl (m ((lam _ f \ f # P # Q) # (lam _ x \ lam _ y \ x)))
+ 701 (thenl (m ((lam _ f \ f # P # Q) # (lam _ x \ lam _ y \ x)))
702 [ then
703 %(repeat (conv (depth_tac b))) ROBUS VERSION LINE BELOW
- 704 (then (conv (land_tac b)) (then (conv (land_tac (rator_tac b))) (conv (land_tac b))))
+ 704 (then (conv (land_tac b)) (then (conv (land_tac (rator_tac b))) (conv (land_tac b))))
705 r
- 706 , thenl (conv (rator_tac id))
- 707 [ then (thenl (t (lam _ f \ f # tt # tt)) [ id, r ])
- 708 (thenl (m (and # P # Q)) [ dd , id ])
- 709 , then (repeat (conv (depth_tac b))) (th tt_intro) ]]).
+ 706 , thenl (conv (rator_tac id))
+ 707 [ then (thenl (t (lam _ f \ f # tt # tt)) [ id, r ])
+ 708 (thenl (m (and # P # Q)) [ dd , id ])
+ 709 , then (repeat (conv (depth_tac b))) (th tt_intro) ]]).
710
711/* (and # p # q) :: nil "|-" p */
712ppptac andl andl.
- 713deftac andl (seq Gamma P) TAC :-
- 714 mem Gamma (and # P # Q),
- 715 TAC = then (andl Q) h.
+ 713deftac andl (seq Gamma P) TAC :-
+ 714 mem Gamma (and # P # Q),
+ 715 TAC = then (andl Q) h.
716
717
718/*** forall ***/
719
720/* |- forall # F --> |- F # x */
721ppptac forall_i forall_i.
- 722deftac forall_i (seq Gamma (forall ## _ # lam _ G)) TAC :-
- 723 TAC = then (conv dd) (then k (bind _ x \ eq_true_intro)).
+ 722deftac forall_i (seq Gamma (forall ## _ # lam _ G)) TAC :-
+ 723 TAC = then (conv dd) (then k (bind _ x \ eq_true_intro)).
724
725/* forall # F |- F # T */
726ppptac forall_e forall_e.
- 727deftac forall_e (seq Gamma GX) TAC :-
- 728 mem Gamma (forall ## _ # (lam _ G)), GX = G X,
- 729 TAC = thenl (m ((lam _ G) # X)) [ b, thenl (m ((lam _ z \ tt) # X))
- 730 [ thenl c [ then sym (thenl (m (forall ## _ # lam _ G)) [dd,h ]), r ]
- 731 , then (conv b) (th tt_intro) ] ].
+ 727deftac forall_e (seq Gamma GX) TAC :-
+ 728 mem Gamma (forall ## _ # (lam _ G)), GX = G X,
+ 729 TAC = thenl (m ((lam _ G) # X)) [ b, thenl (m ((lam _ z \ tt) # X))
+ 730 [ thenl c [ then sym (thenl (m (forall ## _ # lam _ G)) [dd,h ]), r ]
+ 731 , then (conv b) (th tt_intro) ] ].
732
733/* forall # F |- f --> F # a, forall # F |- f */
- 734ppptac (lforall F A) (lforall PF PA) :- ppp F PF, ppp A PA.
- 735deftac (lforall F A) (seq Gamma G) TAC :-
- 736 TAC = thenl (m (impl # (F A) # G))
- 737 [ thenl s [ then mp forall_e, then i h ] , then (w (forall ## _ # lam _ F)) i ].
+ 734ppptac (lforall F A) (lforall PF PA) :- ppp F PF, ppp A PA.
+ 735deftac (lforall F A) (seq Gamma G) TAC :-
+ 736 TAC = thenl (m (impl # (F A) # G))
+ 737 [ thenl s [ then mp forall_e, then i h ] , then (w (forall ## _ # lam _ F)) i ].
738
739/* forall # F |- f --> F # a, forall # F |- f */
- 740ppptac (lforall A) (lforall PA) :- ppp A PA.
- 741deftac (lforall A) (seq Gamma G) (lforall F A) :-
- 742 mem Gamma (forall ## _ # lam _ F).
+ 740ppptac (lforall A) (lforall PA) :- ppp A PA.
+ 741deftac (lforall A) (seq Gamma G) (lforall F A) :-
+ 742 mem Gamma (forall ## _ # lam _ F).
743
744/* forall # F |- f --> F # a, forall # F |- f */
745ppptac lforall lforall.
- 746deftac lforall (seq Gamma G) (lforall A).
+ 746deftac lforall (seq Gamma G) (lforall A).
747
748/* forall # F |- f --> F # a, forall # F |- f */
- 749ppptac (lforall_last A) (lforall_last PA) :- ppp A PA.
- 750deftac (lforall_last A) (seq ((forall ## _ # lam _ F)::Gamma) G) (lforall F A).
+ 749ppptac (lforall_last A) (lforall_last PA) :- ppp A PA.
+ 750deftac (lforall_last A) (seq ((forall ## _ # lam _ F)::Gamma) G) (lforall F A).
751
752/*** false ***/
753
@@ -2984,54 +2984,54 @@ Test Bed
755
756/* |- p=>q --> p |- q */
757ppptac i i.
- 758deftac i (seq Gamma (impl # P # Q)) TAC :-
- 759 TAC = then (conv dd) (thenl s [ andl, thenl conj [ h [], id ]]).
+ 758deftac i (seq Gamma (impl # P # Q)) TAC :-
+ 759 TAC = then (conv dd) (thenl s [ andl, thenl conj [ h [], id ]]).
760
761/* p=>q |- q --> |- p */
- 762ppptac (mp P) (mp PP) :- ppp P PP.
- 763deftac (mp P) (seq Gamma Q) TAC :-
- 764 TAC = then (andr P) (thenl (m P) [ then sym (thenl (m (impl # P # Q)) [ dd , h ]) , id ]).
+ 762ppptac (mp P) (mp PP) :- ppp P PP.
+ 763deftac (mp P) (seq Gamma Q) TAC :-
+ 764 TAC = then (andr P) (thenl (m P) [ then sym (thenl (m (impl # P # Q)) [ dd , h ]) , id ]).
765
766/* p=>q |- q --> |- p */
767ppptac mp mp.
- 768deftac mp (seq Gamma Q) (mp P) :-
- 769 mem Gamma (impl # P # Q).
+ 768deftac mp (seq Gamma Q) (mp P) :-
+ 769 mem Gamma (impl # P # Q).
770
771/* |- q --> p |- q and |- p */
- 772ppptac (cut P) (cut PP) :- ppp P PP.
- 773deftac (cut P) (seq Gamma Q) TAC :-
- 774 TAC = then (andr P) (thenl (m P) [then sym (thenl (m (impl # P # Q)) [then (conv (land_tac dd)) r, i] ) , id]).
+ 772ppptac (cut P) (cut PP) :- ppp P PP.
+ 773deftac (cut P) (seq Gamma Q) TAC :-
+ 774 TAC = then (andr P) (thenl (m P) [then sym (thenl (m (impl # P # Q)) [then (conv (land_tac dd)) r, i] ) , id]).
775
776/* |-q --> p |- q where the theorem T proves p */
- 777ppptac (cutth P) (cutth PP) :- ppp P PP.
- 778deftac (cutth T) SEQ TAC :-
+ 777ppptac (cutth P) (cutth PP) :- ppp P PP.
+ 778deftac (cutth T) SEQ TAC :-
779 proves T X,
- 780 TAC = (thenl (cut X) [ id, th T ]).
+ 780 TAC = (thenl (cut X) [ id, th T ]).
781
782/* applies the theorem T */
- 783ppptac (applyth P) (applyth PP) :- ppp P PP.
- 784deftac (applyth T) SEQ (then (cutth T) apply_last).
+ 783ppptac (applyth P) (applyth PP) :- ppp P PP.
+ 784deftac (applyth T) SEQ (then (cutth T) apply_last).
785
786/* impl p q, Gamma |- f ---> /*impl q f*/ Gamma |- p , q, Gamma |- f */
- 787ppptac (lapply P Q) (lapply PP PQ) :- ppp P PP, ppp Q PQ.
- 788deftac (lapply P Q) (seq Gamma F) TAC :-
+ 787ppptac (lapply P Q) (lapply PP PQ) :- ppp P PP, ppp Q PQ.
+ 788deftac (lapply P Q) (seq Gamma F) TAC :-
789 TAC =
- 790 thenl (m (impl # Q # F)) [ thenl s [ then (mp Q) (then (w (impl # Q # F)) (then (mp P) (w (impl # P # Q)))) , then i (h [A]) ] , then (w (impl # P # Q)) (then i id) ].
+ 790 thenl (m (impl # Q # F)) [ thenl s [ then (mp Q) (then (w (impl # Q # F)) (then (mp P) (w (impl # P # Q)))) , then i (h [A]) ] , then (w (impl # P # Q)) (then i id) ].
791
792/* impl p q, Gamma |- f ---> /*impl q f*/ Gamma |- p , q, Gamma |- f */
793ppptac lapply lapply.
- 794deftac lapply (seq Gamma F) (lapply P Q) :-
- 795 mem Gamma (impl # P # Q).
+ 794deftac lapply (seq Gamma F) (lapply P Q) :-
+ 795 mem Gamma (impl # P # Q).
796
797/* impl p q, Gamma |- f ---> /*impl q f*/ Gamma |- p , q, Gamma |- f */
798ppptac lapply_last lapply_last.
- 799deftac lapply_last (seq ((impl # P # Q)::Gamma) F) (lapply P Q).
+ 799deftac lapply_last (seq ((impl # P # Q)::Gamma) F) (lapply P Q).
800
801/* p |- f ---> p |- p ==> f */
- 802ppptac (g P) (g PP) :- ppp P PP.
- 803deftac (g P) (seq _ F) TAC :-
+ 802ppptac (g P) (g PP) :- ppp P PP.
+ 803deftac (g P) (seq _ F) TAC :-
804 TAC =
- 805 (thenl (m (impl # P # F)) [thenl s [then mp h , then i h] , id ]).
+ 805 (thenl (m (impl # P # F)) [thenl s [then mp h , then i h] , id ]).
806
807/*** not ***/
808
@@ -3039,206 +3039,206 @@ Test Bed
810
811/**** apply, i.e. forall + impl ****/
812
- 813ppptac (apply X) (apply PX) :- ppp X PX.
- 814deftac (apply X) SEQ h :- var X, !.
- 815deftac (apply X) SEQ h.
- 816deftac (apply (impl # P # Q)) SEQ TAC :-
- 817 TAC = thenl (lapply P Q) [ id, apply_last ].
- 818deftac (apply (forall ## _ # lam _ G)) SEQ TAC :-
- 819 TAC = then (lforall G X) apply_last.
+ 813ppptac (apply X) (apply PX) :- ppp X PX.
+ 814deftac (apply X) SEQ h :- var X, !.
+ 815deftac (apply X) SEQ h.
+ 816deftac (apply (impl # P # Q)) SEQ TAC :-
+ 817 TAC = thenl (lapply P Q) [ id, apply_last ].
+ 818deftac (apply (forall ## _ # lam _ G)) SEQ TAC :-
+ 819 TAC = then (lforall G X) apply_last.
820
821ppptac apply_last apply_last.
- 822deftac apply_last (seq (H::Gamma) F) (apply H).
+ 822deftac apply_last (seq (H::Gamma) F) (apply H).
823
824ppptac apply apply.
- 825deftac apply (seq Gamma F) (apply H) :-
+ 825deftac apply (seq Gamma F) (apply H) :-
826 mem Gamma H.
827
828/********** conversion(als) ***********/
829
- 830strip_constant (I ## _) H :- !, strip_constant I H.
+ 830strip_constant (I ## _) H :- !, strip_constant I H.
831strip_constant H H.
832
833/* expands definitions, even if applied to arguments */
- 834ppptac (dd L) (dd L).
- 835deftac (dd L) (seq _ (eq ## _ # T # X)) d :- strip_constant T H, bang (mem L H).
- 836deftac (dd L) (seq _ (eq ## _ # (D # T) # X))
- 837 (thenl (t A) [thenl c [dd L , r], b]).
+ 834ppptac (dd L) (dd L).
+ 835deftac (dd L) (seq _ (eq ## _ # T # X)) d :- strip_constant T H, bang (mem L H).
+ 836deftac (dd L) (seq _ (eq ## _ # (D # T) # X))
+ 837 (thenl (t A) [thenl c [dd L , r], b]).
838
839ppptac dd dd.
- 840deftac dd _ (dd L).
+ 840deftac dd _ (dd L).
841
842ppptac beta_expand beta_expand.
- 843deftac beta_expand (seq _ (eq ## _ # (lam _ x \ F x) # (lam _ x \ (lam _ F) # x))) TAC :-
- 844 TAC = then k (bind _ x \ then sym b).
+ 843deftac beta_expand (seq _ (eq ## _ # (lam _ x \ F x) # (lam _ x \ (lam _ F) # x))) TAC :-
+ 844 TAC = then k (bind _ x \ then sym b).
845
846/* folds a definition, even if applied to arguments */
847/* BUG: it seems to fail with restriction errors in some cases */
848ppptac f f.
- 849deftac f SEQ (then sym dd).
+ 849deftac f SEQ (then sym dd).
850
- 851ppptac (rand_tac C) (rand_tac PC) :- ppptac C PC.
- 852deftac (rand_tac C) SEQ TAC :-
+ 851ppptac (rand_tac C) (rand_tac PC) :- ppptac C PC.
+ 852deftac (rand_tac C) SEQ TAC :-
853 TAC = thenl c [ r , C ].
854
- 855ppptac (rator_tac C) (rator_tac PC) :- ppptac C PC.
- 856deftac (rator_tac C) SEQ TAC :-
+ 855ppptac (rator_tac C) (rator_tac PC) :- ppptac C PC.
+ 856deftac (rator_tac C) SEQ TAC :-
857 TAC = thenl c [ C , r ].
858
- 859ppptac (abs_tac C) (abs_tac PC) :- ppptac C PC.
- 860deftac (abs_tac C) SEQ TAC :-
- 861 TAC = then k (bind A x \ C).
+ 859ppptac (abs_tac C) (abs_tac PC) :- ppptac C PC.
+ 860deftac (abs_tac C) SEQ TAC :-
+ 861 TAC = then k (bind A x \ C).
862
- 863ppptac (land_tac C) (land_tac PC) :- ppptac C PC.
- 864deftac (land_tac C) SEQ TAC :-
+ 863ppptac (land_tac C) (land_tac PC) :- ppptac C PC.
+ 864deftac (land_tac C) SEQ TAC :-
865 TAC = thenl c [ thenl c [ r, C ] , r ].
866
- 867ppptac (sub_tac C) (sub_tac PC) :- ppptac C PC.
- 868deftac (sub_tac C) SEQ TAC :-
- 869 TAC = orelse (rand_tac C) (orelse (rator_tac C) (abs_tac C)).
+ 867ppptac (sub_tac C) (sub_tac PC) :- ppptac C PC.
+ 868deftac (sub_tac C) SEQ TAC :-
+ 869 TAC = orelse (rand_tac C) (orelse (rator_tac C) (abs_tac C)).
870
- 871ppptac (try TAC) (try PTAC) :- ppptac TAC PTAC.
- 872deftac (try TAC) SEQ (orelse TAC id).
+ 871ppptac (try TAC) (try PTAC) :- ppptac TAC PTAC.
+ 872deftac (try TAC) SEQ (orelse TAC id).
873
- 874ppptac (depth_tac C) (depth_tac PC) :- ppptac C PC.
- 875deftac (depth_tac C) SEQ TAC :-
- 876 TAC = then (try C) (sub_tac (depth_tac C)).
+ 874ppptac (depth_tac C) (depth_tac PC) :- ppptac C PC.
+ 875deftac (depth_tac C) SEQ TAC :-
+ 876 TAC = then (try C) (sub_tac (depth_tac C)).
877
- 878ppptac (conv C) (conv PC) :- ppptac C PC.
- 879deftac (conv C) (seq Gamma F) TAC :-
- 880 TAC = thenl (m G) [ then sym C , id ].
+ 878ppptac (conv C) (conv PC) :- ppptac C PC.
+ 879deftac (conv C) (seq Gamma F) TAC :-
+ 880 TAC = thenl (m G) [ then sym C , id ].
881
882/********** Automation ***********/
883/* TODO:
- 884 1) our lforall gets rid of the hypothesis (bad) */
+ 884 1) our lforall gets rid of the hypothesis (bad) */
885/* left tries to reduce the search space via focusing */
886ppptac left left.
- 887deftac left (seq Gamma _) TAC :-
- 888 mem Gamma (not # F),
+ 887deftac left (seq Gamma _) TAC :-
+ 888 mem Gamma (not # F),
889 TAC =
- 890 (!
- 891 (then (cutth not_e)
- 892 (then (lforall_last F)
- 893 (thenl lapply [ h, (w (not # F)) ])))).
- 894deftac left (seq Gamma _) TAC :-
+ 890 (!
+ 891 (then (cutth not_e)
+ 892 (then (lforall_last F)
+ 893 (thenl lapply [ h, (w (not # F)) ])))).
+ 894deftac left (seq Gamma _) TAC :-
895 /* A bit long because we want to beta-reduce the produced hypothesis.
- 896 Maybe this should be automatized somewhere else. */
- 897 mem Gamma (exists ## _ # F),
+ 896 Maybe this should be automatized somewhere else. */
+ 897 mem Gamma (exists ## _ # F),
898 TAC =
- 899 (!
- 900 (then (cutth exists_e)
- 901 (then (lforall_last F)
- 902 (thenl lapply [ h, then (w (exists ## _ # F)) (then apply_last (then forall_i (bind _ x \ then (try (conv (land_tac b))) i))) ])))).
- 903deftac left (seq Gamma H) TAC :-
- 904 mem Gamma (or # F # G),
+ 899 (!
+ 900 (then (cutth exists_e)
+ 901 (then (lforall_last F)
+ 902 (thenl lapply [ h, then (w (exists ## _ # F)) (then apply_last (then forall_i (bind _ x \ then (try (conv (land_tac b))) i))) ])))).
+ 903deftac left (seq Gamma H) TAC :-
+ 904 mem Gamma (or # F # G),
905 TAC =
- 906 (!
- 907 (then (cutth or_e)
- 908 (then (lforall_last F)
- 909 (then (lforall_last G)
- 910 (then (lforall_last H)
- 911 (thenl lapply [ h, then (w (or # F # G)) (then apply_last i)])))))).
- 912deftac left (seq Gamma H) TAC :-
- 913 mem Gamma (and # F # G),
+ 906 (!
+ 907 (then (cutth or_e)
+ 908 (then (lforall_last F)
+ 909 (then (lforall_last G)
+ 910 (then (lforall_last H)
+ 911 (thenl lapply [ h, then (w (or # F # G)) (then apply_last i)])))))).
+ 912deftac left (seq Gamma H) TAC :-
+ 913 mem Gamma (and # F # G),
914 TAC =
- 915 (!
- 916 (then (cutth and_e)
- 917 (then (lforall_last F)
- 918 (then (lforall_last G)
- 919 (then (lforall_last H)
- 920 (thenl lapply [ h, then (w (and # F # G)) (then apply_last (then i i))])))))).
- 921deftac left (seq Gamma H) TAC :-
- 922 mem Gamma (eq ## TY # F # G),
- 923 not (var TY), TY = prop,
+ 915 (!
+ 916 (then (cutth and_e)
+ 917 (then (lforall_last F)
+ 918 (then (lforall_last G)
+ 919 (then (lforall_last H)
+ 920 (thenl lapply [ h, then (w (and # F # G)) (then apply_last (then i i))])))))).
+ 921deftac left (seq Gamma H) TAC :-
+ 922 mem Gamma (eq ## TY # F # G),
+ 923 not (var TY), TY = prop,
924 TAC =
- 925 (then (g (eq ## TY # F # G))
- 926 (then (conv (land_tac (then (applyth eq_to_impl) h)))
- 927 (then i (w (eq ## TY # F # G))))).
+ 925 (then (g (eq ## TY # F # G))
+ 926 (then (conv (land_tac (then (applyth eq_to_impl) h)))
+ 927 (then i (w (eq ## TY # F # G))))).
928
929ppptac not_i not_i.
- 930deftac not_i (seq _ (not # _)) (applyth not_i).
+ 930deftac not_i (seq _ (not # _)) (applyth not_i).
931
932ppptac inv inv.
933deftac inv _ TAC :-
934 TAC =
- 935 (then!
- 936 (repeat!
- 937 (orelse! conj (orelse! forall_i (orelse! i (orelse! not_i s)))))
- 938 (bind* (repeat! left))).
+ 935 (then!
+ 936 (repeat!
+ 937 (orelse! conj (orelse! forall_i (orelse! i (orelse! not_i s)))))
+ 938 (bind* (repeat! left))).
939
- 940ppptac (sync N) (sync N).
- 941deftac (sync N) (seq _ tt) (th tt_intro).
- 942deftac (sync N) (seq Gamma _) (then (applyth ff_elim) h) :-
+ 940ppptac (sync N) (sync N).
+ 941deftac (sync N) (seq _ tt) (th tt_intro).
+ 942deftac (sync N) (seq Gamma _) (then (applyth ff_elim) h) :-
943 mem Gamma ff.
- 944deftac (sync N) (seq _ (or # _ # _))
- 945 (orelse (then (applyth orr) (itaut N)) (then (applyth orl) (itaut N))).
- 946deftac (sync N) (seq _ (exists ## _ # _)) (then (applyth exists_i) (then (conv b) (itaut N2))) :-
+ 944deftac (sync N) (seq _ (or # _ # _))
+ 945 (orelse (then (applyth orr) (itaut N)) (then (applyth orl) (itaut N))).
+ 946deftac (sync N) (seq _ (exists ## _ # _)) (then (applyth exists_i) (then (conv b) (itaut N2))) :-
947 N2 is N - 2.
948
- 949ppptac (itaut N) (itaut N).
- 950deftac (itaut N) SEQ fail :- N =< 0, !.
- 951deftac (itaut N) SEQ TAC :-
+ 949ppptac (itaut N) (itaut N).
+ 950deftac (itaut N) SEQ fail :- N =< 0, !.
+ 951deftac (itaut N) SEQ TAC :-
952 %print (itaut N) SEQ,
953 N1 is N - 1,
954 N2 is N - 2,
955 TAC =
- 956 (then! inv
- 957 (bind*
- 958 (orelse h
- 959 (orelse (sync N)
- 960 (orelse /* Hypothesis not moved to front */ (then lforall (itaut N2))
- 961 (then lapply (itaut N1))))))).
+ 956 (then! inv
+ 957 (bind*
+ 958 (orelse h
+ 959 (orelse (sync N)
+ 960 (orelse /* Hypothesis not moved to front */ (then lforall (itaut N2))
+ 961 (then lapply (itaut N1))))))).
962
- 963ppptac (itauteq N) (itauteq N).
- 964deftac (itauteq N) _ (then (cutth eq_reflexive) (itaut N)).
+ 963ppptac (itauteq N) (itauteq N).
+ 964deftac (itauteq N) _ (then (cutth eq_reflexive) (itaut N)).
965
966/********** inductive predicates package ********/
967
968ppptac monotone monotone.
- 969deftac monotone (seq _ (impl # X # X)) (! (then i h)) :- !.
- 970deftac monotone (seq [forall ## _ # lam _ x \ impl # (F # x) # (G # x)] (impl # (F # T) # (G # T))) (! apply) :- !.
- 971deftac monotone (seq _ (impl # (and # _ # _) # _)) TAC :-
- 972 TAC = then (applyth and_monotone) monotone.
- 973deftac monotone (seq _ (impl # (or # _ # _) # _)) TAC :-
- 974 TAC = then (applyth or_monotone) monotone.
- 975deftac monotone (seq _ (impl # (impl # _ # _) # _)) TAC :-
- 976 TAC = then (applyth impl_monotone) monotone.
- 977deftac monotone (seq _ (impl # (not # _) # _)) TAC :-
- 978 TAC = then (applyth not_monotone) monotone.
- 979deftac monotone (seq _ (impl # (forall ## _ # lam _ _) # _)) TAC :-
+ 969deftac monotone (seq _ (impl # X # X)) (! (then i h)) :- !.
+ 970deftac monotone (seq [forall ## _ # lam _ x \ impl # (F # x) # (G # x)] (impl # (F # T) # (G # T))) (! apply) :- !.
+ 971deftac monotone (seq _ (impl # (and # _ # _) # _)) TAC :-
+ 972 TAC = then (applyth and_monotone) monotone.
+ 973deftac monotone (seq _ (impl # (or # _ # _) # _)) TAC :-
+ 974 TAC = then (applyth or_monotone) monotone.
+ 975deftac monotone (seq _ (impl # (impl # _ # _) # _)) TAC :-
+ 976 TAC = then (applyth impl_monotone) monotone.
+ 977deftac monotone (seq _ (impl # (not # _) # _)) TAC :-
+ 978 TAC = then (applyth not_monotone) monotone.
+ 979deftac monotone (seq _ (impl # (forall ## _ # lam _ _) # _)) TAC :-
980 TAC =
- 981 then (conv (land_tac (rand_tac beta_expand)))
- 982 (then (conv (rand_tac (rand_tac beta_expand)))
- 983 (then (applyth forall_monotone) (then forall_i (bind _ x \
- 984 then (conv (depth_tac b)) (then (conv (depth_tac b)) monotone))))).
- 985deftac monotone (seq _ (impl # (exists ## _ # lam _ _) # _)) TAC :-
+ 981 then (conv (land_tac (rand_tac beta_expand)))
+ 982 (then (conv (rand_tac (rand_tac beta_expand)))
+ 983 (then (applyth forall_monotone) (then forall_i (bind _ x \
+ 984 then (conv (depth_tac b)) (then (conv (depth_tac b)) monotone))))).
+ 985deftac monotone (seq _ (impl # (exists ## _ # lam _ _) # _)) TAC :-
986 TAC =
- 987 then (conv (land_tac (rand_tac beta_expand)))
- 988 (then (conv (rand_tac (rand_tac beta_expand)))
- 989 (then (applyth exists_monotone) (then forall_i (bind _ x \
- 990 then (conv (depth_tac b)) (then (conv (depth_tac b)) monotone))))).
+ 987 then (conv (land_tac (rand_tac beta_expand)))
+ 988 (then (conv (rand_tac (rand_tac beta_expand)))
+ 989 (then (applyth exists_monotone) (then forall_i (bind _ x \
+ 990 then (conv (depth_tac b)) (then (conv (depth_tac b)) monotone))))).
991
992/* expands "monotone # (lam _ f \ lam _ x \ X f x)" into
- 993 "! x \ p # x ==> q # x |- X p y ==> X q y"
- 994 and then calls the monotone tactic */
+ 993 "! x \ p # x ==> q # x |- X p y ==> X q y"
+ 994 and then calls the monotone tactic */
995ppptac auto_monotone auto_monotone.
996deftac auto_monotone _ TAC :-
997 TAC =
- 998 then (conv dd)
- 999 (then forall_i (bind _ p \ (then forall_i (bind _ q \
-1000 then (conv (land_tac dd))
-1001 (then (conv (land_tac (depth_tac (dd [in]))))
-1002 (then (conv (land_tac (depth_tac (dd [in]))))
-1003 (then i
-1004 (then (conv dd)
-1005 (then forall_i (bind _ x \
-1006 (then (conv (land_tac dd))
-1007 (then (conv (rand_tac dd))
-1008 (then (conv (land_tac (rator_tac b)))
-1009 (then (conv (land_tac b))
-1010 (then (conv (rand_tac (rator_tac b)))
-1011 (then (conv (rand_tac b))
-1012 monotone)))))))))))))))).
+ 998 then (conv dd)
+ 999 (then forall_i (bind _ p \ (then forall_i (bind _ q \
+1000 then (conv (land_tac dd))
+1001 (then (conv (land_tac (depth_tac (dd [in]))))
+1002 (then (conv (land_tac (depth_tac (dd [in]))))
+1003 (then i
+1004 (then (conv dd)
+1005 (then forall_i (bind _ x \
+1006 (then (conv (land_tac dd))
+1007 (then (conv (rand_tac dd))
+1008 (then (conv (land_tac (rator_tac b)))
+1009 (then (conv (land_tac b))
+1010 (then (conv (rand_tac (rator_tac b)))
+1011 (then (conv (rand_tac b))
+1012 monotone)))))))))))))))).
1013
1014/********** the library ********/
1015
@@ -3252,976 +3252,976 @@ Test Bed
1023 % decl eq (pi A \ A --> A --> prop)
1024
1025 /********** Axiomatization of choice over types ********/
-1026 decl choose (pi A \ A)
+1026 decl choose (pi A \ A)
1027
1028 /*********** Connectives and quantifiers ********/
-1029 , def tt (prop,((lam prop x \ x) = (lam prop x \ x)))
-1030 , def forall (pi A \ ((A --> prop) --> prop),
-1031 (lam (A --> prop) f \ f = (lam A g \ tt)))
-1032 , def ff (prop,(! x \ x))
-1033 , def and ((prop --> prop --> prop),
-1034 (lam _ x \ lam _ y \ (lam (prop --> prop --> prop) f \ f # x # y) = (lam _ f \ f # tt # tt)))
-1035 , def impl ((prop --> prop --> prop),(lam _ a \ lam _ b \ a && b <=> a))
-1036 , def exists (pi A \ ((A --> prop) --> prop),
-1037 (lam (A --> prop) f \ ! c \ (! a \ f # a ==> c) ==> c))
-1038 , def not ((prop --> prop),(lam _ x \ x ==> ff))
-1039 , def or ((prop --> prop --> prop),
-1040 (lam _ x \ lam _ y \ ! c \ (x ==> c) ==> (y ==> c) ==> c))
-1041 , theorem tt_intro (tt,[then (conv dd) (then k (bind _ x12 \ r))])
-1042 , theorem ff_elim ((! p \ ff ==> p),
-1043 [then forall_i (bind prop x3\ then (conv (land_tac dd)) (then i forall_e))])
-1044 , theorem sym ((! p \ ! q \ p = q ==> q = p),
+1029 , def tt (prop,((lam prop x \ x) = (lam prop x \ x)))
+1030 , def forall (pi A \ ((A --> prop) --> prop),
+1031 (lam (A --> prop) f \ f = (lam A g \ tt)))
+1032 , def ff (prop,(! x \ x))
+1033 , def and ((prop --> prop --> prop),
+1034 (lam _ x \ lam _ y \ (lam (prop --> prop --> prop) f \ f # x # y) = (lam _ f \ f # tt # tt)))
+1035 , def impl ((prop --> prop --> prop),(lam _ a \ lam _ b \ a && b <=> a))
+1036 , def exists (pi A \ ((A --> prop) --> prop),
+1037 (lam (A --> prop) f \ ! c \ (! a \ f # a ==> c) ==> c))
+1038 , def not ((prop --> prop),(lam _ x \ x ==> ff))
+1039 , def or ((prop --> prop --> prop),
+1040 (lam _ x \ lam _ y \ ! c \ (x ==> c) ==> (y ==> c) ==> c))
+1041 , theorem tt_intro (tt,[then (conv dd) (then k (bind _ x12 \ r))])
+1042 , theorem ff_elim ((! p \ ff ==> p),
+1043 [then forall_i (bind prop x3\ then (conv (land_tac dd)) (then i forall_e))])
+1044 , theorem sym ((! p \ ! q \ p = q ==> q = p),
1045 [then forall_i
-1046 (bind prop x12 \
+1046 (bind prop x12 \
1047 then forall_i
-1048 (bind prop x13 \
-1049 then i (then sym h)))])
-1050 , theorem not_e ((! p \ not # p ==> p ==> ff),
-1051 [then forall_i (bind prop x3 \ then (conv (land_tac dd)) (then i h))])
-1052 , theorem conj ((! p \ ! q \ p ==> q ==> p && q),
+1048 (bind prop x13 \
+1049 then i (then sym h)))])
+1050 , theorem not_e ((! p \ not # p ==> p ==> ff),
+1051 [then forall_i (bind prop x3 \ then (conv (land_tac dd)) (then i h))])
+1052 , theorem conj ((! p \ ! q \ p ==> q ==> p && q),
1053 [then forall_i
-1054 (bind prop x12 \
-1055 then forall_i (bind prop x13 \ then i (then i (then conj h))))])
-1056 , theorem andl ((! p \ ! q \ p && q ==> p),
+1054 (bind prop x12 \
+1055 then forall_i (bind prop x13 \ then i (then i (then conj h))))])
+1056 , theorem andl ((! p \ ! q \ p && q ==> p),
1057 [then forall_i
-1058 (bind prop x12 \
-1059 then forall_i (bind prop x13 \ then i (then (andl x13) h)))])
-1060 , theorem andr ((! p \ ! q \ p && q ==> q),
+1058 (bind prop x12 \
+1059 then forall_i (bind prop x13 \ then i (then (andl x13) h)))])
+1060 , theorem andr ((! p \ ! q \ p && q ==> q),
1061 [then forall_i
-1062 (bind prop x12 \
-1063 then forall_i (bind prop x13 \ then i (then (andr x12) h)))])
-1064 , theorem and_e ((! p \ ! q \ ! c \ p && q ==> (p ==> q ==> c) ==> c),
+1062 (bind prop x12 \
+1063 then forall_i (bind prop x13 \ then i (then (andr x12) h)))])
+1064 , theorem and_e ((! p \ ! q \ ! c \ p && q ==> (p ==> q ==> c) ==> c),
1065 [then forall_i
-1066 (bind prop x12 \
+1066 (bind prop x12 \
1067 then forall_i
-1068 (bind prop x13 \
+1068 (bind prop x13 \
1069 then forall_i
-1070 (bind prop x14 \ then i (then i (thenl apply [andl, andr])))))])
-1071 , theorem not_i ((! p \ (p ==> ff) ==> not # p),
-1072 [then forall_i (bind prop x2 \ then i (then (conv dd) h))])
-1073 , theorem orl ((! p \ ! q \ p ==> p || q),
+1070 (bind prop x14 \ then i (then i (thenl apply [andl, andr])))))])
+1071 , theorem not_i ((! p \ (p ==> ff) ==> not # p),
+1072 [then forall_i (bind prop x2 \ then i (then (conv dd) h))])
+1073 , theorem orl ((! p \ ! q \ p ==> p || q),
1074 [then forall_i
-1075 (bind prop x12 \
+1075 (bind prop x12 \
1076 then forall_i
-1077 (bind prop x13 \
+1077 (bind prop x13 \
1078 then i
-1079 (then (conv dd)
-1080 (then forall_i (bind prop x14 \ then i (then i (then apply h)))))))])
-1081 , theorem orr ((! p \ ! q \ q ==> p || q),
+1079 (then (conv dd)
+1080 (then forall_i (bind prop x14 \ then i (then i (then apply h)))))))])
+1081 , theorem orr ((! p \ ! q \ q ==> p || q),
1082 [then forall_i
-1083 (bind prop x12 \
+1083 (bind prop x12 \
1084 then forall_i
-1085 (bind prop x13 \
+1085 (bind prop x13 \
1086 then i
-1087 (then (conv dd)
-1088 (then forall_i (bind prop x14 \ then i (then i (then apply h)))))))])
-1089 , theorem or_e ((! p \ ! q \ ! c \ p || q ==> (p ==> c) ==> (q ==> c) ==> c),
+1087 (then (conv dd)
+1088 (then forall_i (bind prop x14 \ then i (then i (then apply h)))))))])
+1089 , theorem or_e ((! p \ ! q \ ! c \ p || q ==> (p ==> c) ==> (q ==> c) ==> c),
1090 [then forall_i
-1091 (bind prop x12 \
+1091 (bind prop x12 \
1092 then forall_i
-1093 (bind prop x13 \
+1093 (bind prop x13 \
1094 then forall_i
-1095 (bind prop x14 \ then (conv (land_tac dd)) (then i forall_e))))])
-1096 , theorem exists_e (pi T \
-1097 (! f \ (exists ## T # f) ==> (! c \ (! x \ f # x ==> c) ==> c)),
-1098 [then forall_i (bind (T --> prop) x12 \ then (conv (land_tac dd)) (then i h))])
-1099 , theorem exists_i (pi T \ (! f \ ! w \ f # w ==> (exists ## T # f)),
+1095 (bind prop x14 \ then (conv (land_tac dd)) (then i forall_e))))])
+1096 , theorem exists_e (pi T \
+1097 (! f \ (exists ## T # f) ==> (! c \ (! x \ f # x ==> c) ==> c)),
+1098 [then forall_i (bind (T --> prop) x12 \ then (conv (land_tac dd)) (then i h))])
+1099 , theorem exists_i (pi T \ (! f \ ! w \ f # w ==> (exists ## T # f)),
1100 [then forall_i
-1101 (bind (T --> prop) x12 \
+1101 (bind (T --> prop) x12 \
1102 then forall_i
-1103 (bind T x13 \
+1103 (bind T x13 \
1104 then i
-1105 (then (conv dd)
-1106 (then forall_i
-1107 (bind prop x14 \ then i (then (lforall x13) (then apply h)))))))])
+1105 (then (conv dd)
+1106 (then forall_i
+1107 (bind prop x14 \ then i (then (lforall x13) (then apply h)))))))])
1108 , theorem eq_to_impl
-1109 ((! x13 \ ! x14 \ (x13 = x14) = ((x13 ==> x14) && (x14 ==> x13))),
-1110 [thenl inv [(bind prop x13 \ bind prop x14 \ then (conv (then sym h)) h),
-1111 (bind prop x13 \ bind prop x14 \ then (conv h) h),
-1112 (bind prop x13 \ bind prop x14 \ itaut 2),
-1113 (bind prop x13 \ bind prop x14 \ itaut 2)]])
+1109 ((! x13 \ ! x14 \ (x13 = x14) = ((x13 ==> x14) && (x14 ==> x13))),
+1110 [thenl inv [(bind prop x13 \ bind prop x14 \ then (conv (then sym h)) h),
+1111 (bind prop x13 \ bind prop x14 \ then (conv h) h),
+1112 (bind prop x13 \ bind prop x14 \ itaut 2),
+1113 (bind prop x13 \ bind prop x14 \ itaut 2)]])
1114
1115 /*********** Axiomatization of disjoint union ********/
-1116 , decl inj1_disj_union (pi A \pi B \ A --> disj_union ## A ## B)
-1117 , decl inj2_disj_union (pi A \ pi B \ B --> disj_union ## A ## B)
-1118 , decl case_disj_union (pi A \pi B \ pi C \ disj_union ## A ## B --> (A --> C) --> (B --> C) --> C)
-1119 , axiom case_disj_union_inj1 (pi A \ pi B \ pi C \ (! b \ ! (A --> C) e1 \ ! (B --> C) e2 \
-1120 case_disj_union ## A ## B ## C # (inj1_disj_union ## A ## B # b) # e1 # e2 = e1 # b))
-1121 , axiom case_disj_union_inj2 (pi A \ pi B \ pi C \ (! b \ ! (A --> C) e1 \ ! (B --> C) e2 \
-1122 case_disj_union ## A ## B ## C # (inj2_disj_union ## A ## B # b) # e1 # e2 = e2 # b))
+1116 , decl inj1_disj_union (pi A \pi B \ A --> disj_union ## A ## B)
+1117 , decl inj2_disj_union (pi A \ pi B \ B --> disj_union ## A ## B)
+1118 , decl case_disj_union (pi A \pi B \ pi C \ disj_union ## A ## B --> (A --> C) --> (B --> C) --> C)
+1119 , axiom case_disj_union_inj1 (pi A \ pi B \ pi C \ (! b \ ! (A --> C) e1 \ ! (B --> C) e2 \
+1120 case_disj_union ## A ## B ## C # (inj1_disj_union ## A ## B # b) # e1 # e2 = e1 # b))
+1121 , axiom case_disj_union_inj2 (pi A \ pi B \ pi C \ (! b \ ! (A --> C) e1 \ ! (B --> C) e2 \
+1122 case_disj_union ## A ## B ## C # (inj2_disj_union ## A ## B # b) # e1 # e2 = e2 # b))
1123
1124 /*********** Axiomatization of the universe ********/
-1125 , decl injection_univ (pi A \pi B \ A --> univ ## A ## B)
-1126 , decl ejection_univ (pi A \pi B \ univ ## A ## B --> A)
-1127 , decl inject_limit_univ (pi A \pi B \ (B --> univ ## A ## B) --> univ ## A ## B)
-1128 , decl eject_limit_univ (pi A \ pi B \ univ ## A ## B --> (B --> univ ## A ## B))
-1129 , decl pair_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B --> univ ## A ## B)
-1130 , decl proj1_univ (pi A \ pi B \ univ ## A ## B --> univ ## A ## B)
-1131 , decl proj2_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
-1132 , decl inj1_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
-1133 , decl inj2_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
-1134 , decl case_univ (pi A \pi B \ pi C \ univ ## A ## B --> (univ ## A ## B --> C) --> (univ ## A ## B --> C) --> C)
-1135 , axiom ejection_injection_univ (pi A \ pi B \
-1136 ! A p \ ejection_univ ## A ## B # (injection_univ ## A ## B # p) = p)
-1137 , axiom eject_inject_limit_univ (pi A \ pi B \
-1138 ! (B --> univ ## A ## B) p \ eject_limit_univ ## A ## B # (inject_limit_univ ## A ## B # p) = p)
-1139 , axiom proj1_pair_univ (pi A \ pi B \ ! (univ ## A ## B) p1 \ ! p2 \
-1140 proj1_univ ## A ## B # (pair_univ ## A ## B # p1 # p2) = p1)
-1141 , axiom proj2_pair_univ (pi A \ pi B \ ! p1 \ ! (univ ## A ## B) p2 \
-1142 proj2_univ ## A ## B # (pair_univ ## A ## B # p1 # p2) = p2)
-1143 , axiom case_univ_inj1 (pi A \ pi B \ pi C \ (! b \ ! (univ ## A ## B --> C) e1 \ ! e2 \
-1144 case_univ ## A ## B ## C # (inj1_univ ## A ## B # b) # e1 # e2 = e1 # b))
-1145 , axiom case_univ_inj2 (pi A \ pi B \ pi C \ (! b \ ! (univ ## A ## B --> C) e1 \ ! e2 \
-1146 case_univ ## A ## B ## C # (inj2_univ ## A ## B # b) # e1 # e2 = e2 # b))
+1125 , decl injection_univ (pi A \pi B \ A --> univ ## A ## B)
+1126 , decl ejection_univ (pi A \pi B \ univ ## A ## B --> A)
+1127 , decl inject_limit_univ (pi A \pi B \ (B --> univ ## A ## B) --> univ ## A ## B)
+1128 , decl eject_limit_univ (pi A \ pi B \ univ ## A ## B --> (B --> univ ## A ## B))
+1129 , decl pair_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B --> univ ## A ## B)
+1130 , decl proj1_univ (pi A \ pi B \ univ ## A ## B --> univ ## A ## B)
+1131 , decl proj2_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
+1132 , decl inj1_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
+1133 , decl inj2_univ (pi A \pi B \ univ ## A ## B --> univ ## A ## B)
+1134 , decl case_univ (pi A \pi B \ pi C \ univ ## A ## B --> (univ ## A ## B --> C) --> (univ ## A ## B --> C) --> C)
+1135 , axiom ejection_injection_univ (pi A \ pi B \
+1136 ! A p \ ejection_univ ## A ## B # (injection_univ ## A ## B # p) = p)
+1137 , axiom eject_inject_limit_univ (pi A \ pi B \
+1138 ! (B --> univ ## A ## B) p \ eject_limit_univ ## A ## B # (inject_limit_univ ## A ## B # p) = p)
+1139 , axiom proj1_pair_univ (pi A \ pi B \ ! (univ ## A ## B) p1 \ ! p2 \
+1140 proj1_univ ## A ## B # (pair_univ ## A ## B # p1 # p2) = p1)
+1141 , axiom proj2_pair_univ (pi A \ pi B \ ! p1 \ ! (univ ## A ## B) p2 \
+1142 proj2_univ ## A ## B # (pair_univ ## A ## B # p1 # p2) = p2)
+1143 , axiom case_univ_inj1 (pi A \ pi B \ pi C \ (! b \ ! (univ ## A ## B --> C) e1 \ ! e2 \
+1144 case_univ ## A ## B ## C # (inj1_univ ## A ## B # b) # e1 # e2 = e1 # b))
+1145 , axiom case_univ_inj2 (pi A \ pi B \ pi C \ (! b \ ! (univ ## A ## B --> C) e1 \ ! e2 \
+1146 case_univ ## A ## B ## C # (inj2_univ ## A ## B # b) # e1 # e2 = e2 # b))
1147
1148 /******************* Equality *****************/
-1149 , theorem eq_reflexive (pi A \ ((! A a \ a = a),
-1150 [ then forall_i (bind A x \ r) ]))
+1149 , theorem eq_reflexive (pi A \ ((! A a \ a = a),
+1150 [ then forall_i (bind A x \ r) ]))
1151
1152 /******************* Logic *****************/
-1153 , theorem or_commutative ((! a \ ! b \ a || b <=> b || a),
-1154 [itaut 1])
-1155 , theorem or_ff ((! a \ a || ff <=> a),
-1156 [itaut 1])
-1157 , theorem or_tt ((! a \ a || tt <=> tt),
-1158 [itaut 1])
-1159 , theorem or_idempotent ((! a \ a || a <=> a),
-1160 [itaut 1])
-1161 , theorem or_associative ((! a \ ! b \ ! c \ a || (b || c) <=> (a || b) || c),
-1162 [itaut 1])
-1163 , theorem and_commutative ((! a \ ! b \ a && b <=> b && a),
-1164 [itaut 1])
-1165 , theorem and_tt ((! a \ a && tt <=> a),
-1166 [itaut 1])
-1167 , theorem and_ff ((! a \ a && ff <=> ff),
-1168 [itaut 1])
-1169 , theorem and_idempotent ((! a \ a && a <=> a),
-1170 [itaut 1])
-1171 , theorem and_associative ((! a \ ! b \ ! c \ a && (b && c) <=> (a && b) && c),
-1172 [itaut 1])
-1173 , theorem and_or ((! a \ ! b \ ! c \ a && (b || c) <=> (a && b) || (a && c)),
-1174 [itaut 1])
-1175 , theorem or_and ((! a \ ! b \ ! c \ a || (b && c) <=> (a || b) && (a || c)),
-1176 [itaut 1])
-1177 , theorem ads_or_and ((! a \ ! b \ (a && b) || b <=> b),
-1178 [itaut 1])
-1179 , theorem ads_and_or ((! a \ ! b \ (a || b) && b <=> b),
-1180 [itaut 1])
-1181 , theorem not_or ((! a \ ! b \ not # a && not # b <=> not # (a || b)),
-1182 [itaut 2])
-1183 , theorem not_and ((! a \ ! b \ not # a || not # b ==> not # (a && b)),
-1184 [itaut 2])
-1185 , theorem not_not_not ((! p \ not # (not # (not # p)) <=> not # p),
-1186 [itaut 3])
-1187 , theorem impl_not_not ((! a \ ! b \ (a ==> b) ==> (not # b ==> not # a)),
-1188 [itaut 3])
-1189 , theorem eq_to_impl_f ((! p \ ! q \ (p <=> q) ==> p ==> q),
-1190 [itaut 2])
-1191 , theorem eq_to_impl_b ((! p \ ! q \ (p <=> q) ==> q ==> p),
-1192 [itaut 2])
+1153 , theorem or_commutative ((! a \ ! b \ a || b <=> b || a),
+1154 [itaut 1])
+1155 , theorem or_ff ((! a \ a || ff <=> a),
+1156 [itaut 1])
+1157 , theorem or_tt ((! a \ a || tt <=> tt),
+1158 [itaut 1])
+1159 , theorem or_idempotent ((! a \ a || a <=> a),
+1160 [itaut 1])
+1161 , theorem or_associative ((! a \ ! b \ ! c \ a || (b || c) <=> (a || b) || c),
+1162 [itaut 1])
+1163 , theorem and_commutative ((! a \ ! b \ a && b <=> b && a),
+1164 [itaut 1])
+1165 , theorem and_tt ((! a \ a && tt <=> a),
+1166 [itaut 1])
+1167 , theorem and_ff ((! a \ a && ff <=> ff),
+1168 [itaut 1])
+1169 , theorem and_idempotent ((! a \ a && a <=> a),
+1170 [itaut 1])
+1171 , theorem and_associative ((! a \ ! b \ ! c \ a && (b && c) <=> (a && b) && c),
+1172 [itaut 1])
+1173 , theorem and_or ((! a \ ! b \ ! c \ a && (b || c) <=> (a && b) || (a && c)),
+1174 [itaut 1])
+1175 , theorem or_and ((! a \ ! b \ ! c \ a || (b && c) <=> (a || b) && (a || c)),
+1176 [itaut 1])
+1177 , theorem ads_or_and ((! a \ ! b \ (a && b) || b <=> b),
+1178 [itaut 1])
+1179 , theorem ads_and_or ((! a \ ! b \ (a || b) && b <=> b),
+1180 [itaut 1])
+1181 , theorem not_or ((! a \ ! b \ not # a && not # b <=> not # (a || b)),
+1182 [itaut 2])
+1183 , theorem not_and ((! a \ ! b \ not # a || not # b ==> not # (a && b)),
+1184 [itaut 2])
+1185 , theorem not_not_not ((! p \ not # (not # (not # p)) <=> not # p),
+1186 [itaut 3])
+1187 , theorem impl_not_not ((! a \ ! b \ (a ==> b) ==> (not # b ==> not # a)),
+1188 [itaut 3])
+1189 , theorem eq_to_impl_f ((! p \ ! q \ (p <=> q) ==> p ==> q),
+1190 [itaut 2])
+1191 , theorem eq_to_impl_b ((! p \ ! q \ (p <=> q) ==> q ==> p),
+1192 [itaut 2])
1193
1194/*************** Properties inj/disj/univ ***********/
1195 , theorem pair_univ_inj_l
-1196 (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ ! x22 \ ! x23 \ pair_univ ## A ## B # x20 # x22 = pair_univ ## A ## B # x21 # x23 ==> x20 = x21) ,
-1197 [then (repeat forall_i)
-1198 (bind (univ ## A ## B) x22 \
-1199 bind (univ ## A ## B) x23 \
-1200 bind (univ ## A ## B) x24 \
-1201 bind (univ ## A ## B) x25 \
+1196 (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ ! x22 \ ! x23 \ pair_univ ## A ## B # x20 # x22 = pair_univ ## A ## B # x21 # x23 ==> x20 = x21) ,
+1197 [then (repeat forall_i)
+1198 (bind (univ ## A ## B) x22 \
+1199 bind (univ ## A ## B) x23 \
+1200 bind (univ ## A ## B) x24 \
+1201 bind (univ ## A ## B) x25 \
1202 then i
-1203 (then (cutth proj1_pair_univ)
-1204 (then (lforall x22)
-1205 (then (conv (land_tac (then sym apply)))
-1206 (then (conv (depth_tac h)) (applyth proj1_pair_univ))))))])
+1203 (then (cutth proj1_pair_univ)
+1204 (then (lforall x22)
+1205 (then (conv (land_tac (then sym apply)))
+1206 (then (conv (depth_tac h)) (applyth proj1_pair_univ))))))])
1207 , theorem pair_univ_inj_r
-1208 (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ ! x22 \ ! x23 \ pair_univ ## A ## B # x20 # x22 = pair_univ ## A ## B # x21 # x23 ==> x22 = x23) ,
-1209 [then (repeat forall_i)
-1210 (bind (univ ## A ## B) x22 \
-1211 bind (univ ## A ## B) x23 \
-1212 bind (univ ## A ## B) x24 \
-1213 bind (univ ## A ## B) x25 \
+1208 (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ ! x22 \ ! x23 \ pair_univ ## A ## B # x20 # x22 = pair_univ ## A ## B # x21 # x23 ==> x22 = x23) ,
+1209 [then (repeat forall_i)
+1210 (bind (univ ## A ## B) x22 \
+1211 bind (univ ## A ## B) x23 \
+1212 bind (univ ## A ## B) x24 \
+1213 bind (univ ## A ## B) x25 \
1214 then i
-1215 (then (cutth proj2_pair_univ)
-1216 (then (lforall x22)
-1217 (then (conv (land_tac (then sym apply)))
-1218 (then (conv (depth_tac h)) (applyth proj2_pair_univ))))))])
+1215 (then (cutth proj2_pair_univ)
+1216 (then (lforall x22)
+1217 (then (conv (land_tac (then sym apply)))
+1218 (then (conv (depth_tac h)) (applyth proj2_pair_univ))))))])
1219 , theorem injection_univ_inj
-1220 (pi A \ pi B \ (! A x20 \ ! x21 \ injection_univ ## A ## B # x20 = injection_univ ## A ## B # x21 ==> x20 = x21) ,
+1220 (pi A \ pi B \ (! A x20 \ ! x21 \ injection_univ ## A ## B # x20 = injection_univ ## A ## B # x21 ==> x20 = x21) ,
1221 [then forall_i
-1222 (bind A x20 \
+1222 (bind A x20 \
1223 then forall_i
-1224 (bind A x21 \
-1225 then (then (cutth ejection_injection_univ) (lforall x21))
-1226 (then (then (cutth ejection_injection_univ) (lforall x20))
-1227 (then i
-1228 (thenl
-1229 (cut
-1230 (ejection_univ ## A ## B # (injection_univ ## A ## B # x20) =
-1231 ejection_univ ## A ## B # (injection_univ ## A ## B # x21)))
+1224 (bind A x21 \
+1225 then (then (cutth ejection_injection_univ) (lforall x21))
+1226 (then (then (cutth ejection_injection_univ) (lforall x20))
+1227 (then i
+1228 (thenl
+1229 (cut
+1230 (ejection_univ ## A ## B # (injection_univ ## A ## B # x20) =
+1231 ejection_univ ## A ## B # (injection_univ ## A ## B # x21)))
1232 [thenl
-1233 (cut
-1234 ((ejection_univ ## A ## B # (injection_univ ## A ## B # x20) =
-1235 ejection_univ ## A ## B # (injection_univ ## A ## B # x21)) =
-1236 (x20 = x21)))
-1237 [then (conv (depth_tac (then sym h))) h,
-1238 thenl c [thenl c [r, h], h]], thenl c [r, h]])))))])
+1233 (cut
+1234 ((ejection_univ ## A ## B # (injection_univ ## A ## B # x20) =
+1235 ejection_univ ## A ## B # (injection_univ ## A ## B # x21)) =
+1236 (x20 = x21)))
+1237 [then (conv (depth_tac (then sym h))) h,
+1238 thenl c [thenl c [r, h], h]], thenl c [r, h]])))))])
1239 , theorem inj1_univ_inj
-1240 (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ inj1_univ ## A ## B # x20 = inj1_univ ## A ## B # x21 ==> x20 = x21) ,
+1240 (pi A \ pi B \ (! (univ ## A ## B) x20 \ ! x21 \ inj1_univ ## A ## B # x20 = inj1_univ ## A ## B # x21 ==> x20 = x21) ,
1241 [then inv
-1242 (bind (univ ## A ## B) x20 \ bind (univ ## A ## B) x21 \
-1243 thenl (t (case_univ ## A ## B ## (univ ## A ## B) # (inj1_univ ## A ## B # x20) '
-1244 (lam (univ ## A ## B) x22 \ x22) '
-1245 (lam (univ ## A ## B) x22 \ x22)))
+1242 (bind (univ ## A ## B) x20 \ bind (univ ## A ## B) x21 \
+1243 thenl (t (case_univ ## A ## B ## (univ ## A ## B) # (inj1_univ ## A ## B # x20) '
+1244 (lam (univ ## A ## B) x22 \ x22) '
+1245 (lam (univ ## A ## B) x22 \ x22)))
1246 [then sym
-1247 (then (conv (land_tac (applyth case_univ_inj1)))
-1248 (then (conv (land_tac b)) r)),
-1249 then (conv (depth_tac h))
-1250 (then (conv (land_tac (applyth case_univ_inj1)))
-1251 (then (conv (land_tac b)) r))])])
+1247 (then (conv (land_tac (applyth case_univ_inj1)))
+1248 (then (conv (land_tac b)) r)),
+1249 then (conv (depth_tac h))
+1250 (then (conv (land_tac (applyth case_univ_inj1)))
+1251 (then (conv (land_tac b)) r))])])
1252 , theorem inj2_univ_inj
-1253 (pi A \ pi B \ (! (univ ## A ## B) x22 \ ! x23 \ inj2_univ ## A ## B # x22 = inj2_univ ## A ## B # x23 ==> x22 = x23) ,
+1253 (pi A \ pi B \ (! (univ ## A ## B) x22 \ ! x23 \ inj2_univ ## A ## B # x22 = inj2_univ ## A ## B # x23 ==> x22 = x23) ,
1254 [then inv
-1255 (bind (univ ## A ## B) x20 \ bind (univ ## A ## B) x21 \
-1256 thenl (t (case_univ ## A ## B ## (univ ## A ## B) # (inj2_univ ## A ## B # x20) '
-1257 (lam (univ ## A ## B) x22 \ x22) '
-1258 (lam (univ ## A ## B) x22 \ x22)))
+1255 (bind (univ ## A ## B) x20 \ bind (univ ## A ## B) x21 \
+1256 thenl (t (case_univ ## A ## B ## (univ ## A ## B) # (inj2_univ ## A ## B # x20) '
+1257 (lam (univ ## A ## B) x22 \ x22) '
+1258 (lam (univ ## A ## B) x22 \ x22)))
1259 [then sym
-1260 (then (conv (land_tac (applyth case_univ_inj2)))
-1261 (then (conv (land_tac b)) r)),
-1262 then (conv (depth_tac h))
-1263 (then (conv (land_tac (applyth case_univ_inj2)))
-1264 (then (conv (land_tac b)) r))])])
+1260 (then (conv (land_tac (applyth case_univ_inj2)))
+1261 (then (conv (land_tac b)) r)),
+1262 then (conv (depth_tac h))
+1263 (then (conv (land_tac (applyth case_univ_inj2)))
+1264 (then (conv (land_tac b)) r))])])
1265 , theorem not_eq_inj1_inj2_univ
-1266 (pi A \ pi B \ (! (univ ## A ## B) x22 \ ! x23 \ inj1_univ ## A ## B # x22 = inj2_univ ## A ## B # x23 ==> ff) ,
+1266 (pi A \ pi B \ (! (univ ## A ## B) x22 \ ! x23 \ inj1_univ ## A ## B # x22 = inj2_univ ## A ## B # x23 ==> ff) ,
1267 [then inv
-1268 (bind (univ ## A ## B) x22 \
-1269 bind (univ ## A ## B) x23 \
-1270 then (cutth case_univ_inj1)
-1271 (then (lforall x22)
-1272 (then (lforall (lam (univ ## A ## B) x24 \ ff))
-1273 (then (lforall (lam (univ ## A ## B) x24 \ tt))
-1274 (thenl (m ((lam (univ ## A ## B) x24 \ ff) # x22)) [b,
-1275 then (conv (then sym h))
-1276 (then (wl [])
-1277 (then (conv (depth_tac h))
-1278 (then (wl [])
-1279 (then (conv (applyth case_univ_inj2))
-1280 (then (conv b) (itaut 1))))))])))))])
-1281 , theorem inj1_disj_union_inj (pi A \ pi B \
-1282 ((! x \ ! y \
-1283 inj1_disj_union ## A ## B # x = inj1_disj_union ## A ## B # y ==> x = y) ,
+1268 (bind (univ ## A ## B) x22 \
+1269 bind (univ ## A ## B) x23 \
+1270 then (cutth case_univ_inj1)
+1271 (then (lforall x22)
+1272 (then (lforall (lam (univ ## A ## B) x24 \ ff))
+1273 (then (lforall (lam (univ ## A ## B) x24 \ tt))
+1274 (thenl (m ((lam (univ ## A ## B) x24 \ ff) # x22)) [b,
+1275 then (conv (then sym h))
+1276 (then (wl [])
+1277 (then (conv (depth_tac h))
+1278 (then (wl [])
+1279 (then (conv (applyth case_univ_inj2))
+1280 (then (conv b) (itaut 1))))))])))))])
+1281 , theorem inj1_disj_union_inj (pi A \ pi B \
+1282 ((! x \ ! y \
+1283 inj1_disj_union ## A ## B # x = inj1_disj_union ## A ## B # y ==> x = y) ,
1284 [then inv
-1285 (bind A x23 \
+1285 (bind A x23 \
1286 bind A x24 \
-1287 then (cutth case_disj_union_inj1)
-1288 (then (lforall x23)
-1289 (then (lforall (lam A x25 \ x25))
-1290 (then (lforall (lam B x25 \ choose ## A))
-1291 (thenl (t ((lam A x25 \ x25) # x23))
-1292 [then (conv (rand_tac b)) r,
-1293 then (conv (land_tac (then sym h)))
-1294 (then (wl [])
-1295 (then (conv (depth_tac h))
-1296 (then (wl [])
-1297 (then (conv (land_tac (applyth case_disj_union_inj1)))
-1298 b))))])))))]))
-1299 , theorem inj2_disj_union_inj (pi A \ pi B \
-1300 ((! x \ ! y \
-1301 inj2_disj_union ## A ## B # x = inj2_disj_union ## A ## B # y ==> x = y) ,
+1287 then (cutth case_disj_union_inj1)
+1288 (then (lforall x23)
+1289 (then (lforall (lam A x25 \ x25))
+1290 (then (lforall (lam B x25 \ choose ## A))
+1291 (thenl (t ((lam A x25 \ x25) # x23))
+1292 [then (conv (rand_tac b)) r,
+1293 then (conv (land_tac (then sym h)))
+1294 (then (wl [])
+1295 (then (conv (depth_tac h))
+1296 (then (wl [])
+1297 (then (conv (land_tac (applyth case_disj_union_inj1)))
+1298 b))))])))))]))
+1299 , theorem inj2_disj_union_inj (pi A \ pi B \
+1300 ((! x \ ! y \
+1301 inj2_disj_union ## A ## B # x = inj2_disj_union ## A ## B # y ==> x = y) ,
1302 [then inv
-1303 (bind B x23 \
+1303 (bind B x23 \
1304 bind B x24 \
-1305 then (cutth case_disj_union_inj2)
-1306 (then (lforall x23)
-1307 (then (lforall (lam A x25 \ choose ## B))
-1308 (then (lforall (lam B x25 \ x25))
-1309 (thenl (t ((lam B x25 \ x25) # x23))
-1310 [then (conv (rand_tac b)) r,
-1311 then (conv (land_tac (then sym h)))
-1312 (then (wl [])
-1313 (then (conv (depth_tac h))
-1314 (then (wl [])
-1315 (then (conv (land_tac (applyth case_disj_union_inj2)))
-1316 b))))])))))]))
+1305 then (cutth case_disj_union_inj2)
+1306 (then (lforall x23)
+1307 (then (lforall (lam A x25 \ choose ## B))
+1308 (then (lforall (lam B x25 \ x25))
+1309 (thenl (t ((lam B x25 \ x25) # x23))
+1310 [then (conv (rand_tac b)) r,
+1311 then (conv (land_tac (then sym h)))
+1312 (then (wl [])
+1313 (then (conv (depth_tac h))
+1314 (then (wl [])
+1315 (then (conv (land_tac (applyth case_disj_union_inj2)))
+1316 b))))])))))]))
1317
1318 /********** Monotonicity of logical connectives *********/
-1319 , theorem and_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
-1320 (a1 ==> b1) ==> (a2 ==> b2) ==> a1 && a2 ==> b1 && b2),
-1321 [itaut 2])
-1322 , theorem or_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
-1323 (a1 ==> b1) ==> (a2 ==> b2) ==> a1 || a2 ==> b1 || b2),
-1324 [itaut 2])
-1325 , theorem impl_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
-1326 (b1 ==> a1) ==> (a2 ==> b2) ==> (a1 ==> a2) ==> (b1 ==> b2)),
-1327 [itaut 3])
-1328 , theorem not_monotone ((! p \ ! q \ (p ==> q) ==> (not # q) ==> (not # p)),
-1329 [itaut 3])
-1330 , theorem forall_monotone (pi A \ (! p \ ! q \
-1331 (! A x \ p # x ==> q # x) ==> (! x \ p # x) ==> (! x \ q # x)),
-1332 [itaut 6])
-1333 , theorem exists_monotone (pi A \ (! p \ ! q \
-1334 (! A x \ p # x ==> q # x) ==> (? x \ p # x) ==> (? x \ q # x)),
-1335 [itaut 6])
+1319 , theorem and_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
+1320 (a1 ==> b1) ==> (a2 ==> b2) ==> a1 && a2 ==> b1 && b2),
+1321 [itaut 2])
+1322 , theorem or_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
+1323 (a1 ==> b1) ==> (a2 ==> b2) ==> a1 || a2 ==> b1 || b2),
+1324 [itaut 2])
+1325 , theorem impl_monotone ((! a1 \ ! b1 \ ! a2 \ ! b2 \
+1326 (b1 ==> a1) ==> (a2 ==> b2) ==> (a1 ==> a2) ==> (b1 ==> b2)),
+1327 [itaut 3])
+1328 , theorem not_monotone ((! p \ ! q \ (p ==> q) ==> (not # q) ==> (not # p)),
+1329 [itaut 3])
+1330 , theorem forall_monotone (pi A \ (! p \ ! q \
+1331 (! A x \ p # x ==> q # x) ==> (! x \ p # x) ==> (! x \ q # x)),
+1332 [itaut 6])
+1333 , theorem exists_monotone (pi A \ (! p \ ! q \
+1334 (! A x \ p # x ==> q # x) ==> (? x \ p # x) ==> (? x \ q # x)),
+1335 [itaut 6])
1336
1337 /********** Knaster-Tarski theorem *********/
-1338 , def in (pi A \ (A --> (A --> prop) --> prop),
-1339 (lam A x \ lam (A --> prop) j \ j # x))
-1340 , def subseteq (pi A \ ((A --> prop) --> (A --> prop) --> prop),
-1341 (lam (A --> prop) x \ lam (A --> prop) y \ ! z \ z #in x ==> z #in y))
-1342 , theorem in_subseteq (pi A \
-1343 (! s \ ! t \ ! x \ s <<= t ==> x #in s ==> x #in t),
+1338 , def in (pi A \ (A --> (A --> prop) --> prop),
+1339 (lam A x \ lam (A --> prop) j \ j # x))
+1340 , def subseteq (pi A \ ((A --> prop) --> (A --> prop) --> prop),
+1341 (lam (A --> prop) x \ lam (A --> prop) y \ ! z \ z #in x ==> z #in y))
+1342 , theorem in_subseteq (pi A \
+1343 (! s \ ! t \ ! x \ s <<= t ==> x #in s ==> x #in t),
1344 [then forall_i
-1345 (bind (A --> prop) x9 \
+1345 (bind (A --> prop) x9 \
1346 then forall_i
-1347 (bind (A --> prop) x10 \
-1348 then forall_i (bind A x11 \ then (conv (land_tac dd)) (itaut 4))))])
-1349 , def monotone (pi A \ (((A --> prop) --> (A --> prop)) --> prop),
-1350 (lam (_ A) f \ ! x \ ! y \ x <<= y ==> f # x <<= f # y))
-1351 , def is_fixpoint (pi A \ (((A --> prop) --> (A --> prop)) --> ((A --> prop) --> prop)),
-1352 (lam (_ A) f \ lam (_ A) x \ (f # x) <<= x && x <<= (f # x)))
-1353 , def fixpoint (pi A \ (((A --> prop) --> (A --> prop)) --> (A --> prop)),
-1354 (lam (_ A) f \ lam A a \ ! e \ f # e <<= e ==> a #in e))
-1355 , theorem fixpoint_subseteq_any_prefixpoint (pi A \
-1356 (! f \ ! x\ f # x <<= x ==> fixpoint ## A # f <<= x),
+1347 (bind (A --> prop) x10 \
+1348 then forall_i (bind A x11 \ then (conv (land_tac dd)) (itaut 4))))])
+1349 , def monotone (pi A \ (((A --> prop) --> (A --> prop)) --> prop),
+1350 (lam (_ A) f \ ! x \ ! y \ x <<= y ==> f # x <<= f # y))
+1351 , def is_fixpoint (pi A \ (((A --> prop) --> (A --> prop)) --> ((A --> prop) --> prop)),
+1352 (lam (_ A) f \ lam (_ A) x \ (f # x) <<= x && x <<= (f # x)))
+1353 , def fixpoint (pi A \ (((A --> prop) --> (A --> prop)) --> (A --> prop)),
+1354 (lam (_ A) f \ lam A a \ ! e \ f # e <<= e ==> a #in e))
+1355 , theorem fixpoint_subseteq_any_prefixpoint (pi A \
+1356 (! f \ ! x\ f # x <<= x ==> fixpoint ## A # f <<= x),
1357 [then inv
-1358 (bind ((A --> prop) --> (A --> prop)) x9 \
-1359 (bind (A --> prop) x10 \
-1360 then (conv (land_tac dd))
-1361 (then (conv dd)
-1362 (then forall_i
-1363 (bind A x11 \
-1364 then (conv (land_tac dd))
-1365 (then (conv (land_tac b)) (itaut 4)))))))])
-1366 , theorem fixpoint_subseteq_any_fixpoint (pi A \
-1367 (! f \ ! x\ is_fixpoint ## A # f # x ==> fixpoint ## A # f <<= x),
+1358 (bind ((A --> prop) --> (A --> prop)) x9 \
+1359 (bind (A --> prop) x10 \
+1360 then (conv (land_tac dd))
+1361 (then (conv dd)
+1362 (then forall_i
+1363 (bind A x11 \
+1364 then (conv (land_tac dd))
+1365 (then (conv (land_tac b)) (itaut 4)))))))])
+1366 , theorem fixpoint_subseteq_any_fixpoint (pi A \
+1367 (! f \ ! x\ is_fixpoint ## A # f # x ==> fixpoint ## A # f <<= x),
1368 [then forall_i
-1369 (bind ((A --> prop) --> (A --> prop)) x9 \
+1369 (bind ((A --> prop) --> (A --> prop)) x9 \
1370 then forall_i
-1371 (bind (A --> prop) x10 \
-1372 then (conv (land_tac dd))
-1373 (then (cutth fixpoint_subseteq_any_prefixpoint) (itaut 8))))])
-1374 , theorem prefixpoint_to_prefixpoint (pi A \
-1375 (! f \ ! x \ monotone ## A # f ==> f # x <<= x ==> f # (f # x) <<= f # x),
+1371 (bind (A --> prop) x10 \
+1372 then (conv (land_tac dd))
+1373 (then (cutth fixpoint_subseteq_any_prefixpoint) (itaut 8))))])
+1374 , theorem prefixpoint_to_prefixpoint (pi A \
+1375 (! f \ ! x \ monotone ## A # f ==> f # x <<= x ==> f # (f # x) <<= f # x),
1376 [then forall_i
-1377 (bind ((A --> prop) --> (A --> prop)) x9 \
+1377 (bind ((A --> prop) --> (A --> prop)) x9 \
1378 then forall_i
-1379 (bind (A --> prop) x10 \ then (conv (land_tac dd)) (itaut 6)))])
-1380 , theorem fixpoint_is_prefixpoint (pi A \
-1381 (! f \ monotone ## A # f ==> f # (fixpoint ## A # f)<<= fixpoint ## A # f),
+1379 (bind (A --> prop) x10 \ then (conv (land_tac dd)) (itaut 6)))])
+1380 , theorem fixpoint_is_prefixpoint (pi A \
+1381 (! f \ monotone ## A # f ==> f # (fixpoint ## A # f)<<= fixpoint ## A # f),
1382 [then inv
-1383 (bind ((A --> prop) --> (A --> prop)) x9 \
-1384 then (conv dd)
-1385 (then inv
-1386 (bind A x10 \
-1387 then (conv (depth_tac (dd [fixpoint])))
-1388 (then (conv dd)
-1389 (then (conv b)
-1390 (then inv
-1391 (bind (A --> prop) x11 \
-1392 thenl (cut (fixpoint ## A # x9 <<= x11))
+1383 (bind ((A --> prop) --> (A --> prop)) x9 \
+1384 then (conv dd)
+1385 (then inv
+1386 (bind A x10 \
+1387 then (conv (depth_tac (dd [fixpoint])))
+1388 (then (conv dd)
+1389 (then (conv b)
+1390 (then inv
+1391 (bind (A --> prop) x11 \
+1392 thenl (cut (fixpoint ## A # x9 <<= x11))
1393 [thenl
-1394 (cut (x9 # (fixpoint ## A # x9) <<= x9 # x11))
-1395 [then (cutth in_subseteq)
-1396 (then (lforall_last (x9 # x11))
-1397 (then (lforall_last x11)
-1398 (thenl apply_last [h,
-1399 then (cutth in_subseteq) (itaut 10)]))),
+1394 (cut (x9 # (fixpoint ## A # x9) <<= x9 # x11))
+1395 [then (cutth in_subseteq)
+1396 (then (lforall_last (x9 # x11))
+1397 (then (lforall_last x11)
+1398 (thenl apply_last [h,
+1399 then (cutth in_subseteq) (itaut 10)]))),
1400 thenl
-1401 (m (monotone ## A # x9 ==> x9 # (fixpoint ## A # x9) <<= x9 # x11))
-1402 [itaut 10, then (conv (land_tac dd)) (itaut 10)]],
-1403 then (applyth fixpoint_subseteq_any_prefixpoint) h])))))))])
-1404 , theorem fixpoint_is_fixpoint (pi A \
-1405 (! f \ monotone ## A # f ==> is_fixpoint ## A # f # (fixpoint ## A # f)),
+1401 (m (monotone ## A # x9 ==> x9 # (fixpoint ## A # x9) <<= x9 # x11))
+1402 [itaut 10, then (conv (land_tac dd)) (itaut 10)]],
+1403 then (applyth fixpoint_subseteq_any_prefixpoint) h])))))))])
+1404 , theorem fixpoint_is_fixpoint (pi A \
+1405 (! f \ monotone ## A # f ==> is_fixpoint ## A # f # (fixpoint ## A # f)),
1406 [then inv
-1407 (bind ((A --> prop) --> (A --> prop)) x9 \
-1408 then (conv (depth_tac (dd [is_fixpoint])))
-1409 (thenl inv [then (applyth fixpoint_is_prefixpoint) h,
-1410 then (applyth fixpoint_subseteq_any_prefixpoint)
-1411 (then (g (monotone ## A # x9))
-1412 (then (conv (land_tac dd))
-1413 (then inv
-1414 (then apply (then (applyth fixpoint_is_prefixpoint) h)))))]))])
+1407 (bind ((A --> prop) --> (A --> prop)) x9 \
+1408 then (conv (depth_tac (dd [is_fixpoint])))
+1409 (thenl inv [then (applyth fixpoint_is_prefixpoint) h,
+1410 then (applyth fixpoint_subseteq_any_prefixpoint)
+1411 (then (g (monotone ## A # x9))
+1412 (then (conv (land_tac dd))
+1413 (then inv
+1414 (then apply (then (applyth fixpoint_is_prefixpoint) h)))))]))])
1415
1416 /*********** Axiomatization of well-founded recursion ********/
-1417 , decl rec (pi A \pi B \ ((A --> B) --> (A --> B)) --> (A --> B))
+1417 , decl rec (pi A \pi B \ ((A --> B) --> (A --> B)) --> (A --> B))
1418 , inductive_def acc accF accF_monotone acc_i0 acc_e0 acc_e
-1419 (pi A \ param (A --> A --> prop) lt \ acc \
-1420 [ (acc_i, ! x \ (! y \ lt # y # x ==> acc # y) ==> acc # x) ])
+1419 (pi A \ param (A --> A --> prop) lt \ acc \
+1420 [ (acc_i, ! x \ (! y \ lt # y # x ==> acc # y) ==> acc # x) ])
1421
-1422 , def well_founded (pi A \ ((A --> A --> prop) --> prop,
-1423 lam (_ A) lt \ ! x \ acc ## A # lt # x))
+1422 , def well_founded (pi A \ ((A --> A --> prop) --> prop,
+1423 lam (_ A) lt \ ! x \ acc ## A # lt # x))
1424
-1425 , axiom rec_is_fixpoint (pi A \ pi B \
-1426 (! lt \ well_founded ## A # lt ==>
-1427 ! ((A --> B) --> (A --> B)) h \
-1428 (! f \ ! g \ ! i \
-1429 (! p \ lt # p # i ==> f # p = g # p) ==> h # f # i = h # g # i) ==>
-1430 rec ## A ## B # h = h # (rec ## A ## B # h)))
+1425 , axiom rec_is_fixpoint (pi A \ pi B \
+1426 (! lt \ well_founded ## A # lt ==>
+1427 ! ((A --> B) --> (A --> B)) h \
+1428 (! f \ ! g \ ! i \
+1429 (! p \ lt # p # i ==> f # p = g # p) ==> h # f # i = h # g # i) ==>
+1430 rec ## A ## B # h = h # (rec ## A ## B # h)))
1431 /******************* TESTS *****************/
1432 /* The first three tests are commented out because they require extra-hacks
-1433 in the kernel to avoid quantifying over p, q and g.
-1434 , theorem test_apply (p ==> (p ==> p ==> q) ==> q,
-1435 [then i (then i (then apply h))])
-1436 , theorem test_apply2 (p ==> (! x \ ! y \ x ==> x ==> y) ==> q,
-1437 [then i (then i (then apply h))])
-1438 , theorem test_itaut_1 (((? x \ g x) ==> ! x \ (! y \ g y ==> x) ==> x),
-1439 [itaut 4])*/
-1440 , theorem test_monotone1 (monotone ## _ # (lam _ p \ lam _ x \ not # (p # x) ==> tt && p # tt || p # x),
-1441 [ auto_monotone ])
-1442 , theorem test_monotone2 (monotone ## _ # (lam _ p \ lam _ x \ ? z \ not # (p # x) ==> tt && p # tt || z),
-1443 [ auto_monotone ])
-1444 , theorem test_monotone3 (monotone ## _ # (lam _ p \ lam _ x \ ! z \ ? y \ (not # (p # x) ==> z && p # y || y)),
-1445 [ auto_monotone ])
-1446 , inductive_def pnn pnnF pnnF_monotone pnn_i pnn_e0 pnn_e (pnn \
-1447 [ (pnn_tt, pnn # tt)
-1448 , (pnn_not, ! x \ pnn # x ==> pnn # (not # x))])
+1433 in the kernel to avoid quantifying over p, q and g.
+1434 , theorem test_apply (p ==> (p ==> p ==> q) ==> q,
+1435 [then i (then i (then apply h))])
+1436 , theorem test_apply2 (p ==> (! x \ ! y \ x ==> x ==> y) ==> q,
+1437 [then i (then i (then apply h))])
+1438 , theorem test_itaut_1 (((? x \ g x) ==> ! x \ (! y \ g y ==> x) ==> x),
+1439 [itaut 4])*/
+1440 , theorem test_monotone1 (monotone ## _ # (lam _ p \ lam _ x \ not # (p # x) ==> tt && p # tt || p # x),
+1441 [ auto_monotone ])
+1442 , theorem test_monotone2 (monotone ## _ # (lam _ p \ lam _ x \ ? z \ not # (p # x) ==> tt && p # tt || z),
+1443 [ auto_monotone ])
+1444 , theorem test_monotone3 (monotone ## _ # (lam _ p \ lam _ x \ ! z \ ? y \ (not # (p # x) ==> z && p # y || y)),
+1445 [ auto_monotone ])
+1446 , inductive_def pnn pnnF pnnF_monotone pnn_i pnn_e0 pnn_e (pnn \
+1447 [ (pnn_tt, pnn # tt)
+1448 , (pnn_not, ! x \ pnn # x ==> pnn # (not # x))])
1449 , theorem pnn_e
-1450 ((! x13 \
-1451 x13 # tt && (! x14 \ x13 # x14 ==> x13 # (not # x14)) ==>
-1452 (! x14 \ pnn # x14 ==> x13 # x14)) ,
+1450 ((! x13 \
+1451 x13 # tt && (! x14 \ x13 # x14 ==> x13 # (not # x14)) ==>
+1452 (! x14 \ pnn # x14 ==> x13 # x14)) ,
1453 [then forall_i
-1454 (bind (prop --> prop) x13 \
-1455 then (cutth pnn_e0)
-1456 (then (lforall x13)
-1457 (then i
-1458 (thenl lapply
-1459 [then (conv (depth_tac (dd [pnnF])))
-1460 (then forall_i
-1461 (bind prop x14 \
+1454 (bind (prop --> prop) x13 \
+1455 then (cutth pnn_e0)
+1456 (then (lforall x13)
+1457 (then i
+1458 (thenl lapply
+1459 [then (conv (depth_tac (dd [pnnF])))
+1460 (then forall_i
+1461 (bind prop x14 \
1462 then i
1463 % from now on the proof is ad-hoc + fragile
-1464 (thenl left [then (conv (depth_tac h)) (itaut 1),
+1464 (thenl left [then (conv (depth_tac h)) (itaut 1),
1465 then left
-1466 (bind prop x15 \
-1467 then left (then (conv (depth_tac h)) (itaut 8)))]))),
-1468 h]))))])
+1466 (bind prop x15 \
+1467 then left (then (conv (depth_tac h)) (itaut 8)))]))),
+1468 h]))))])
1469 , theorem pnn_has_two_values
-1470 ((! x13 \ pnn # x13 ==> x13 = tt || x13 = ff) ,
+1470 ((! x13 \ pnn # x13 ==> x13 = tt || x13 = ff) ,
1471 % applying an elimination principle is hard: it should be automatized
-1472 [then (cutth pnn_e)
-1473 (then (lforall (lam prop x13 \ or # (eq ## prop # x13 # tt) # (eq ## prop # x13 # ff)))
-1474 (thenl lapply
-1475 [thenl conj [then (conv b) (itaut 1),
-1476 then (repeat (conv (depth_tac b)))
-1477 (then forall_i (bind prop x13 \ then i (then left (itaut 8))))],
+1472 [then (cutth pnn_e)
+1473 (then (lforall (lam prop x13 \ or # (eq ## prop # x13 # tt) # (eq ## prop # x13 # ff)))
+1474 (thenl lapply
+1475 [thenl conj [then (conv b) (itaut 1),
+1476 then (repeat (conv (depth_tac b)))
+1477 (then forall_i (bind prop x13 \ then i (then left (itaut 8))))],
1478 then inv
-1479 (bind prop x13 \
-1480 then (lforall x13)
-1481 (thenl lapply [h,
+1479 (bind prop x13 \
+1480 then (lforall x13)
+1481 (thenl lapply [h,
1482 then
-1483 (g
-1484 ((lam prop x14 \ or # (eq ## prop # x14 # tt) # (eq ## prop # x14 # ff)) '
-1485 x13))
-1486 (then (repeat (conv (depth_tac b)))
-1487 (then
-1488 (w
-1489 ((lam prop x14 \ or # (eq ## prop # x14 # tt) # (eq ## prop # x14 # ff))
-1490 # x13)) (then (w (pnn # x13)) (itaut 2))))]))]))])
-1491 , inductive_def in_two in_twoF in_twoF_monotone in_two_i in_two_e0 in_two_e (in_two \
-1492 [ (in_two_tt, in_two # tt)
-1493 , (in_two_ff, in_two # ff) ])
+1483 (g
+1484 ((lam prop x14 \ or # (eq ## prop # x14 # tt) # (eq ## prop # x14 # ff)) '
+1485 x13))
+1486 (then (repeat (conv (depth_tac b)))
+1487 (then
+1488 (w
+1489 ((lam prop x14 \ or # (eq ## prop # x14 # tt) # (eq ## prop # x14 # ff))
+1490 # x13)) (then (w (pnn # x13)) (itaut 2))))]))]))])
+1491 , inductive_def in_two in_twoF in_twoF_monotone in_two_i in_two_e0 in_two_e (in_two \
+1492 [ (in_two_tt, in_two # tt)
+1493 , (in_two_ff, in_two # ff) ])
1494 , new_basic_type bool2 myrep2 myabs2 myrepabs2 myabsrep2 myproprep2
-1495 (pnn,
-1496 [then (cutth pnn_tt) (then (applyth exists_i) h)])
-1497 , def mytt (bool2,(myabs2 # tt))
-1498 , def mynot ((bool2 --> bool2),(lam _ x \ myabs2 # (not # (myrep2 # x))))
+1495 (pnn,
+1496 [then (cutth pnn_tt) (then (applyth exists_i) h)])
+1497 , def mytt (bool2,(myabs2 # tt))
+1498 , def mynot ((bool2 --> bool2),(lam _ x \ myabs2 # (not # (myrep2 # x))))
1499 , theorem mytt_transfer
-1500 (myrep2 # mytt = tt ,
-1501 [then (conv (depth_tac (dd [mytt])))
-1502 (then (applyth myrepabs2) (applyth pnn_tt))])
+1500 (myrep2 # mytt = tt ,
+1501 [then (conv (depth_tac (dd [mytt])))
+1502 (then (applyth myrepabs2) (applyth pnn_tt))])
1503 , theorem mynot_transfer
-1504 ((! x18 \ myrep2 # (mynot # x18) = not # (myrep2 # x18)) ,
-1505 [then (conv (depth_tac (dd [mynot])))
-1506 (then forall_i
-1507 (bind bool2 x18 \
-1508 then (applyth myrepabs2)
-1509 (then (applyth pnn_not) (applyth myproprep2))))])
+1504 ((! x18 \ myrep2 # (mynot # x18) = not # (myrep2 # x18)) ,
+1505 [then (conv (depth_tac (dd [mynot])))
+1506 (then forall_i
+1507 (bind bool2 x18 \
+1508 then (applyth myrepabs2)
+1509 (then (applyth pnn_not) (applyth myproprep2))))])
1510 , theorem mybool2_e
-1511 ((! x18 \
-1512 x18 # mytt && (! x19 \ x18 # x19 ==> x18 # (mynot # x19)) ==>
-1513 (! x19 \ x18 # x19)) ,
+1511 ((! x18 \
+1512 x18 # mytt && (! x19 \ x18 # x19 ==> x18 # (mynot # x19)) ==>
+1513 (! x19 \ x18 # x19)) ,
1514 [thenl
-1515 (cut
-1516 (forall ## (bool2 --> prop) '
-1517 (lam (bool2 --> prop) x18 \
+1515 (cut
+1516 (forall ## (bool2 --> prop) '
+1517 (lam (bool2 --> prop) x18 \
1518 impl '
-1519 (and # (x18 # (myabs2 # (myrep2 # mytt))) '
-1520 (forall ## bool2 '
-1521 (lam bool2 x19 \
-1522 impl # (x18 # (myabs2 # (myrep2 # x19))) '
-1523 (x18 '
-1524 (myabs2 '
-1525 (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
+1519 (and # (x18 # (myabs2 # (myrep2 # mytt))) '
+1520 (forall ## bool2 '
+1521 (lam bool2 x19 \
+1522 impl # (x18 # (myabs2 # (myrep2 # x19))) '
+1523 (x18 '
+1524 (myabs2 '
+1525 (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
1526 '
-1527 (forall ## bool2 '
-1528 (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
+1527 (forall ## bool2 '
+1528 (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
1529 [then
-1530 (g
-1531 (forall ## (bool2 --> prop) '
-1532 (lam (bool2 --> prop) x18 \
+1530 (g
+1531 (forall ## (bool2 --> prop) '
+1532 (lam (bool2 --> prop) x18 \
1533 impl '
-1534 (and # (x18 # (myabs2 # (myrep2 # mytt))) '
-1535 (forall ## bool2 '
-1536 (lam bool2 x19 \
-1537 impl # (x18 # (myabs2 # (myrep2 # x19))) '
-1538 (x18 '
-1539 (myabs2 '
-1540 (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
+1534 (and # (x18 # (myabs2 # (myrep2 # mytt))) '
+1535 (forall ## bool2 '
+1536 (lam bool2 x19 \
+1537 impl # (x18 # (myabs2 # (myrep2 # x19))) '
+1538 (x18 '
+1539 (myabs2 '
+1540 (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
1541 '
-1542 (forall ## bool2 '
-1543 (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
-1544 (then
-1545 (w
-1546 (forall ## (bool2 --> prop) '
-1547 (lam (bool2 --> prop) x18 \
+1542 (forall ## bool2 '
+1543 (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
+1544 (then
+1545 (w
+1546 (forall ## (bool2 --> prop) '
+1547 (lam (bool2 --> prop) x18 \
1548 impl '
-1549 (and # (x18 # (myabs2 # (myrep2 # mytt))) '
-1550 (forall ## bool2 '
-1551 (lam bool2 x19 \
-1552 impl # (x18 # (myabs2 # (myrep2 # x19))) '
-1553 (x18 '
-1554 (myabs2 '
-1555 (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
+1549 (and # (x18 # (myabs2 # (myrep2 # mytt))) '
+1550 (forall ## bool2 '
+1551 (lam bool2 x19 \
+1552 impl # (x18 # (myabs2 # (myrep2 # x19))) '
+1553 (x18 '
+1554 (myabs2 '
+1555 (myrep2 # (mynot # (myabs2 # (myrep2 # x19)))))))))
1556 '
-1557 (forall ## bool2 '
-1558 (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
-1559 (then (repeat (conv (depth_tac (applyth myabsrep2)))) (then i h))),
+1557 (forall ## bool2 '
+1558 (lam bool2 x19 \ x18 # (myabs2 # (myrep2 # x19)))))))
+1559 (then (repeat (conv (depth_tac (applyth myabsrep2)))) (then i h))),
1560 then forall_i
-1561 (bind (bool2 --> prop) x18 \
-1562 then (cutth pnn_e)
-1563 (then
-1564 (lforall
-1565 (lam prop x19 \
+1561 (bind (bool2 --> prop) x18 \
+1562 then (cutth pnn_e)
+1563 (then
+1564 (lforall
+1565 (lam prop x19 \
1566 exists ## bool2 '
-1567 (lam bool2 x20 \
-1568 and # (eq ## _ # x19 # (myrep2 # x20)) '
-1569 (x18 # (myabs2 # x19)))))
-1570 (then inv
-1571 (bind bool2 x19 \
+1567 (lam bool2 x20 \
+1568 and # (eq ## _ # x19 # (myrep2 # x20)) '
+1569 (x18 # (myabs2 # x19)))))
+1570 (then inv
+1571 (bind bool2 x19 \
1572 thenl
-1573 (cut
-1574 ((lam prop x20 \
+1573 (cut
+1574 ((lam prop x20 \
1575 exists ## bool2 '
-1576 (lam bool2 x21 \
-1577 and # (eq ## _ # x20 # (myrep2 # x21)) '
-1578 (x18 # (myabs2 # x20)))) # (myrep2 # x19)))
+1576 (lam bool2 x21 \
+1577 and # (eq ## _ # x20 # (myrep2 # x21)) '
+1578 (x18 # (myabs2 # x20)))) # (myrep2 # x19)))
1579 [then
-1580 (g
-1581 ((lam prop x20 \
+1580 (g
+1581 ((lam prop x20 \
1582 exists ## bool2 '
-1583 (lam bool2 x21 \
-1584 and # (eq ## _ # x20 # (myrep2 # x21)) '
-1585 (x18 # (myabs2 # x20)))) # (myrep2 # x19)))
-1586 (then (conv (depth_tac b)) inv),
+1583 (lam bool2 x21 \
+1584 and # (eq ## _ # x20 # (myrep2 # x21)) '
+1585 (x18 # (myabs2 # x20)))) # (myrep2 # x19)))
+1586 (then (conv (depth_tac b)) inv),
1587 thenl apply
-1588 [then (repeat (conv (depth_tac b)))
-1589 (thenl inv
-1590 [then (cutth exists_i)
-1591 (then
-1592 (lforall_last
-1593 (lam bool2 x20 \
-1594 and # (eq ## _ # tt # (myrep2 # x20)) '
-1595 (x18 # (myabs2 # tt))))
-1596 (then (lforall_last mytt)
-1597 (then apply_last (then (conv b)
-1598 (thenl inv
-1599 [then (cutth mytt_transfer)
-1600 (then (conv (depth_tac h)) (applyth tt_intro)),
-1601 (applyth tt_intro),
-1602 then (cutth mytt_transfer)
-1603 (then (g (x18 # (myabs2 # (myrep2 # mytt))))
-1604 (then (conv (depth_tac h)) (then i h)))]))))),
-1605 (bind prop x20 \
+1588 [then (repeat (conv (depth_tac b)))
+1589 (thenl inv
+1590 [then (cutth exists_i)
+1591 (then
+1592 (lforall_last
+1593 (lam bool2 x20 \
+1594 and # (eq ## _ # tt # (myrep2 # x20)) '
+1595 (x18 # (myabs2 # tt))))
+1596 (then (lforall_last mytt)
+1597 (then apply_last (then (conv b)
+1598 (thenl inv
+1599 [then (cutth mytt_transfer)
+1600 (then (conv (depth_tac h)) (applyth tt_intro)),
+1601 (applyth tt_intro),
+1602 then (cutth mytt_transfer)
+1603 (then (g (x18 # (myabs2 # (myrep2 # mytt))))
+1604 (then (conv (depth_tac h)) (then i h)))]))))),
+1605 (bind prop x20 \
1606 bind bool2 x21 \
-1607 then (cutth exists_i)
-1608 (then
-1609 (lforall_last
-1610 (lam bool2 x22 \
-1611 and # (eq ## _ # (not # x20) # (myrep2 # x22)) '
-1612 (x18 # (myabs2 # (not # x20)))))
-1613 (then (lforall_last (mynot # x21))
-1614 (then apply_last (then (conv b)
-1615 (thenl inv
-1616 [then (conv (applyth mynot_transfer))
-1617 (then (conv (depth_tac (dd [not]))) (then inv (itaut 3))),
-1618 then (g (myrep2 # (mynot # x21)))
-1619 (then (conv (land_tac (applyth mynot_transfer)))
-1620 (then (conv (depth_tac (dd [not]))) (then inv (itaut 3)))),
-1621 then (lforall (myabs2 # x20))
-1622 (thenl lapply [then (conv (depth_tac (applyth myabsrep2))) h,
+1607 then (cutth exists_i)
+1608 (then
+1609 (lforall_last
+1610 (lam bool2 x22 \
+1611 and # (eq ## _ # (not # x20) # (myrep2 # x22)) '
+1612 (x18 # (myabs2 # (not # x20)))))
+1613 (then (lforall_last (mynot # x21))
+1614 (then apply_last (then (conv b)
+1615 (thenl inv
+1616 [then (conv (applyth mynot_transfer))
+1617 (then (conv (depth_tac (dd [not]))) (then inv (itaut 3))),
+1618 then (g (myrep2 # (mynot # x21)))
+1619 (then (conv (land_tac (applyth mynot_transfer)))
+1620 (then (conv (depth_tac (dd [not]))) (then inv (itaut 3)))),
+1621 then (lforall (myabs2 # x20))
+1622 (thenl lapply [then (conv (depth_tac (applyth myabsrep2))) h,
1623 then
-1624 (g
-1625 (x18 '
-1626 (myabs2 '
-1627 (myrep2 # (mynot # (myabs2 # (myrep2 # (myabs2 # x20))))))))
-1628 (then (conv (depth_tac (applyth myabsrep2)))
-1629 (then (conv (depth_tac (applyth myabsrep2)))
-1630 (thenl (cut (x20 = myrep2 # x21))
-1631 [then (conv (depth_tac h))
-1632 (then (conv (depth_tac h))
-1633 (then (conv (depth_tac (applyth myabsrep2)))
-1634 (then i
-1635 (then
-1636 (conv
-1637 (rand_tac
-1638 (rand_tac (then sym (applyth mynot_transfer)))))
-1639 (then (conv (depth_tac (applyth myabsrep2))) h))))),
-1640 itaut 2])))])]))))))]),
-1641 applyth myproprep2]]))))]])
+1624 (g
+1625 (x18 '
+1626 (myabs2 '
+1627 (myrep2 # (mynot # (myabs2 # (myrep2 # (myabs2 # x20))))))))
+1628 (then (conv (depth_tac (applyth myabsrep2)))
+1629 (then (conv (depth_tac (applyth myabsrep2)))
+1630 (thenl (cut (x20 = myrep2 # x21))
+1631 [then (conv (depth_tac h))
+1632 (then (conv (depth_tac h))
+1633 (then (conv (depth_tac (applyth myabsrep2)))
+1634 (then i
+1635 (then
+1636 (conv
+1637 (rand_tac
+1638 (rand_tac (then sym (applyth mynot_transfer)))))
+1639 (then (conv (depth_tac (applyth myabsrep2))) h))))),
+1640 itaut 2])))])]))))))]),
+1641 applyth myproprep2]]))))]])
1642
1643, theorem step0
-1644 ((! x13 \ mynot # (mynot # (mynot # x13)) = mynot # x13) ,
+1644 ((! x13 \ mynot # (mynot # (mynot # x13)) = mynot # x13) ,
1645 [then inv
-1646 (bind bool2 x13 \
-1647 then (repeat (conv (depth_tac (dd [mynot]))))
-1648 (thenl (conv (land_tac (rand_tac (rand_tac (applyth myrepabs2)))))
-1649 [then (cutth pnn_not)
-1650 (then (lforall (myrep2 # (myabs2 # (not # (myrep2 # x13)))))
-1651 (then (cutth myproprep2)
-1652 (then (lforall (myabs2 # (not # (myrep2 # x13))))
-1653 (then apply h)))),
+1646 (bind bool2 x13 \
+1647 then (repeat (conv (depth_tac (dd [mynot]))))
+1648 (thenl (conv (land_tac (rand_tac (rand_tac (applyth myrepabs2)))))
+1649 [then (cutth pnn_not)
+1650 (then (lforall (myrep2 # (myabs2 # (not # (myrep2 # x13)))))
+1651 (then (cutth myproprep2)
+1652 (then (lforall (myabs2 # (not # (myrep2 # x13))))
+1653 (then apply h)))),
1654 thenl
-1655 (conv
-1656 (land_tac
-1657 (rand_tac (rand_tac (rand_tac (applyth myrepabs2))))))
-1658 [then (cutth pnn_not)
-1659 (then (lforall (myrep2 # x13))
-1660 (then (cutth myproprep2)
-1661 (then (lforall x13) (then apply h)))),
-1662 then (conv (land_tac (rand_tac (applyth not_not_not)))) r]]))])
+1655 (conv
+1656 (land_tac
+1657 (rand_tac (rand_tac (rand_tac (applyth myrepabs2))))))
+1658 [then (cutth pnn_not)
+1659 (then (lforall (myrep2 # x13))
+1660 (then (cutth myproprep2)
+1661 (then (lforall x13) (then apply h)))),
+1662 then (conv (land_tac (rand_tac (applyth not_not_not)))) r]]))])
1663 , theorem mynot_mynot_mytt
-1664 (mynot # (mynot # mytt) = mytt ,
-1665 [then (conv (depth_tac (dd [mynot])))
-1666 (then (cutth mynot_transfer)
-1667 (then (lforall mytt)
-1668 (then (conv (depth_tac h))
-1669 (then (cutth mytt_transfer)
-1670 (then (conv (depth_tac h))
-1671 (then (conv (depth_tac (dd [mytt]))) (thenl c [r, itaut 3])))))))])
+1664 (mynot # (mynot # mytt) = mytt ,
+1665 [then (conv (depth_tac (dd [mynot])))
+1666 (then (cutth mynot_transfer)
+1667 (then (lforall mytt)
+1668 (then (conv (depth_tac h))
+1669 (then (cutth mytt_transfer)
+1670 (then (conv (depth_tac h))
+1671 (then (conv (depth_tac (dd [mytt]))) (thenl c [r, itaut 3])))))))])
1672 , theorem step1
-1673 ((! x18 \ x18 = mytt || x18 = mynot # mytt) ,
+1673 ((! x18 \ x18 = mytt || x18 = mynot # mytt) ,
1674 [then forall_i
-1675 (bind bool2 x18 \
-1676 then (cutth mybool2_e)
-1677 (thenl
-1678 (cut
-1679 ((lam bool2 x19 \
-1680 or # (eq ## _ # x19 # mytt) # (eq ## _ # x19 # (mynot # mytt))) # x18))
+1675 (bind bool2 x18 \
+1676 then (cutth mybool2_e)
+1677 (thenl
+1678 (cut
+1679 ((lam bool2 x19 \
+1680 or # (eq ## _ # x19 # mytt) # (eq ## _ # x19 # (mynot # mytt))) # x18))
1681 [then
-1682 (g
-1683 ((lam bool2 x19 \
-1684 or # (eq ## _ # x19 # mytt) # (eq ## _ # x19 # (mynot # mytt))) '
-1685 x18)) (then (conv (depth_tac b)) (then i h)),
+1682 (g
+1683 ((lam bool2 x19 \
+1684 or # (eq ## _ # x19 # mytt) # (eq ## _ # x19 # (mynot # mytt))) '
+1685 x18)) (then (conv (depth_tac b)) (then i h)),
1686 then apply
-1687 (then (repeat (conv (depth_tac b)))
-1688 (thenl conj [then (applyth orl) r,
+1687 (then (repeat (conv (depth_tac b)))
+1688 (thenl conj [then (applyth orl) r,
1689 thenl inv
-1690 [(bind bool2 x19 \
-1691 then (applyth orr) (then (conv (depth_tac h)) r)),
-1692 (bind bool2 x19 \
-1693 then (applyth orl) (then (conv (depth_tac h)) (applyth mynot_mynot_mytt)))]]))]))])
+1690 [(bind bool2 x19 \
+1691 then (applyth orr) (then (conv (depth_tac h)) r)),
+1692 (bind bool2 x19 \
+1693 then (applyth orl) (then (conv (depth_tac h)) (applyth mynot_mynot_mytt)))]]))]))])
1694
1695 /******* Cartesian product of types ******/
1696 /* TODO: this is an inductive type as well: generalize
-1697 inductive_type to type abstractions */
-1698 , def is_pair (pi A \ pi B \
-1699 (univ ## (disj_union ## A ## B) ## prop --> prop),
-1700 lam (_ A B) p \ ? A a \ ? B b \
-1701 p =
-1702 pair_univ ## (_ A B) ## _ '
-1703 (injection_univ ## (_ A B) ## _ # (inj1_disj_union ## A ## B # a)) '
-1704 (injection_univ ## (_ A B) ## _ # (inj2_disj_union ## A ## B # b)))
-1705 , new_basic_type prod prod_rep prod_abs prod_repabs prod_absrep prod_proprep
-1706 (pi A \ pi B \ is_pair ## A ## B, [daemon])
-1707 , def pair (pi A \ pi B \
-1708 (A --> B --> prod ## A ## B,
-1709 lam A a \ lam B b \
-1710 prod_abs ## A ## B '
-1711 (pair_univ ## (_ A B) ## _ '
-1712 (injection_univ ## (_ A B) ## _ # (inj1_disj_union ## A ## B # a)) '
-1713 (injection_univ ## (_ A B) ## _ # (inj2_disj_union ## A ## B # b)))
-1714 ))
-1715 /* TODO: define fst and snd and prove the usual lemmas
-1716 fst # (pair # a # b) = a */
+1697 inductive_type to type abstractions */
+1698 , def is_pair (pi A \ pi B \
+1699 (univ ## (disj_union ## A ## B) ## prop --> prop),
+1700 lam (_ A B) p \ ? A a \ ? B b \
+1701 p =
+1702 pair_univ ## (_ A B) ## _ '
+1703 (injection_univ ## (_ A B) ## _ # (inj1_disj_union ## A ## B # a)) '
+1704 (injection_univ ## (_ A B) ## _ # (inj2_disj_union ## A ## B # b)))
+1705 , new_basic_type prod prod_rep prod_abs prod_repabs prod_absrep prod_proprep
+1706 (pi A \ pi B \ is_pair ## A ## B, [daemon])
+1707 , def pair (pi A \ pi B \
+1708 (A --> B --> prod ## A ## B,
+1709 lam A a \ lam B b \
+1710 prod_abs ## A ## B '
+1711 (pair_univ ## (_ A B) ## _ '
+1712 (injection_univ ## (_ A B) ## _ # (inj1_disj_union ## A ## B # a)) '
+1713 (injection_univ ## (_ A B) ## _ # (inj2_disj_union ## A ## B # b)))
+1714 ))
+1715 /* TODO: define fst and snd and prove the usual lemmas
+1716 fst # (pair # a # b) = a */
1717
-1718 /************* Natural numbers ***************/
-1719 , inductive_def is_nat is_natF is_nat_monotone is_nat_i is_nat_e0 is_nat_e
-1720 (is_nat \
-1721 [ (is_nat_z, is_nat # (inj1_univ ## prop ## prop # (injection_univ ## prop ## prop # ff)))
-1722 , (is_nat_s, ! x \ is_nat # x ==> is_nat # (inj2_univ ## prop ## prop # x))])
-1723 , new_basic_type nat nat_rep nat_abs nat_repabs nat_absrep nat_proprep
-1724 (is_nat,
-1725 [then (cutth is_nat_z) (then (applyth exists_i) h)])
-1726 , def z (nat, nat_abs # (inj1_univ ## prop ## prop # (injection_univ ## prop ## prop # ff)))
-1727 , def s (nat --> nat,
-1728 (lam _ x \ nat_abs # (inj2_univ ## prop ## prop # (nat_rep # x))))
-1729 /* TODO: consequence of is_nat_e by transfer principles */
-1730 , theorem nat_e ((! p \ p # z ==> (! n \ p # n ==> p # (s # n)) ==> ! n \ p # n), [ daemon ])
-1731 , theorem nat_abs_inj
-1732 ((! x18 \
-1733 ! x19 \
-1734 is_nat # x18 ==>
-1735 is_nat # x19 ==> nat_abs # x18 = nat_abs # x19 ==> x18 = x19) ,
-1736 [then inv
-1737 (bind _ x18 \
-1738 bind _ x19 \
-1739 thenl (conv (land_tac (then sym (applyth nat_repabs)))) [h,
-1740 thenl (conv (rand_tac (then sym (applyth nat_repabs)))) [h,
-1741 then (conv (depth_tac h)) r]])])
-1742 , theorem nat_rep_inj
-1743 ((! x18 \ ! x19 \ nat_rep # x18 = nat_rep # x19 ==> x18 = x19) ,
-1744 [then inv
-1745 (bind nat x18 \
-1746 bind nat x19 \
-1747 then (conv (land_tac (then sym (applyth nat_absrep))))
-1748 (then (conv (rand_tac (then sym (applyth nat_absrep))))
-1749 (then (conv (depth_tac h)) r)))])
-1750 , theorem s_inj ((! x18 \ ! x19 \ s # x18 = s # x19 ==> x18 = x19) ,
-1751 [then (repeat (conv (depth_tac (dd [s]))))
-1752 (then inv
-1753 (bind nat x18 \
-1754 bind nat x19 \
-1755 then (applyth nat_rep_inj)
-1756 (then (applyth inj2_univ_inj)
-1757 (thenl (applyth nat_abs_inj)
-1758 [then (applyth is_nat_s) (applyth nat_proprep),
-1759 then (applyth is_nat_s) (applyth nat_proprep), h]))))])
-1760 , theorem not_equal_z_s ((! x20 \ not # (z = s # x20)) ,
-1761 [then (repeat (conv (depth_tac (dd [z]))))
-1762 (then (repeat (conv (depth_tac (dd [s]))))
-1763 (then (repeat (conv (depth_tac (dd [not]))))
-1764 (then inv
-1765 (bind nat x20 \
-1766 then (applyth not_eq_inj1_inj2_univ)
-1767 (thenl (thenl (applyth nat_abs_inj) [id, id, h])
-1768 [applyth is_nat_z,
-1769 then (applyth is_nat_s) (applyth nat_proprep)])))))])
-1770 , def nat_case (pi A \ (nat --> A --> (nat --> A) --> A,
-1771 lam _ n \ lam (_ A) a \ lam (_ A) f \
-1772 case_univ ## prop ## prop ## A # (nat_rep # n) # (lam _ x \ a) # (lam _ p \ f # (nat_abs # p))))
-1773 , theorem nat_case_z (pi A \ ((! x21 \ ! x22 \ nat_case ## A # z # x21 # x22 = x21) ,
-1774 [then (conv (depth_tac (dd [nat_case])))
-1775 (then (conv (depth_tac (dd [z])))
-1776 (then forall_i
-1777 (bind A x21 \
-1778 then forall_i
-1779 (bind (nat --> A) x22 \
-1780 thenl
-1781 (conv (land_tac (rator_tac (land_tac (applyth nat_repabs)))))
-1782 [applyth is_nat_z,
-1783 then (conv (depth_tac (applyth case_univ_inj1)))
-1784 (then (conv (depth_tac b)) r)]))))]))
-1785 , theorem nat_case_s
-1786 (pi A \ (! x21 \ ! x22 \ ! x23 \
-1787 nat_case ## A # (s # x21) # x22 # x23 = x23 # x21),
-1788 [then (conv (depth_tac (dd [nat_case])))
-1789 (then (conv (depth_tac (dd [s])))
-1790 (then forall_i
-1791 (bind nat x21 \
-1792 then forall_i
-1793 (bind A x22 \
-1794 then forall_i
-1795 (bind (nat --> A) x23 \
-1796 thenl
-1797 (conv (land_tac (rator_tac (land_tac (applyth nat_repabs)))))
-1798 [then (applyth is_nat_s) (applyth nat_proprep),
-1799 then (conv (depth_tac (applyth case_univ_inj2)))
-1800 (then (conv (depth_tac b))
-1801 (then (conv (depth_tac (applyth nat_absrep))) r))])))))])
+1718 /************* Natural numbers ***************/
+1719 , inductive_def is_nat is_natF is_nat_monotone is_nat_i is_nat_e0 is_nat_e
+1720 (is_nat \
+1721 [ (is_nat_z, is_nat # (inj1_univ ## prop ## prop # (injection_univ ## prop ## prop # ff)))
+1722 , (is_nat_s, ! x \ is_nat # x ==> is_nat # (inj2_univ ## prop ## prop # x))])
+1723 , new_basic_type nat nat_rep nat_abs nat_repabs nat_absrep nat_proprep
+1724 (is_nat,
+1725 [then (cutth is_nat_z) (then (applyth exists_i) h)])
+1726 , def z (nat, nat_abs # (inj1_univ ## prop ## prop # (injection_univ ## prop ## prop # ff)))
+1727 , def s (nat --> nat,
+1728 (lam _ x \ nat_abs # (inj2_univ ## prop ## prop # (nat_rep # x))))
+1729 /* TODO: consequence of is_nat_e by transfer principles */
+1730 , theorem nat_e ((! p \ p # z ==> (! n \ p # n ==> p # (s # n)) ==> ! n \ p # n), [ daemon ])
+1731 , theorem nat_abs_inj
+1732 ((! x18 \
+1733 ! x19 \
+1734 is_nat # x18 ==>
+1735 is_nat # x19 ==> nat_abs # x18 = nat_abs # x19 ==> x18 = x19) ,
+1736 [then inv
+1737 (bind _ x18 \
+1738 bind _ x19 \
+1739 thenl (conv (land_tac (then sym (applyth nat_repabs)))) [h,
+1740 thenl (conv (rand_tac (then sym (applyth nat_repabs)))) [h,
+1741 then (conv (depth_tac h)) r]])])
+1742 , theorem nat_rep_inj
+1743 ((! x18 \ ! x19 \ nat_rep # x18 = nat_rep # x19 ==> x18 = x19) ,
+1744 [then inv
+1745 (bind nat x18 \
+1746 bind nat x19 \
+1747 then (conv (land_tac (then sym (applyth nat_absrep))))
+1748 (then (conv (rand_tac (then sym (applyth nat_absrep))))
+1749 (then (conv (depth_tac h)) r)))])
+1750 , theorem s_inj ((! x18 \ ! x19 \ s # x18 = s # x19 ==> x18 = x19) ,
+1751 [then (repeat (conv (depth_tac (dd [s]))))
+1752 (then inv
+1753 (bind nat x18 \
+1754 bind nat x19 \
+1755 then (applyth nat_rep_inj)
+1756 (then (applyth inj2_univ_inj)
+1757 (thenl (applyth nat_abs_inj)
+1758 [then (applyth is_nat_s) (applyth nat_proprep),
+1759 then (applyth is_nat_s) (applyth nat_proprep), h]))))])
+1760 , theorem not_equal_z_s ((! x20 \ not # (z = s # x20)) ,
+1761 [then (repeat (conv (depth_tac (dd [z]))))
+1762 (then (repeat (conv (depth_tac (dd [s]))))
+1763 (then (repeat (conv (depth_tac (dd [not]))))
+1764 (then inv
+1765 (bind nat x20 \
+1766 then (applyth not_eq_inj1_inj2_univ)
+1767 (thenl (thenl (applyth nat_abs_inj) [id, id, h])
+1768 [applyth is_nat_z,
+1769 then (applyth is_nat_s) (applyth nat_proprep)])))))])
+1770 , def nat_case (pi A \ (nat --> A --> (nat --> A) --> A,
+1771 lam _ n \ lam (_ A) a \ lam (_ A) f \
+1772 case_univ ## prop ## prop ## A # (nat_rep # n) # (lam _ x \ a) # (lam _ p \ f # (nat_abs # p))))
+1773 , theorem nat_case_z (pi A \ ((! x21 \ ! x22 \ nat_case ## A # z # x21 # x22 = x21) ,
+1774 [then (conv (depth_tac (dd [nat_case])))
+1775 (then (conv (depth_tac (dd [z])))
+1776 (then forall_i
+1777 (bind A x21 \
+1778 then forall_i
+1779 (bind (nat --> A) x22 \
+1780 thenl
+1781 (conv (land_tac (rator_tac (land_tac (applyth nat_repabs)))))
+1782 [applyth is_nat_z,
+1783 then (conv (depth_tac (applyth case_univ_inj1)))
+1784 (then (conv (depth_tac b)) r)]))))]))
+1785 , theorem nat_case_s
+1786 (pi A \ (! x21 \ ! x22 \ ! x23 \
+1787 nat_case ## A # (s # x21) # x22 # x23 = x23 # x21),
+1788 [then (conv (depth_tac (dd [nat_case])))
+1789 (then (conv (depth_tac (dd [s])))
+1790 (then forall_i
+1791 (bind nat x21 \
+1792 then forall_i
+1793 (bind A x22 \
+1794 then forall_i
+1795 (bind (nat --> A) x23 \
+1796 thenl
+1797 (conv (land_tac (rator_tac (land_tac (applyth nat_repabs)))))
+1798 [then (applyth is_nat_s) (applyth nat_proprep),
+1799 then (conv (depth_tac (applyth case_univ_inj2)))
+1800 (then (conv (depth_tac b))
+1801 (then (conv (depth_tac (applyth nat_absrep))) r))])))))])
1802
1803
-1804 , theorem pred_well_founded
-1805 (well_founded ## nat # (lam nat x21 \ lam nat x22 \ x22 = s # x21) ,
-1806 [then (conv dd)
-1807 (then forall_i
-1808 (bind nat x21 \
-1809 thenl (applyth nat_e)
-1810 [then (applyth acc_i)
-1811 (then (repeat (conv (depth_tac b)))
-1812 (then inv
-1813 (bind nat x22 \
-1814 then (applyth ff_elim) (then (cutth not_equal_z_s) (itaut 4))))),
-1815 then inv
-1816 (bind nat x22 \
-1817 then (applyth acc_i)
-1818 (then (repeat (conv (depth_tac b)))
-1819 (then inv
-1820 (bind nat x23 \
-1821 then (cutth s_inj)
-1822 (then (lforall x22)
-1823 (then (lforall x23)
-1824 (thenl lapply [h,
-1825 then (conv (rand_tac (then sym h))) h])))))))]))])
-1826 , def nat_recF (pi A \
-1827 A --> (nat --> A --> A) --> (nat --> A) --> (nat --> A)
-1828 , lam A a \ lam (_ A) f \ lam (_ A) rec \ lam _ n \
-1829 nat_case ## A # n # a # (lam _ p \ f # p # (rec # p)))
-1830 , def nat_rec (pi A \
-1831 A --> (nat --> A --> A) --> nat --> A
-1832 , lam A a \ lam (_ A) f \ rec ## nat ## A # (nat_recF ## A # a # f))
-1833 , theorem nat_rec_ok0 (pi A \
-1834 ((! a \ ! f \
-1835 nat_rec ## A # a # f = nat_recF ## A # a # f # (nat_rec ## A # a # f)) ,
-1836 [then inv
-1837 (bind A x22 \
-1838 bind (nat --> A --> A) x23 \
-1839 then (repeat (conv (depth_tac (dd [nat_rec]))))
-1840 (thenl (applyth rec_is_fixpoint) [applyth pred_well_founded,
-1841 then (repeat (conv (depth_tac b)))
-1842 (then (repeat (conv (depth_tac (dd [nat_recF]))))
-1843 (then forall_i
-1844 (bind (nat --> A) x24 \
-1845 then forall_i
-1846 (bind (nat --> A) x25 \
-1847 then (conv (rand_tac beta_expand))
-1848 (thenl (applyth nat_e)
-1849 [then (conv (depth_tac b))
-1850 (then inv
-1851 (then (conv (land_tac (applyth nat_case_z)))
-1852 (then (conv (rand_tac (applyth nat_case_z))) r))),
-1853 then (repeat (conv (depth_tac b)))
-1854 (then inv
-1855 (bind nat x26 \
-1856 then (conv (rand_tac (applyth nat_case_s)))
-1857 (then (conv (land_tac (applyth nat_case_s)))
-1858 (then (repeat (conv (depth_tac b)))
-1859 (then (lforall x26)
-1860 (thenl lapply [r,
-1861 then (conv (land_tac (rand_tac h))) r]))))))])))))]))]))
-1862 , theorem nat_rec_ok (pi A \
-1863 (! a \ ! f \ ! n \
-1864 nat_rec ## A # a # f # n =
-1865 nat_case ## A # n # a # (lam _ p \ f # p # (nat_rec ## A # a # f # p))),
-1866 [then inv
-1867 (bind A x22 \
-1868 bind (nat --> A --> A) x23 \
-1869 bind nat x24 \
-1870 then (conv (land_tac (rator_tac (applyth nat_rec_ok0))))
-1871 (then (conv (depth_tac (dd [nat_recF]))) r))])
+1804 , theorem pred_well_founded
+1805 (well_founded ## nat # (lam nat x21 \ lam nat x22 \ x22 = s # x21) ,
+1806 [then (conv dd)
+1807 (then forall_i
+1808 (bind nat x21 \
+1809 thenl (applyth nat_e)
+1810 [then (applyth acc_i)
+1811 (then (repeat (conv (depth_tac b)))
+1812 (then inv
+1813 (bind nat x22 \
+1814 then (applyth ff_elim) (then (cutth not_equal_z_s) (itaut 4))))),
+1815 then inv
+1816 (bind nat x22 \
+1817 then (applyth acc_i)
+1818 (then (repeat (conv (depth_tac b)))
+1819 (then inv
+1820 (bind nat x23 \
+1821 then (cutth s_inj)
+1822 (then (lforall x22)
+1823 (then (lforall x23)
+1824 (thenl lapply [h,
+1825 then (conv (rand_tac (then sym h))) h])))))))]))])
+1826 , def nat_recF (pi A \
+1827 A --> (nat --> A --> A) --> (nat --> A) --> (nat --> A)
+1828 , lam A a \ lam (_ A) f \ lam (_ A) rec \ lam _ n \
+1829 nat_case ## A # n # a # (lam _ p \ f # p # (rec # p)))
+1830 , def nat_rec (pi A \
+1831 A --> (nat --> A --> A) --> nat --> A
+1832 , lam A a \ lam (_ A) f \ rec ## nat ## A # (nat_recF ## A # a # f))
+1833 , theorem nat_rec_ok0 (pi A \
+1834 ((! a \ ! f \
+1835 nat_rec ## A # a # f = nat_recF ## A # a # f # (nat_rec ## A # a # f)) ,
+1836 [then inv
+1837 (bind A x22 \
+1838 bind (nat --> A --> A) x23 \
+1839 then (repeat (conv (depth_tac (dd [nat_rec]))))
+1840 (thenl (applyth rec_is_fixpoint) [applyth pred_well_founded,
+1841 then (repeat (conv (depth_tac b)))
+1842 (then (repeat (conv (depth_tac (dd [nat_recF]))))
+1843 (then forall_i
+1844 (bind (nat --> A) x24 \
+1845 then forall_i
+1846 (bind (nat --> A) x25 \
+1847 then (conv (rand_tac beta_expand))
+1848 (thenl (applyth nat_e)
+1849 [then (conv (depth_tac b))
+1850 (then inv
+1851 (then (conv (land_tac (applyth nat_case_z)))
+1852 (then (conv (rand_tac (applyth nat_case_z))) r))),
+1853 then (repeat (conv (depth_tac b)))
+1854 (then inv
+1855 (bind nat x26 \
+1856 then (conv (rand_tac (applyth nat_case_s)))
+1857 (then (conv (land_tac (applyth nat_case_s)))
+1858 (then (repeat (conv (depth_tac b)))
+1859 (then (lforall x26)
+1860 (thenl lapply [r,
+1861 then (conv (land_tac (rand_tac h))) r]))))))])))))]))]))
+1862 , theorem nat_rec_ok (pi A \
+1863 (! a \ ! f \ ! n \
+1864 nat_rec ## A # a # f # n =
+1865 nat_case ## A # n # a # (lam _ p \ f # p # (nat_rec ## A # a # f # p))),
+1866 [then inv
+1867 (bind A x22 \
+1868 bind (nat --> A --> A) x23 \
+1869 bind nat x24 \
+1870 then (conv (land_tac (rator_tac (applyth nat_rec_ok0))))
+1871 (then (conv (depth_tac (dd [nat_recF]))) r))])
1872
-1873 /************* Arithmetics: plus ***************/
-1874 , def plus (nat --> nat --> nat,
-1875 lam _ n \ lam _ m \
-1876 nat_rec ## _ # m # (lam _ p \ lam _ sum \ s # sum)' n)
-1877 , theorem plus_z ((! n \ z + n = n),
-1878 [then (conv (depth_tac (dd [plus])))
-1879 (then inv
-1880 (bind nat x21 \
-1881 then (conv (land_tac (applyth nat_rec_ok)))
-1882 (then (conv (land_tac (applyth nat_case_z))) r)))])
-1883 , theorem plus_s ((! n \ ! m \ s # n + m = s # (n + m)),
-1884 [then (repeat (conv (depth_tac (dd [plus]))))
-1885 (then inv
-1886 (bind nat x21 \
-1887 bind nat x22 \
-1888 then (conv (land_tac (applyth nat_rec_ok)))
-1889 (then (conv (land_tac (applyth nat_case_s)))
-1890 (then (repeat (conv (depth_tac b))) r))))])
-1891 , theorem plus_n_z ((! n \ n + z = n),
-1892 [then (conv (rand_tac beta_expand))
-1893 (thenl (applyth nat_e) [then (conv b) (applyth plus_z),
-1894 then (repeat (conv (depth_tac b)))
-1895 (then inv
-1896 (bind nat x21 \
-1897 then (conv (land_tac (applyth plus_s)))
-1898 (then (conv (depth_tac h)) r)))])])
-1899 , theorem plus_n_s ((! n \ ! m \ n + (s # m) = s # (n + m)),
-1900 [then (conv (rand_tac beta_expand))
-1901 (thenl (applyth nat_e)
-1902 [then (conv b)
-1903 (then inv
-1904 (bind nat x21 \ then (repeat (conv (depth_tac (applyth plus_z)))) r)),
-1905 then (repeat (conv (depth_tac b)))
-1906 (then inv
-1907 (bind nat x21 \
-1908 bind nat x22 \
-1909 then (conv (land_tac (applyth plus_s)))
-1910 (thenl c [r,
-1911 then (conv (land_tac apply)) (then sym (applyth plus_s))])))])])
-1912 , theorem plus_comm ((! n \ ! m \ n + m = m + n),
-1913 [then (conv (rand_tac beta_expand))
-1914 (thenl (applyth nat_e)
-1915 [then (conv b)
-1916 (then inv
-1917 (bind nat x21 \
-1918 then (conv (land_tac (applyth plus_z)))
-1919 (then sym (applyth plus_n_z)))),
-1920 then (repeat (conv (depth_tac b)))
-1921 (then inv
-1922 (bind nat x21 \
-1923 bind nat x22 \
-1924 then (conv (land_tac (applyth plus_s)))
-1925 (then sym
-1926 (then (conv (land_tac (applyth plus_n_s)))
-1927 (thenl c [r, then sym apply])))))])])
+1873 /************* Arithmetics: plus ***************/
+1874 , def plus (nat --> nat --> nat,
+1875 lam _ n \ lam _ m \
+1876 nat_rec ## _ # m # (lam _ p \ lam _ sum \ s # sum)' n)
+1877 , theorem plus_z ((! n \ z + n = n),
+1878 [then (conv (depth_tac (dd [plus])))
+1879 (then inv
+1880 (bind nat x21 \
+1881 then (conv (land_tac (applyth nat_rec_ok)))
+1882 (then (conv (land_tac (applyth nat_case_z))) r)))])
+1883 , theorem plus_s ((! n \ ! m \ s # n + m = s # (n + m)),
+1884 [then (repeat (conv (depth_tac (dd [plus]))))
+1885 (then inv
+1886 (bind nat x21 \
+1887 bind nat x22 \
+1888 then (conv (land_tac (applyth nat_rec_ok)))
+1889 (then (conv (land_tac (applyth nat_case_s)))
+1890 (then (repeat (conv (depth_tac b))) r))))])
+1891 , theorem plus_n_z ((! n \ n + z = n),
+1892 [then (conv (rand_tac beta_expand))
+1893 (thenl (applyth nat_e) [then (conv b) (applyth plus_z),
+1894 then (repeat (conv (depth_tac b)))
+1895 (then inv
+1896 (bind nat x21 \
+1897 then (conv (land_tac (applyth plus_s)))
+1898 (then (conv (depth_tac h)) r)))])])
+1899 , theorem plus_n_s ((! n \ ! m \ n + (s # m) = s # (n + m)),
+1900 [then (conv (rand_tac beta_expand))
+1901 (thenl (applyth nat_e)
+1902 [then (conv b)
+1903 (then inv
+1904 (bind nat x21 \ then (repeat (conv (depth_tac (applyth plus_z)))) r)),
+1905 then (repeat (conv (depth_tac b)))
+1906 (then inv
+1907 (bind nat x21 \
+1908 bind nat x22 \
+1909 then (conv (land_tac (applyth plus_s)))
+1910 (thenl c [r,
+1911 then (conv (land_tac apply)) (then sym (applyth plus_s))])))])])
+1912 , theorem plus_comm ((! n \ ! m \ n + m = m + n),
+1913 [then (conv (rand_tac beta_expand))
+1914 (thenl (applyth nat_e)
+1915 [then (conv b)
+1916 (then inv
+1917 (bind nat x21 \
+1918 then (conv (land_tac (applyth plus_z)))
+1919 (then sym (applyth plus_n_z)))),
+1920 then (repeat (conv (depth_tac b)))
+1921 (then inv
+1922 (bind nat x21 \
+1923 bind nat x22 \
+1924 then (conv (land_tac (applyth plus_s)))
+1925 (then sym
+1926 (then (conv (land_tac (applyth plus_n_s)))
+1927 (thenl c [r, then sym apply])))))])])
1928
-1929 ].
+1929 ].
1930
1931/* Status and dependencies of the tactics:
-1932+dd:
-1933+sym:
-1934+eq_true_intro: (th tt_intro)
-1935+forall_i: dd eq_true_intro
-1936+conj: dd eq_true_intro
-1937+andr: dd tt_intro
-1938+andl: dd tt_intro
-1939+forall_e: sym dd
-1940+mp: andr sym dd
-1941+i: dd andl conj
-1942+cut: andr sym dd i
-1943+cutth: cut
-1944+lapply*: mp
-1945+lforall*: mp forall_e
-1946+apply*: lapply lforall
-1947+applyth: cutth apply*
+1932+dd:
+1933+sym:
+1934+eq_true_intro: (th tt_intro)
+1935+forall_i: dd eq_true_intro
+1936+conj: dd eq_true_intro
+1937+andr: dd tt_intro
+1938+andl: dd tt_intro
+1939+forall_e: sym dd
+1940+mp: andr sym dd
+1941+i: dd andl conj
+1942+cut: andr sym dd i
+1943+cutth: cut
+1944+lapply*: mp
+1945+lforall*: mp forall_e
+1946+apply*: lapply lforall
+1947+applyth: cutth apply*
1948
-1949- f converional sometimes fails
-1950- conv (depth_tac) diverges when applied to terms that contain
-1951 metavariables
-1952- repeat is not implemented using progress, that is not even there
-1953*/
+1949- f converional sometimes fails
+1950- conv (depth_tac) diverges when applied to terms that contain
+1951 metavariables
+1952- repeat is not implemented using progress, that is not even there
+1953*/
1954
1955/*
-1956-2.5) in the proof for myprop, at the end I provide the
-1957 witness (and X X) where X remains free (and it is not even pi-quantified).
-1958 If prop was empty, then X could not exist. On the other hand, if X was
-1959 empty, then there would be no need to provide the proof at all.
-1960 In any case, the symptom for X remaining free at the end of a proof is
-1961 one or more goals delayed on it. We never check for them and we have
-1962 no way atm to do that. See bug -3)
+1956-2.5) in the proof for myprop, at the end I provide the
+1957 witness (and X X) where X remains free (and it is not even pi-quantified).
+1958 If prop was empty, then X could not exist. On the other hand, if X was
+1959 empty, then there would be no need to provide the proof at all.
+1960 In any case, the symptom for X remaining free at the end of a proof is
+1961 one or more goals delayed on it. We never check for them and we have
+1962 no way atm to do that. See bug -3)
1963
-1964-2) the test apply_2 is very slow: why?
-1965 same for the witness for myprop
+1964-2) the test apply_2 is very slow: why?
+1965 same for the witness for myprop
1966
-19670) definitions must not be recursive; typing should capture it
-1968 (but not if declare_constraint is commented out...)
+19670) definitions must not be recursive; typing should capture it
+1968 (but not if declare_constraint is commented out...)
1969
-19700.25) occurr check in bind case still missing :-(
+19700.25) occurr check in bind case still missing :-(
1971
-19720.50) case AppUvar vs AppUVar in unification is bugged (e.g.)
-1973 X^2 x0 x1 = X^2 x0 x1
+19720.50) case AppUvar vs AppUVar in unification is bugged (e.g.)
+1973 X^2 x0 x1 = X^2 x0 x1
1974
-19752) we need to fix the ELPI problems about handling of metavariables.
-1976 I have already discussed with Enrico about them and he could have a
-1977 shot at them. Namely:
-1978 a) occur check + optimization to avoid it when possible (IN PROGRESS)
-1979 b) unimplemented cases of restriction (IN PROGRESS)
+19752) we need to fix the ELPI problems about handling of metavariables.
+1976 I have already discussed with Enrico about them and he could have a
+1977 shot at them. Namely:
+1978 a) occur check + optimization to avoid it when possible (IN PROGRESS)
+1979 b) unimplemented cases of restriction (IN PROGRESS)
1980
-19813) once we let metavariables reach the goals, the current HOL-light
-1982 tactic implementation becomes too fragile. We should let the user
-1983 refer to hypotheses at least by number if not by name. But we better
-1984 have a bidirectional successor/predecessor via declare_constraint
+19813) once we let metavariables reach the goals, the current HOL-light
+1982 tactic implementation becomes too fragile. We should let the user
+1983 refer to hypotheses at least by number if not by name. But we better
+1984 have a bidirectional successor/predecessor via declare_constraint
1985
-19865) we could implement an automated theorem prover in lambdaProlog
-1987 that works or is interfaced with the HOL-light code. There are
-1988 complete provers like leanCOP 2.0 that are only 10 lines of code,
-1989 but use some Prolog tricks.
+19865) we could implement an automated theorem prover in lambdaProlog
+1987 that works or is interfaced with the HOL-light code. There are
+1988 complete provers like leanCOP 2.0 that are only 10 lines of code,
+1989 but use some Prolog tricks.
1990
-19916) we should do a small formalization, possibly developing a tactic,
-1992 to prove that everything is working. For example, a decision procedure
-1993 for rings or for linear inequations.
+19916) we should do a small formalization, possibly developing a tactic,
+1992 to prove that everything is working. For example, a decision procedure
+1993 for rings or for linear inequations.
1994
-1995*/
+1995*/
File "/home/runner/work/elpi/elpi/docs/source/../../tests/sources/hollight.elpi", line 28, column 0, characters 756-797:
@@ -4238,7 +4238,7 @@ Test Bed
1pred f i:any.
2
3main :-
-4 (f uvar :- print "ok") => (f X, not(f 1)), var X.
+4 (f uvar :- print "ok") => (f X, not(f 1)), var X.
ok
@@ -4274,7 +4274,7 @@ Test Bed
:
1% q X Y shoud yield X=ok Y=ok
2
-3:untyped q X Y :- (r a => p X), f X Y.
+3:untyped q X Y :- (r a => p X), f X Y.
4:untyped f ok ko :- r a.
5:untyped f ok ok.
6:untyped p ko :- r a.
@@ -4302,7 +4302,7 @@ Test Bed
:
1% q X yields X=ok
2
-3:untyped q X :- (a, (b :- a), (a => c)) => (b,c => r ok) => r X.
+3:untyped q X :- (a, (b :- a), (a => c)) => (b,c => r ok) => r X.
4:untyped main :- q X, X = ok.
@@ -4310,7 +4310,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -4326,7 +4326,7 @@ Test Bed
:
1% to be traced
2
- 3:index(_ _ _ _ _ _ _ _ 1)
+ 3:index(_ _ _ _ _ _ _ _ 1)
4pred p i:int, i:int, i:int, i:int, i:int, i:int, i:int, i:int, i:int.
5p X X X X X X X X 2.
6p X X X X X X X X 2.
@@ -4439,7 +4439,7 @@ Test Bed
113iter 0 _.
114
115main :-
-116 iter 999999 (p 1 1 1 1 1 1 1 1 1).
+116 iter 999999 (p 1 1 1 1 1 1 1 1 1).
Parsing time: 0.001
@@ -4450,7 +4450,7 @@ Test Bed
Success:
-Time: 1.810
+Time: 1.792
Constraints:
@@ -4461,7 +4461,7 @@ Test Bed
../../tests/sources/io_colon.elpi
:
1pred f i:int.
-2main :- (pi i\ f i :- true) => f 1.
+2main :- (pi i\ f i :- true) => f 1.
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -4516,9 +4516,9 @@ Test Bed
:
1% q X yields X=ok
2
-3:untyped q X :- r X (x\ p x).
-4:untyped r ko (x\ g x).
-5:untyped r ok (y\ p y).
+3:untyped q X :- r X (x\ p x).
+4:untyped r ko (x\ g x).
+5:untyped r ok (y\ p y).
6:untyped main :- q X, X = ok.
@@ -4526,7 +4526,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -4542,17 +4542,17 @@ Test Bed
:
1%%%module lambda3.
2
- 3:untyped of (appl T1 T2) B :- of T1 (impl A B), of T2 A.
- 4:untyped of (lam F) (impl A B) :- pi x\ of x A => of (F x) B.
+ 3:untyped of (appl T1 T2) B :- of T1 (impl A B), of T2 A.
+ 4:untyped of (lam F) (impl A B) :- pi x\ of x A => of (F x) B.
5
- 6:untyped append (xcons X XS) L (xcons X L1) :- append XS L L1 .
+ 6:untyped append (xcons X XS) L (xcons X L1) :- append XS L L1 .
7:untyped append xnil L L .
8
- 9:untyped termify xnil (lam x\x).
-10:untyped termify (xcons X XS) (lam F) :- pi c\ termify XS (F c).
+ 9:untyped termify xnil (lam x\x).
+10:untyped termify (xcons X XS) (lam F) :- pi c\ termify XS (F c).
11
12:untyped test L :-
-13 X1 = (xcons x0 (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil))))))))))),
+13 X1 = (xcons x0 (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil))))))))))),
14 append X1 X1 X2 ,
15 append X2 X2 X3 ,
16 append X3 X3 X4 ,
@@ -4576,33 +4576,33 @@ Test Bed
34:untyped once L :- of L Z.
35
36:untyped iter zero X.
-37:untyped iter (s N) X :- X, iter N X.
+37:untyped iter (s N) X :- X, iter N X.
38
39:untyped plus zero X X.
-40:untyped plus (s X) Y (s S) :- plus X Y S.
+40:untyped plus (s X) Y (s S) :- plus X Y S.
41
42:untyped mult zero X zero.
-43:untyped mult (s X) Y Z :- mult X Y K, plus Y K Z.
+43:untyped mult (s X) Y Z :- mult X Y K, plus Y K Z.
44
-45:untyped exp zero X (s zero).
-46:untyped exp (s X) Y Z :- exp X Y K, mult Y K Z.
+45:untyped exp zero X (s zero).
+46:untyped exp (s X) Y Z :- exp X Y K, mult Y K Z.
47
48:untyped main :-
-49 TEN = s (s (s (s (s (s (s (s (s (s zero))))))))),
-50 exp (s (s (s zero))) TEN THOUSAND,
+49 TEN = s (s (s (s (s (s (s (s (s (s zero))))))))),
+50 exp (s (s (s zero))) TEN THOUSAND,
51 test L,
-52 iter THOUSAND (once L).
+52 iter THOUSAND (once L).
Parsing time: 0.000
Compilation time: 0.001
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
-Time: 0.314
+Time: 0.331
Constraints:
@@ -4614,7 +4614,7 @@ Test Bed
:
1type a, b, f prop.
2f :- [print a, print b, a].
-3a :- (b :- [print "done"]) => b.
+3a :- (b :- [print "done"]) => b.
4
5main :- f.
@@ -4652,7 +4652,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -4668,60 +4668,60 @@ Test Bed
:
1pred spy i:prop.
2spy X :- counter "run" N, print N "test " X,
- 3 not(not(X)).
+ 3 not(not(X)).
4
5type test ((A -> A -> prop) -> B -> prop) -> B -> prop.
6test P T :-
- 7 spy(P (x\y\x = y) F, F = T),
- 8 spy(P (x\y\y = x) F, F = T),
- 9 spy(pi dummy\ sigma F\ P (x\y\x = y) F, F = T),
-10 spy(pi dummy\ sigma F\ P (x\y\y = x) F, F = T)
+ 7 spy(P (x\y\x = y) F, F = T),
+ 8 spy(P (x\y\y = x) F, F = T),
+ 9 spy(pi dummy\ sigma F\ P (x\y\x = y) F, F = T),
+10 spy(pi dummy\ sigma F\ P (x\y\y = x) F, F = T)
11 , print "----------------------------------------"
12 .
13
14pred clause o:any.
-15clause (x\y\F y x) :- F = a\b\b.
+15clause (x\y\F y x) :- F = a\b\b.
16pred clause1 o:any.
-17clause1 (x\y\x).
+17clause1 (x\y\x).
18pred clause2 o:any.
-19clause2 (x\y\X x, F y (X x)) :- F = a\b\b.
+19clause2 (x\y\X x, F y (X x)) :- F = a\b\b.
20pred clause3 o:any.
21
22type r A -> B.
23pred prune_arg o:any.
24pred prune_arg2 o:any.
25pred prune_arg3 o:any.
-26prune_arg (r F).
-27prune_arg2 (r (x\F x)).
-28prune_arg3 (r (x\y\F y x)).
+26prune_arg (r F).
+27prune_arg2 (r (x\F x)).
+28prune_arg3 (r (x\y\F y x)).
29
30type whatever, h, f, v A.
31
32main :-
-33 test (eq\F\ pi x\ pi y\ eq (F y x) x) (a\b\b),
-34 test (eq\F\ not (pi x\ pi y\ eq (F x) y)) whatever,
-35 test (eq\F\ pi x\ pi y\ eq (F y x) (r (w\h w x))) (a\b\r (x\h x b)),
-36 test (eq\F\ pi x\ pi y\ sigma R\ R = x, eq (F y x) R) (a\b\b),
-37 test (eq\F\ not (pi x\ pi y\ sigma R\ R = x, eq (F R) y)) whatever,
-38 test (eq\F\ pi x\ pi y\ sigma R\ R = x, eq (F y x) (r (w\h w R))) (a\b\r (x\h x b)),
-39 spy (pi dummy\ clause (x\y\x)),
-40 spy (pi dummy\ clause1 (x\y\F y x), F = a\b\b),
-41 spy (pi dummy\ clause2 (x\y\x , x)),
-42 spy (clause3 (x\y\G y x) => pi dummy\ clause3 (x\y\x)), (G = a\b\b),
-43 test (eq\F\ sigma H\pi x\ pi y\ eq (F y) (r (H y x)), H x x = x, H x y = x) (a\r a),
+33 test (eq\F\ pi x\ pi y\ eq (F y x) x) (a\b\b),
+34 test (eq\F\ not (pi x\ pi y\ eq (F x) y)) whatever,
+35 test (eq\F\ pi x\ pi y\ eq (F y x) (r (w\h w x))) (a\b\r (x\h x b)),
+36 test (eq\F\ pi x\ pi y\ sigma R\ R = x, eq (F y x) R) (a\b\b),
+37 test (eq\F\ not (pi x\ pi y\ sigma R\ R = x, eq (F R) y)) whatever,
+38 test (eq\F\ pi x\ pi y\ sigma R\ R = x, eq (F y x) (r (w\h w R))) (a\b\r (x\h x b)),
+39 spy (pi dummy\ clause (x\y\x)),
+40 spy (pi dummy\ clause1 (x\y\F y x), F = a\b\b),
+41 spy (pi dummy\ clause2 (x\y\x , x)),
+42 spy (clause3 (x\y\G y x) => pi dummy\ clause3 (x\y\x)), (G = a\b\b),
+43 test (eq\F\ sigma H\pi x\ pi y\ eq (F y) (r (H y x)), H x x = x, H x y = x) (a\r a),
44
45 % this is hard because F<H but is applied to y that H can see, so H is restricted to the
46 % level of F (that alone would prune y) but applied to y, so H 1 = y works
-47 test (eq\F\ pi x\ pi y\ sigma H\ pi z\pi w\eq (F y) (r (H w)),
-48 spy(H 1 = y), not(H 2 = x))
-49 (a\r whatever),
-50 test (eq\F\ pi x\ pi y\ sigma H\ pi w\eq (F y x) (r (H w)),
-51 H 1 = f x y)
-52 (a\b\r (f b a)),
+47 test (eq\F\ pi x\ pi y\ sigma H\ pi z\pi w\eq (F y) (r (H w)),
+48 spy(H 1 = y), not(H 2 = x))
+49 (a\r whatever),
+50 test (eq\F\ pi x\ pi y\ sigma H\ pi w\eq (F y x) (r (H w)),
+51 H 1 = f x y)
+52 (a\b\r (f b a)),
53
-54 test (eq\F\ pi x\pi y\prune_arg (F y x)) (a\b\r (v a b)),
-55 test (eq\F\ pi x\pi y\prune_arg2 (F y x)) (a\b\r (x\v a b)),
-56 test (eq\F\ pi x\pi y\prune_arg3 (F y x)) (a\b\r (x\y\v a b)),
+54 test (eq\F\ pi x\pi y\prune_arg (F y x)) (a\b\r (v a b)),
+55 test (eq\F\ pi x\pi y\prune_arg2 (F y x)) (a\b\r (x\v a b)),
+56 test (eq\F\ pi x\pi y\prune_arg3 (F y x)) (a\b\r (x\y\v a b)),
57
58 true.
@@ -4930,20 +4930,20 @@ Test Bed
:
1pred term i:A, o:B.
2
- 3:untyped term (app X Y) B :- term X (arr A B), term Y A.
- 4:untyped term (lam A F) (arr A B) :- pi x\ term x A => term (F x) B.
- 5:untyped term (uvar as X) A :- declare_constraint (term X A) [X].
+ 3:untyped term (app X Y) B :- term X (arr A B), term Y A.
+ 4:untyped term (lam A F) (arr A B) :- pi x\ term x A => term (F x) B.
+ 5:untyped term (uvar as X) A :- declare_constraint (term X A) [X].
6:untyped term true bool.
7:untyped term false bool.
8:untyped term zero nat.
- 9:untyped term succ (arr nat nat).
+ 9:untyped term succ (arr nat nat).
10
-11constraint term {
-12 rule (GX ?- term (uvar K LX) TX)
-13 \ (GY ?- term (uvar K LY) TY)
-14 | (compatible GX LX GY LY CTXCONSTR)
+11constraint term {
+12 rule (GX ?- term (uvar K LX) TX)
+13 \ (GY ?- term (uvar K LY) TY)
+14 | (compatible GX LX GY LY CTXCONSTR)
15 <=> [ TX = TY , CTXCONSTR ].
-16}
+16}
17
18% resilient to dummy ctx variables
19:untyped both_or_none P Q :- P, !, Q.
@@ -4951,7 +4951,7 @@ Test Bed
21
22:untyped compatible _ [] _ [] [] :- !.
23:untyped compatible GX [X|XS] GY [Y|YS] [TX = TY | K] :-
-24 both_or_none (GX => term X TX) (GY => term Y TY),
+24 both_or_none (GX => term X TX) (GY => term Y TY),
25 !,
26 compatible GX XS GY YS K.
27:untyped compatible _ _ _ _ [false].
@@ -4960,22 +4960,22 @@ Test Bed
30:untyped spy P :- print "]fail", fail.
31
32pred watch i:A.
-33watch (uvar as X) :- declare_constraint (print "watch" X) [X], !.
+33watch (uvar as X) :- declare_constraint (print "watch" X) [X], !.
34watch X :- print "watch" X.
35
36:untyped main :-
37 % this is tricky becasuse X sees w, so CHR has to deal with a dirty context
-38 pi w\ (sigma X A B C A' B' T1 T2 \ pi v\
-39 term b2n (arr bool nat) =>
-40 (T1 = (lam _ x \ lam _ y\ X x y),
-41 T2 = (lam _ x \ lam _ y\ X y x),
-42 term T1 (arr A (arr B nat)),
-43 term T2 (arr A' (arr B' C)),
+38 pi w\ (sigma X A B C A' B' T1 T2 \ pi v\
+39 term b2n (arr bool nat) =>
+40 (T1 = (lam _ x \ lam _ y\ X x y),
+41 T2 = (lam _ x \ lam _ y\ X y x),
+42 term T1 (arr A (arr B nat)),
+43 term T2 (arr A' (arr B' C)),
44 print A A' B B' C "|" T1 "|" T2,
-45 spy (X = x\y\ x),
+45 spy (X = x\y\ x),
46 print A A' B B' C "|" T1 "|" T2,
-47 spy (term (app T2 false) _),
-48 print A A' B B' C "|" T1 "|" T2)),
+47 spy (term (app T2 false) _),
+48 print A A' B B' C "|" T1 "|" T2)),
49 true.
50
51% vim: set ft=lprolog:
@@ -4992,7 +4992,7 @@ Test Bed
lam bool c2 \ lam nat c3 \ c3
-Parsing time: 0.000
+
-1.313348 + 0.056941 + 0.939354
+1.303534 + 0.058142 + 0.914749
Parsing time: 0.000
@@ -5053,7 +5053,7 @@ Test Bed
Success:
-Time: 2.529
+Time: 2.497
Constraints:
@@ -5068,21 +5068,21 @@ Test Bed
3type c (pair int int) -> l -> l.
4
5pred add i:int, i:int, i:l, o:l.
- 6add K V n (c (pr K V) n) :- !.
- 7add K V (c (pr K _) L) (c (pr K V) L) :- !.
- 8add K V (c X L) (c X L1) :- add K V L L1.
+ 6add K V n (c (pr K V) n) :- !.
+ 7add K V (c (pr K _) L) (c (pr K V) L) :- !.
+ 8add K V (c X L) (c X L1) :- add K V L L1.
9
10pred bindings i:l, o:list (pair int int).
11bindings n [].
-12bindings (c X L) [X|L1] :- bindings L L1.
+12bindings (c X L) [X|L1] :- bindings L L1.
13
14pred assoc i:int, i:l, o:int.
-15assoc K (c (pr K V) _) V :- !.
-16assoc K (c _ L) V :- assoc K L V.
+15assoc K (c (pr K V) _) V :- !.
+16assoc K (c _ L) V :- assoc K L V.
17
18pred remove i:int, i:l, o:l.
-19remove K (c (pr K _) L) L :- !.
-20remove K (c X L) (c X L1) :- remove K L L1.
+19remove K (c (pr K _) L) L :- !.
+20remove K (c X L) (c X L1) :- remove K L L1.
21
22pred build i:int, i:int, i:l, o:l.
23build N N X X :- !.
@@ -5095,28 +5095,28 @@ Test Bed
30test N N _ _ :- !.
31test N M F X :-
32 N1 is N + 1,
-33 std.assert! (F N X N) "not found",
+33 std.assert! (F N X N) "not found",
34 test N1 M F X.
35
36pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A.
37test2 N N _ _ :- !.
38test2 N M F X :-
39 N1 is N + 1,
-40 std.assert! (F N X X1) "not found",
+40 std.assert! (F N X X1) "not found",
41 test2 N1 M F X1.
42
43macro @iters :- 4096.
44
45main :-
-46 std.time (build 0 @iters n T) Time0, !,
-47 std.time (test 0 @iters assoc T) Time1, !,
+46 std.time (build 0 @iters n T) Time0, !,
+47 std.time (test 0 @iters assoc T) Time1, !,
48 bindings T B,
-49 std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
-50 std.time (test2 0 @iters remove T) Time2, !,
+49 std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
+50 std.time (test2 0 @iters remove T) Time2, !,
51 print Time0 "+" Time1 "+" Time2.
-6.328652 + 2.882384 + 0.401003
+6.401275 + 2.926368 + 0.387892
Parsing time: 0.001
@@ -5127,7 +5127,7 @@ Test Bed
Success:
-Time: 9.618
+Time: 9.722
Constraints:
@@ -5164,28 +5164,28 @@ Test Bed
25test N N _ _ :- !.
26test N M F X :-
27 N1 is N + 1,
-28 std.assert! (F N X N) "not found",
+28 std.assert! (F N X N) "not found",
29 test N1 M F X.
30
31pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A.
32test2 N N _ _ :- !.
33test2 N M F X :-
34 N1 is N + 1,
-35 std.assert! (F N X X1) "not found",
+35 std.assert! (F N X X1) "not found",
36 test2 N1 M F X1.
37
38macro @iters :- 4096.
39
40main :-
-41 std.time (build 0 @iters [] T) Time0, !,
-42 std.time (test 0 @iters assoc T) Time1, !,
+41 std.time (build 0 @iters [] T) Time0, !,
+42 std.time (test 0 @iters assoc T) Time1, !,
43 bindings T B,
-44 std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
-45 std.time (test2 0 @iters remove T) Time2, !,
+44 std.assert! ({std.length B} = @iters, B = [pr 0 0|_]) "bindings broken", !,
+45 std.time (test2 0 @iters remove T) Time2, !,
46 print Time0 "+" Time1 "+" Time2.
-5.764627 + 2.731453 + 0.231218
+5.701716 + 2.697709 + 0.228060
Parsing time: 0.000
@@ -5196,7 +5196,7 @@ Test Bed
Success:
-Time: 8.733
+Time: 8.633
Constraints:
@@ -5207,12 +5207,12 @@ Test Bed
../../tests/sources/name_builtin.elpi
:
1main :-
-2 (pi f x y\
-3 name (f x y) f [x, y]),
-4 (pi x\ name x x []),
-5 (pi f x y\
-6 name (A f x y) f [x,y], print "A=" A, A f x y = (f x y)),
-7 (pi x\ name (B x) x [], print "B=" B, B x = x).
+2 (pi f x y\
+3 name (f x y) f [x, y]),
+4 (pi x\ name x x []),
+5 (pi f x y\
+6 name (A f x y) f [x,y], print "A=" A, A f x y = (f x y)),
+7 (pi x\ name (B x) x [], print "B=" B, B x = x).
A= c3 \ c4 \ c5 \ c3 c4 c5
@@ -5289,7 +5289,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -5314,14 +5314,14 @@ Test Bed
9pred aux i:list A, i:list A, o:list A.
10
11pred main.
-12main :- rev [1,2,3] [3,2,1], not(aux [] [] []), rev.aux [] [] [].
+12main :- rev [1,2,3] [3,2,1], not(aux [] [] []), rev.aux [] [] [].
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -5352,7 +5352,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -5372,14 +5372,14 @@ Test Bed
4}
5
6:untyped
-7main :- x.acc.rev [1,2,3] [3,2,1], x.acc.rev.aux [] [] [], not(x.foo).
+7main :- x.acc.rev [1,2,3] [3,2,1], x.acc.rev.aux [] [] [], not(x.foo).
Parsing time: 0.000
-Compilation time: 0.000
+Compilation time: 0.001
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -5432,7 +5432,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -5453,7 +5453,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -5469,12 +5469,12 @@ Test Bed
:
1module test.
2/*
- 3infixl x+,y+ 190.
- 4infixr x++ 191.
- 5prefixr z+ 191.
- 6postfixl w+ 190.
- 7infixl x* 200.
- 8*/
+ 3infixl x+,y+ 190.
+ 4infixr x++ 191.
+ 5prefixr z+ 191.
+ 6postfixl w+ 190.
+ 7infixl x* 200.
+ 8*/
9X +x D.
10
11foo xx uu.
@@ -5495,7 +5495,7 @@ Test Bed
26type (+y) A -> B -> C.
27type (*x) A -> B -> C.
28
-29main :- print (a a +x [b] +y d), cd +x d.
+29main :- print (a a +x [b] +y d), cd +x d.
a a +x [b] +y d
@@ -5593,7 +5593,7 @@ Test Bed
../../tests/sources/patternunif.elpi
:
1% q Y should yield Y = \\\f 2
-2:untyped q Y :- pi b\ pi c\ (r :- pi a\ s (f a) => s (X b c a)) => r, Y = X.
+2:untyped q Y :- pi b\ pi c\ (r :- pi a\ s (f a) => s (X b c a)) => r, Y = X.
3
4:untyped main :- q Y, Y = x\y\z\f z.
@@ -5627,8 +5627,8 @@ Test Bed
../../tests/sources/patternunif2.elpi
:
1% r Y yields Y=\0
-2:untyped q (a\ X a) X.
-3:untyped r A :- pi c\ q (a\a) A.
+2:untyped q (a\ X a) X.
+3:untyped r A :- pi c\ q (a\a) A.
4
5:untyped main :- r Y, Y = x\x.
@@ -5679,10 +5679,10 @@ Test Bed
:
1% q X yields X=\0, i.e. X=b\b
2
-3:untyped q X :- pi x\ pi y\ z (w\ X).
+3:untyped q X :- pi x\ pi y\ z (w\ X).
4
-5:untyped z (a\ a).
-6:untyped z (a\ b\ b).
+5:untyped z (a\ a).
+6:untyped z (a\ b\ b).
7:untyped
8main :- q X, X = b\b.
@@ -5715,12 +5715,12 @@ Test Bed
8type q diagnostic -> prop.
9
10of stop.
-11of (bam x\x).
-12of (lam x\F) :- pi w\ of F.
+11of (bam x\x).
+12of (lam x\F) :- pi w\ of F.
13
-14q X :- of (lam x\ bam y\ y), X = ok.
-15r X :- of (bam y\ y), X = ok.
-16s X :- of (lam x\ lam y\ stop), X = ok.
+14q X :- of (lam x\ bam y\ y), X = ok.
+15r X :- of (bam y\ y), X = ok.
+16s X :- of (lam x\ lam y\ stop), X = ok.
17
18main :- q X, r S, s T, X = ok, S = ok, T = ok.
@@ -5744,11 +5744,11 @@ Test Bed
../../tests/sources/pnf.elpi
:
1/*
- 2 * Predicates for transforming formulas into prenex normal form
- 3 * assuming classical logic equivalences. This is an example of
- 4 * analyzing formula structure, including recursion over bindings
- 5 * and generating modified structure based on this analysis
- 6 */
+ 2 * Predicates for transforming formulas into prenex normal form
+ 3 * assuming classical logic equivalences. This is an example of
+ 4 * analyzing formula structure, including recursion over bindings
+ 5 * and generating modified structure based on this analysis
+ 6 */
7
8%module pnf.
9
@@ -5763,13 +5763,13 @@ Test Bed
18quant_free perp.
19quant_free tru.
20quant_free A :- atom A.
-21quant_free (and B C) :- quant_free B, quant_free C.
-22quant_free (or B C) :- quant_free B, quant_free C.
-23quant_free (imp B C) :- quant_free B, quant_free C.
+21quant_free (and B C) :- quant_free B, quant_free C.
+22quant_free (or B C) :- quant_free B, quant_free C.
+23quant_free (imp B C) :- quant_free B, quant_free C.
24
25pred atom o:formula.
-26atom (path X Y) :- termp X, termp Y.
-27atom (adj X Y) :- termp X, termp Y.
+26atom (path X Y) :- termp X, termp Y.
+27atom (adj X Y) :- termp X, termp Y.
28
29type a, b, c term.
30type f term -> term.
@@ -5778,69 +5778,69 @@ Test Bed
33termp a.
34termp b.
35termp c.
-36termp (f X) :- termp X.
+36termp (f X) :- termp X.
37
38pred prenex o:formula, o:formula.
-39(prenex B B) :- (quant_free B), !.
-40(prenex (and B C) D) :- (prenex B U), (prenex C V), (merge (and U V) D).
-41(prenex (or B C) D) :- (prenex B U), (prenex C V), (merge (or U V) D).
-42(prenex (imp B C) D) :- (prenex B U), (prenex C V), (merge (imp U V) D).
-43(prenex (all B) (all D)) :- (pi x\ ((termp x) => (prenex (B x) (D x)))).
-44(prenex (some B) (some D)) :- (pi x\ ((termp x) => (prenex (B x) (D x)))).
+39(prenex B B) :- (quant_free B), !.
+40(prenex (and B C) D) :- (prenex B U), (prenex C V), (merge (and U V) D).
+41(prenex (or B C) D) :- (prenex B U), (prenex C V), (merge (or U V) D).
+42(prenex (imp B C) D) :- (prenex B U), (prenex C V), (merge (imp U V) D).
+43(prenex (all B) (all D)) :- (pi x\ ((termp x) => (prenex (B x) (D x)))).
+44(prenex (some B) (some D)) :- (pi x\ ((termp x) => (prenex (B x) (D x)))).
45
46
47/* This predicate is for moving out quantifiers appearing at the head of the
-48immediate subformulas of a formula with a propositional connective as its
-49top-level symbol */
+48immediate subformulas of a formula with a propositional connective as its
+49top-level symbol */
50pred merge o:formula, o:formula.
-51(merge (and (all B) (all C)) (all D)) :-
-52 (pi x\ ((termp x) => (merge (and (B x) (C x)) (D x)))).
-53(merge (and (all B) C) (all D)) :-
-54 (pi x\ ((termp x) => (merge (and (B x) C) (D x)))).
-55(merge (and B (all C)) (all D)) :-
-56 (pi x\ ((termp x) => (merge (and B (C x)) (D x)))).
+51(merge (and (all B) (all C)) (all D)) :-
+52 (pi x\ ((termp x) => (merge (and (B x) (C x)) (D x)))).
+53(merge (and (all B) C) (all D)) :-
+54 (pi x\ ((termp x) => (merge (and (B x) C) (D x)))).
+55(merge (and B (all C)) (all D)) :-
+56 (pi x\ ((termp x) => (merge (and B (C x)) (D x)))).
57
-58(merge (and (some B) C) (some D)) :-
-59 (pi x\ ((termp x) => (merge (and (B x) C) (D x)))).
-60(merge (and B (some C)) (some D)) :-
-61 (pi x\ ((termp x) => (merge (and B (C x)) (D x)))).
+58(merge (and (some B) C) (some D)) :-
+59 (pi x\ ((termp x) => (merge (and (B x) C) (D x)))).
+60(merge (and B (some C)) (some D)) :-
+61 (pi x\ ((termp x) => (merge (and B (C x)) (D x)))).
62
-63(merge (or (all B) C) (all D)) :-
-64 (pi x\ ((termp x) => (merge (or (B x) C) (D x)))).
-65(merge (or B (all C)) (all D)) :-
-66 (pi x\ ((termp x) => (merge (or B (C x)) (D x)))).
-67(merge (or (some B) (some C)) (some D)) :-
-68 (pi x\ ((termp x) => (merge (or (B x) (C x)) (D x)))).
-69(merge (or (some B) C) (some D)) :-
-70 (pi x\ ((termp x) => (merge (or (B x) C) (D x)))).
-71(merge (or B (some C)) (some D)) :-
-72 (pi x\ ((termp x) => (merge (or B (C x)) (D x)))).
+63(merge (or (all B) C) (all D)) :-
+64 (pi x\ ((termp x) => (merge (or (B x) C) (D x)))).
+65(merge (or B (all C)) (all D)) :-
+66 (pi x\ ((termp x) => (merge (or B (C x)) (D x)))).
+67(merge (or (some B) (some C)) (some D)) :-
+68 (pi x\ ((termp x) => (merge (or (B x) (C x)) (D x)))).
+69(merge (or (some B) C) (some D)) :-
+70 (pi x\ ((termp x) => (merge (or (B x) C) (D x)))).
+71(merge (or B (some C)) (some D)) :-
+72 (pi x\ ((termp x) => (merge (or B (C x)) (D x)))).
73
-74(merge (imp (all B) (some C)) (some D)) :-
-75 (pi x\ ((termp x) => (merge (imp (B x) (C x)) (D x)))).
-76(merge (imp (all B) C) (some D)) :-
-77 (pi x\ ((termp x) => (merge (imp (B x) C) (D x)))).
-78(merge (imp (some B) C) (all D)) :-
-79 (pi x\ ((termp x) => (merge (imp (B x) C) (D x)))).
-80(merge (imp B (all C)) (all D)) :-
-81 (pi x\ ((termp x) => (merge (imp B (C x)) (D x)))).
-82(merge (imp B (some C)) (some D)) :-
-83 (pi x\ ((termp x) => (merge (imp B (C x)) (D x)))).
+74(merge (imp (all B) (some C)) (some D)) :-
+75 (pi x\ ((termp x) => (merge (imp (B x) (C x)) (D x)))).
+76(merge (imp (all B) C) (some D)) :-
+77 (pi x\ ((termp x) => (merge (imp (B x) C) (D x)))).
+78(merge (imp (some B) C) (all D)) :-
+79 (pi x\ ((termp x) => (merge (imp (B x) C) (D x)))).
+80(merge (imp B (all C)) (all D)) :-
+81 (pi x\ ((termp x) => (merge (imp B (C x)) (D x)))).
+82(merge (imp B (some C)) (some D)) :-
+83 (pi x\ ((termp x) => (merge (imp B (C x)) (D x)))).
84
-85(merge B B) :- (quant_free B).
+85(merge B B) :- (quant_free B).
86
87type one, two, three, four term.
88type formula term -> formula -> prop.
89
-90formula one (imp (all (x \ (path a x))) tru).
-91formula two (imp (some (x \ (path a x))) tru).
-92formula three (and (all (x \ (path a x))) (all (y \ (path y a)))).
-93formula four (imp (some (x \ (path a x))) ((all (y \ (path a y))))).
+90formula one (imp (all (x \ (path a x))) tru).
+91formula two (imp (some (x \ (path a x))) tru).
+92formula three (and (all (x \ (path a x))) (all (y \ (path y a)))).
+93formula four (imp (some (x \ (path a x))) ((all (y \ (path a y))))).
94
95pred test o:term, o:formula.
-96(test N F) :- (formula N OF), (prenex OF F).
+96(test N F) :- (formula N OF), (prenex OF F).
97
-98main :- (test one F1), (test two F2), (test three F3), (test four F4),!.
+98main :- (test one F1), (test two F2), (test three F3), (test four F4),!.
Parsing time: 0.001
@@ -5853,7 +5853,7 @@ Test Bed
Warning: File "/home/runner/work/elpi/elpi/docs/source/../../tests/sources/pnf.elpi", line 99, column 66, characters 3524-3526:
F4 is linear: name it _F4 (discard) or F4_ (fresh variable)
-Compilation time: 0.000
+Compilation time: 0.001
Typechecking time: 0.002
@@ -5924,13 +5924,13 @@ Test Bed
53check_domain B T :- inputs B I, is_subset T I.
54
55%is_subset A B :- print (is_subset A B), fail.
- 56is_subset A B :- var A, !, declare_constraint (is_subset A B) [A].
- 57is_subset A B :- var B, !, declare_constraint (is_subset A B) [B].
+ 56is_subset A B :- var A, !, declare_constraint (is_subset A B) [A].
+ 57is_subset A B :- var B, !, declare_constraint (is_subset A B) [B].
58is_subset A B :- is_subset_ A B.
59is_subset_ [] _.
60is_subset_ [X|TL] TL1 :- mem TL1 X, is_subset TL TL1.
61
- 62mem A B :- var A, !, declare_constraint (mem A B) [A].
+ 62mem A B :- var A, !, declare_constraint (mem A B) [A].
63mem A B :- mem_ A B.
64mem_ [X|_] X :- !.
65mem_ [Y|TL] X :- mem TL X.
@@ -5944,7 +5944,7 @@ Test Bed
73
74%check_term term type
75%check_term A B C :- print "CHECK" (check_term A B C), fail.
- 76check_term (app F T) TY ORIGTYS :-
+ 76check_term (app F T) TY ORIGTYS :-
77 !,
78 find ORIGTYS F D C,
79 check_term T D ORIGTYS,
@@ -5960,12 +5960,12 @@ Test Bed
89inputs [case A _ | TL] [A | TL'] :- inputs TL TL'.
90
91/* Expected output, according to OCaml
- 92Note: I use ref to kill Hindley-Milner polymorphism
- 93# let g = ref (function `A -> `C | `B -> `D);;
- 94# let f = function `A -> `A | `B -> !g `A;;
- 95# f,!g;;
- 96- : (_[< `A | `B ] -> (_[> `A | `C | `D ] as 'a)) *
- 97 (_[< `A | `B > `A ] -> 'a) */
+ 92Note: I use ref to kill Hindley-Milner polymorphism
+ 93# let g = ref (function `A -> `C | `B -> `D);;
+ 94# let f = function `A -> `A | `B -> !g `A;;
+ 95# f,!g;;
+ 96- : (_[< `A | `B ] -> (_[> `A | `C | `D ] as 'a)) *
+ 97 (_[< `A | `B > `A ] -> 'a) */
98
99% This is an interesting propagation rule we would like to add:
100% a (non empty) subset of a singleton is a singleton.
@@ -5975,8 +5975,8 @@ Test Bed
104% (is_subset X [a])
105% 2. already unifying the first argument of the rule triggers resumption
106% but there is confusion between the two runtimes and a mess happens
-107propagate [] [is_subset X [Y]] (X = [Y]).
-108propagate [is_subset X Y,is_subset Y Z] [] (is_subset X Z).
+107propagate [] [is_subset X [Y]] (X = [Y]).
+108propagate [is_subset X Y,is_subset Y Z] [] (is_subset X Z).
109
110inter [X | A] L [X | B] :- mem L X, !, inter A L B.
111inter [X | A] L B :- inter A L B.
@@ -5987,22 +5987,22 @@ Test Bed
116union [] L L .
117
118is_ground [].
-119is_ground (_ :: L) :- is_ground L.
+119is_ground (_ :: L) :- is_ground L.
120
-121propagate [] [is_subset X YS, is_subset X XS] (is_subset X INTER) :-
+121propagate [] [is_subset X YS, is_subset X XS] (is_subset X INTER) :-
122 is_ground YS, is_ground XS, inter YS XS INTER.
123
124propagate [X] [X] true.
125
-126propagate [mem X A,is_subset X Y] [] (mem Y A).
+126propagate [mem X A,is_subset X Y] [] (mem Y A).
127
-128propagate [] [mem X A] (is_subset [A] X).
-129propagate [] [is_subset A X, is_subset B X] (is_subset C X) :-
+128propagate [] [mem X A] (is_subset [A] X).
+129propagate [] [is_subset A X, is_subset B X] (is_subset C X) :-
130 is_ground A, is_ground B, union A B C.
131
132main1 :-
133 P = [ fun f [ case a a
-134 , case b (app g a) ]
+134 , case b (app g a) ]
135 , fun g [ case a c
136 , case b d ]
137 ],
@@ -6029,8 +6029,8 @@ Test Bed
158
159main2 :-
160 P' = [ fun f [ case a a
-161 , case b (app h1 (app g a))
-162 , case c (app h2 (app g a)) ]
+161 , case b (app h1 (app g a))
+162 , case c (app h2 (app g a)) ]
163 , fun g [ case a a ]
164 , fun h1 [ case a a
165 , case b b
@@ -6051,7 +6051,7 @@ Test Bed
180 print ":::" h1 ":" Ih1' "->" Oh1',
181 print ":::" h2 ":" Ih2' "->" Oh2'.
182
-183main :- (main1, print "xxx failing", fail) ; print "xxx failed", main2.
+183main :- (main1, print "xxx failing", fail) ; print "xxx failed", main2.
184
185% vim: set ft=lprolog:
@@ -6113,13 +6113,13 @@ Test Bed
:
1:untyped
2main :-
-3 print (p X :- q X, r x),
-4 print (X is f Y mod r X),
-5 print (X is f Y + r X * g A),
-6 print (X is (f Y + r X) * g A),
-7 print (X is f Y ^ r X ^ g A),
-8 print (X || A && B ===> G),
-9 print [f X, g Y, (a , b), a + b].
+3 print (p X :- q X, r x),
+4 print (X is f Y mod r X),
+5 print (X is f Y + r X * g A),
+6 print (X is (f Y + r X) * g A),
+7 print (X is f Y ^ r X ^ g A),
+8 print (X || A && B ===> G),
+9 print [f X, g Y, (a , b), a + b].
p X0 :- q X0 , r x
@@ -6135,7 +6135,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -6183,53 +6183,53 @@ Test Bed
32type exp i -> i -> i -> prop.
33
34plus zero X X.
-35plus (s X) Y (s S) :- plus X Y S.
-36less zero (s _).
-37less (s X) (s Y) :- less X Y.
-38neq zero (s _).
-39neq (s _) zero.
-40neq (s X) (s Y) :- neq X Y.
-41queens N Qs :- range (s zero) N Ns, queens_aux Ns xnil Qs.
+35plus (s X) Y (s S) :- plus X Y S.
+36less zero (s _).
+37less (s X) (s Y) :- less X Y.
+38neq zero (s _).
+39neq (s _) zero.
+40neq (s X) (s Y) :- neq X Y.
+41queens N Qs :- range (s zero) N Ns, queens_aux Ns xnil Qs.
42queens_aux xnil Qs Qs.
43queens_aux UnplacedQs SafeQs Qs :-
44 select UnplacedQs UnplacedQs1 Q,
-45 not_attack SafeQs Q (s zero),
-46 queens_aux UnplacedQs1 (xcons Q SafeQs) Qs.
+45 not_attack SafeQs Q (s zero),
+46 queens_aux UnplacedQs1 (xcons Q SafeQs) Qs.
47
48
-49not_attack_aux Xs X :- not_attack Xs X (s zero).
+49not_attack_aux Xs X :- not_attack Xs X (s zero).
50not_attack xnil DUMMY1 DUMMY2 :- !.
-51not_attack (xcons Y Ys) X N :- plus Y N S1, neq X S1,
+51not_attack (xcons Y Ys) X N :- plus Y N S1, neq X S1,
52 plus X N S2, neq Y S2,
-53 N1 = (s N),
+53 N1 = (s N),
54 not_attack Ys X N1.
55
56%select A B C :- print first_clause (select A B C), fail.
-57select (xcons X Xs) Xs X.
+57select (xcons X Xs) Xs X.
58%select A B C :- print backtrack (select A B C), fail.
-59select (xcons Y Ys) (xcons Y Zs) X :- select Ys Zs X.
+59select (xcons Y Ys) (xcons Y Zs) X :- select Ys Zs X.
60%select A B C :- print no_more_chances (select A B C), fail.
61
-62range N N (xcons N xnil) :- !.
-63range M N (xcons M Ns) :- less M N, M1 = (s M), range M1 N Ns.
+62range N N (xcons N xnil) :- !.
+63range M N (xcons M Ns) :- less M N, M1 = (s M), range M1 N Ns.
64
-65once :- queens (s (s (s (s zero)))) L, xxx L.
-66xxx (xcons (s (s zero)) (xcons (s (s (s (s zero)))) (xcons (s zero) (xcons (s (s (s zero))) xnil)))).
+65once :- queens (s (s (s (s zero)))) L, xxx L.
+66xxx (xcons (s (s zero)) (xcons (s (s (s (s zero)))) (xcons (s zero) (xcons (s (s (s zero))) xnil)))).
67
-68q L :- queens (s (s (s (s zero)))) L.
+68q L :- queens (s (s (s (s zero)))) L.
69
70iter zero X.
-71iter (s N) X :- X, iter N X.
+71iter (s N) X :- X, iter N X.
72
73mult zero X zero.
-74mult (s X) Y Z :- mult X Y K, plus Y K Z.
+74mult (s X) Y Z :- mult X Y K, plus Y K Z.
75
-76exp zero X (s zero).
-77exp (s X) Y Z :- exp X Y K, mult Y K Z.
+76exp zero X (s zero).
+77exp (s X) Y Z :- exp X Y K, mult Y K Z.
78
79main :-
-80 TEN = s (s (s (s (s (s (s (s (s (s zero))))))))),
-81 exp (s (s (s (s zero)))) TEN TENTHOUSAND,
+80 TEN = s (s (s (s (s (s (s (s (s (s zero))))))))),
+81 exp (s (s (s (s zero)))) TEN TENTHOUSAND,
82 iter TENTHOUSAND once.
83
84% ----------------------------------------------------------
@@ -6268,7 +6268,7 @@ Test Bed
Success:
-Time: 1.578
+Time: 1.617
Constraints:
@@ -6300,14 +6300,14 @@ Test Bed
6 R < 10.
-3
+2
Warning: File "/home/runner/work/elpi/elpi/docs/source/../../tests/sources/reduce_cbn.elpi", line 21, column 21, characters 727-756:
@@ -6388,7 +6388,7 @@ Test Bed
Success:
-Time: 0.251
+Time: 0.265
Constraints:
@@ -6405,41 +6405,41 @@ Test Bed
5type cbv i -> i -> prop.
6type beta i -> i -> i -> prop.
7
- 8copy (app M N) (app M2 N2) :- copy M M2, copy N N2.
- 9copy (lam F) (lam F2) :- pi x\ copy x x => copy (F x) (F2 x).
+ 8copy (app M N) (app M2 N2) :- copy M M2, copy N N2.
+ 9copy (lam F) (lam F2) :- pi x\ copy x x => copy (F x) (F2 x).
10
-11cbv (lam F) (lam F2) :- pi x\ cbv x x => copy x x => cbv (F x) (F2 x).
-12cbv (app M N) R2 :-
+11cbv (lam F) (lam F2) :- pi x\ cbv x x => copy x x => cbv (F x) (F2 x).
+12cbv (app M N) R2 :-
13 cbv N N2,
14 cbv M M2,
15 beta M2 N2 R2.
16
-17beta (lam F) T R2 :- !,
-18 (pi x\ copy x T => copy (F x) (R' x), R = R' x),
+17beta (lam F) T R2 :- !,
+18 (pi x\ copy x T => copy (F x) (R' x), R = R' x),
19 cbv R R2.
-20beta H A (app H A).
+20beta H A (app H A).
21
22main :-
-23 ZERO = (lam s\ lam z\ z),
-24 SUCC = (lam n\ lam s\ lam z\ app s (app (app n s) z)),
-25 cbv (app SUCC ZERO) ONE,
-26 PLUS = (lam n\ lam m\ lam s\ lam z\ app (app n s) (app (app m s) z)),
-27 MULT = (lam n\ lam m\ lam s\ app n (app m s)),
-28 cbv (app SUCC (app SUCC ZERO)) TWO,
-29 cbv (app (app PLUS (app (app PLUS TWO) TWO)) TWO) SIX,
-30 cbv (app (app MULT SIX) TWO) TWELVE,
-31 EXP = (lam n\ lam m\ app n m),
-32 cbv (app (app PLUS TWO) ONE) THREE,
-33 cbv (app (app EXP TWO) THREE) NINE,
-34 cbv (app (app MULT TWO) TWO) FOUR,
-35 cbv (app (app PLUS THREE) TWO) FIVE,
-36 cbv (app (app PLUS FOUR) TWO) SIX,
-37 cbv (app (app EXP FIVE) FIVE) RES,
-38 cbv (app (app EXP FIVE) FIVE) RES,
-39 cbv (app (app EXP FIVE) FIVE) RES,
-40 cbv (app (app EXP FIVE) FIVE) RES,
-41 cbv (app (app EXP FIVE) FIVE) RES,
-42 cbv (app (app EXP FIVE) FIVE) RES.
+23 ZERO = (lam s\ lam z\ z),
+24 SUCC = (lam n\ lam s\ lam z\ app s (app (app n s) z)),
+25 cbv (app SUCC ZERO) ONE,
+26 PLUS = (lam n\ lam m\ lam s\ lam z\ app (app n s) (app (app m s) z)),
+27 MULT = (lam n\ lam m\ lam s\ app n (app m s)),
+28 cbv (app SUCC (app SUCC ZERO)) TWO,
+29 cbv (app (app PLUS (app (app PLUS TWO) TWO)) TWO) SIX,
+30 cbv (app (app MULT SIX) TWO) TWELVE,
+31 EXP = (lam n\ lam m\ app n m),
+32 cbv (app (app PLUS TWO) ONE) THREE,
+33 cbv (app (app EXP TWO) THREE) NINE,
+34 cbv (app (app MULT TWO) TWO) FOUR,
+35 cbv (app (app PLUS THREE) TWO) FIVE,
+36 cbv (app (app PLUS FOUR) TWO) SIX,
+37 cbv (app (app EXP FIVE) FIVE) RES,
+38 cbv (app (app EXP FIVE) FIVE) RES,
+39 cbv (app (app EXP FIVE) FIVE) RES,
+40 cbv (app (app EXP FIVE) FIVE) RES,
+41 cbv (app (app EXP FIVE) FIVE) RES,
+42 cbv (app (app EXP FIVE) FIVE) RES.
Warning: File "/home/runner/work/elpi/elpi/docs/source/../../tests/sources/reduce_cbv.elpi", line 18, column 8, characters 419-448:
@@ -6464,7 +6464,7 @@ Test Bed
Success:
-Time: 1.592
+Time: 1.714
Constraints:
@@ -6476,7 +6476,7 @@ Test Bed
:
1% main should fail.
2
-3main :- (x\ x) = (x\ X).
+3main :- (x\ x) = (x\ X).
Parsing time: 0.000
@@ -6501,7 +6501,7 @@ Test Bed
9debug-print A B :- print A B.
10
11pred spy i:prop.
-12spy P :- counter "run" NR, if (not(NR = 0)) (debug-print "run=" NR) true,
+12spy P :- counter "run" NR, if (not(NR = 0)) (debug-print "run=" NR) true,
13 debug-print "----<<---- enter: " P,
14 P, !,
15 debug-print "---->>---- exit: " P.
@@ -6510,12 +6510,12 @@ Test Bed
18type lam (term -> term) -> term.
19
20foo A B :-
-21 spy(A = lam i\ lam j\ X_ i j),
-22 spy(B = lam i\ lam j\ Y_ i j),
-23 spy(A = lam i\ lam j\ i),
-24 spy(B = lam i\ lam j\ i).
+21 spy(A = lam i\ lam j\ X_ i j),
+22 spy(B = lam i\ lam j\ Y_ i j),
+23 spy(A = lam i\ lam j\ i),
+24 spy(B = lam i\ lam j\ i).
25
-26main :- pi x\ foo (A_ x) B_.
+26main :- pi x\ foo (A_ x) B_.
----<<---- enter: X0 c0 = lam c1 \ lam c2 \ X1^1 c1 c2
@@ -6548,7 +6548,7 @@ Test Bed
:
1:untyped main :-
2 pi x\ sigma Y Z\ pi y\
-3 std.spy(X x = f (Y y) e\ (Z y e)).
+3 std.spy(X x = f (Y y) e\ (Z y e)).
----<<---- enter: X0 c0 = f (X1^1 c1) c2 \ X2^1 c1 c2
@@ -6575,7 +6575,7 @@ Test Bed
:
1main :-
2 pi x y z u w\
-3 std.spy(X x y = X u w).
+3 std.spy(X x y = X u w).
----<<---- enter: X0 c0 c1 = X0 c3 c4
@@ -6602,7 +6602,7 @@ Test Bed
:
1:untyped main :-
2 pi x\ sigma Y\ pi y\ sigma Z\
-3 std.spy(X x = f (Y y) l\e\ (Z e)).
+3 std.spy(X x = f (Y y) l\e\ (Z e)).
----<<---- enter: X0 c0 = f (X1^1 c1) c2 \ c3 \ X2^2 c3
@@ -6613,7 +6613,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -6683,15 +6683,15 @@ Test Bed
54type append i -> i -> i -> prop.
55
56rev L RL :- aux L xnil RL .
-57aux (xcons X XS) ACC R :- aux XS (xcons X ACC) R .
+57aux (xcons X XS) ACC R :- aux XS (xcons X ACC) R .
58aux xnil L L .
59
-60append (xcons X XS) L (xcons X L1) :- append XS L L1 .
+60append (xcons X XS) L (xcons X L1) :- append XS L L1 .
61append xnil L L .
62
63:untyped
64main :-
-65 X1 = (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil)))))))))),
+65 X1 = (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil)))))))))),
66 append X1 X1 X2 ,
67 append X2 X2 X3 ,
68 append X3 X3 X4 ,
@@ -6721,7 +6721,7 @@ Test Bed
Success:
-Time: 0.138
+Time: 0.145
Constraints:
@@ -6749,13 +6749,13 @@ Test Bed
16type append i -> i -> i -> prop.
17
18rev L RL :- aux L xnil RL.
-19aux (xcons X XS) ACC R :- aux XS (xcons X ACC) R.
+19aux (xcons X XS) ACC R :- aux XS (xcons X ACC) R.
20aux xnil L L.
21
-22append (xcons X XS) L (xcons X L1) :- append XS L L1.
+22append (xcons X XS) L (xcons X L1) :- append XS L L1.
23append xnil L L.
24main :-
-25 X1 = (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil)))))))))),
+25 X1 = (xcons x1 (xcons x2 (xcons x3 (xcons x4 (xcons x5 (xcons x6 (xcons x7 (xcons x8 (xcons x9 (xcons x10 xnil)))))))))),
26 append X1 X1 X2 ,
27 append X2 X2 X3 ,
28 append X3 X3 X4 ,
@@ -6779,13 +6779,13 @@ Test Bed
Parsing time: 0.000
-Compilation time: 0.000
+Compilation time: 0.001
Typechecking time: 0.002
Success:
-Time: 0.141
+Time: 0.144
Constraints:
@@ -6797,19 +6797,19 @@ Test Bed
:
1main :-
2 3 == 3,
-3 not([X, _] == [X, Y]),
-4 not(X == Y),
-5 (x\ x) == (y\ y),
-6 ID = (x\x),
-7 (ID 3) == (ID 3),
-8 pi x y\ same_var (X x) (X y), not(same_term (X x) (X y)).
+3 not([X, _] == [X, Y]),
+4 not(X == Y),
+5 (x\ x) == (y\ y),
+6 ID = (x\x),
+7 (ID 3) == (ID 3),
+8 pi x y\ same_var (X x) (X y), not(same_term (X x) (X y)).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -6829,7 +6829,7 @@ Test Bed
4q X X A.
5
6:untyped
-7main :- (pi c\ q X A Y, q Y A X, q X Y A), X = d.
+7main :- (pi c\ q X A Y, q Y A X, q X Y A), X = d.
Parsing time: 0.000
@@ -6861,7 +6861,7 @@ Test Bed
9test N N _ _ :- !.
10test N M F X :-
11 N1 is N + 1,
-12 std.assert! (F N X) "not found",
+12 std.assert! (F N X) "not found",
13 test N1 M F X.
14
15pred test2 i:int, i:int, i:(int -> A -> A -> prop), i:A, o:A.
@@ -6874,16 +6874,16 @@ Test Bed
22macro @iters :- 4096.
23
24main :-
-25 std.time (build 0 @iters {std.set.make cmp_term} T) Time0, !,
-26 std.time (test 0 @iters std.set.mem T) Time1, !,
+25 std.time (build 0 @iters {std.set.make cmp_term} T) Time0, !,
+26 std.time (test 0 @iters std.set.mem T) Time1, !,
27 std.set.elements T L,
-28 std.assert! ({std.length L} = @iters, L = [0|_]) "elements broken", !,
-29 std.time (test2 0 @iters std.set.remove T E) Time2, !,
-30 std.assert! (std.set.cardinal E 0) "not empty",
+28 std.assert! ({std.length L} = @iters, L = [0|_]) "elements broken", !,
+29 std.time (test2 0 @iters std.set.remove T E) Time2, !,
+30 std.assert! (std.set.cardinal E 0) "not empty",
31 print Time0 "+" Time1 "+" Time2.
-1.102111 + 0.052648 + 0.774574
+1.094963 + 0.052925 + 0.764467
Parsing time: 0.000
@@ -6894,7 +6894,7 @@ Test Bed
Success:
-Time: 2.018
+Time: 2.003
Constraints:
@@ -6949,7 +6949,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -6976,7 +6976,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7002,7 +7002,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
../../tests/sources/shorten_aux2.elpi
@@ -7038,7 +7038,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7094,14 +7094,14 @@ Test Bed
4type t term.
5
6pred copy i:term, o:term.
- 7copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
- 8copy (lam F) (lam F1) :- pi x\ copy (F x) (F1 x).
+ 7copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
+ 8copy (lam F) (lam F1) :- pi x\ copy (F x) (F1 x).
9% we omit (copy x x) on purpose
10
11main :-
-12 T = (lam x\ {copy x t => ((A x) = x, copy (app (A x) x))}),
+12 T = (lam x\ {copy x t => ((A x) = x, copy (app (A x) x))}),
13 print T,
-14 T = (lam _\ app t t).
+14 T = (lam _\ app t t).
lam c0 \ app t t
@@ -7111,7 +7111,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7131,14 +7131,14 @@ Test Bed
4type t term.
5
6pred copy i:term, o:term.
- 7copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
- 8copy (lam F) (lam F1) :- pi x\ copy (F x) (F1 x).
+ 7copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
+ 8copy (lam F) (lam F1) :- pi x\ copy (F x) (F1 x).
9% we omit (copy x x) on purpose
10
11main :-
-12 T = (lam x\ {copy x t => copy (app x x)}),
+12 T = (lam x\ {copy x t => copy (app x x)}),
13 print T,
-14 T = (lam _\ app t t).
+14 T = (lam _\ app t t).
lam c0 \ app t t
@@ -7165,14 +7165,14 @@ Test Bed
1pred pp i:int, o:string.
2pp X "name" :- name X.
3
-4main :- (X = x\ print {pp x}), (X = x\ pp x (W x), print (W x)).
+4main :- (X = x\ print {pp x}), (X = x\ pp x (W x), print (W x)).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
@@ -7199,7 +7199,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7214,7 +7214,7 @@ Test Bed
../../tests/sources/trace2.elpi
:
1main :-
-2 print 1, (pi x\ sigma Y\ fail => (true, fail)).
+2 print 1, (pi x\ sigma Y\ fail => (true, fail)).
1
@@ -7224,7 +7224,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7238,10 +7238,10 @@ Test Bed
../../tests/sources/trace_chr.elpi
:
- 1constraint even odd {
- 2 rule \ (even X) (odd X) | (odd z) <=> true.
- 3 rule \ (even X) (odd X) | (odd (s z)) <=> fail.
- 4}
+ 1constraint even odd {
+ 2 rule \ (even X) (odd X) | (odd z) <=> true.
+ 3 rule \ (even X) (odd X) | (odd (s z)) <=> fail.
+ 4}
5kind nat type.
6type s nat -> nat.
7type z nat.
@@ -7250,24 +7250,24 @@ Test Bed
10pred odd i:nat.
11even z.
12
-13odd (s X) :- even X.
-14even (s X) :- odd X.
+13odd (s X) :- even X.
+14even (s X) :- odd X.
15
-16even (uvar as X) :- declare_constraint (even X) X.
-17odd (uvar as X) :- declare_constraint (odd X) X.
+16even (uvar as X) :- declare_constraint (even X) X.
+17odd (uvar as X) :- declare_constraint (odd X) X.
18
19main :-
20 even Z,
21 declare_constraint true Z,
22 Z = s W,
-23 not(even W).
+23 not(even W).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7292,7 +7292,7 @@ Test Bed
9q :- print 2.
10
11main :- p.
-12main :- q, !, q => (q :- !) => q.
+12main :- q, !, q => (q :- !) => q.
Parsing time: 0.000
@@ -7319,7 +7319,7 @@ Test Bed
4p 3 :- p 2.
5
6main :-
-7 std.findall (p _) L, print L.
+7 std.findall (p _) L, print L.
[p 1, p 2, p 3]
@@ -7329,7 +7329,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
@@ -7369,7 +7369,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
@@ -7400,7 +7400,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
@@ -7426,7 +7426,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.002
+Typechecking time: 0.001
Success:
@@ -7440,9 +7440,9 @@ Test Bed
../../tests/sources/typeabbrv10.elpi
:
-1typeabbrev (bar A) (list A).
-2typeabbrev (tmp A) (list A).
-3typeabbrev (foo A) (tmp A).
+1typeabbrev (bar A) (list A).
+2typeabbrev (tmp A) (list A).
+3typeabbrev (foo A) (tmp A).
4
5pred foo i:int, o:int.
6
@@ -7503,19 +7503,19 @@ Test Bed
../../tests/sources/typeabbrv3.elpi
:
-1typeabbrev (t1 X Y) (pair Y X).
+1typeabbrev (t1 X Y) (pair Y X).
2
3pred f i:t1 bool int.
4f _.
5
-6main :- f (pr 2 tt).
+6main :- f (pr 2 tt).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7543,7 +7543,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7576,7 +7576,7 @@ Test Bed
1typeabbrev x (option A).
2pred f i:x.
3f _.
-4main :- f (some 3).
+4main :- f (some 3).
Parsing time: 0.000
@@ -7622,19 +7622,19 @@ Test Bed
3type g xx -> xx.
4{
5pred f i:xx.
- 6f (g _).
+ 6f (g _).
7
8}
9
10
-11main :- f (g tt).
+11main :- f (g tt).
Parsing time: 0.000
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7664,7 +7664,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7687,7 +7687,7 @@ Test Bed
Compilation time: 0.000
-Typechecking time: 0.001
+Typechecking time: 0.002
Success:
@@ -7710,28 +7710,28 @@ Test Bed
7
8pred mk-app i:term, i:list term, o:term.
9mk-app HD [] HD :- !.
-10mk-app (uvar as K) [A|Args] R :- !, unsafe-cast K K', mk-app (K' A) Args R.
-11mk-app HD [X|XS] T :- mk-app (app HD X) XS T.
+10mk-app (uvar as K) [A|Args] R :- !, unsafe-cast K K', mk-app (K' A) Args R.
+11mk-app HD [X|XS] T :- mk-app (app HD X) XS T.
12
13pred copy i:term, o:term.
14
-15copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
-16copy (lam F) (lam F1) :- pi x\ copy x x => copy (F x) (F1 x).
-17copy (uvar F L as X) T :- var X, !, copy-list L L1, mk-app F L1 T.
-18copy (uvar C L) (uvar C L1) :- copy-list L L1.
+15copy (app A B) (app A1 B1) :- copy A A1, copy B B1.
+16copy (lam F) (lam F1) :- pi x\ copy x x => copy (F x) (F1 x).
+17copy (uvar F L as X) T :- var X, !, copy-list L L1, mk-app F L1 T.
+18copy (uvar C L) (uvar C L1) :- copy-list L L1.
19
20pred copy-list i:list term, o:list term.
21copy-list [] [].
22copy-list [X|XS] [Y|YS] :- copy X Y, copy-list XS YS.
23
24pred meta-copy i:term, o:term.
-25constraint meta-copy {
-26 rule (meta-copy I O) | (copy I X) <=> (O = X).
-27}
+25constraint meta-copy {
+26 rule (meta-copy I O) | (copy I X) <=> (O = X).
+27}
28
-29main :- In = (lam x\ F x),
+29main :- In = (lam x\ F x),
30 copy In T, print T,
-31 declare_constraint (meta-copy In S) [], print S, not(var S).
+31 declare_constraint (meta-copy In S) [], print S, not(var S).
X0 , X1 , X2 , X3 , X4 , X4 c0 c1
@@ -7795,7 +7795,7 @@ Test Bed
2type foo tm -> (tm -> tm) -> prop.
3
4main :-
-5 declare_constraint (foo X Y) X [Y, Z].
+5 declare_constraint (foo X Y) X [Y, Z].
diff --git a/search.html b/search.html
index c91ae0fce..3b6b2c1a7 100644
--- a/search.html
+++ b/search.html
@@ -6,7 +6,7 @@
Search — Elpi documentation
-
+
diff --git a/searchindex.js b/searchindex.js
index cb83edb55..cd8e571a6 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"API:": [[1, null]], "About": [[0, null]], "Building": [[0, "building"]], "Extensions": [[0, "extensions"]], "Playground": [[2, null]], "Prerequisites": [[0, "prerequisites"], [2, "prerequisites"]], "Regexp Matching": [[2, "regexp-matching"]], "Syntax": [[2, "syntax"]], "Test Bed": [[2, "test-bed"]], "Welcome to Elpi\u2019s documentation!": [[1, null]]}, "docnames": ["about", "index", "playground"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1}, "filenames": ["about.rst", "index.rst", "playground.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [0, 2], "0": 2, "00": 2, "000": 2, "001": 2, "002": 2, "004": 2, "014": 2, "018": 2, "024": 2, "027": 2, "033": 2, "052648": 2, "056941": 2, "068": 2, "083": 2, "1": 2, "10": 2, "100": 2, "101": 2, "102": 2, "102111": 2, "106": 2, "107": 2, "108": 2, "11": 2, "111": 2, "1111": 2, "1114": 2, "1128": 2, "113": 2, "1131": 2, "1134": 2, "1136": 2, "1168": 2, "1174": 2, "1175": 2, "1181": 2, "12": 2, "120": 2, "1236": 2, "1240": 2, "127": 2, "1276": 2, "1279": 2, "128": 2, "13": 2, "1310": 2, "1311": 2, "133": 2, "1332": 2, "1334": 2, "134": 2, "135": 2, "136": 2, "137": 2, "138": 2, "1387": 2, "1394": 2, "14": 2, "141": 2, "1434": 2, "1436": 2, "1488": 2, "1490": 2, "15": 2, "154": 2, "1540": 2, "1544": 2, "16": 2, "1603": 2, "1609": 2, "1643": 2, "1644": 2, "1660": 2, "1666": 2, "17": 2, "18": 2, "1876": 2, "1877": 2, "19": 2, "190": 2, "191": 2, "1913": 2, "1915": 2, "1941": 2, "1942": 2, "1984": 2, "1985": 2, "2": 2, "20": 2, "200": 2, "2005": 2, "2006": 2, "2044": 2, "2045": 2, "21": 2, "213": 2, "216": 2, "22": 2, "2252": 2, "2254": 2, "23": 2, "231218": 2, "2315": 2, "2316": 2, "2368": 2, "2372": 2, "24": 2, "2428": 2, "2434": 2, "2479": 2, "2481": 2, "25": 2, "251": 2, "252": 2, "253": 2, "2533": 2, "2537": 2, "254": 2, "255": 2, "257": 2, "2593": 2, "2599": 2, "26": 2, "27": 2, "274": 2, "276": 2, "28": 2, "29": 2, "291": 2, "292": 2, "3": 2, "30": 2, "300": 2, "31": 2, "313348": 2, "314": 2, "319": 2, "328652": 2, "33": 2, "34": 2, "3476": 2, "3478": 2, "3491": 2, "3493": 2, "35": 2, "3508": 2, "3510": 2, "3524": 2, "3526": 2, "3545": 2, "3546": 2, "36": 2, "37": 2, "38": 2, "382": 2, "383": 2, "384": 2, "385": 2, "386": 2, "387": 2, "388": 2, "389": 2, "39": 2, "390": 2, "395": 2, "396": 2, "397": 2, "4": 2, "40": 2, "401003": 2, "402": 2, "403": 2, "408": 2, "409": 2, "4096": 2, "41": 2, "419": 2, "42": 2, "43": 2, "436": 2, "437": 2, "44": 2, "448": 2, "45": 2, "47": 2, "48": 2, "485": 2, "49": 2, "494": 2, "495": 2, "496": 2, "497": 2, "498": 2, "499": 2, "5": 2, "50": 2, "500": 2, "501": 2, "502": 2, "507": 2, "508": 2, "509": 2, "51": 2, "514": 2, "515": 2, "516": 2, "52": 2, "520": 2, "521": 2, "528": 2, "529": 2, "53": 2, "533": 2, "548": 2, "55": 2, "56": 2, "565": 2, "57": 2, "578": 2, "579": 2, "58": 2, "59": 2, "592": 2, "6": 2, "60": 2, "61": 2, "618": 2, "62": 2, "623": 2, "627": 2, "629": 2, "63": 2, "636": 2, "637": 2, "64": 2, "65": 2, "657": 2, "66": 2, "660": 2, "67": 2, "671": 2, "675": 2, "681": 2, "683": 2, "688": 2, "7": 2, "70": 2, "711": 2, "712": 2, "719": 2, "72": 2, "727": 2, "73": 2, "731453": 2, "733": 2, "74": 2, "75": 2, "756": 2, "76": 2, "761": 2, "763": 2, "764627": 2, "77": 2, "771": 2, "774574": 2, "78": 2, "780": 2, "781": 2, "79": 2, "794": 2, "795": 2, "797": 2, "8": 2, "80": 2, "81": 2, "810": 2, "818": 2, "81920": 2, "821": 2, "83": 2, "85": 2, "852": 2, "858": 2, "87": 2, "88": 2, "882384": 2, "89": 2, "899": 2, "9": 2, "90": 2, "92": 2, "939354": 2, "95": 2, "96": 2, "960": 2, "964": 2, "97": 2, "98": 2, "99": 2, "999999": 2, "A": 2, "As": 2, "But": 2, "FOR": 2, "For": 2, "IN": 2, "If": 2, "In": 2, "It": 2, "No": 2, "OF": 2, "ON": 2, "ONE": 2, "Of": 2, "On": [0, 2], "Or": 0, "The": 2, "There": 2, "To": [0, 2], "_": 2, "_a": 2, "_ab": 2, "_b": 2, "_build": 2, "_c": 2, "_d": 2, "_dummy1": 2, "_dummy2": 2, "_e": 2, "_f": 2, "_f1": 2, "_f2": 2, "_f3": 2, "_f4": 2, "_foo": 2, "_g": 2, "_nine": 2, "_t": 2, "_tq": 2, "_twelv": 2, "_v": 2, "_x": 2, "_x0": 2, "_x01": 2, "_x1": 2, "_x10": 2, "_x2": 2, "_x3": 2, "_x4": 2, "_x5": 2, "_y": 2, "_z": 2, "a1": 2, "a2": 2, "a_": 2, "ab": 2, "ab_": 2, "abbrevi": 2, "abort": 2, "about": 2, "abs_tac": 2, "absrep": 2, "absreptyp": 2, "abstract": 2, "abstyp": 2, "acc": 2, "acc_": 2, "acc_e0": 2, "acc_i": 2, "acc_i0": 2, "accf": 2, "accf_monoton": 2, "accord": 2, "accumul": 2, "accumulate_twice1": 2, "accumulate_twice2": 2, "ack": 2, "ackermann": 2, "ad": 2, "add": 2, "adepth": 2, "adj": 2, "ads_and_or": 2, "ads_or_and": 2, "after": 2, "al": 2, "all": 2, "all_equals_list": 2, "alon": 2, "alreadi": 2, "also": 2, "altern": 2, "an": [0, 2], "analysi": 2, "analyz": 2, "and_": 2, "and_associ": 2, "and_commut": 2, "and_ff": 2, "and_idempot": 2, "and_monoton": 2, "and_or": 2, "and_tt": 2, "andl": 2, "andr": 2, "ani": [0, 2], "answer": 2, "app": 2, "appear": 2, "append": 2, "appl": 2, "appli": 2, "applic": 2, "apply_2": 2, "apply_last": 2, "applyth": 2, "appuvar": 2, "apredf": 2, "apt": 0, "ar": [0, 2], "arg": 2, "argument": 2, "arithmet": 2, "ariti": 2, "around": 2, "arr": 2, "as_1": 2, "as_2": 2, "as_3": 2, "asclaus": 2, "ask": 2, "assert": 2, "assoc": 2, "associ": 2, "assum": 2, "assumpt": 2, "ast": 2, "atisym": 2, "atm": 2, "atom": 2, "auto": 2, "auto_monoton": 2, "autom": 2, "automat": 2, "aux": 2, "avail": 2, "avoid": 2, "axiom": 2, "axiomat": 2, "b": 2, "b1": 2, "b2": 2, "b2n": 2, "b_": 2, "backchain": 2, "backtrack": 2, "bad": 2, "bam": 2, "bang": 2, "bar": 2, "base": [0, 2], "basic": 2, "baz": 2, "bdepth": 2, "becasus": 2, "becaus": 2, "becom": 2, "befor": [0, 2], "belong": 2, "below": 2, "beta": 2, "beta_expand": 2, "better": 2, "between": 2, "bi": 2, "bidirect": 2, "bind": 2, "bit": 2, "block": 2, "bo": 2, "bodi": 2, "bool": 2, "bool2": 2, "both": [0, 2], "both_or_non": 2, "bound": 2, "box": 2, "brain": 2, "branch": 2, "broken": 2, "btl": 2, "btw": 2, "bug": 2, "build": 2, "build_pred": 2, "build_quantified_pred": 2, "built": 2, "builtin": 2, "c": 2, "c0": 2, "c1": 2, "c2": 2, "c3": 2, "c4": 2, "c5": 2, "c6": 2, "call": 2, "callback_prov": 2, "can": [0, 2], "cannot": 2, "canon": 2, "canonicaltac": 2, "captur": 2, "cardin": 2, "cartesian": 2, "case": 2, "case_disj_union": 2, "case_disj_union_inj1": 2, "case_disj_union_inj2": 2, "case_univ": 2, "case_univ_inj1": 2, "case_univ_inj2": 2, "cast": 2, "cbn": 2, "cbv": 2, "cd": 2, "cert": 2, "certif": 2, "chang": 2, "charact": 2, "check": 2, "check1": 2, "check1axm": 2, "check1decl": 2, "check1def": 2, "check1nbt": 2, "check1thm": 2, "check_codomain": 2, "check_domain": 2, "check_hyp": 2, "check_term": 2, "choic": 2, "choos": 2, "chr": 2, "chr_nokei": 2, "chr_nokey2": 2, "chr_not_cliqu": 2, "chr_sem": 2, "chrgcd": 2, "chrleq": 2, "classic": 2, "claus": 2, "clause1": 2, "clause2": 2, "clause3": 2, "close": 2, "cmp_term": 2, "code": 2, "column": 2, "come": 0, "comma": 2, "command": 2, "comment": 2, "common": 2, "commun": 0, "compat": 2, "compil": 2, "complet": 2, "con": 2, "concat1": 2, "confus": 2, "conj": 2, "conj2": 2, "conjunct": 2, "connect": 2, "consequ": 2, "consist": 2, "consol": 2, "const": 2, "constant": 2, "constant_tacl": 2, "constraint": 2, "cont": 2, "contain": 2, "content": 2, "context": 2, "contnext": 2, "conv": 2, "convention": 2, "converion": 2, "convers": 2, "copi": 2, "coq": 0, "correctli": 2, "could": 2, "counter": 2, "creat": [0, 2], "cross": 0, "cs_": 2, "cscript": 2, "ct": 2, "ctx": 2, "ctx_load": 2, "ctxconstr": 2, "current": [0, 2], "cut": 2, "cut2": 2, "cut3": 2, "cut4": 2, "cut5": 2, "cut6": 2, "cutth": 2, "d": 2, "d1": 2, "d11": 2, "d2": 2, "d22": 2, "d3": 2, "d33": 2, "d_": 2, "daemon": 2, "damag": 2, "data": 2, "dd": 2, "deal": 2, "debian": 0, "debprint": 2, "debug": 2, "debuggin": 2, "decis": 2, "decl": 2, "declar": 2, "declare_constraint": 2, "deep_index": 2, "def": 2, "def0": 2, "default": 2, "defin": 2, "definit": 2, "deftac": 2, "deftacl": 2, "delai": 2, "delay_outside_frag": 2, "denot": 2, "depend": 2, "deprec": 2, "depth": 2, "depth_tac": 2, "desper": 2, "desperate2": 2, "desperate3": 2, "develop": 2, "diagnost": 2, "did": 2, "differ": 2, "direct": 2, "directli": 0, "directori": 0, "dirti": 2, "discard": 2, "discuss": 2, "disj": 2, "disj_union": 2, "disjoint": 2, "distinct": 2, "distinct_nam": 2, "distrib": 0, "div": 2, "diverg": 2, "do": 2, "doc": [0, 2], "document": [0, 2], "doe": 2, "doesn": 2, "done": 2, "doom": 2, "doubl": 2, "down": 2, "drop": 2, "due": 2, "dummi": 2, "dummy1": 2, "dummy1_": 2, "dummy2": 2, "dummy2_": 2, "dune": 2, "duplic": 2, "e": [0, 2], "e1": 2, "e2": 2, "e_": 2, "eager": 2, "echo": 2, "effici": 2, "eg": 2, "either": 0, "eject_inject_limit_univ": 2, "eject_limit_univ": 2, "ejection_injection_univ": 2, "ejection_univ": 2, "element": 2, "elimin": 2, "elimthm": 2, "elp": 2, "elpi": 2, "elpi_api": 2, "elpi_only_llam": 2, "els": 2, "empti": 2, "en": 0, "end": 2, "end_com": 2, "end_of_proof": 2, "engin": 2, "enrico": 2, "enter": 2, "env": 2, "eq": 2, "eq_reflex": 2, "eq_to_impl": 2, "eq_to_impl_b": 2, "eq_to_impl_f": 2, "eq_true_intro": 2, "equal": 2, "equival": 2, "erro": 2, "error": 2, "escap": 2, "eta": 2, "eta_a": 2, "eval": 2, "evalu": 2, "even": 2, "everyth": 2, "exampl": 2, "except": 2, "exec": 2, "exist": 2, "existence_condit": 2, "exists_": 2, "exists_i": 2, "exists_monoton": 2, "exit": 2, "exp": 2, "expand": 2, "expect": 2, "explicitli": 0, "export": 2, "ext": 0, "extend": 2, "extern": 0, "extra": 2, "f": 2, "f1": 2, "f1_": 2, "f2": 2, "f2_": 2, "f3": 2, "f3_": 2, "f4": 2, "f4_": 2, "f_": 2, "facil": 2, "fail": 2, "failur": 2, "fallback": 0, "fals": 2, "famili": 2, "fatal": 2, "ff": 2, "ff_elim": 2, "file": [0, 2], "filter": 2, "find": 2, "findal": 2, "first": 2, "first_claus": 2, "five": 2, "fix": 2, "fixdef": 2, "fixiti": 2, "fixpoint": 2, "fixpoint_is_fixpoint": 2, "fixpoint_is_prefixpoint": 2, "fixpoint_subseteq_any_fixpoint": 2, "fixpoint_subseteq_any_prefixpoint": 2, "flat": 2, "flexibl": 2, "flush": 2, "fn": 2, "focus": 2, "fold": 2, "fold2_append": 2, "follow": [0, 2], "foo": 2, "foo1": 2, "foo2": 2, "foo3": 2, "foo4": 2, "foral": 2, "forall_": 2, "forall_i": 2, "forall_monoton": 2, "forc": 2, "form": 2, "formal": 2, "formed": 2, "formula": 2, "found": 2, "four": 2, "fp": 2, "fr": 0, "fragil": 2, "fragment": 2, "fragment_exit": 2, "fragment_exit2": 2, "fragment_exit3": 2, "free": 2, "fresh": 2, "fresh_": 2, "from": 2, "front": 2, "frozen": 2, "fst": 2, "ft": 2, "fun": 2, "function": 2, "funnam": 2, "g": [0, 2], "g1": 2, "g2": 2, "g_": 2, "gamma": 2, "gamma1": 2, "gamma2": 2, "gc": 2, "gcd": 2, "gener": [0, 2], "general_cas": 2, "general_case2": 2, "general_case3": 2, "get": 2, "gettimeofdai": 2, "github": 0, "githubpag": 0, "global": 2, "go": 2, "goal": 2, "goaltact": 2, "group": 2, "gx": 2, "gy": 2, "h": 2, "h1": 2, "h2": 2, "ha": 2, "hack": 2, "halt": 2, "hand": 2, "handl": 2, "happen": 2, "hard": 2, "hash": 2, "hashtbl": 2, "have": [0, 2], "hc_interp": 2, "hd": 2, "hdclaus": 2, "he": 2, "head": 2, "heap_discard": 2, "helper": 0, "henc": 2, "here": 2, "higher": 2, "hindlei": 2, "ho": 2, "hoc": 2, "hol": 2, "hollight": 2, "hollight_legaci": 2, "home": 2, "hook": 2, "horn": 2, "how": 2, "html": 0, "http": 0, "hurt": 2, "hyp": 2, "hyp_uvar": 2, "hypothes": 2, "hypothesi": 2, "hypsuchthat": 2, "i": [0, 2], "id": 2, "idempot": 2, "identifi": 2, "ig": 2, "ign": 2, "ignor": 2, "ih1": 2, "ih2": 2, "ii": 2, "illustr": 2, "immedi": 2, "imp": 2, "impl": 2, "impl2": 2, "impl_monoton": 2, "impl_not_not": 2, "implement": 2, "implic": 2, "implicit": 2, "in_subseteq": 2, "in_two": 2, "in_two_": 2, "in_two_e0": 2, "in_two_ff": 2, "in_two_i": 2, "in_two_tt": 2, "in_twof": 2, "in_twof_monoton": 2, "includ": 2, "incompat": 2, "increas": 2, "index": 2, "index2": 2, "induct": 2, "inductive_def": 2, "inductive_def_pkg": 2, "inductive_typ": 2, "ineffici": 2, "inequ": 2, "infer": 2, "infix": 2, "infixl": 2, "infixr": 2, "inj": 2, "inj1_disj_union": 2, "inj1_disj_union_inj": 2, "inj1_univ": 2, "inj1_univ_inj": 2, "inj2_disj_union": 2, "inj2_disj_union_inj": 2, "inj2_univ": 2, "inj2_univ_inj": 2, "inject": [0, 2], "inject_limit_univ": 2, "injection_univ": 2, "injection_univ_inj": 2, "input": 2, "inria": 0, "insid": 2, "inspect": 2, "instal": [0, 2], "instead": [0, 2], "int": 2, "int_tac": 2, "integ": 2, "inter": 2, "interact": 2, "interactive_tac": 2, "interest": 2, "interfac": 2, "interpret": 2, "intersphinx": 0, "introspect": 0, "introthm": 2, "inv": 2, "io_colon": 2, "is_fixpoint": 2, "is_ground": 2, "is_nat": 2, "is_nat_": 2, "is_nat_e0": 2, "is_nat_i": 2, "is_nat_monoton": 2, "is_nat_z": 2, "is_natf": 2, "is_pair": 2, "is_subset": 2, "is_subset_": 2, "itac": 2, "itaut": 2, "itauteq": 2, "iter": 2, "its": [0, 2], "j": 2, "just": 2, "jwintz": 2, "k": 2, "k1": 2, "k2": 2, "kernel": 2, "keyword": 2, "kill": 2, "kind": 2, "knaster": 2, "known": 2, "ko": 2, "ko1": 2, "ko2": 2, "l": 2, "l1": 2, "l2": 2, "lam": 2, "lambda": 2, "lambda2": 2, "lambda3": 2, "lambdaprolog": 2, "land_tac": 2, "langag": 2, "lappli": 2, "lapply_last": 2, "last": 2, "lazi": 2, "leancop": 2, "least": 2, "left": 2, "legaci": 1, "lemma": 2, "len": 2, "length": 2, "leq": 2, "less": 2, "let": 2, "level": 2, "lforal": 2, "lforall_last": 2, "lh": 2, "lib": 2, "librari": 2, "light": 2, "like": 2, "line": 2, "linear": 2, "link": 0, "list": 2, "list_as_conj": 2, "list_comma": 2, "list_iter_rev": 2, "list_map": 2, "liter": 2, "literalinclud": 2, "llam": 2, "llamchr": 2, "local": 2, "logic": 2, "long": 2, "longer": 2, "look": 2, "loop": 2, "lost": 2, "lower": 2, "lprolog": 2, "lstop": 2, "lt": 2, "ltn": 2, "lvl": 2, "lx": 2, "ly": 2, "m": 2, "m1": 2, "m2": 2, "macro": 2, "mai": 2, "main": 2, "main1": 2, "main2": 2, "make": [0, 2], "makefil": 0, "man": 2, "manag": 0, "mani": 2, "map": 2, "map_list": 2, "map_list_opt": 2, "mark": 2, "master": 0, "match": 0, "matter": 2, "mayb": 2, "mean": 2, "meant": 0, "mem": 2, "mem_": 2, "memb": 2, "merg": 2, "mess": 2, "messag": 2, "meta": 2, "metavari": 2, "milner": 2, "miss": 2, "mistak": 2, "mixfix": 2, "mk": 2, "mk_bounded_fresh": 2, "mk_constant_list": 2, "mk_intro_thm": 2, "mk_list_of_bounded_fresh": 2, "mk_script": 2, "ml": 2, "mod": 2, "mode": 2, "modifi": 2, "modul": [0, 2], "mono": 2, "monoton": 2, "monthm": 2, "more": 2, "move": 2, "mp": 2, "much": 2, "mult": 2, "must": 2, "myabs2": 2, "myabsrep2": 2, "mybool2_": 2, "myformula": 2, "mynot": 2, "mynot_mynot_mytt": 2, "mynot_transf": 2, "myprop": 2, "myproprep2": 2, "myrep2": 2, "myrepabs2": 2, "mytt": 2, "mytt_transf": 2, "n": 2, "n1": 2, "n2": 2, "name": [0, 2], "name1": 2, "name_builtin": 2, "named_clauses00": 2, "named_clauses01": 2, "named_clauses02": 2, "namespac": 2, "namespaces00": 2, "namespaces01": 2, "namespaces02": 2, "namespaces03": 2, "nat": 2, "nat_": 2, "nat_ab": 2, "nat_abs_inj": 2, "nat_absrep": 2, "nat_cas": 2, "nat_case_": 2, "nat_case_z": 2, "nat_proprep": 2, "nat_rec": 2, "nat_rec_ok": 2, "nat_rec_ok0": 2, "nat_recf": 2, "nat_rep": 2, "nat_rep_inj": 2, "nat_repab": 2, "natur": 2, "need": 2, "neq": 2, "never": 2, "new": 2, "new2": 2, "new_basic_typ": 2, "new_certif": 2, "new_interactive_tac": 2, "new_tac": 2, "newcom": 2, "newl": 2, "newlazi": 2, "newt": 2, "next": 2, "next_object": 2, "next_tact": 2, "next_tactic0": 2, "nil": 2, "nil_con": 2, "nine": 2, "nine_": 2, "no_more_ch": 2, "nojekyl": 0, "non": 2, "non_interactive_tac": 2, "normal": 2, "not_": 2, "not_and": 2, "not_attack": 2, "not_attack_aux": 2, "not_defin": 2, "not_eq_inj1_inj2_univ": 2, "not_equal_z_": 2, "not_i": 2, "not_monoton": 2, "not_not_not": 2, "not_or": 2, "notat": 2, "notation_error": 2, "notation_legaci": 2, "note": 2, "noth": 2, "now": 2, "nr": 2, "num": 2, "number": 2, "o": 2, "object": [0, 2], "ocaml": 2, "ocamlc": 2, "ocamlopt": 2, "occur": 2, "occurr": 2, "odd": 2, "og": 2, "oh1": 2, "oh2": 2, "ok": 2, "old": 2, "omit": 2, "onc": 2, "one": [0, 2], "ones": 2, "onli": 2, "opam": 2, "oper": 2, "opr": 2, "optim": 2, "option": [1, 2], "or_": 2, "or_and": 2, "or_associ": 2, "or_commut": 2, "or_ff": 2, "or_idempot": 2, "or_monoton": 2, "or_tt": 2, "order": 2, "orels": 2, "org": 0, "origti": 2, "orl": 2, "orr": 2, "otac": 2, "other": [0, 2], "other_tac": 2, "otherwis": 2, "our": 2, "out": 2, "out1": 2, "outcom": 2, "output": 2, "outs2": 2, "outsid": 2, "over": 2, "overbar": 2, "own": 0, "p": 2, "p1": 2, "p2": 2, "p_tactic": 2, "pa": 2, "packag": [0, 2], "page": [0, 2], "pair": 2, "pair_univ": 2, "pair_univ_inj_l": 2, "pair_univ_inj_r": 2, "param": 2, "pars": 2, "parse_axiom": 2, "parse_def": 2, "parse_inductive_def_spec": 2, "parse_nbt": 2, "parse_obj": 2, "parse_thm": 2, "parser": [1, 2], "parsetac": 2, "parseterm": 2, "pass": 2, "path": 2, "pathfroma": 2, "pattern": 2, "patternunif": 2, "patternunif2": 2, "pb": 2, "pc": 2, "pcanonicaltac": 2, "pdef": 2, "perp": 2, "pf": 2, "pg": 2, "pgamma": 2, "pgoal": 2, "ph": 2, "pi": 2, "pi3": 2, "pi5": 2, "pip": 0, "pl": 2, "place": 0, "playground": 0, "pleas": 2, "plu": 2, "plugin": 0, "plus_": 2, "plus_comm": 2, "plus_n_": 2, "plus_n_z": 2, "plus_z": 2, "pnf": 2, "pnn": 2, "pnn_e": 2, "pnn_e0": 2, "pnn_has_two_valu": 2, "pnn_i": 2, "pnn_not": 2, "pnn_tt": 2, "pnnf": 2, "pnnf_monoton": 2, "point": 0, "poli": 2, "polymorph": 2, "polymorphic_vari": 2, "polyt": 2, "possibl": 2, "possibli": 2, "postfix": 2, "postfixl": 2, "pp": 2, "pp_tactic": 2, "ppp": 2, "ppptac": 2, "pptac": 2, "ppterm": 2, "pq": 2, "pr": 2, "preced": 2, "pred": 2, "pred_": 2, "pred_e0": 2, "pred_i": 2, "pred_well_found": 2, "predecessor": 2, "predf": 2, "predf_mon": 2, "predf_monoton": 2, "predic": 2, "prefix": 2, "prefixpoint_to_prefixpoint": 2, "prefixr": 2, "prenex": 2, "prep": 2, "preph": 2, "prephtyp": 2, "pretti": 2, "previou": 2, "primivit": 2, "principl": 2, "print": 2, "print_constraint": 2, "print_sequ": 2, "printer": 2, "probabl": 2, "problem": 2, "procedur": 2, "process_constructor": 2, "prod": 2, "prod_ab": 2, "prod_absrep": 2, "prod_proprep": 2, "prod_rep": 2, "prod_repab": 2, "produc": 2, "product": 2, "prog": 2, "program": 2, "progress": 2, "proj1_pair_univ": 2, "proj1_univ": 2, "proj2_pair_univ": 2, "proj2_univ": 2, "project": 0, "prolog": 2, "proof": 2, "prop": 2, "propag": 2, "properti": 2, "proposit": 2, "provabl": 2, "prove": 2, "prove_fix_elim_thm": 2, "prove_fix_intro_thm": 2, "prove_intro_thm": 2, "prove_monotonicity_thm": 2, "prover": 2, "provid": 2, "prune": 2, "prune_arg": 2, "prune_arg2": 2, "prune_arg3": 2, "pscript": 2, "pseq": 2, "pst": 2, "psttac": 2, "ptac": 2, "ptac1": 2, "ptac2": 2, "ptacl": 2, "ptacn": 2, "pty": 2, "ptybo": 2, "ptyp": 2, "ptype": 2, "publish": 0, "purpos": 2, "put": 2, "put_bind": 2, "px": 2, "py": 2, "python3": 0, "q": 2, "quant_fre": 2, "quantifi": 2, "quater": 2, "queen": 2, "queens_aux": 2, "queri": 2, "quote_syntax": 2, "r": 2, "r2": 2, "rand_tac": 2, "random": 2, "rang": 2, "rator_tac": 2, "re": 2, "reach": 2, "read": 2, "read_cmd": 2, "read_in_context": 2, "readterm": 2, "realiz": 2, "realli": 2, "rec": 2, "rec_is_fixpoint": 2, "recogn": 2, "recurs": 2, "reduc": 2, "reduce_cbn": 2, "reduce_cbv": 2, "reduct": 2, "ref": 2, "refer": [0, 2], "refl": 2, "refman": 0, "regress": 2, "relev": 2, "remain": 2, "remov": 2, "rep": 2, "repab": 2, "repabstyp": 2, "repeat": 2, "repres": 2, "reptyp": 2, "requir": 2, "resili": 2, "resolut": 0, "rest": 2, "restrict": 2, "restriction3": 2, "restriction4": 2, "restriction5": 2, "restriction6": 2, "restructuredtext": 2, "result": 2, "resumpt": 2, "reterm": 2, "retriev": 2, "return": 2, "rev": 2, "rev14": 2, "rid": 2, "right": 2, "ring": 2, "rl": 2, "robu": 2, "role": 0, "root": 0, "rtd": 0, "rule": 2, "run": 2, "runner": 2, "runtim": 2, "s1": 2, "s2": 2, "s_inj": 2, "safe_list_map": 2, "safeq": 2, "same": 2, "same_term": 2, "same_var": 2, "script": 2, "search": 2, "section": 0, "see": [0, 2], "seem": 2, "select": 2, "self": 0, "self_assign": 2, "self_init": 2, "semant": 2, "seq": 2, "sequent": 2, "set": 2, "shorten": 2, "shorten2": 2, "shorten_aux": 2, "shorten_aux2": 2, "shorten_builtin": 2, "shorten_tri": 2, "shot": 2, "shoud": 2, "should": 2, "sigma": 2, "silenc": 2, "simpl": 2, "simpli": 2, "sinc": 2, "singleton": 2, "six": 2, "size": 2, "skip": 2, "slow": 2, "small": 2, "snd": 2, "snippet": 2, "so": 2, "solv": 2, "some": 2, "sometim": 2, "somewher": 2, "sourc": [0, 2], "space": 2, "special": 2, "spent": 2, "sphinx": [0, 2], "spill_and": 2, "spill_impl": 2, "spill_lam": 2, "spy": 2, "src": 2, "src263": 2, "src265": 2, "st": 2, "stack": 0, "stai": 2, "standard": 2, "start": 2, "state": 2, "state_fixpoint_def": 2, "statement": 2, "statu": 2, "std": 2, "std_in": 2, "std_out": 2, "stderr": 2, "stdout": 2, "step0": 2, "step1": 2, "still": 2, "stm": 2, "stop": 2, "string": 2, "strip_const": 2, "stronger": 2, "structur": 2, "sttac": 2, "sub_tac": 2, "subformula": 2, "subproof": 2, "subset": 2, "subseteq": 2, "subst": 2, "substitut": 2, "succ": 2, "succe": 2, "success": 2, "successor": 2, "sum": 2, "super": 2, "support": 2, "sure": [0, 2], "suspend": 2, "sym": 2, "symbol": 2, "symptom": 2, "sync": 2, "system": 0, "t": 2, "t1": 2, "t1_": 2, "t2": 2, "t2_": 2, "t_": 2, "tabl": 2, "tac": 2, "tac1": 2, "tac2": 2, "tacl": 2, "tacn": 2, "tactic": 2, "target": 0, "tarski": 2, "tc": 2, "temporarili": 2, "ten": 2, "tenthousand": 2, "ter": 2, "term": 2, "termifi": 2, "termp": 2, "test1": 2, "test2": 2, "test3": 2, "test4": 2, "test5": 2, "test_appli": 2, "test_apply2": 2, "test_itaut_1": 2, "test_monotone1": 2, "test_monotone2": 2, "test_monotone3": 2, "text": 2, "teyju": 2, "tgt": 2, "th": 2, "than": 2, "the_librari": 2, "thei": 2, "them": 2, "theme": 0, "thenl": 2, "thenll": 2, "theorem": 2, "therefor": 2, "thi": [0, 2], "third": 2, "thm": 2, "thousand": 2, "three": 2, "through": 0, "time": 2, "time0": 2, "time1": 2, "time2": 2, "time_aft": 2, "tl": 2, "tl1": 2, "tm": 2, "tmp": 2, "todo": 2, "token": 2, "too": 2, "top": 2, "toplevel": 2, "toplevel_loop": 2, "toto": 2, "tp": 2, "trace": 2, "trace2": 2, "trace_chr": 2, "trace_cut": 2, "trace_findal": 2, "trail": 2, "tran": 2, "transfer": 2, "transform": 2, "tree": 0, "tri": 2, "trick": 2, "tricki": 2, "trigger": 2, "tru": 2, "true": 2, "true_then_fals": 2, "trust": 2, "try": 2, "try_claus": 2, "tt": 2, "tt_intro": 2, "ttl": 2, "turn": 2, "twelv": 2, "twelve_": 2, "two": 2, "tx": 2, "ty": 2, "tybo": 2, "tye": 2, "typ": 2, "typdef": 2, "type": 2, "typeabbrev": 2, "typeabbrv": 2, "typeabbrv1": 2, "typeabbrv10": 2, "typeabbrv11": 2, "typeabbrv12": 2, "typeabbrv2": 2, "typeabbrv3": 2, "typeabbrv4": 2, "typeabbrv5": 2, "typeabbrv6": 2, "typeabbrv7": 2, "typeabbrv8": 2, "typeabbrv9": 2, "typecheck": 2, "u": 2, "u1": 2, "u2": 2, "uid_priv": 2, "ulimit": 2, "ultim": 2, "uminu": 2, "unabl": 2, "unari": 2, "uncom": 2, "undeclar": 2, "unif": 2, "unif_1": 2, "unif_2": 2, "unif_zero": 2, "unifi": 2, "unimpl": 2, "union": 2, "univ": 2, "univers": 2, "unknown": 2, "unplacedq": 2, "unplacedqs1": 2, "unsaf": 2, "untrust": 2, "untyp": 2, "up": 2, "update_certif": 2, "us": [0, 2], "usag": 0, "user": 2, "usual": 2, "util": 2, "uu": 2, "uvar": 2, "uvar_1": 2, "uvar_2": 2, "uvar_3": 2, "uvar_4": 2, "uvar_5": 2, "uvar_6": 2, "uvar_chr": 2, "v": 2, "v1": 2, "v2": 2, "v_": 2, "valid": 2, "var": 2, "variabl": 2, "variad": 2, "variadic_declare_constraint": 2, "variant": 2, "veri": 2, "verifi": 2, "version": 2, "vg": 2, "via": 2, "vim": 2, "visual": 0, "vt": 2, "w": 2, "w_legaci": 2, "wa": 2, "wai": 2, "want": 2, "warn": 2, "watch": 2, "we": 2, "welcom": 2, "well": 2, "well_found": 2, "wgamma": 2, "what": 2, "whatev": 2, "when": 2, "where": 2, "which": [0, 2], "while": 2, "why": 2, "wit": 2, "within": 2, "without": 2, "wl": 2, "work": 2, "would": 2, "write": 2, "wrong": 2, "ww": 2, "www": 0, "x": 2, "x0": 2, "x01": 2, "x01_": 2, "x0_": 2, "x1": 2, "x10": 2, "x10_": 2, "x11": 2, "x12": 2, "x13": 2, "x14": 2, "x15": 2, "x16": 2, "x17": 2, "x18": 2, "x19": 2, "x1_": 2, "x2": 2, "x20": 2, "x21": 2, "x22": 2, "x23": 2, "x24": 2, "x25": 2, "x26": 2, "x2_": 2, "x3": 2, "x3_": 2, "x4": 2, "x4_": 2, "x5": 2, "x5_": 2, "x6": 2, "x7": 2, "x8": 2, "x9": 2, "x_": 2, "xa": 2, "xcon": 2, "xnil": 2, "xr": 2, "xt": 2, "xtac": 2, "xx": 2, "xxx": 2, "xxxxxxxxx": 2, "y": 2, "y2": 2, "y_": 2, "yap": 2, "yield": 2, "you": 2, "your": 2, "ysx": 2, "yx": 2, "yy": 2, "z": 2, "z_": 2, "zebra": 2, "zero": 2, "\u03bbprolog": 2}, "titles": ["About", "Welcome to Elpi\u2019s documentation!", "Playground"], "titleterms": {"": 1, "about": 0, "api": 1, "bed": 2, "build": 0, "document": 1, "elpi": 1, "extens": 0, "match": 2, "playground": 2, "prerequisit": [0, 2], "regexp": 2, "syntax": 2, "test": 2, "welcom": 1}})
\ No newline at end of file
+Search.setIndex({"alltitles": {"API:": [[1, null]], "About": [[0, null]], "Building": [[0, "building"]], "Extensions": [[0, "extensions"]], "Playground": [[2, null]], "Prerequisites": [[0, "prerequisites"], [2, "prerequisites"]], "Regexp Matching": [[2, "regexp-matching"]], "Syntax": [[2, "syntax"]], "Test Bed": [[2, "test-bed"]], "Welcome to Elpi\u2019s documentation!": [[1, null]]}, "docnames": ["about", "index", "playground"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1}, "filenames": ["about.rst", "index.rst", "playground.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [0, 2], "0": 2, "00": 2, "000": 2, "001": 2, "002": 2, "003": 2, "004": 2, "014": 2, "024": 2, "027": 2, "033": 2, "052925": 2, "058142": 2, "068": 2, "083": 2, "094963": 2, "1": 2, "10": 2, "100": 2, "101": 2, "102": 2, "106": 2, "107": 2, "108": 2, "11": 2, "111": 2, "1111": 2, "1114": 2, "1128": 2, "113": 2, "1131": 2, "1134": 2, "1136": 2, "1168": 2, "1174": 2, "1175": 2, "1181": 2, "12": 2, "120": 2, "1236": 2, "1240": 2, "127": 2, "1276": 2, "1279": 2, "128": 2, "13": 2, "1310": 2, "1311": 2, "133": 2, "1332": 2, "1334": 2, "134": 2, "135": 2, "136": 2, "137": 2, "1387": 2, "1394": 2, "14": 2, "1434": 2, "1436": 2, "144": 2, "145": 2, "1488": 2, "1490": 2, "15": 2, "154": 2, "1540": 2, "1544": 2, "16": 2, "1603": 2, "1609": 2, "1643": 2, "1644": 2, "1660": 2, "1666": 2, "17": 2, "18": 2, "1876": 2, "1877": 2, "19": 2, "190": 2, "191": 2, "1913": 2, "1915": 2, "1941": 2, "1942": 2, "1984": 2, "1985": 2, "2": 2, "20": 2, "200": 2, "2005": 2, "2006": 2, "2044": 2, "2045": 2, "21": 2, "213": 2, "216": 2, "22": 2, "2252": 2, "2254": 2, "228060": 2, "23": 2, "2315": 2, "2316": 2, "2368": 2, "2372": 2, "24": 2, "2428": 2, "2434": 2, "2479": 2, "2481": 2, "25": 2, "252": 2, "253": 2, "2533": 2, "2537": 2, "254": 2, "255": 2, "257": 2, "2593": 2, "2599": 2, "26": 2, "265": 2, "27": 2, "274": 2, "276": 2, "28": 2, "29": 2, "291": 2, "292": 2, "3": 2, "30": 2, "300": 2, "303534": 2, "31": 2, "319": 2, "33": 2, "331": 2, "34": 2, "3476": 2, "3478": 2, "3491": 2, "3493": 2, "35": 2, "3508": 2, "3510": 2, "3524": 2, "3526": 2, "3545": 2, "3546": 2, "36": 2, "37": 2, "38": 2, "382": 2, "383": 2, "384": 2, "385": 2, "386": 2, "387": 2, "387892": 2, "388": 2, "389": 2, "39": 2, "390": 2, "395": 2, "396": 2, "397": 2, "4": 2, "40": 2, "401275": 2, "402": 2, "403": 2, "408": 2, "409": 2, "4096": 2, "41": 2, "419": 2, "42": 2, "43": 2, "436": 2, "437": 2, "44": 2, "448": 2, "45": 2, "47": 2, "48": 2, "485": 2, "49": 2, "494": 2, "495": 2, "496": 2, "497": 2, "498": 2, "499": 2, "5": 2, "50": 2, "500": 2, "501": 2, "502": 2, "507": 2, "508": 2, "509": 2, "51": 2, "514": 2, "515": 2, "516": 2, "52": 2, "520": 2, "521": 2, "528": 2, "53": 2, "533": 2, "548": 2, "55": 2, "56": 2, "565": 2, "57": 2, "579": 2, "58": 2, "59": 2, "6": 2, "60": 2, "61": 2, "617": 2, "62": 2, "623": 2, "627": 2, "629": 2, "63": 2, "633": 2, "636": 2, "637": 2, "64": 2, "65": 2, "657": 2, "66": 2, "660": 2, "67": 2, "671": 2, "675": 2, "681": 2, "683": 2, "688": 2, "697709": 2, "7": 2, "70": 2, "701716": 2, "711": 2, "712": 2, "714": 2, "719": 2, "72": 2, "722": 2, "727": 2, "73": 2, "74": 2, "75": 2, "756": 2, "76": 2, "761": 2, "763": 2, "764467": 2, "77": 2, "771": 2, "78": 2, "780": 2, "781": 2, "79": 2, "792": 2, "794": 2, "795": 2, "797": 2, "8": 2, "80": 2, "81": 2, "818": 2, "81920": 2, "821": 2, "83": 2, "85": 2, "852": 2, "858": 2, "87": 2, "88": 2, "89": 2, "899": 2, "9": 2, "90": 2, "914749": 2, "92": 2, "926368": 2, "95": 2, "96": 2, "960": 2, "964": 2, "97": 2, "98": 2, "99": 2, "999999": 2, "A": 2, "As": 2, "But": 2, "FOR": 2, "For": 2, "IN": 2, "If": 2, "In": 2, "It": 2, "No": 2, "OF": 2, "ON": 2, "ONE": 2, "Of": 2, "On": [0, 2], "Or": 0, "The": 2, "There": 2, "To": [0, 2], "_": 2, "_a": 2, "_ab": 2, "_b": 2, "_build": 2, "_c": 2, "_d": 2, "_dummy1": 2, "_dummy2": 2, "_e": 2, "_f": 2, "_f1": 2, "_f2": 2, "_f3": 2, "_f4": 2, "_foo": 2, "_g": 2, "_nine": 2, "_t": 2, "_tq": 2, "_twelv": 2, "_v": 2, "_x": 2, "_x0": 2, "_x01": 2, "_x1": 2, "_x10": 2, "_x2": 2, "_x3": 2, "_x4": 2, "_x5": 2, "_y": 2, "_z": 2, "a1": 2, "a2": 2, "a_": 2, "ab": 2, "ab_": 2, "abbrevi": 2, "abort": 2, "about": 2, "abs_tac": 2, "absrep": 2, "absreptyp": 2, "abstract": 2, "abstyp": 2, "acc": 2, "acc_": 2, "acc_e0": 2, "acc_i": 2, "acc_i0": 2, "accf": 2, "accf_monoton": 2, "accord": 2, "accumul": 2, "accumulate_twice1": 2, "accumulate_twice2": 2, "ack": 2, "ackermann": 2, "ad": 2, "add": 2, "adepth": 2, "adj": 2, "ads_and_or": 2, "ads_or_and": 2, "after": 2, "al": 2, "all": 2, "all_equals_list": 2, "alon": 2, "alreadi": 2, "also": 2, "altern": 2, "an": [0, 2], "analysi": 2, "analyz": 2, "and_": 2, "and_associ": 2, "and_commut": 2, "and_ff": 2, "and_idempot": 2, "and_monoton": 2, "and_or": 2, "and_tt": 2, "andl": 2, "andr": 2, "ani": [0, 2], "answer": 2, "app": 2, "appear": 2, "append": 2, "appl": 2, "appli": 2, "applic": 2, "apply_2": 2, "apply_last": 2, "applyth": 2, "appuvar": 2, "apredf": 2, "apt": 0, "ar": [0, 2], "arg": 2, "argument": 2, "arithmet": 2, "ariti": 2, "around": 2, "arr": 2, "as_1": 2, "as_2": 2, "as_3": 2, "asclaus": 2, "ask": 2, "assert": 2, "assoc": 2, "associ": 2, "assum": 2, "assumpt": 2, "ast": 2, "atisym": 2, "atm": 2, "atom": 2, "auto": 2, "auto_monoton": 2, "autom": 2, "automat": 2, "aux": 2, "avail": 2, "avoid": 2, "axiom": 2, "axiomat": 2, "b": 2, "b1": 2, "b2": 2, "b2n": 2, "b_": 2, "backchain": 2, "backtrack": 2, "bad": 2, "bam": 2, "bang": 2, "bar": 2, "base": [0, 2], "basic": 2, "baz": 2, "bdepth": 2, "becasus": 2, "becaus": 2, "becom": 2, "befor": [0, 2], "belong": 2, "below": 2, "beta": 2, "beta_expand": 2, "better": 2, "between": 2, "bi": 2, "bidirect": 2, "bind": 2, "bit": 2, "block": 2, "bo": 2, "bodi": 2, "bool": 2, "bool2": 2, "both": [0, 2], "both_or_non": 2, "bound": 2, "box": 2, "brain": 2, "branch": 2, "broken": 2, "btl": 2, "btw": 2, "bug": 2, "build": 2, "build_pred": 2, "build_quantified_pred": 2, "built": 2, "builtin": 2, "c": 2, "c0": 2, "c1": 2, "c2": 2, "c3": 2, "c4": 2, "c5": 2, "c6": 2, "call": 2, "callback_prov": 2, "can": [0, 2], "cannot": 2, "canon": 2, "canonicaltac": 2, "captur": 2, "cardin": 2, "cartesian": 2, "case": 2, "case_disj_union": 2, "case_disj_union_inj1": 2, "case_disj_union_inj2": 2, "case_univ": 2, "case_univ_inj1": 2, "case_univ_inj2": 2, "cast": 2, "cbn": 2, "cbv": 2, "cd": 2, "cert": 2, "certif": 2, "chang": 2, "charact": 2, "check": 2, "check1": 2, "check1axm": 2, "check1decl": 2, "check1def": 2, "check1nbt": 2, "check1thm": 2, "check_codomain": 2, "check_domain": 2, "check_hyp": 2, "check_term": 2, "choic": 2, "choos": 2, "chr": 2, "chr_nokei": 2, "chr_nokey2": 2, "chr_not_cliqu": 2, "chr_sem": 2, "chrgcd": 2, "chrleq": 2, "classic": 2, "claus": 2, "clause1": 2, "clause2": 2, "clause3": 2, "close": 2, "cmp_term": 2, "code": 2, "column": 2, "come": 0, "comma": 2, "command": 2, "comment": 2, "common": 2, "commun": 0, "compat": 2, "compil": 2, "complet": 2, "con": 2, "concat1": 2, "confus": 2, "conj": 2, "conj2": 2, "conjunct": 2, "connect": 2, "consequ": 2, "consist": 2, "consol": 2, "const": 2, "constant": 2, "constant_tacl": 2, "constraint": 2, "cont": 2, "contain": 2, "content": 2, "context": 2, "contnext": 2, "conv": 2, "convention": 2, "converion": 2, "convers": 2, "copi": 2, "coq": 0, "correctli": 2, "could": 2, "counter": 2, "creat": [0, 2], "cross": 0, "cs_": 2, "cscript": 2, "ct": 2, "ctx": 2, "ctx_load": 2, "ctxconstr": 2, "current": [0, 2], "cut": 2, "cut2": 2, "cut3": 2, "cut4": 2, "cut5": 2, "cut6": 2, "cutth": 2, "d": 2, "d1": 2, "d11": 2, "d2": 2, "d22": 2, "d3": 2, "d33": 2, "d_": 2, "daemon": 2, "damag": 2, "data": 2, "dd": 2, "deal": 2, "debian": 0, "debprint": 2, "debug": 2, "debuggin": 2, "decis": 2, "decl": 2, "declar": 2, "declare_constraint": 2, "deep_index": 2, "def": 2, "def0": 2, "default": 2, "defin": 2, "definit": 2, "deftac": 2, "deftacl": 2, "delai": 2, "delay_outside_frag": 2, "denot": 2, "depend": 2, "deprec": 2, "depth": 2, "depth_tac": 2, "desper": 2, "desperate2": 2, "desperate3": 2, "develop": 2, "diagnost": 2, "did": 2, "differ": 2, "direct": 2, "directli": 0, "directori": 0, "dirti": 2, "discard": 2, "discuss": 2, "disj": 2, "disj_union": 2, "disjoint": 2, "distinct": 2, "distinct_nam": 2, "distrib": 0, "div": 2, "diverg": 2, "do": 2, "doc": [0, 2], "document": [0, 2], "doe": 2, "doesn": 2, "done": 2, "doom": 2, "doubl": 2, "down": 2, "drop": 2, "due": 2, "dummi": 2, "dummy1": 2, "dummy1_": 2, "dummy2": 2, "dummy2_": 2, "dune": 2, "duplic": 2, "e": [0, 2], "e1": 2, "e2": 2, "e_": 2, "eager": 2, "echo": 2, "effici": 2, "eg": 2, "either": 0, "eject_inject_limit_univ": 2, "eject_limit_univ": 2, "ejection_injection_univ": 2, "ejection_univ": 2, "element": 2, "elimin": 2, "elimthm": 2, "elp": 2, "elpi": 2, "elpi_api": 2, "elpi_only_llam": 2, "els": 2, "empti": 2, "en": 0, "end": 2, "end_com": 2, "end_of_proof": 2, "engin": 2, "enrico": 2, "enter": 2, "env": 2, "eq": 2, "eq_reflex": 2, "eq_to_impl": 2, "eq_to_impl_b": 2, "eq_to_impl_f": 2, "eq_true_intro": 2, "equal": 2, "equival": 2, "erro": 2, "error": 2, "escap": 2, "eta": 2, "eta_a": 2, "eval": 2, "evalu": 2, "even": 2, "everyth": 2, "exampl": 2, "except": 2, "exec": 2, "exist": 2, "existence_condit": 2, "exists_": 2, "exists_i": 2, "exists_monoton": 2, "exit": 2, "exp": 2, "expand": 2, "expect": 2, "explicitli": 0, "export": 2, "ext": 0, "extend": 2, "extern": 0, "extra": 2, "f": 2, "f1": 2, "f1_": 2, "f2": 2, "f2_": 2, "f3": 2, "f3_": 2, "f4": 2, "f4_": 2, "f_": 2, "facil": 2, "fail": 2, "failur": 2, "fallback": 0, "fals": 2, "famili": 2, "fatal": 2, "ff": 2, "ff_elim": 2, "file": [0, 2], "filter": 2, "find": 2, "findal": 2, "first": 2, "first_claus": 2, "five": 2, "fix": 2, "fixdef": 2, "fixiti": 2, "fixpoint": 2, "fixpoint_is_fixpoint": 2, "fixpoint_is_prefixpoint": 2, "fixpoint_subseteq_any_fixpoint": 2, "fixpoint_subseteq_any_prefixpoint": 2, "flat": 2, "flexibl": 2, "flush": 2, "fn": 2, "focus": 2, "fold": 2, "fold2_append": 2, "follow": [0, 2], "foo": 2, "foo1": 2, "foo2": 2, "foo3": 2, "foo4": 2, "foral": 2, "forall_": 2, "forall_i": 2, "forall_monoton": 2, "forc": 2, "form": 2, "formal": 2, "formed": 2, "formula": 2, "found": 2, "four": 2, "fp": 2, "fr": 0, "fragil": 2, "fragment": 2, "fragment_exit": 2, "fragment_exit2": 2, "fragment_exit3": 2, "free": 2, "fresh": 2, "fresh_": 2, "from": 2, "front": 2, "frozen": 2, "fst": 2, "ft": 2, "fun": 2, "function": 2, "funnam": 2, "g": [0, 2], "g1": 2, "g2": 2, "g_": 2, "gamma": 2, "gamma1": 2, "gamma2": 2, "gc": 2, "gcd": 2, "gener": [0, 2], "general_cas": 2, "general_case2": 2, "general_case3": 2, "get": 2, "gettimeofdai": 2, "github": 0, "githubpag": 0, "global": 2, "go": 2, "goal": 2, "goaltact": 2, "group": 2, "gx": 2, "gy": 2, "h": 2, "h1": 2, "h2": 2, "ha": 2, "hack": 2, "halt": 2, "hand": 2, "handl": 2, "happen": 2, "hard": 2, "hash": 2, "hashtbl": 2, "have": [0, 2], "hc_interp": 2, "hd": 2, "hdclaus": 2, "he": 2, "head": 2, "heap_discard": 2, "helper": 0, "henc": 2, "here": 2, "higher": 2, "hindlei": 2, "ho": 2, "hoc": 2, "hol": 2, "hollight": 2, "hollight_legaci": 2, "home": 2, "hook": 2, "horn": 2, "how": 2, "html": 0, "http": 0, "hurt": 2, "hyp": 2, "hyp_uvar": 2, "hypothes": 2, "hypothesi": 2, "hypsuchthat": 2, "i": [0, 2], "id": 2, "idempot": 2, "identifi": 2, "ig": 2, "ign": 2, "ignor": 2, "ih1": 2, "ih2": 2, "ii": 2, "illustr": 2, "immedi": 2, "imp": 2, "impl": 2, "impl2": 2, "impl_monoton": 2, "impl_not_not": 2, "implement": 2, "implic": 2, "implicit": 2, "in_subseteq": 2, "in_two": 2, "in_two_": 2, "in_two_e0": 2, "in_two_ff": 2, "in_two_i": 2, "in_two_tt": 2, "in_twof": 2, "in_twof_monoton": 2, "includ": 2, "incompat": 2, "increas": 2, "index": 2, "index2": 2, "induct": 2, "inductive_def": 2, "inductive_def_pkg": 2, "inductive_typ": 2, "ineffici": 2, "inequ": 2, "infer": 2, "infix": 2, "infixl": 2, "infixr": 2, "inj": 2, "inj1_disj_union": 2, "inj1_disj_union_inj": 2, "inj1_univ": 2, "inj1_univ_inj": 2, "inj2_disj_union": 2, "inj2_disj_union_inj": 2, "inj2_univ": 2, "inj2_univ_inj": 2, "inject": [0, 2], "inject_limit_univ": 2, "injection_univ": 2, "injection_univ_inj": 2, "input": 2, "inria": 0, "insid": 2, "inspect": 2, "instal": [0, 2], "instead": [0, 2], "int": 2, "int_tac": 2, "integ": 2, "inter": 2, "interact": 2, "interactive_tac": 2, "interest": 2, "interfac": 2, "interpret": 2, "intersphinx": 0, "introspect": 0, "introthm": 2, "inv": 2, "io_colon": 2, "is_fixpoint": 2, "is_ground": 2, "is_nat": 2, "is_nat_": 2, "is_nat_e0": 2, "is_nat_i": 2, "is_nat_monoton": 2, "is_nat_z": 2, "is_natf": 2, "is_pair": 2, "is_subset": 2, "is_subset_": 2, "itac": 2, "itaut": 2, "itauteq": 2, "iter": 2, "its": [0, 2], "j": 2, "just": 2, "jwintz": 2, "k": 2, "k1": 2, "k2": 2, "kernel": 2, "keyword": 2, "kill": 2, "kind": 2, "knaster": 2, "known": 2, "ko": 2, "ko1": 2, "ko2": 2, "l": 2, "l1": 2, "l2": 2, "lam": 2, "lambda": 2, "lambda2": 2, "lambda3": 2, "lambdaprolog": 2, "land_tac": 2, "langag": 2, "lappli": 2, "lapply_last": 2, "last": 2, "lazi": 2, "leancop": 2, "least": 2, "left": 2, "legaci": 1, "lemma": 2, "len": 2, "length": 2, "leq": 2, "less": 2, "let": 2, "level": 2, "lforal": 2, "lforall_last": 2, "lh": 2, "lib": 2, "librari": 2, "light": 2, "like": 2, "line": 2, "linear": 2, "link": 0, "list": 2, "list_as_conj": 2, "list_comma": 2, "list_iter_rev": 2, "list_map": 2, "liter": 2, "literalinclud": 2, "llam": 2, "llamchr": 2, "local": 2, "logic": 2, "long": 2, "longer": 2, "look": 2, "loop": 2, "lost": 2, "lower": 2, "lprolog": 2, "lstop": 2, "lt": 2, "ltn": 2, "lvl": 2, "lx": 2, "ly": 2, "m": 2, "m1": 2, "m2": 2, "macro": 2, "mai": 2, "main": 2, "main1": 2, "main2": 2, "make": [0, 2], "makefil": 0, "man": 2, "manag": 0, "mani": 2, "map": 2, "map_list": 2, "map_list_opt": 2, "mark": 2, "master": 0, "match": 0, "matter": 2, "mayb": 2, "mean": 2, "meant": 0, "mem": 2, "mem_": 2, "memb": 2, "merg": 2, "mess": 2, "messag": 2, "meta": 2, "metavari": 2, "milner": 2, "miss": 2, "mistak": 2, "mixfix": 2, "mk": 2, "mk_bounded_fresh": 2, "mk_constant_list": 2, "mk_intro_thm": 2, "mk_list_of_bounded_fresh": 2, "mk_script": 2, "ml": 2, "mod": 2, "mode": 2, "modifi": 2, "modul": [0, 2], "mono": 2, "monoton": 2, "monthm": 2, "more": 2, "move": 2, "mp": 2, "much": 2, "mult": 2, "must": 2, "myabs2": 2, "myabsrep2": 2, "mybool2_": 2, "myformula": 2, "mynot": 2, "mynot_mynot_mytt": 2, "mynot_transf": 2, "myprop": 2, "myproprep2": 2, "myrep2": 2, "myrepabs2": 2, "mytt": 2, "mytt_transf": 2, "n": 2, "n1": 2, "n2": 2, "name": [0, 2], "name1": 2, "name_builtin": 2, "named_clauses00": 2, "named_clauses01": 2, "named_clauses02": 2, "namespac": 2, "namespaces00": 2, "namespaces01": 2, "namespaces02": 2, "namespaces03": 2, "nat": 2, "nat_": 2, "nat_ab": 2, "nat_abs_inj": 2, "nat_absrep": 2, "nat_cas": 2, "nat_case_": 2, "nat_case_z": 2, "nat_proprep": 2, "nat_rec": 2, "nat_rec_ok": 2, "nat_rec_ok0": 2, "nat_recf": 2, "nat_rep": 2, "nat_rep_inj": 2, "nat_repab": 2, "natur": 2, "need": 2, "neq": 2, "never": 2, "new": 2, "new2": 2, "new_basic_typ": 2, "new_certif": 2, "new_interactive_tac": 2, "new_tac": 2, "newcom": 2, "newl": 2, "newlazi": 2, "newt": 2, "next": 2, "next_object": 2, "next_tact": 2, "next_tactic0": 2, "nil": 2, "nil_con": 2, "nine": 2, "nine_": 2, "no_more_ch": 2, "nojekyl": 0, "non": 2, "non_interactive_tac": 2, "normal": 2, "not_": 2, "not_and": 2, "not_attack": 2, "not_attack_aux": 2, "not_defin": 2, "not_eq_inj1_inj2_univ": 2, "not_equal_z_": 2, "not_i": 2, "not_monoton": 2, "not_not_not": 2, "not_or": 2, "notat": 2, "notation_error": 2, "notation_legaci": 2, "note": 2, "noth": 2, "now": 2, "nr": 2, "num": 2, "number": 2, "o": 2, "object": [0, 2], "ocaml": 2, "ocamlc": 2, "ocamlopt": 2, "occur": 2, "occurr": 2, "odd": 2, "og": 2, "oh1": 2, "oh2": 2, "ok": 2, "old": 2, "omit": 2, "onc": 2, "one": [0, 2], "ones": 2, "onli": 2, "opam": 2, "oper": 2, "opr": 2, "optim": 2, "option": [1, 2], "or_": 2, "or_and": 2, "or_associ": 2, "or_commut": 2, "or_ff": 2, "or_idempot": 2, "or_monoton": 2, "or_tt": 2, "order": 2, "orels": 2, "org": 0, "origti": 2, "orl": 2, "orr": 2, "otac": 2, "other": [0, 2], "other_tac": 2, "otherwis": 2, "our": 2, "out": 2, "out1": 2, "outcom": 2, "output": 2, "outs2": 2, "outsid": 2, "over": 2, "overbar": 2, "own": 0, "p": 2, "p1": 2, "p2": 2, "p_tactic": 2, "pa": 2, "packag": [0, 2], "page": [0, 2], "pair": 2, "pair_univ": 2, "pair_univ_inj_l": 2, "pair_univ_inj_r": 2, "param": 2, "pars": 2, "parse_axiom": 2, "parse_def": 2, "parse_inductive_def_spec": 2, "parse_nbt": 2, "parse_obj": 2, "parse_thm": 2, "parser": [1, 2], "parsetac": 2, "parseterm": 2, "pass": 2, "path": 2, "pathfroma": 2, "pattern": 2, "patternunif": 2, "patternunif2": 2, "pb": 2, "pc": 2, "pcanonicaltac": 2, "pdef": 2, "perp": 2, "pf": 2, "pg": 2, "pgamma": 2, "pgoal": 2, "ph": 2, "pi": 2, "pi3": 2, "pi5": 2, "pip": 0, "pl": 2, "place": 0, "playground": 0, "pleas": 2, "plu": 2, "plugin": 0, "plus_": 2, "plus_comm": 2, "plus_n_": 2, "plus_n_z": 2, "plus_z": 2, "pnf": 2, "pnn": 2, "pnn_e": 2, "pnn_e0": 2, "pnn_has_two_valu": 2, "pnn_i": 2, "pnn_not": 2, "pnn_tt": 2, "pnnf": 2, "pnnf_monoton": 2, "point": 0, "poli": 2, "polymorph": 2, "polymorphic_vari": 2, "polyt": 2, "possibl": 2, "possibli": 2, "postfix": 2, "postfixl": 2, "pp": 2, "pp_tactic": 2, "ppp": 2, "ppptac": 2, "pptac": 2, "ppterm": 2, "pq": 2, "pr": 2, "preced": 2, "pred": 2, "pred_": 2, "pred_e0": 2, "pred_i": 2, "pred_well_found": 2, "predecessor": 2, "predf": 2, "predf_mon": 2, "predf_monoton": 2, "predic": 2, "prefix": 2, "prefixpoint_to_prefixpoint": 2, "prefixr": 2, "prenex": 2, "prep": 2, "preph": 2, "prephtyp": 2, "pretti": 2, "previou": 2, "primivit": 2, "principl": 2, "print": 2, "print_constraint": 2, "print_sequ": 2, "printer": 2, "probabl": 2, "problem": 2, "procedur": 2, "process_constructor": 2, "prod": 2, "prod_ab": 2, "prod_absrep": 2, "prod_proprep": 2, "prod_rep": 2, "prod_repab": 2, "produc": 2, "product": 2, "prog": 2, "program": 2, "progress": 2, "proj1_pair_univ": 2, "proj1_univ": 2, "proj2_pair_univ": 2, "proj2_univ": 2, "project": 0, "prolog": 2, "proof": 2, "prop": 2, "propag": 2, "properti": 2, "proposit": 2, "provabl": 2, "prove": 2, "prove_fix_elim_thm": 2, "prove_fix_intro_thm": 2, "prove_intro_thm": 2, "prove_monotonicity_thm": 2, "prover": 2, "provid": 2, "prune": 2, "prune_arg": 2, "prune_arg2": 2, "prune_arg3": 2, "pscript": 2, "pseq": 2, "pst": 2, "psttac": 2, "ptac": 2, "ptac1": 2, "ptac2": 2, "ptacl": 2, "ptacn": 2, "pty": 2, "ptybo": 2, "ptyp": 2, "ptype": 2, "publish": 0, "purpos": 2, "put": 2, "put_bind": 2, "px": 2, "py": 2, "python3": 0, "q": 2, "quant_fre": 2, "quantifi": 2, "quater": 2, "queen": 2, "queens_aux": 2, "queri": 2, "quote_syntax": 2, "r": 2, "r2": 2, "rand_tac": 2, "random": 2, "rang": 2, "rator_tac": 2, "re": 2, "reach": 2, "read": 2, "read_cmd": 2, "read_in_context": 2, "readterm": 2, "realiz": 2, "realli": 2, "rec": 2, "rec_is_fixpoint": 2, "recogn": 2, "recurs": 2, "reduc": 2, "reduce_cbn": 2, "reduce_cbv": 2, "reduct": 2, "ref": 2, "refer": [0, 2], "refl": 2, "refman": 0, "regress": 2, "relev": 2, "remain": 2, "remov": 2, "rep": 2, "repab": 2, "repabstyp": 2, "repeat": 2, "repres": 2, "reptyp": 2, "requir": 2, "resili": 2, "resolut": 0, "rest": 2, "restrict": 2, "restriction3": 2, "restriction4": 2, "restriction5": 2, "restriction6": 2, "restructuredtext": 2, "result": 2, "resumpt": 2, "reterm": 2, "retriev": 2, "return": 2, "rev": 2, "rev14": 2, "rid": 2, "right": 2, "ring": 2, "rl": 2, "robu": 2, "role": 0, "root": 0, "rtd": 0, "rule": 2, "run": 2, "runner": 2, "runtim": 2, "s1": 2, "s2": 2, "s_inj": 2, "safe_list_map": 2, "safeq": 2, "same": 2, "same_term": 2, "same_var": 2, "script": 2, "search": 2, "section": 0, "see": [0, 2], "seem": 2, "select": 2, "self": 0, "self_assign": 2, "self_init": 2, "semant": 2, "seq": 2, "sequent": 2, "set": 2, "shorten": 2, "shorten2": 2, "shorten_aux": 2, "shorten_aux2": 2, "shorten_builtin": 2, "shorten_tri": 2, "shot": 2, "shoud": 2, "should": 2, "sigma": 2, "silenc": 2, "simpl": 2, "simpli": 2, "sinc": 2, "singleton": 2, "six": 2, "size": 2, "skip": 2, "slow": 2, "small": 2, "snd": 2, "snippet": 2, "so": 2, "solv": 2, "some": 2, "sometim": 2, "somewher": 2, "sourc": [0, 2], "space": 2, "special": 2, "spent": 2, "sphinx": [0, 2], "spill_and": 2, "spill_impl": 2, "spill_lam": 2, "spy": 2, "src": 2, "src263": 2, "src265": 2, "st": 2, "stack": 0, "stai": 2, "standard": 2, "start": 2, "state": 2, "state_fixpoint_def": 2, "statement": 2, "statu": 2, "std": 2, "std_in": 2, "std_out": 2, "stderr": 2, "stdout": 2, "step0": 2, "step1": 2, "still": 2, "stm": 2, "stop": 2, "string": 2, "strip_const": 2, "stronger": 2, "structur": 2, "sttac": 2, "sub_tac": 2, "subformula": 2, "subproof": 2, "subset": 2, "subseteq": 2, "subst": 2, "substitut": 2, "succ": 2, "succe": 2, "success": 2, "successor": 2, "sum": 2, "super": 2, "support": 2, "sure": [0, 2], "suspend": 2, "sym": 2, "symbol": 2, "symptom": 2, "sync": 2, "system": 0, "t": 2, "t1": 2, "t1_": 2, "t2": 2, "t2_": 2, "t_": 2, "tabl": 2, "tac": 2, "tac1": 2, "tac2": 2, "tacl": 2, "tacn": 2, "tactic": 2, "target": 0, "tarski": 2, "tc": 2, "temporarili": 2, "ten": 2, "tenthousand": 2, "ter": 2, "term": 2, "termifi": 2, "termp": 2, "test1": 2, "test2": 2, "test3": 2, "test4": 2, "test5": 2, "test_appli": 2, "test_apply2": 2, "test_itaut_1": 2, "test_monotone1": 2, "test_monotone2": 2, "test_monotone3": 2, "text": 2, "teyju": 2, "tgt": 2, "th": 2, "than": 2, "the_librari": 2, "thei": 2, "them": 2, "theme": 0, "thenl": 2, "thenll": 2, "theorem": 2, "therefor": 2, "thi": [0, 2], "third": 2, "thm": 2, "thousand": 2, "three": 2, "through": 0, "time": 2, "time0": 2, "time1": 2, "time2": 2, "time_aft": 2, "tl": 2, "tl1": 2, "tm": 2, "tmp": 2, "todo": 2, "token": 2, "too": 2, "top": 2, "toplevel": 2, "toplevel_loop": 2, "toto": 2, "tp": 2, "trace": 2, "trace2": 2, "trace_chr": 2, "trace_cut": 2, "trace_findal": 2, "trail": 2, "tran": 2, "transfer": 2, "transform": 2, "tree": 0, "tri": 2, "trick": 2, "tricki": 2, "trigger": 2, "tru": 2, "true": 2, "true_then_fals": 2, "trust": 2, "try": 2, "try_claus": 2, "tt": 2, "tt_intro": 2, "ttl": 2, "turn": 2, "twelv": 2, "twelve_": 2, "two": 2, "tx": 2, "ty": 2, "tybo": 2, "tye": 2, "typ": 2, "typdef": 2, "type": 2, "typeabbrev": 2, "typeabbrv": 2, "typeabbrv1": 2, "typeabbrv10": 2, "typeabbrv11": 2, "typeabbrv12": 2, "typeabbrv2": 2, "typeabbrv3": 2, "typeabbrv4": 2, "typeabbrv5": 2, "typeabbrv6": 2, "typeabbrv7": 2, "typeabbrv8": 2, "typeabbrv9": 2, "typecheck": 2, "u": 2, "u1": 2, "u2": 2, "uid_priv": 2, "ulimit": 2, "ultim": 2, "uminu": 2, "unabl": 2, "unari": 2, "uncom": 2, "undeclar": 2, "unif": 2, "unif_1": 2, "unif_2": 2, "unif_zero": 2, "unifi": 2, "unimpl": 2, "union": 2, "univ": 2, "univers": 2, "unknown": 2, "unplacedq": 2, "unplacedqs1": 2, "unsaf": 2, "untrust": 2, "untyp": 2, "up": 2, "update_certif": 2, "us": [0, 2], "usag": 0, "user": 2, "usual": 2, "util": 2, "uu": 2, "uvar": 2, "uvar_1": 2, "uvar_2": 2, "uvar_3": 2, "uvar_4": 2, "uvar_5": 2, "uvar_6": 2, "uvar_chr": 2, "v": 2, "v1": 2, "v2": 2, "v_": 2, "valid": 2, "var": 2, "variabl": 2, "variad": 2, "variadic_declare_constraint": 2, "variant": 2, "veri": 2, "verifi": 2, "version": 2, "vg": 2, "via": 2, "vim": 2, "visual": 0, "vt": 2, "w": 2, "w_legaci": 2, "wa": 2, "wai": 2, "want": 2, "warn": 2, "watch": 2, "we": 2, "welcom": 2, "well": 2, "well_found": 2, "wgamma": 2, "what": 2, "whatev": 2, "when": 2, "where": 2, "which": [0, 2], "while": 2, "why": 2, "wit": 2, "within": 2, "without": 2, "wl": 2, "work": 2, "would": 2, "write": 2, "wrong": 2, "ww": 2, "www": 0, "x": 2, "x0": 2, "x01": 2, "x01_": 2, "x0_": 2, "x1": 2, "x10": 2, "x10_": 2, "x11": 2, "x12": 2, "x13": 2, "x14": 2, "x15": 2, "x16": 2, "x17": 2, "x18": 2, "x19": 2, "x1_": 2, "x2": 2, "x20": 2, "x21": 2, "x22": 2, "x23": 2, "x24": 2, "x25": 2, "x26": 2, "x2_": 2, "x3": 2, "x3_": 2, "x4": 2, "x4_": 2, "x5": 2, "x5_": 2, "x6": 2, "x7": 2, "x8": 2, "x9": 2, "x_": 2, "xa": 2, "xcon": 2, "xnil": 2, "xr": 2, "xt": 2, "xtac": 2, "xx": 2, "xxx": 2, "xxxxxxxxx": 2, "y": 2, "y2": 2, "y_": 2, "yap": 2, "yield": 2, "you": 2, "your": 2, "ysx": 2, "yx": 2, "yy": 2, "z": 2, "z_": 2, "zebra": 2, "zero": 2, "\u03bbprolog": 2}, "titles": ["About", "Welcome to Elpi\u2019s documentation!", "Playground"], "titleterms": {"": 1, "about": 0, "api": 1, "bed": 2, "build": 0, "document": 1, "elpi": 1, "extens": 0, "match": 2, "playground": 2, "prerequisit": [0, 2], "regexp": 2, "syntax": 2, "test": 2, "welcom": 1}})
\ No newline at end of file