| 1 |
(** * Isomorphisms *) |
| 2 |
(** Following the category-theoretic definition, [f : A → B] is an |
| 3 |
isomorphism when it has an inverse [f⁻¹ : B → A] which is both a |
| 4 |
left and a right inverse. In the language of homotopy type |
| 5 |
theory, we are formalizing quasi-invertibility; this notion of |
| 6 |
isomorphism is not an hProp. The better notations of equivalence |
| 7 |
(such that all proofs of [IsEquiv f] are equal when only assuming |
| 8 |
function extensionality) are more complicated. Possibilities |
| 9 |
include: *) |
| 10 |
|
| 11 |
(** - Adjoint equivalence, the default of HoTT/HoTT: *) |
| 12 |
(** |
| 13 |
<< |
| 14 |
Definition Sect {A B : Type} (s : A -> B) (r : B -> A) := |
| 15 |
forall x : A, r (s x) = x. |
| 16 |
|
| 17 |
Class IsEquiv {A B : Type} (f : A -> B) := BuildIsEquiv { |
| 18 |
equiv_inv : B -> A ; |
| 19 |
eisretr : Sect equiv_inv f; |
| 20 |
eissect : Sect f equiv_inv; |
| 21 |
eisadj : forall x : A, eisretr (f x) = ap f (eissect x) |
| 22 |
}. |
| 23 |
>> *) |
| 24 |
(** - Contractible fibers: [∀ y : B, Contr { x : A | f x = y }] where |
| 25 |
[Contr T := { center : T | forall y, center = y }] *) |
| 26 |
|
| 27 |
(** This is useful for classifying equalities in a theoretically nice |
| 28 |
way. *) |
| 29 |
|
| 30 |
Class IsIso {A B} (f : A -> B) := |
| 31 |
{ iso_inv : B -> A; |
| 32 |
is_right_inv : forall x, f (iso_inv x) = x; |
| 33 |
is_left_inv : forall x, iso_inv (f x) = x }. |
| 34 |
|
| 35 |
Arguments iso_inv {_ _} _ {_} _. |
| 36 |
Arguments is_right_inv {_ _} _ {_} _. |
| 37 |
Arguments is_left_inv {_ _} _ {_} _. |