lean2/tests/lean/cast3.lean
Leonardo de Moura 935c2a03a3 feat(*): change name conventions for Lean builtin libraries
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-05 19:21:44 -08:00

24 lines
487 B
Text

import cast
variables A A' B B' : Type
variable x : A
eval cast (refl A) x
eval x = (cast (refl A) x)
variable b : B
definition f (x : A) : B := b
axiom H : (A -> B) = (A' -> B)
variable a' : A'
eval (cast H f) a'
axiom H2 : (A -> B) = (A' -> B')
definition g (x : B') : Nat := 0
eval g ((cast H2 f) a')
check g ((cast H2 f) a')
eval (cast H2 f) a'
variables A1 A2 A3 : Type
axiom Ha : A1 = A2
axiom Hb : A2 = A3
variable a : A1
eval (cast Hb (cast Ha a))
check (cast Hb (cast Ha a))