2013-12-19 01:40:21 +00:00
|
|
|
Set: pp::colors
|
|
|
|
Set: pp::unicode
|
2014-01-01 21:52:25 +00:00
|
|
|
Imported 'Int'
|
2013-12-19 01:40:21 +00:00
|
|
|
Assumed: A
|
|
|
|
Assumed: B
|
|
|
|
Assumed: f
|
|
|
|
Defined: g
|
|
|
|
Assumed: h
|
|
|
|
Assumed: hinv
|
|
|
|
Assumed: Inv
|
|
|
|
Assumed: H1
|
|
|
|
Proved: f_eq_g
|
|
|
|
Proved: Inj
|
2014-01-05 20:05:08 +00:00
|
|
|
definition g (A : Type) (f : A → A → A) (x y : A) : A := f y x
|
2014-01-08 08:38:39 +00:00
|
|
|
theorem f_eq_g (A : Type) (f : A → A → A) (H1 : ∀ x y : A, f x y = f y x) : f = g A f :=
|
2014-01-09 01:25:14 +00:00
|
|
|
funext (λ x : A,
|
|
|
|
funext (λ y : A,
|
2014-01-19 05:11:12 +00:00
|
|
|
let L1 : f x y = f y x := H1 x y, L2 : f y x = g A f x y := refl (g A f x y) in trans L1 L2))
|
2014-01-08 08:38:39 +00:00
|
|
|
theorem Inj (A B : Type)
|
|
|
|
(h : A → B)
|
|
|
|
(hinv : B → A)
|
|
|
|
(Inv : ∀ x : A, hinv (h x) = x)
|
|
|
|
(x y : A)
|
|
|
|
(H : h x = h y) : x = y :=
|
2014-01-06 03:10:21 +00:00
|
|
|
let L1 : hinv (h x) = hinv (h y) := congr2 hinv H,
|
2013-12-19 20:46:14 +00:00
|
|
|
L2 : hinv (h x) = x := Inv x,
|
|
|
|
L3 : hinv (h y) = y := Inv y,
|
2014-01-06 03:10:21 +00:00
|
|
|
L4 : x = hinv (h x) := symm L2,
|
2014-01-19 05:11:12 +00:00
|
|
|
L5 : x = hinv (h y) := trans L4 L1
|
|
|
|
in trans L5 L3
|
2013-12-19 01:40:21 +00:00
|
|
|
10
|