2013-12-24 06:04:19 +00:00
|
|
|
Import "cast.lean"
|
|
|
|
|
2013-09-07 03:45:26 +00:00
|
|
|
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
|
2013-12-06 21:23:20 +00:00
|
|
|
Axiom H : (A -> B) = (A' -> B)
|
2013-09-07 03:45:26 +00:00
|
|
|
Variable a' : A'
|
|
|
|
Eval (cast H f) a'
|
2013-12-06 21:23:20 +00:00
|
|
|
Axiom H2 : (A -> B) = (A' -> B')
|
2013-09-07 03:45:26 +00:00
|
|
|
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))
|