lean2/tests/lean/elab7.lean
Leonardo de Moura ae01d3818d fix(frontends/lean/parser): parse_type method
The parser had a nasty ambiguity. For example,
    f Type 1
had two possible interpretations
    (f (Type) (1))
or
    (f (Type 1))

To fix this issue, whenever we want to specify a particular universe, we have to precede 'Type' with a parenthesis.
Examples:
    (Type 1)
    (Type U)
    (Type M + 1)

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-19 15:24:34 -08:00

21 lines
No EOL
825 B
Text

Variables A B C : (Type U)
Variable P : A -> Bool
Variable F1 : A -> B -> C
Variable F2 : A -> B -> C
Variable H : Pi (a : A) (b : B), (F1 a b) == (F2 a b)
Variable a : A
Check Eta (F2 a)
Check Abst (fun a : A,
(Trans (Symm (Eta (F1 a)))
(Trans (Abst (fun (b : B), H a b))
(Eta (F2 a)))))
Check Abst (fun a, (Abst (fun b, H a b)))
Theorem T1 : F1 = F2 := Abst (fun a, (Abst (fun b, H a b)))
Theorem T2 : (fun (x1 : A) (x2 : B), F1 x1 x2) = F2 := Abst (fun a, (Abst (fun b, H a b)))
Theorem T3 : F1 = (fun (x1 : A) (x2 : B), F2 x1 x2) := Abst (fun a, (Abst (fun b, H a b)))
Theorem T4 : (fun (x1 : A) (x2 : B), F1 x1 x2) = (fun (x1 : A) (x2 : B), F2 x1 x2) := Abst (fun a, (Abst (fun b, H a b)))
Show Environment 4
SetOption pp::implicit true
Show Environment 4