diff --git a/src/Cat/Categories/Fun.agda b/src/Cat/Categories/Fun.agda index 70dab6c..ac7fd8a 100644 --- a/src/Cat/Categories/Fun.agda +++ b/src/Cat/Categories/Fun.agda @@ -55,11 +55,11 @@ module Fun {ℓc ℓc' ℓd ℓd' : Level} (ℂ : Category ℓc ℓc') (𝔻 : C ηNat = proj₂ η' ζNat = proj₂ ζ' 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 = (_:⊕:_ {A} {B} {D} (_:⊕:_ {B} {C} {D} ζ' η') θ') - _g⊕f_ = _:⊕:_ {A} {B} {C} - _h⊕g_ = _:⊕:_ {B} {C} {D} + R = (NT[_∘_] {A} {B} {D} (NT[_∘_] {B} {C} {D} ζ' η') θ') + _g⊕f_ = NT[_∘_] {A} {B} {C} + _h⊕g_ = NT[_∘_] {B} {C} {D} :isAssociative: : L ≡ R :isAssociative: = lemSig (naturalIsProp {F = A} {D}) L R (funExt (λ x → isAssociative)) @@ -77,13 +77,13 @@ module Fun {ℓc ℓc' ℓd ℓd' : Level} (ℂ : Category ℓc ℓc') (𝔻 : C f' C ∎ eq-l : ∀ C → (𝔻 [ identityTrans B C ∘ f' C ]) ≡ f' C 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-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) isIdentity - : (_:⊕:_ {A} {A} {B} f (NT.identity A)) ≡ f - × (_:⊕:_ {A} {B} {B} (NT.identity B) f) ≡ f + : (NT[_∘_] {A} {A} {B} f (NT.identity A)) ≡ f + × (NT[_∘_] {A} {B} {B} (NT.identity B) f) ≡ f isIdentity = ident-r , ident-l -- Functor categories. Objects are functors, arrows are natural transformations. 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 ℂ 𝔻 ; Arrow = NaturalTransformation ; 𝟙 = λ {F} → NT.identity F - ; _∘_ = λ {F G H} → _:⊕:_ {F} {G} {H} + ; _∘_ = λ {F G H} → NT[_∘_] {F} {G} {H} } instance @@ -116,5 +116,5 @@ module _ {ℓ ℓ' : Level} (ℂ : Category ℓ ℓ') where { Object = Presheaf ℂ ; Arrow = NaturalTransformation ; 𝟙 = λ {F} → identity F - ; _∘_ = λ {F G H} → NatComp {F = F} {G = G} {H = H} + ; _∘_ = λ {F G H} → NT[_∘_] {F = F} {G = G} {H = H} } diff --git a/src/Cat/Category/NaturalTransformation.agda b/src/Cat/Category/NaturalTransformation.agda index 4130a19..8de0f34 100644 --- a/src/Cat/Category/NaturalTransformation.agda +++ b/src/Cat/Category/NaturalTransformation.agda @@ -83,21 +83,19 @@ module NaturalTransformation {ℓc ℓc' ℓd ℓd' : Level} module F = Functor F module G = Functor G module H = Functor H - _∘nt_ : Transformation G H → Transformation F G → Transformation F H - (θ ∘nt η) C = 𝔻 [ θ C ∘ η C ] + T[_∘_] : Transformation G H → Transformation F G → Transformation F H + T[ θ ∘ η ] C = 𝔻 [ θ C ∘ η C ] - NatComp _:⊕:_ : NaturalTransformation G H → NaturalTransformation F G → NaturalTransformation F H - proj₁ ((θ , _) :⊕: (η , _)) = θ ∘nt η - proj₂ ((θ , θNat) :⊕: (η , ηNat)) {A} {B} f = begin - 𝔻 [ (θ ∘nt η) B ∘ F.func→ f ] ≡⟨⟩ + NT[_∘_] : NaturalTransformation G H → NaturalTransformation F G → NaturalTransformation F H + proj₁ NT[ (θ , _) ∘ (η , _) ] = T[ θ ∘ η ] + proj₂ NT[ (θ , θNat) ∘ (η , ηNat) ] {A} {B} f = begin + 𝔻 [ T[ θ ∘ η ] B ∘ F.func→ f ] ≡⟨⟩ 𝔻 [ 𝔻 [ θ B ∘ η B ] ∘ F.func→ f ] ≡⟨ sym isAssociative ⟩ 𝔻 [ θ B ∘ 𝔻 [ η B ∘ F.func→ f ] ] ≡⟨ cong (λ φ → 𝔻 [ θ B ∘ φ ]) (ηNat f) ⟩ 𝔻 [ θ B ∘ 𝔻 [ G.func→ f ∘ η A ] ] ≡⟨ isAssociative ⟩ 𝔻 [ 𝔻 [ θ B ∘ G.func→ f ] ∘ η A ] ≡⟨ cong (λ φ → 𝔻 [ φ ∘ η A ]) (θNat f) ⟩ 𝔻 [ 𝔻 [ H.func→ f ∘ θ A ] ∘ η A ] ≡⟨ sym isAssociative ⟩ 𝔻 [ H.func→ f ∘ 𝔻 [ θ A ∘ η A ] ] ≡⟨⟩ - 𝔻 [ H.func→ f ∘ (θ ∘nt η) A ] ∎ + 𝔻 [ H.func→ f ∘ T[ θ ∘ η ] A ] ∎ where open Category 𝔻 - - NatComp = _:⊕:_