Prove assoc and ident for funky category

This commit is contained in:
Frederik Hanghøj Iversen 2018-03-29 15:47:43 +02:00
parent ffedb83210
commit 432cc78821

View file

@ -129,15 +129,92 @@ module Try0 {a b : Level} { : Category a b}
raw : RawCategory _ _ raw : RawCategory _ _
raw = record raw = record
{ Object = Σ[ X .Object ] .Arrow X A × .Arrow X B { Object = Σ[ X .Object ] .Arrow X A × .Arrow X B
; Arrow = λ{ (X , xa , xb) (Y , ya , yb) Σ[ xy .Arrow X Y ] ( [ ya xy ] xa) × ( [ yb xy ] xb) } ; Arrow = λ{ (X , xa , xb) (Y , ya , yb)
; 𝟙 = λ{ {A , _} .𝟙 {A} , {!!}} Σ[ xy .Arrow X Y ]
; _∘_ = \ { (f , p) (g , q) ._∘_ f g , {!!} } ( [ ya xy ] xa)
× [ yb xy ] xb
}
; 𝟙 = λ{ {A , f , g} .𝟙 {A} , .rightIdentity , .rightIdentity}
; _∘_ = λ { {A , a0 , a1} {B , b0 , b1} {C , c0 , c1} (f , f0 , f1) (g , g0 , g1)
(f .∘ g)
, (begin
[ c0 [ f g ] ] ≡⟨ .isAssociative
[ [ c0 f ] g ] ≡⟨ cong (λ φ [ φ g ]) f0
[ b0 g ] ≡⟨ g0
a0
)
, (begin
[ c1 [ f g ] ] ≡⟨ .isAssociative
[ [ c1 f ] g ] ≡⟨ cong (λ φ [ φ g ]) f1
[ b1 g ] ≡⟨ g1
a1
)
}
} }
open RawCategory raw open RawCategory raw
isAssocitaive : IsAssociative
isAssocitaive {A , a0 , a1} {B , _} {C , c0 , c1} {D , d0 , d1} {ff@(f , f0 , f1)} {gg@(g , g0 , g1)} {hh@(h , h0 , h1)} i
= s0 i , rl i , rr i
where
l = hh (gg ff)
r = hh gg ff
-- s0 : h .∘ (g .∘ f) ≡ h .∘ g .∘ f
s0 : proj₁ l proj₁ r
s0 = .isAssociative {f = f} {g} {h}
prop0 : a isProp ( [ d0 a ] a0)
prop0 a = .arrowsAreSets ( [ d0 a ]) a0
rl : (λ i ( [ d0 s0 i ]) a0) [ proj₁ (proj₂ l) proj₁ (proj₂ r) ]
rl = lemPropF prop0 s0
prop1 : a isProp (( [ d1 a ]) a1)
prop1 a = .arrowsAreSets _ _
rr : (λ i ( [ d1 s0 i ]) a1) [ proj₂ (proj₂ l) proj₂ (proj₂ r) ]
rr = lemPropF prop1 s0
isIdentity : IsIdentity 𝟙
isIdentity {AA@(A , a0 , a1)} {BB@(B , b0 , b1)} {f , f0 , f1} = leftIdentity , rightIdentity
where
leftIdentity : 𝟙 (f , f0 , f1) (f , f0 , f1)
leftIdentity i = l i , rl i , rr i
where
L = 𝟙 (f , f0 , f1)
R : Arrow AA BB
R = f , f0 , f1
l : proj₁ L proj₁ R
l = .leftIdentity
prop0 : a isProp (( [ b0 a ]) a0)
prop0 a = .arrowsAreSets _ _
rl : (λ i ( [ b0 l i ]) a0) [ proj₁ (proj₂ L) proj₁ (proj₂ R) ]
rl = lemPropF prop0 l
prop1 : a isProp ( [ b1 a ] a1)
prop1 _ = .arrowsAreSets _ _
rr : (λ i ( [ b1 l i ]) a1) [ proj₂ (proj₂ L) proj₂ (proj₂ R) ]
rr = lemPropF prop1 l
rightIdentity : (f , f0 , f1) 𝟙 (f , f0 , f1)
rightIdentity i = l i , rl i , {!!}
where
L = (f , f0 , f1) 𝟙
R : Arrow AA BB
R = (f , f0 , f1)
l : [ f .𝟙 ] f
l = .rightIdentity
prop0 : a isProp (( [ b0 a ]) a0)
prop0 _ = .arrowsAreSets _ _
rl : (λ i ( [ b0 l i ]) a0) [ proj₁ (proj₂ L) proj₁ (proj₂ R) ]
rl = lemPropF prop0 l
prop1 : a isProp (( [ b1 a ]) a1)
prop1 _ = .arrowsAreSets _ _
rr : (λ i ( [ b1 l i ]) a1) [ proj₂ (proj₂ L) proj₂ (proj₂ R) ]
rr = lemPropF prop1 l
cat : IsCategory raw cat : IsCategory raw
cat = {!!} cat = record
{ isAssociative = isAssocitaive
; isIdentity = isIdentity
; arrowsAreSets = {!!}
; univalent = {!!}
}
module cat = IsCategory cat module cat = IsCategory cat