Rename natural transformation composition
This commit is contained in:
parent
dd11b69c71
commit
cb8533b84a
|
@ -55,11 +55,11 @@ module Fun {ℓc ℓc' ℓd ℓd' : Level} (ℂ : Category ℓc ℓc') (𝔻 : C
|
||||||
ηNat = proj₂ η'
|
ηNat = proj₂ η'
|
||||||
ζNat = proj₂ ζ'
|
ζNat = proj₂ ζ'
|
||||||
L : NaturalTransformation A D
|
L : NaturalTransformation A D
|
||||||
L = (_:⊕:_ {A} {C} {D} ζ' (_:⊕:_ {A} {B} {C} η' θ'))
|
L = (NT[_∘_] {A} {C} {D} ζ' (NT[_∘_] {A} {B} {C} η' θ'))
|
||||||
R : NaturalTransformation A D
|
R : NaturalTransformation A D
|
||||||
R = (_:⊕:_ {A} {B} {D} (_:⊕:_ {B} {C} {D} ζ' η') θ')
|
R = (NT[_∘_] {A} {B} {D} (NT[_∘_] {B} {C} {D} ζ' η') θ')
|
||||||
_g⊕f_ = _:⊕:_ {A} {B} {C}
|
_g⊕f_ = NT[_∘_] {A} {B} {C}
|
||||||
_h⊕g_ = _:⊕:_ {B} {C} {D}
|
_h⊕g_ = NT[_∘_] {B} {C} {D}
|
||||||
:isAssociative: : L ≡ R
|
:isAssociative: : L ≡ R
|
||||||
:isAssociative: = lemSig (naturalIsProp {F = A} {D})
|
:isAssociative: = lemSig (naturalIsProp {F = A} {D})
|
||||||
L R (funExt (λ x → isAssociative))
|
L R (funExt (λ x → isAssociative))
|
||||||
|
@ -77,13 +77,13 @@ module Fun {ℓc ℓc' ℓd ℓd' : Level} (ℂ : Category ℓc ℓc') (𝔻 : C
|
||||||
f' C ∎
|
f' C ∎
|
||||||
eq-l : ∀ C → (𝔻 [ identityTrans B C ∘ f' C ]) ≡ f' C
|
eq-l : ∀ C → (𝔻 [ identityTrans B C ∘ f' C ]) ≡ f' C
|
||||||
eq-l C = proj₂ 𝔻.isIdentity
|
eq-l C = proj₂ 𝔻.isIdentity
|
||||||
ident-r : (_:⊕:_ {A} {A} {B} f (NT.identity A)) ≡ f
|
ident-r : (NT[_∘_] {A} {A} {B} f (NT.identity A)) ≡ f
|
||||||
ident-r = lemSig allNatural _ _ (funExt eq-r)
|
ident-r = lemSig allNatural _ _ (funExt eq-r)
|
||||||
ident-l : (_:⊕:_ {A} {B} {B} (NT.identity B) f) ≡ f
|
ident-l : (NT[_∘_] {A} {B} {B} (NT.identity B) f) ≡ f
|
||||||
ident-l = lemSig allNatural _ _ (funExt eq-l)
|
ident-l = lemSig allNatural _ _ (funExt eq-l)
|
||||||
isIdentity
|
isIdentity
|
||||||
: (_:⊕:_ {A} {A} {B} f (NT.identity A)) ≡ f
|
: (NT[_∘_] {A} {A} {B} f (NT.identity A)) ≡ f
|
||||||
× (_:⊕:_ {A} {B} {B} (NT.identity B) f) ≡ f
|
× (NT[_∘_] {A} {B} {B} (NT.identity B) f) ≡ f
|
||||||
isIdentity = ident-r , ident-l
|
isIdentity = ident-r , ident-l
|
||||||
-- Functor categories. Objects are functors, arrows are natural transformations.
|
-- Functor categories. Objects are functors, arrows are natural transformations.
|
||||||
RawFun : RawCategory (ℓc ⊔ ℓc' ⊔ ℓd ⊔ ℓd') (ℓc ⊔ ℓc' ⊔ ℓd')
|
RawFun : RawCategory (ℓc ⊔ ℓc' ⊔ ℓd ⊔ ℓd') (ℓc ⊔ ℓc' ⊔ ℓd')
|
||||||
|
@ -91,7 +91,7 @@ module Fun {ℓc ℓc' ℓd ℓd' : Level} (ℂ : Category ℓc ℓc') (𝔻 : C
|
||||||
{ Object = Functor ℂ 𝔻
|
{ Object = Functor ℂ 𝔻
|
||||||
; Arrow = NaturalTransformation
|
; Arrow = NaturalTransformation
|
||||||
; 𝟙 = λ {F} → NT.identity F
|
; 𝟙 = λ {F} → NT.identity F
|
||||||
; _∘_ = λ {F G H} → _:⊕:_ {F} {G} {H}
|
; _∘_ = λ {F G H} → NT[_∘_] {F} {G} {H}
|
||||||
}
|
}
|
||||||
|
|
||||||
instance
|
instance
|
||||||
|
@ -116,5 +116,5 @@ module _ {ℓ ℓ' : Level} (ℂ : Category ℓ ℓ') where
|
||||||
{ Object = Presheaf ℂ
|
{ Object = Presheaf ℂ
|
||||||
; Arrow = NaturalTransformation
|
; Arrow = NaturalTransformation
|
||||||
; 𝟙 = λ {F} → identity F
|
; 𝟙 = λ {F} → identity F
|
||||||
; _∘_ = λ {F G H} → NatComp {F = F} {G = G} {H = H}
|
; _∘_ = λ {F G H} → NT[_∘_] {F = F} {G = G} {H = H}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,21 +83,19 @@ module NaturalTransformation {ℓc ℓc' ℓd ℓd' : Level}
|
||||||
module F = Functor F
|
module F = Functor F
|
||||||
module G = Functor G
|
module G = Functor G
|
||||||
module H = Functor H
|
module H = Functor H
|
||||||
_∘nt_ : Transformation G H → Transformation F G → Transformation F H
|
T[_∘_] : Transformation G H → Transformation F G → Transformation F H
|
||||||
(θ ∘nt η) C = 𝔻 [ θ C ∘ η C ]
|
T[ θ ∘ η ] C = 𝔻 [ θ C ∘ η C ]
|
||||||
|
|
||||||
NatComp _:⊕:_ : NaturalTransformation G H → NaturalTransformation F G → NaturalTransformation F H
|
NT[_∘_] : NaturalTransformation G H → NaturalTransformation F G → NaturalTransformation F H
|
||||||
proj₁ ((θ , _) :⊕: (η , _)) = θ ∘nt η
|
proj₁ NT[ (θ , _) ∘ (η , _) ] = T[ θ ∘ η ]
|
||||||
proj₂ ((θ , θNat) :⊕: (η , ηNat)) {A} {B} f = begin
|
proj₂ NT[ (θ , θNat) ∘ (η , ηNat) ] {A} {B} f = begin
|
||||||
𝔻 [ (θ ∘nt η) B ∘ F.func→ f ] ≡⟨⟩
|
𝔻 [ T[ θ ∘ η ] B ∘ F.func→ f ] ≡⟨⟩
|
||||||
𝔻 [ 𝔻 [ θ B ∘ η B ] ∘ F.func→ f ] ≡⟨ sym isAssociative ⟩
|
𝔻 [ 𝔻 [ θ B ∘ η B ] ∘ F.func→ f ] ≡⟨ sym isAssociative ⟩
|
||||||
𝔻 [ θ B ∘ 𝔻 [ η B ∘ F.func→ f ] ] ≡⟨ cong (λ φ → 𝔻 [ θ B ∘ φ ]) (ηNat f) ⟩
|
𝔻 [ θ B ∘ 𝔻 [ η B ∘ F.func→ f ] ] ≡⟨ cong (λ φ → 𝔻 [ θ B ∘ φ ]) (ηNat f) ⟩
|
||||||
𝔻 [ θ B ∘ 𝔻 [ G.func→ f ∘ η A ] ] ≡⟨ isAssociative ⟩
|
𝔻 [ θ B ∘ 𝔻 [ G.func→ f ∘ η A ] ] ≡⟨ isAssociative ⟩
|
||||||
𝔻 [ 𝔻 [ θ B ∘ G.func→ f ] ∘ η A ] ≡⟨ cong (λ φ → 𝔻 [ φ ∘ η A ]) (θNat f) ⟩
|
𝔻 [ 𝔻 [ θ B ∘ G.func→ f ] ∘ η A ] ≡⟨ cong (λ φ → 𝔻 [ φ ∘ η A ]) (θNat f) ⟩
|
||||||
𝔻 [ 𝔻 [ H.func→ f ∘ θ A ] ∘ η A ] ≡⟨ sym isAssociative ⟩
|
𝔻 [ 𝔻 [ H.func→ f ∘ θ A ] ∘ η A ] ≡⟨ sym isAssociative ⟩
|
||||||
𝔻 [ H.func→ f ∘ 𝔻 [ θ A ∘ η A ] ] ≡⟨⟩
|
𝔻 [ H.func→ f ∘ 𝔻 [ θ A ∘ η A ] ] ≡⟨⟩
|
||||||
𝔻 [ H.func→ f ∘ (θ ∘nt η) A ] ∎
|
𝔻 [ H.func→ f ∘ T[ θ ∘ η ] A ] ∎
|
||||||
where
|
where
|
||||||
open Category 𝔻
|
open Category 𝔻
|
||||||
|
|
||||||
NatComp = _:⊕:_
|
|
||||||
|
|
Loading…
Reference in a new issue