lean2/tests/lean/tst3.lean

59 lines
1.4 KiB
Text
Raw Normal View History

SetOption lean::parser::verbose false.
2013-08-27 23:03:45 +00:00
Notation 10 if _ then _ : implies.
Show Environment 1.
Show if true then false.
Variable a : Bool.
Show if true then if a then false.
SetOption lean::pp::notation false.
2013-08-27 23:03:45 +00:00
Show if true then if a then false.
Variable A : Type.
Variable f : A -> A -> A -> Bool.
Notation 100 _ |- _ ; _ : f.
Show Environment 1.
Variable c : A.
Variable d : A.
Variable e : A.
Show c |- d ; e.
SetOption lean::pp::notation true.
2013-08-27 23:03:45 +00:00
Show c |- d ; e.
Variable fact : A -> A.
Notation 20 _ ! : fact.
Show c! !.
SetOption lean::pp::notation false.
Show c! !.
SetOption lean::pp::notation true.
2013-08-27 23:03:45 +00:00
Variable g : A -> A -> A.
Notation 30 [ _ ; _ ] : g
Show [c;d].
Show [c ; [d;e] ].
SetOption lean::pp::notation false.
2013-08-27 23:03:45 +00:00
Show [c ; [d;e] ].
SetOption lean::pp::notation true.
2013-08-27 23:03:45 +00:00
Variable h : A -> A -> A.
Notation 40 _ << _ end : h.
Show Environment 1.
Show d << e end.
Show [c ; d << e end ].
SetOption lean::pp::notation false.
2013-08-27 23:03:45 +00:00
Show [c ; d << e end ].
SetOption lean::pp::notation true.
2013-08-27 23:03:45 +00:00
Variable r : A -> A -> A.
Infixl 30 ++ : r.
Variable s : A -> A -> A.
Infixl 40 ** : s.
Show c ** d ++ e ** c.
Variable p1 : Bool.
Variable p2 : Bool.
Variable p3 : Bool.
Show p1 || p2 && p3.
SetOption lean::pp::notation false.
2013-08-27 23:03:45 +00:00
Show c ** d ++ e ** c.
Show p1 || p2 && p3.
SetOption lean::pp::notation true.
2013-08-27 23:03:45 +00:00
Show c = d || d = c.
Show not p1 || p2.
Show p1 && p3 || p2 && p3.
SetOption lean::pp::notation false.
2013-08-27 23:03:45 +00:00
Show not p1 || p2.
Show p1 && p3 || p2 && p3.