2613e7c444
This bug was reported by Jeremy in the Lean Google group: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/lean-discuss/ZKJ8WPPEVJA/n05x6rPRzvMJ
32 lines
712 B
Text
32 lines
712 B
Text
import algebra.function
|
|
import logic.funext
|
|
|
|
open function
|
|
|
|
structure bijection (A : Type) :=
|
|
(func finv : A → A)
|
|
(linv : finv ∘ func = id)
|
|
(rinv : func ∘ finv = id)
|
|
|
|
attribute bijection.func [coercion]
|
|
|
|
namespace bijection
|
|
variable {A : Type}
|
|
|
|
protected theorem eq {f g : bijection A}
|
|
(func_eq : func f = func g) (finv_eq : finv f = finv g) : f = g :=
|
|
begin
|
|
revert finv_eq,
|
|
revert func_eq,
|
|
cases g with [gfunc, gfinv, glinv, grinv],
|
|
cases f with [func, finv, linv, rinv],
|
|
state,
|
|
esimp,
|
|
intros [func_eq, finv_eq],
|
|
revert grinv, revert glinv, revert rinv, revert linv,
|
|
rewrite [func_eq, finv_eq],
|
|
intros [H1, H2, H3, H4],
|
|
apply rfl
|
|
end
|
|
|
|
end bijection
|