Skip to content
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

+Commutative monads #402

Closed
wants to merge 1 commit into from
Closed

Conversation

sergey-goncharov
Copy link
Collaborator

  • added the definition of commutative monad (src/Categories/Monad/Commutative.agda)
  • to that end, amended the definition of strong monad (src/Categories/Monad/Strong.agda): added the assumption of the underlying monodial category to be symmetric, and used it to define the dual strength (strengthen' : NaturalTransformation (⊗ ∘F (F ⁂ idF)) (F ∘F ⊗))
  • added a helper SwapFG≅FGSwap to src/Categories/Category/Product/Properties.agda

@JacquesCarette
Copy link
Collaborator

Sorry for the silence, it's been a crazy term for me - why did you close this PR?

open import Categories.Monad

private
variable
o ℓ e : Level

record Strength {C : Category o ℓ e} (V : Monoidal C) (M : Monad C) : Set (o ⊔ ℓ ⊔ e) where
record Strength {C : Category o ℓ e} {V : Monoidal C} (S : Symmetric V) (M : Monad C) : Set (o ⊔ ℓ ⊔ e) where
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't it the case that there are different concepts of Strength depending on whether the underlying category is Symmetric or not? So there should be two notions of Strength rather than requiring Symmetric V?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, that was too crude. We can have left-strong monads over non-symmetric V.

open M using (F)
open Functor F

record Commutative : Set (o ⊔ ℓ ⊔ e) where
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if Commutative should be a simple property rather than a record ? There are certainly times where a one-field record is much nicer (both to help Agda with inference, and to get a nice projector name), I'm not sure here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just copycatted /src/Categories/Monad/Idempotent.agda

Copy link
Collaborator

Choose a reason for hiding this comment

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

Which was the right thing to do. I didn't think of asking the question about that one - such are the vagaries of code reviews done by humans, you don't catch everything every time.

@sergey-goncharov
Copy link
Collaborator Author

Sorry for the silence, it's been a crazy term for me - why did you close this PR?

I thought, if I delete it, it counts as withdrawn. Should I have done something different? I did not see other options.

I wanted to add this definition initially, but Leon (@Reijix) already implemented it in his fork (together with many other things). He kind of convinced me that his implementation is better.

@JacquesCarette
Copy link
Collaborator

If you wanted to withdraw it from consideration, then closing it is the right thing to do - I just expected a message to go along, saying why you were closing it.

So is Leon (@Reijix ) going to be submitting some PRs?

@sergey-goncharov
Copy link
Collaborator Author

If you wanted to withdraw it from consideration, then closing it is the right thing to do - I just expected a message to go along, saying why you were closing it.

So is Leon (@Reijix ) going to be submitting some PRs?

now he must:-) since he protested about my PR.

@Reijix Reijix mentioned this pull request Dec 7, 2023
@Reijix
Copy link
Contributor

Reijix commented Dec 7, 2023

If you wanted to withdraw it from consideration, then closing it is the right thing to do - I just expected a message to go along, saying why you were closing it.

So is Leon (@Reijix ) going to be submitting some PRs?

I wanted to hold it back until I can figure out the missing proof, but it seems that I wont be able to do it any time soon, so I've created the PR now (#404) in hope that someone else is able to.

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.

3 participants