-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
b78e2e2
Given two monads construct the 1-category of bimodules between them
tillrampe aba333e
Delete unnecessary comment
tillrampe e52aa32
Merge branch 'bimodule' into cat-of-bimods
tillrampe 99dc736
Open Bimodulehomomorphism as its definition has been moved to a new file
tillrampe 1a211fb
Specify open commands by using commands
tillrampe 3eede4b
Eta reduce the definition of hom sets
tillrampe 26e78a2
Move the two monads that serve as parameters into the module signature
tillrampe ab136f3
Make monads an explicit parameter
tillrampe 8b05760
Import Bimodulehomomorphism as it has moved to a different file
tillrampe 4862f00
No lossy unification needed
tillrampe ba4c6c6
Specify open commands by using commands to avoid name clashes
tillrampe 04e3ecb
Use named implicit application when opening the module and skip level…
tillrampe 4762e52
Give a clearer name to lemmata
tillrampe 294f18d
Move definitions of the fileds of the record type to the where clause
tillrampe 7adb41d
Call the lemmata by their new names
tillrampe d0579d2
Don't open multiple instances of the module Monad resp. Bimodule as i…
tillrampe 52e1af4
Add a comment explaining why we cannot delta reduce the definition of…
tillrampe ce521e5
Add a comment explaining why we cannot delta reduce the definition of…
tillrampe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| {-# 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 | ||
| -- must be delta expanded to type-check | ||
| -- as functions are applied to different implicit parameters | ||
| { refl = hom.Equiv.refl | ||
| ; sym = hom.Equiv.sym | ||
| ; trans = hom.Equiv.trans | ||
| } | ||
| ; ∘-resp-≈ = hom.∘-resp-≈ | ||
| } | ||
| where | ||
| open Bimodulehomomorphism using (α) | ||
75 changes: 75 additions & 0 deletions
75
src/Categories/Category/Construction/Bimodules/Properties.agda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| {-# 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 | ||
| -- Cannot be delta reduced because of size issues | ||
| { 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) | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.