Skip to content

1-Category of Bimodules#479

Merged
JacquesCarette merged 18 commits intoagda:masterfrom
tillrampe:cat-of-bimods
Jul 7, 2025
Merged

1-Category of Bimodules#479
JacquesCarette merged 18 commits intoagda:masterfrom
tillrampe:cat-of-bimods

Conversation

@tillrampe
Copy link
Contributor

This pull request constructs a 1-category of bimodules and bimodule homomorphism given two monads in a bicategory (cf. Shulman - Framed Bicategories and Monoidal Fibrations, Ch. 11). This is part of a larger project constructing a bicategory of monads and bimodules.

@JacquesCarette
Copy link
Collaborator

Build failed - problem with moving things around?

@tillrampe
Copy link
Contributor Author

Yes, I've found the problem and with it a couple more things to improve. I will push the commits all together when they are ready for review.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer mixfix notation for _≅_ and _⇒_, and that is not possible unless you open the modules.

Copy link
Collaborator

Choose a reason for hiding this comment

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

C.⇒ works just fine infix BTW.

; identity² = identity₂²
; equiv = record
{ refl = hom.Equiv.refl
; sym = hom.Equiv.sym
Copy link
Contributor Author

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.Equiv but in fact it cannot. The issue is that how.Equiv is a proof that hom._≈_ is an equivalence, but we need a proof that λ h₁ h₂ → α h₁ ≈ α h₂ is an equivalence.

Copy link
Collaborator

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.

Copy link
Collaborator

@JacquesCarette JacquesCarette left a comment

Choose a reason for hiding this comment

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

As the last thing discussed was quite cosmetic (in a way that is not covered by the library's style guide), I'm not going to hold up this PR because of that.

@JacquesCarette JacquesCarette merged commit aabe490 into agda:master Jul 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants