Prove second inverse law for from/to-isomorphism

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-22 13:49:53 +01:00
parent 0246c1b5ab
commit ebcab2528e
2 changed files with 51 additions and 30 deletions

View file

@ -203,7 +203,7 @@ module _ ( : Level) where
re-ve : (x : isEquiv A B f) (inv obv) x x re-ve : (x : isEquiv A B f) (inv obv) x x
re-ve = Equiv≃.inverse-from-to-iso A B re-ve = Equiv≃.inverse-from-to-iso A B
ve-re : (x : isIso f) (obv inv) x x ve-re : (x : isIso f) (obv inv) x x
ve-re = Equiv≃.inverse-to-from-iso A B ve-re = Equiv≃.inverse-to-from-iso A B sA sB
iso : isEquiv A B f Eqv.≅ isIso f iso : isEquiv A B f Eqv.≅ isIso f
iso = obv , inv , iso = obv , inv ,
record record
@ -213,12 +213,8 @@ module _ ( : Level) where
in fromIsomorphism iso in fromIsomorphism iso
module _ {hA hB : Object} where module _ {hA hB : Object} where
private open Σ hA renaming (proj₁ to A ; proj₂ to sA)
A = proj₁ hA open Σ hB renaming (proj₁ to B ; proj₂ to sB)
sA = proj₂ hA
B = proj₁ hB
sB = proj₂ hB
-- lem3 and the equivalence from lem4 -- lem3 and the equivalence from lem4
step0 : Σ (A B) isIso Σ (A B) (isEquiv A B) step0 : Σ (A B) isIso Σ (A B) (isEquiv A B)

View file

@ -75,15 +75,54 @@ module _ {a b : Level} (A : Set a) (B : Set b) where
x x
-- `toIso` is abstract - so I probably can't close this proof. -- `toIso` is abstract - so I probably can't close this proof.
-- inverse-to-from-iso : ∀ {f} → toIso {f} ∘ fromIso {f} ≡ idFun _ module _ (sA : isSet A) (sB : isSet B) where
-- inverse-to-from-iso = funExt (λ x → begin module _ {f : A B} (iso : Isomorphism f) where
-- (toIso ∘ fromIso) x ≡⟨⟩ module _ (iso-x iso-y : Isomorphism f) where
-- toIso (fromIso x) ≡⟨ cong toIso (propIsEquiv _ (fromIso x) y) ⟩ open Σ iso-x renaming (fst to x ; snd to inv-x)
-- toIso y ≡⟨ {!!} ⟩ open Σ iso-y renaming (fst to y ; snd to inv-y)
-- x ∎) module inv-x = AreInverses inv-x
-- where module inv-y = AreInverses inv-y
-- y : iseqv _
-- y = {!!} fx≡fy : x y
fx≡fy = begin
x ≡⟨ cong (λ φ x φ) (sym inv-y.recto-verso)
x (f y) ≡⟨⟩
(x f) y ≡⟨ cong (λ φ φ y) inv-x.verso-recto
y
open import Cat.Prelude
propInv : g isProp (AreInverses f g)
propInv g t u i = record { verso-recto = a i ; recto-verso = b i }
where
module t = AreInverses t
module u = AreInverses u
a : t.verso-recto u.verso-recto
a i = h
where
hh : a (g f) a a
hh a = sA ((g f) a) a (λ i t.verso-recto i a) (λ i u.verso-recto i a) i
h : g f idFun A
h i a = hh a i
b : t.recto-verso u.recto-verso
b i = h
where
hh : b (f g) b b
hh b = sB _ _ (λ i t.recto-verso i b) (λ i u.recto-verso i b) i
h : f g idFun B
h i b = hh b i
inx≡iny : (λ i AreInverses f (fx≡fy i)) [ inv-x inv-y ]
inx≡iny = lemPropF propInv fx≡fy
propIso : iso-x iso-y
propIso i = fx≡fy i , inx≡iny i
inverse-to-from-iso : (toIso {f} fromIso {f}) iso iso
inverse-to-from-iso = begin
(toIso fromIso) iso ≡⟨⟩
toIso (fromIso iso) ≡⟨ propIso _ _
iso
fromIsomorphism : A B A ~ B fromIsomorphism : A B A ~ B
fromIsomorphism (f , iso) = f , fromIso iso fromIsomorphism (f , iso) = f , fromIso iso
@ -159,20 +198,6 @@ module _ {a b : Level} (A : Set a) (B : Set b) where
module Equiv where module Equiv where
open Equiv ≃isEquiv public open Equiv ≃isEquiv public
inverse-to-from-iso : {f} (x : _) (toIso {f} fromIso {f}) x x
inverse-to-from-iso {f} x = begin
(toIso fromIso) x ≡⟨⟩
toIso (fromIso x) ≡⟨ cong toIso (propIsEquiv _ (fromIso x) y)
toIso y ≡⟨ py
x
where
open Σ x renaming (fst to f~ ; snd to inv)
module inv = AreInverses inv
y : isEquiv _ _ f
y = {!!}
open Σ (toIso y) renaming (fst to f~' ; snd to inv')
py : toIso y (f~ , inv)
py = {!!}
module _ {a b : Level} {A : Set a} {B : Set b} where module _ {a b : Level} {A : Set a} {B : Set b} where
open Cubical.PathPrelude using (_≃_) open Cubical.PathPrelude using (_≃_)