Created
January 14, 2020 12:07
-
-
Save pnlph/5908275291bc1d62b346962c19b65ffa to your computer and use it in GitHub Desktop.
Definition bi-invertibility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS --without-K #-} | |
-- BiInverse definition | |
-- f : A ≃ B | |
-- HoTT book | |
-- 4.3 Bi-invertible maps | |
module BiInverse where | |
data _≡_ {A : Set} (x : A) : A → Set where | |
refl : x ≡ x | |
sym : {A : Set} {x y : A} → x ≡ y → y ≡ x | |
sym refl = refl | |
trans : {A : Set} {x y z : A} → x ≡ y → y ≡ z → x ≡ z | |
trans refl refl = refl | |
cong : {A B : Set} (f : A → B) {x y : A} → x ≡ y → f x ≡ f y | |
cong f refl = refl | |
record _≃_ (A B : Set) : Set where | |
field | |
apply : A → B | |
linv : B → A | |
rinv : B → A | |
isLinv : (x : A) → linv (apply x) ≡ x | |
isRinv : (y : B) → apply (rinv y) ≡ y | |
open _≃_ | |
-- Lemma 1.17 | |
linv-is-rinv : {A B : Set} (f : A ≃ B) (y : B) → linv f y ≡ rinv f y | |
linv-is-rinv f y = sym (trans (sym (isLinv f (rinv f y))) (cong (linv f) (isRinv f y))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment