-
Notifications
You must be signed in to change notification settings - Fork 74
1-Category of Bimodules #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
b78e2e2
aba333e
e52aa32
99dc736
1a211fb
3eede4b
26e78a2
ab136f3
8b05760
4862f00
ba4c6c6
04e3ecb
4762e52
294f18d
7adb41d
d0579d2
52e1af4
ce521e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| {-# OPTIONS --without-K --safe #-} | ||
|
|
||
| open import Categories.Bicategory | ||
| open import Categories.Bicategory.Monad using (Monad) | ||
|
|
||
| module Categories.Category.Construction.Bimodules {o ℓ e t} {𝒞 : Bicategory o ℓ e t} (M₁ M₂ : Monad 𝒞) where | ||
|
|
||
| open import Level | ||
| open import Categories.Category | ||
| open import Categories.Bicategory.Monad.Bimodule using (Bimodule) | ||
| open import Categories.Bicategory.Monad.Bimodule.Homomorphism using (Bimodulehomomorphism; id-bimodule-hom; bimodule-hom-∘) | ||
| import Categories.Bicategory.Extras as Bicat | ||
| open Bicat 𝒞 | ||
|
|
||
| Bimodules : Category (o ⊔ ℓ ⊔ e) (ℓ ⊔ e) e | ||
| Bimodules = record | ||
| { Obj = Bimodule M₁ M₂ | ||
| ; _⇒_ = Bimodulehomomorphism | ||
| ; _≈_ = λ h₁ h₂ → α h₁ ≈ α h₂ | ||
| ; id = id-bimodule-hom | ||
| ; _∘_ = bimodule-hom-∘ | ||
| ; assoc = assoc₂ | ||
| ; sym-assoc = sym-assoc₂ | ||
| ; identityˡ = identity₂ˡ | ||
| ; identityʳ = identity₂ʳ | ||
| ; identity² = identity₂² | ||
| ; equiv = record | ||
| { refl = hom.Equiv.refl | ||
| ; sym = hom.Equiv.sym | ||
| ; trans = hom.Equiv.trans | ||
| } | ||
| ; ∘-resp-≈ = hom.∘-resp-≈ | ||
| } | ||
| where | ||
| open Bimodulehomomorphism using (α) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main purpose of this file is to show that a bimodule homomorphism is invertible if its underlying 2-cell is invertible. As this requires considering two different categories plus the ambient bicategory, there is a big potential for overloaded variable names. I'm employing using commands to avoid overloads, but don't rename. If you see a better way to strike a balance between being clear and being concise please let me know.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tend to use named private modules, with the same name as the (bi)category of interest, to give the reader more 'local context' to help resolve which (bi)category is being talked about. I tend to them use non-subscripted names when I do that, as that makes things harder to read.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer mixfix notation for
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| {-# OPTIONS --without-K --safe #-} | ||
|
|
||
|
|
||
| open import Categories.Bicategory | ||
| open import Categories.Bicategory.Monad | ||
|
|
||
| module Categories.Category.Construction.Bimodules.Properties | ||
| {o ℓ e t} {𝒞 : Bicategory o ℓ e t} {M₁ M₂ : Monad 𝒞} where | ||
|
|
||
| open import Agda.Primitive | ||
|
|
||
| import Categories.Category.Construction.Bimodules | ||
| open import Categories.Category | ||
|
|
||
| Bimodules : Category (o ⊔ ℓ ⊔ e) (ℓ ⊔ e) e | ||
| Bimodules = Categories.Category.Construction.Bimodules.Bimodules M₁ M₂ | ||
|
|
||
| private | ||
| module Cat {o₁ ℓ₁ e₁} {C : Categories.Category.Category o₁ ℓ₁ e₁} where | ||
| open Categories.Category.Category C using (Obj; _⇒_) public | ||
| open import Categories.Morphism C using (IsIso; _≅_) public | ||
| open import Categories.Morphism.Reasoning.Iso C using (conjugate-from) public | ||
|
|
||
| open Cat | ||
|
|
||
|
|
||
| import Categories.Bicategory.Extras as Bicat | ||
| open Bicat 𝒞 using (hom; _⇒₂_; _≈_; _∘ᵥ_; _◁_; _▷_; _◁ᵢ_; _▷ᵢ_) | ||
|
|
||
| open import Categories.Bicategory.Monad.Bimodule {𝒞 = 𝒞} | ||
| open import Categories.Bicategory.Monad.Bimodule.Homomorphism {𝒞 = 𝒞} | ||
|
|
||
| module Bimodulehom-isIso {B₁ B₂ : Obj {C = Bimodules}} (f : _⇒_ {C = Bimodules} B₁ B₂) where | ||
| open Monad using (C; T) | ||
| open Bimodule using (F; actionˡ; actionʳ) | ||
| open Bimodulehomomorphism f using (α; linearˡ; linearʳ) | ||
|
|
||
| αisIso⇒fisIso : IsIso {C = hom (C M₁) (C M₂)} α → IsIso {C = Bimodules} f | ||
| αisIso⇒fisIso αisIso = record | ||
| { inv = record | ||
| { α = α⁻¹ | ||
| ; linearˡ = linearˡ⁻¹ | ||
| ; linearʳ = linearʳ⁻¹ | ||
| } | ||
| ; iso = record | ||
| { isoˡ = IsIso.isoˡ αisIso | ||
| ; isoʳ = IsIso.isoʳ αisIso | ||
| } | ||
| } | ||
| where | ||
| open hom.HomReasoning | ||
|
|
||
| α⁻¹ : F B₂ ⇒₂ F B₁ | ||
| α⁻¹ = IsIso.inv αisIso | ||
|
|
||
| αIso : F B₁ ≅ F B₂ | ||
| αIso = record | ||
| { from = α | ||
| ; to = α⁻¹ | ||
| ; iso = IsIso.iso αisIso | ||
| } | ||
|
|
||
| linearˡ⁻¹ : actionˡ B₁ ∘ᵥ α⁻¹ ◁ T M₁ ≈ α⁻¹ ∘ᵥ actionˡ B₂ | ||
| linearˡ⁻¹ = ⟺ (conjugate-from (αIso ◁ᵢ T M₁) αIso linearˡ) | ||
|
|
||
| linearʳ⁻¹ : actionʳ B₁ ∘ᵥ T M₂ ▷ α⁻¹ ≈ α⁻¹ ∘ᵥ actionʳ B₂ | ||
| linearʳ⁻¹ = ⟺ (conjugate-from (T M₂ ▷ᵢ αIso) αIso linearʳ) | ||
|
|
||
| αisIso⇒Iso : IsIso {C = hom (C M₁) (C M₂)} α → B₁ ≅ B₂ | ||
| αisIso⇒Iso αisIso = record | ||
| { from = f | ||
| ; to = IsIso.inv (αisIso⇒fisIso αisIso) | ||
| ; iso = IsIso.iso (αisIso⇒fisIso αisIso) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it can be eta-reduced to
hom.Equivbut in fact it cannot. The issue is thathow.Equivis a proof thathom._≈_is an equivalence, but we need a proof thatλ h₁ h₂ → α h₁ ≈ α h₂is an equivalence.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A one liner comment (like "must be delta expanded to typecheck as at different types") would be good.