[WIP] Stronger lemma for univalence

This commit is contained in:
Frederik Hanghøj Iversen 2018-04-04 11:27:03 +02:00
parent 172287f0a7
commit f66d180ec3
2 changed files with 72 additions and 7 deletions

View file

@ -131,6 +131,55 @@ record RawCategory (a b : Level) : Set (lsuc (a ⊔ b)) where
Univalent[Contr] : Set _
Univalent[Contr] = A isContr (Σ[ X Object ] A X)
private
module _ (A : Object) where
postulate
-- It may be that we need something weaker than this, in that there
-- may be some other lemmas available to us.
-- For instance, `need0` should be available to us when we prove `need1`.
need0 : Y A Y
need1 : (f : Arrow A A) identity f
c : Σ Object (A ≅_)
c = A , idIso A
module _ (y : Σ Object (A ≅_)) where
open Σ y renaming (proj₁ to Y ; proj₂ to isoY)
q : A Y
q = need0 Y
-- Some error with primComp
isoAY : A Y
isoAY = {!id-to-iso A Y q!}
lem : PathP (λ i A q i) (idIso A) isoY
lem = d* isoAY
where
D : (Y : Object) (A Y) Set _
D Y p = (A≅Y : A Y) PathP (λ i A p i) (idIso A) A≅Y
d : D A refl
d A≅Y i = a0 i , a1 i , a2 i
where
open Σ A≅Y renaming (proj₁ to f ; proj₂ to iso-f)
open Σ iso-f renaming (proj₁ to f~ ; proj₂ to areInv)
a0 : identity f
a0 = need1 f
a1 : identity f~
a1 = need1 f~
-- we do have this!
postulate
prop : {A B} (fg : Arrow A B × Arrow B A) isProp (IsInverseOf (fst fg) (snd fg))
a2 : PathP (λ i IsInverseOf (a0 i) (a1 i)) isIdentity areInv
a2 = lemPropF prop λ i a0 i , a1 i
d* : D Y q
d* = pathJ D d Y q
p : (A , idIso A) (Y , isoY)
p i = need0 Y i , lem i
univ-lem : isContr (Σ Object (A ≅_))
univ-lem = c , p
-- From: Thierry Coquand <Thierry.Coquand@cse.gu.se>
-- Date: Wed, Mar 21, 2018 at 3:12 PM
--
@ -312,7 +361,7 @@ record IsCategory {a b : Level} ( : RawCategory a b) : Set (lsuc
res i = fp i , cp i
propInitial : isProp Initial
propInitial Xi Yi = {!!}
propInitial Xi Yi = res
where
open Σ Xi renaming (proj₁ to X ; proj₂ to Xii)
open Σ Yi renaming (proj₁ to Y ; proj₂ to Yii)
@ -342,7 +391,6 @@ record IsCategory {a b : Level} ( : RawCategory a b) : Set (lsuc
res : Xi Yi
res i = p0 i , p1 i
-- | Propositionality of being a category
module _ {a b : Level} ( : RawCategory a b) where
open RawCategory

View file

@ -172,16 +172,33 @@ module Try0 {a b : Level} { : Category a b}
open import Cubical.Univalence
module _ (c : (X , x) (Y , y)) where
-- module _ (c : _ ≅ _) where
open Σ c renaming (proj₁ to f_c ; proj₂ to inv_c)
open Σ inv_c renaming (proj₁ to g_c ; proj₂ to ainv_c)
open Σ ainv_c renaming (proj₁ to left ; proj₂ to right)
c0 : X .≅ Y
c0 = {!!}
c0 = proj₁ f_c , proj₁ g_c , (λ i proj₁ (left i)) , (λ i proj₁ (right i))
f0 : X Y
f0 = .iso-to-id c0
f1 : PathP (λ i .Arrow (f0 i) A × .Arrow (f0 i) B) x y
f1 = {!!}
module _ {A : .Object} (α : .Arrow X A) where
coedom : .Arrow Y A
coedom = coe (λ i .Arrow (f0 i) A) α
coex : .Arrow Y A × .Arrow Y B
coex = coe (λ i .Arrow (f0 i) A × .Arrow (f0 i) B) x
f1 : PathP (λ i .Arrow (f0 i) A × .Arrow (f0 i) B) x coex
f1 = {!sym!}
f2 : coex y
f2 = {!!}
f : (X , x) (Y , y)
f i = f0 i , f1 i
f i = f0 i , {!f1 i!}
prp : isSet (.Object × .Arrow Y A × .Arrow Y B)
prp = setSig {sA = {!!}} {(λ _ setSig {sA = .arrowsAreSets} {λ _ .arrowsAreSets})}
ve-re : (p : (X , x) (Y , y)) f (id-to-iso _ _ p) p
-- ve-re p i j = {!.arrowsAreSets!} , .arrowsAreSets _ _ (let k = proj₁ (proj₂ (p i)) in {!!}) {!!} {!!} {!!} , {!!}
ve-re p = let k = prp {!!} {!!} {!!} {!p!} in {!!}
re-ve : (iso : (X , x) (Y , y)) id-to-iso _ _ (f iso) iso
re-ve = {!!}
iso : E.Isomorphism (id-to-iso (X , x) (Y , y))
iso = f , record { verso-recto = {!!} ; recto-verso = {!!} }
iso = f , record { verso-recto = funExt ve-re ; recto-verso = funExt re-ve }
res : isEquiv ((X , x) (Y , y)) ((X , x) (Y , y)) (id-to-iso (X , x) (Y , y))
res = Equiv≃.fromIso _ _ iso