Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 3 additions & 6 deletions src/Categories/Adjoint/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ open import Categories.Functor using (Functor; _∘F_) renaming (id to idF)
open import Categories.Functor.Hom using (Hom[_][-,-])
open import Categories.Functor.Construction.Constant using (const!)
open import Categories.Functor.Construction.LiftSetoids using (LiftSetoids)
open import Categories.Functor.Properties using ([_]-resp-square; [_]-resp-)
open import Categories.Functor.Properties using ([_]-resp-square; [_]-resp-inverse)
open import Categories.Functor.Limits using (Continuous; Cocontinuous)
open import Categories.Functor.Bifunctor using (Bifunctor; appʳ; appˡ)
open import Categories.Functor.Bifunctor.Properties using ([_]-decompose₁; [_]-decompose₂; [_]-commute)
Expand Down Expand Up @@ -206,7 +206,7 @@ module _ {L : Functor J K} {R : Functor K J} (L⊣R : L ⊣ R) {F : Functor K C}
; commute = λ {X} → begin
proj (L.₀ X) ∘ rep A′ ≈⟨ commute ⟩
F.₁ (counit.η (L.₀ X)) ∘ A.ψ (R.₀ (L.₀ X)) ≈⟨ refl⟩∘⟨ A.commute (unit.η X) ⟨
F.₁ (counit.η (L.₀ X)) ∘ F.₁ (L.₁ (unit.η X)) ∘ A.ψ X ≈⟨ cancelˡ ([ F ]-resp- zig ○ F.identity) ⟩
F.₁ (counit.η (L.₀ X)) ∘ F.₁ (L.₁ (unit.η X)) ∘ A.ψ X ≈⟨ cancelˡ ([ F ]-resp-inverse zig) ⟩
A.ψ X ∎
}

