2015-06-13 02:48:58 +00:00
|
|
|
open equiv
|
|
|
|
|
|
|
|
constants (A B : Type₀) (f : A → B) (g : B → A) (p : Πb, f (g b) = b) (q : Πa, g (f a) = a)
|
|
|
|
|
|
|
|
definition e [constructor] : A ≃ B :=
|
|
|
|
equiv.MK f g p q
|
|
|
|
|
|
|
|
example (b : B) : g (f (g b)) = g b :=
|
|
|
|
by rewrite [to_right_inv e b]
|
|
|
|
|
|
|
|
example (b : B) : g (f (g b)) = g b :=
|
|
|
|
by xrewrite [to_right_inv e b]
|
|
|
|
|
|
|
|
example (b : B) : g (f (g b)) = g b :=
|
|
|
|
by krewrite [to_right_inv e b]
|
|
|
|
|
|
|
|
example (b : B) : g (f (g b)) = g b :=
|
|
|
|
begin
|
2015-12-10 18:37:55 +00:00
|
|
|
note H := to_right_inv e b,
|
2015-06-13 02:48:58 +00:00
|
|
|
esimp at H,
|
|
|
|
rewrite H
|
|
|
|
end
|