Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Categories/Category/Construction/Kleisli.agda
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Kleisli {𝒞 = 𝒞} M = record
assoc′ {A} {B} {C} {D} {f} {g} {h} = begin
(μ.η D ∘ F₁ ((μ.η D ∘ F₁ h) ∘ g)) ∘ f ≈⟨ pushʳ homomorphism ⟩∘⟨refl ⟩
((μ.η D ∘ F₁ (μ.η D ∘ F₁ h)) ∘ F₁ g) ∘ f ≈⟨ pushˡ (∘-resp-≈ˡ (∘-resp-≈ʳ homomorphism)) ⟩
(μ.η D ∘ (F₁ (μ.η D) ∘ F₁ (F₁ h))) ∘ (F₁ g ∘ f) ≈⟨ pushˡ (glue M.assoc (μ.commute h)) ⟩
(μ.η D ∘ (F₁ (μ.η D) ∘ F₁ (F₁ h))) ∘ (F₁ g ∘ f) ≈⟨ pushˡ (sym-glue M.assoc (μ.commute h)) ⟩
(μ.η D ∘ F₁ h) ∘ (μ.η C ∘ (F₁ g ∘ f)) ≈⟨ refl⟩∘⟨ sym-assoc ⟩
(μ.η D ∘ F₁ h) ∘ ((μ.η C ∘ F₁ g) ∘ f) ∎

Expand Down
10 changes: 5 additions & 5 deletions src/Categories/Morphism/Reasoning/Core.agda
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ glue {c′ = c′} {a′ = a′} {a = a} {c″ = c″} {c = c} {b′ = b′} {b
a ∘ (c′ ∘ b′) ≈⟨ extendʳ sq-a ⟩
c″ ∘ (a′ ∘ b′) ∎

-- A "rotated" version of glue. Equivalent to 'Equiv.sym (glue (Equiv.sym sq-a) (Equiv.sym sq-b))'
glue : CommutativeSquare a′ c′ c″ a →
CommutativeSquare b′ c c′ b →
CommutativeSquare (a′ ∘ b′) c c″ (a ∘ b)
glue {a′ = a′} {c′ = c′} {c″ = c″} {a = a} {b′ = b′} {c = c} {b = b} sq-a sq-b = begin
-- A "rotated" version of glue. Equivalent to 'Equiv.sym (glue (Equiv.sym sq-a) (Equiv.sym sq-b))'
sym-glue : CommutativeSquare a′ c′ c″ a →
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is not final! I just wanted to use the name glue′ for the displayed version of glue so had to name this something else

CommutativeSquare b′ c c′ b →
CommutativeSquare (a′ ∘ b′) c c″ (a ∘ b)
sym-glue {a′ = a′} {c′ = c′} {c″ = c″} {a = a} {b′ = b′} {c = c} {b = b} sq-a sq-b = begin
c″ ∘ (a′ ∘ b′) ≈⟨ pullˡ sq-a ⟩
(a ∘ c′) ∘ b′ ≈⟨ extendˡ sq-b ⟩
(a ∘ b) ∘ c ∎
Expand Down
5 changes: 3 additions & 2 deletions src/Categories/NaturalTransformation/Core.agda
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ _∘ᵥ_ : ∀ {F G H : Functor C D} →
_∘ᵥ_ {C = C} {D = D} {F} {G} {H} X Y = record
{ η = λ q → D [ X.η q ∘ Y.η q ]
; commute = λ f → glue (X.commute f) (Y.commute f)
; sym-commute = λ f → Category.Equiv.sym D (glue (X.commute f) (Y.commute f))
; sym-commute = λ f → sym-glue (X.sym-commute f) (Y.sym-commute f)
}
where module X = NaturalTransformation X
module Y = NaturalTransformation Y
Expand All @@ -92,9 +92,10 @@ _∘ᵥ_ {C = C} {D = D} {F} {G} {H} X Y = record
-- "Horizontal composition"
_∘ₕ_ : ∀ {F G : Functor C D} {H I : Functor D E} →
NaturalTransformation H I → NaturalTransformation F G → NaturalTransformation (H ∘F F) (I ∘F G)
_∘ₕ_ {E = E} {F} {I = I} Y X = ntHelper record
_∘ₕ_ {E = E} {F} {I = I} Y X = record
{ η = λ q → E [ I₁ (X.η q) ∘ Y.η (F.F₀ q) ]
; commute = λ f → glue ([ I ]-resp-square (X.commute f)) (Y.commute (F.F₁ f))
; sym-commute = λ f → sym-glue ([ I ]-resp-square (X.sym-commute f)) (Y.sym-commute (F.₁ f))
}
where module F = Functor F
module X = NaturalTransformation X
Expand Down