Expand Down Expand Up @@ -266,10 +266,7 @@ module _ {L : Functor C D} {R : Functor D C} (L⊣R : L ⊣ R) where
}
; assoc = [ R ]-resp-square (counit.commute _)
; sym-assoc = [ R ]-resp-square (counit.sym-commute _)
; identityˡ = λ {X} → begin
μ′.η X C.∘ R.F₁ (L.F₁ (unit.η X)) ≈⟨ [ R ]-resp-∘ zig ⟩
R.F₁ D.id ≈⟨ R.identity ⟩
C.id ∎
; identityˡ = [ R ]-resp-inverse zig
; identityʳ = zag
}
where open C.HomReasoning
Expand Down
12 changes: 4 additions & 8 deletions src/Categories/Adjoint/TwoSided.agda
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ record _⊣⊢_ (L : Functor C D) (R : Functor D C) : Set (levelOfTerm L ⊔ lev
zag⁻¹ : {B : D.Obj} → unit.⇐.η (R.₀ B) C.∘ R.₁ (counit.⇐.η B) C.≈ C.id
zag⁻¹ {B} = begin
unit.⇐.η (R.₀ B) C.∘ R.₁ (counit.⇐.η B) ≈˘⟨ flip-fromʳ unit.FX≅GX zag ⟩∘⟨refl ⟩
R.₁ (counit.⇒.η B) C.∘ R.₁ (counit.⇐.η B) ≈⟨ [ R ]-resp-∘ (counit.iso.isoʳ B) ⟩
R.₁ D.id ≈⟨ R.identity ⟩
R.₁ (counit.⇒.η B) C.∘ R.₁ (counit.⇐.η B) ≈⟨ [ R ]-resp-inverse (counit.iso.isoʳ B) ⟩
C.id ∎
where open C.HomReasoning
open MR C

zig⁻¹ : {A : C.Obj} → L.₁ (unit.⇐.η A) D.∘ counit.⇐.η (L.₀ A) D.≈ D.id
zig⁻¹ {A} = begin
L.₁ (unit.⇐.η A) D.∘ counit.⇐.η (L.₀ A) ≈˘⟨ refl⟩∘⟨ flip-fromˡ counit.FX≅GX zig ⟩
L.₁ (unit.⇐.η A) D.∘ L.₁ (unit.⇒.η A) ≈⟨ [ L ]-resp-∘ (unit.iso.isoˡ A) ⟩
L.₁ C.id ≈⟨ L.identity ⟩
L.₁ (unit.⇐.η A) D.∘ L.₁ (unit.⇒.η A) ≈⟨ [ L ]-resp-inverse (unit.iso.isoˡ A) ⟩
D.id ∎
where open D.HomReasoning
open MR D
Expand Down Expand Up @@ -124,8 +122,7 @@ private
helper = begin
R.₁ (L.₁ (R.₁ (counit.⇒.η B) ∘ unit.⇒.η (R.₀ B))) ≈⟨ Functor.homomorphism (R ∘F L) ⟩
R.₁ (L.₁ (R.₁ (counit.⇒.η B))) ∘ R.₁ (L.₁ (unit.⇒.η (R.₀ B))) ≈˘⟨ R.F-resp-≈ (F≃id-comm₁ counit) ⟩∘⟨refl ⟩
R.₁ (counit.⇒.η (L.₀ (R.₀ B))) ∘ R.₁ (L.₁ (unit.⇒.η (R.₀ B))) ≈⟨ [ R ]-resp-∘ zig ⟩
R.₁ D.id ≈⟨ R.identity ⟩
R.₁ (counit.⇒.η (L.₀ (R.₀ B))) ∘ R.₁ (L.₁ (unit.⇒.η (R.₀ B))) ≈⟨ [ R ]-resp-inverse zig ⟩
id ∎

record WithZag (L : Functor C D) (R : Functor D C) : Set (levelOfTerm L ⊔ levelOfTerm R) where
Expand All @@ -152,8 +149,7 @@ private
helper = begin
L.₁ (R.₁ (counit.⇒.η (L.₀ A) ∘ L.₁ (unit.⇒.η A))) ≈⟨ Functor.homomorphism (L ∘F R) ⟩
(L.₁ (R.₁ (counit.⇒.η (L.₀ A))) ∘ L.₁ (R.₁ (L.₁ (unit.⇒.η A)))) ≈˘⟨ refl⟩∘⟨ L.F-resp-≈ (F≃id-comm₂ (≃.sym unit)) ⟩
L.₁ (R.₁ (counit.⇒.η (L.₀ A))) ∘ L.₁ (unit.⇒.η (R.₀ (L.₀ A))) ≈⟨ [ L ]-resp-∘ zag ⟩
L.₁ C.id ≈⟨ L.identity ⟩
L.₁ (R.₁ (counit.⇒.η (L.₀ A))) ∘ L.₁ (unit.⇒.η (R.₀ (L.₀ A))) ≈⟨ [ L ]-resp-inverse zag ⟩
id ∎

module _ {L : Functor C D} {R : Functor D C} where
Expand Down
26 changes: 7 additions & 19 deletions src/Categories/Adjoint/TwoSided/Compose.agda
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,16 @@ _∘⊣⊢_ {C = C} {D} {E} {L} {R} {L′} {R′} L⊣⊢R L′⊣⊢R′ = with
; iso = λ c → record
{ isoˡ = begin
(⊣⊢₁.unit.⇐.η c ∘ R.₁ (⊣⊢₂.unit.⇐.η (L.₀ c))) ∘ R.₁ (⊣⊢₂.unit.⇒.η (L.₀ c)) ∘ ⊣⊢₁.unit.⇒.η c
≈⟨ center ([ R ]-resp-∘ (⊣⊢₂.unit.iso.isoˡ (L.₀ c))) ⟩
⊣⊢₁.unit.⇐.η c ∘ R.₁ D.id ∘ ⊣⊢₁.unit.⇒.η c
≈⟨ refl⟩∘⟨ elimˡ R.identity ⟩
≈⟨ cancelInner ([ R ]-resp-inverse (⊣⊢₂.unit.iso.isoˡ (L.₀ c))) ⟩
⊣⊢₁.unit.⇐.η c ∘ ⊣⊢₁.unit.⇒.η c
≈⟨ ⊣⊢₁.unit.iso.isoˡ c ⟩
id
; isoʳ = begin
(R.₁ (⊣⊢₂.unit.⇒.η (L.₀ c)) ∘ ⊣⊢₁.unit.⇒.η c) ∘ ⊣⊢₁.unit.⇐.η c ∘ R.₁ (⊣⊢₂.unit.⇐.η (L.₀ c))
≈⟨ center (⊣⊢₁.unit.iso.isoʳ c) ⟩
R.₁ (⊣⊢₂.unit.⇒.η (L.₀ c)) ∘ id ∘ R.₁ (⊣⊢₂.unit.⇐.η (L.₀ c))
≈⟨ refl⟩∘⟨ identityˡ ⟩
≈⟨ cancelInner (⊣⊢₁.unit.iso.isoʳ c) ⟩
R.₁ (⊣⊢₂.unit.⇒.η (L.₀ c)) ∘ R.₁ (⊣⊢₂.unit.⇐.η (L.₀ c))
≈⟨ [ R ]-resp-∘ (⊣⊢₂.unit.iso.isoʳ (L.₀ c)) ⟩
R.₁ D.id
≈⟨ R.identity ⟩
≈⟨ [ R ]-resp-inverse (⊣⊢₂.unit.iso.isoʳ (L.₀ c)) ⟩
id
}
Expand Down Expand Up @@ -123,20 +117,14 @@ _∘⊣⊢_ {C = C} {D} {E} {L} {R} {L′} {R′} L⊣⊢R L′⊣⊢R′ = with
; iso = λ e → record
{ isoˡ = begin
(L′.₁ (⊣⊢₁.counit.⇐.η (R′.₀ e)) ∘ ⊣⊢₂.counit.⇐.η e) ∘ ⊣⊢₂.counit.⇒.η e ∘ L′.₁ (⊣⊢₁.counit.⇒.η (R′.₀ e))
≈⟨ center (⊣⊢₂.counit.iso.isoˡ e) ⟩
L′.₁ (⊣⊢₁.counit.⇐.η (R′.₀ e)) ∘ id ∘ L′.₁ (⊣⊢₁.counit.⇒.η (R′.₀ e))
≈⟨ refl⟩∘⟨ identityˡ ⟩
≈⟨ cancelInner (⊣⊢₂.counit.iso.isoˡ e) ⟩
L′.₁ (⊣⊢₁.counit.⇐.η (R′.₀ e)) ∘ L′.₁ (⊣⊢₁.counit.⇒.η (R′.₀ e))
≈⟨ [ L′ ]-resp-∘ (⊣⊢₁.counit.iso.isoˡ (R′.₀ e)) ⟩
L′.₁ D.id
≈⟨ L′.identity ⟩
≈⟨ [ L′ ]-resp-inverse (⊣⊢₁.counit.iso.isoˡ (R′.₀ e)) ⟩
id
; isoʳ = begin
(⊣⊢₂.counit.⇒.η e ∘ L′.₁ (⊣⊢₁.counit.⇒.η (R′.₀ e))) ∘ L′.₁ (⊣⊢₁.counit.⇐.η (R′.₀ e)) ∘ ⊣⊢₂.counit.⇐.η e
≈⟨ center ([ L′ ]-resp-∘ (⊣⊢₁.counit.iso.isoʳ (R′.₀ e))) ⟩
⊣⊢₂.counit.⇒.η e ∘ L′.₁ D.id ∘ ⊣⊢₂.counit.⇐.η e
≈⟨ refl⟩∘⟨ elimˡ L′.identity ⟩
≈⟨ cancelInner ([ L′ ]-resp-inverse (⊣⊢₁.counit.iso.isoʳ (R′.₀ e))) ⟩
⊣⊢₂.counit.⇒.η e ∘ ⊣⊢₂.counit.⇐.η e
≈⟨ ⊣⊢₂.counit.iso.isoʳ e ⟩
id
Expand All @@ -158,7 +146,7 @@ _∘⊣⊢_ {C = C} {D} {E} {L} {R} {L′} {R′} L⊣⊢R L′⊣⊢R′ = with
⊣⊢₂.counit.⇒.η (L′.₀ (L.₀ c)) ∘ (L′.₁ (⊣⊢₂.unit.⇒.η (L.₀ c)) ∘ L′.₁ (⊣⊢₁.counit.⇒.η (L.₀ c))) ∘ L′.₁ (L.₁ (⊣⊢₁.unit.⇒.η c))
≈⟨ pull-first ⊣⊢₂.zig ⟩
id ∘ L′.₁ (⊣⊢₁.counit.⇒.η (L.₀ c)) ∘ L′.₁ (L.₁ (⊣⊢₁.unit.⇒.η c))
≈⟨ elimʳ (([ L′ ]-resp- ⊣⊢₁.zig) ○ L′.identity) ⟩
≈⟨ elimʳ ([ L′ ]-resp-inverse ⊣⊢₁.zig) ⟩
id
where open E
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ open import Categories.Category.Construction.Presheaves using (Presheaves′; Pr
open import Categories.Category.Instance.Setoids using (Setoids)
open import Categories.Functor.Core using (Functor)
open import Categories.Functor.Hom using (Hom[_][_,_])
open import Categories.Functor.Properties using ([_]-resp-∘; [_]-resp-square)
open import Categories.Functor.Properties using ([_]-resp-∘; [_]-resp-square; [_]-resp-inverse)
open import Categories.Functor.Presheaf using (Presheaf)
open import Categories.NaturalTransformation using (NaturalTransformation; ntHelper)
open import Categories.Object.Product.Core using (Product) -- elide
Expand Down Expand Up @@ -212,9 +212,7 @@ module FromCartesianCCC {o} {C : Category o o o} (Car : Cartesian C) where
F.₁ Δ ⟨$⟩ (α.η (X × X) ⟨$⟩ (H.₁ π₁ ⟨$⟩ x , G.₁ π₂ ⟨$⟩ y))
≈⟨ α.sym-commute Δ ⟩
α.η X ⟨$⟩ (H.₁ Δ ⟨$⟩ (H.F₁ π₁ ⟨$⟩ x) , G.₁ Δ ⟨$⟩ (G.₁ π₂ ⟨$⟩ y))
≈⟨ cong (α.η X) ([ H ]-resp-∘ project₁ , [ G ]-resp-∘ project₂) ⟩
α.η X ⟨$⟩ (H.F₁ C.id ⟨$⟩ x , G.F₁ C.id ⟨$⟩ y)
≈⟨ cong (α.η X) (H.identity , G.identity) ⟩
≈⟨ cong (α.η X) ([ H ]-resp-inverse project₁ , [ G ]-resp-inverse project₂) ⟩
α.η X ⟨$⟩ (x , y)
∎ }
; curry-unique = λ {F G H} {α β} eq {X} {x} {Y} {z} →
Expand Down
4 changes: 2 additions & 2 deletions src/Categories/Diagram/Limit/Ran.agda
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ module _ {o ℓ e o′ ℓ′ e′ o″ ℓ″ e″} {C : Category o′ ℓ′ e
; sym-commute = λ _ → [ X ]-resp-square id-comm
}
; iso = λ _ → record
{ isoˡ = [ X ]-resp- C.identity² ○ X.identity
; isoʳ = [ X ]-resp- C.identity² ○ X.identity
{ isoˡ = [ X ]-resp-inverse C.identity²
; isoʳ = [ X ]-resp-inverse C.identity²
}
}
where open MR C using (id-comm-sym; id-comm)
Expand Down
4 changes: 2 additions & 2 deletions src/Categories/Functor/Monoidal/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ module _ (A : MonoidalCategory o ℓ e) (B : MonoidalCategory o′ ℓ′ e′)
; commute = λ _ → pullʳ ([ G ]-resp-square (CF.⊗-homo.⇐.commute _)) ○ pullˡ (CG.⊗-homo.⇐.commute _) ○ C.assoc
}
; iso = λ _ → record
{ isoˡ = cancelInner ([ G ]-resp- (CF.⊗-homo.iso.isoˡ _) ○ G.identity) ○ CG.⊗-homo.iso.isoˡ _
; isoʳ = cancelInner (CG.⊗-homo.iso.isoʳ _) ○ [ G ]-resp- (CF.⊗-homo.iso.isoʳ _) ○ G.identity
{ isoˡ = cancelInner ([ G ]-resp-inverse (CF.⊗-homo.iso.isoˡ _)) ○ CG.⊗-homo.iso.isoˡ _
; isoʳ = cancelInner (CG.⊗-homo.iso.isoʳ _) ○ [ G ]-resp-inverse (CF.⊗-homo.iso.isoʳ _)
}
}
; associativity = ∘.associativity
Expand Down
18 changes: 9 additions & 9 deletions src/Categories/Functor/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ module _ (F : Functor C D) where
D [ F₁ i ∘ F₁ g ] ∎
where open D.HomReasoning

[_]-resp-inverse : C [ C [ f ∘ g ] ≈ C.id ] → D [ D [ F₁ f ∘ F₁ g ] ≈ D.id ]
[_]-resp-inverse {f = f} {g = g} eq = begin
F₁ f D.∘ F₁ g ≈⟨ [_]-resp-∘ eq ⟩
F₁ C.id ≈⟨ identity ⟩
D.id ∎
where open D.HomReasoning

[_]-resp-Iso : Iso C f g → Iso D (F₁ f) (F₁ g)
[_]-resp-Iso {f = f} {g = g} iso = record
{ isoˡ = begin
F₁ g D.∘ F₁ f ≈⟨ [ isoˡ ]-resp-∘ ⟩
F₁ C.id ≈⟨ identity ⟩
D.id ∎
; isoʳ = begin
F₁ f D.∘ F₁ g ≈⟨ [ isoʳ ]-resp-∘ ⟩
F₁ C.id ≈⟨ identity ⟩
D.id ∎
{ isoˡ = [_]-resp-inverse isoˡ
; isoʳ = [_]-resp-inverse isoʳ
}
where open Iso iso
open D.HomReasoning

[_]-resp-≅ : F₀ Preserves _≅_ C ⟶ _≅_ D
[_]-resp-≅ i≅j = record
Expand Down