| 1 |
Set Primitive Projections. |
| 2 |
Definition compose {A B C : Type} (g : B -> C) (f : A -> B) := fun x => g (f x). |
| 3 |
Inductive paths {A : Type} (a : A) : A -> Type := idpath : paths a a where "x = y" := (@paths _ x y) : type_scope. |
| 4 |
Arguments idpath {A a} , [A] a. |
| 5 |
Definition concat {A : Type} {x y z : A} (p : x = y) (q : y = z) : x = z := match p, q with idpath, idpath => idpath end. |
| 6 |
Notation "p @ q" := (concat p q) (at level 20) : path_scope. |
| 7 |
Axiom ap : forall {A B:Type} (f:A -> B) {x y:A} (p:x = y), f x = f y. |
| 8 |
Definition Sect {A B : Type} (s : A -> B) (r : B -> A) := forall x : A, r (s x) = x. |
| 9 |
Class IsEquiv {A B : Type} (f : A -> B) := { equiv_inv : B -> A ; eisretr : forall x, f (equiv_inv x) = x }. |
| 10 |
Notation "f ^-1" := (@equiv_inv _ _ f _) (at level 3, format "f '^-1'") : equiv_scope. |
| 11 |
Local Open Scope path_scope. |
| 12 |
Local Open Scope equiv_scope. |
| 13 |
Generalizable Variables A B C f g. |
| 14 |
Lemma isequiv_compose `{IsEquiv A B f} `{IsEquiv B C g} |
| 15 |
: IsEquiv (compose g f). |
| 16 |
Proof. |
| 17 |
refine (Build_IsEquiv A C |
| 18 |
(compose g f) |
| 19 |
(compose f^-1 g^-1) _). |
| 20 |
exact (fun c => ap g (@eisretr _ _ f _ (g^-1 c)) @ (@eisretr _ _ g _ c)). |
| 21 |
Abort. |