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

[Merged by Bors] - feat(category_theory/monoidal): the monoidal coherence theorem #7324

Closed
wants to merge 12 commits into from

Conversation

TwoFX
Copy link
Member

@TwoFX TwoFX commented Apr 22, 2021

This PR contains a proof of the monoidal coherence theorem, stated in the following way: if C is any type, then the free monoidal category over C is a preorder.

This should immediately imply the statement needed in the coherence branch.


Open in Gitpod

@TwoFX TwoFX added awaiting-review The author would like community review of the PR and removed not-ready-to-merge labels Apr 29, 2021
| ρ_inv_hom {X} : hom_equiv ((hom.ρ_inv X).comp (hom.ρ_hom X)) (hom.id _)
| ρ_naturality {X Y} (f : X ⟶ᵐ Y) : hom_equiv
((f.tensor (hom.id unit)).comp (hom.ρ_hom Y)) ((hom.ρ_hom X).comp f)
| l_hom_inv {X} : hom_equiv ((hom.l_hom X).comp (hom.l_inv X)) (hom.id _)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason you use l instead of \lambda?

Copy link
Member Author

Choose a reason for hiding this comment

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

It appears that constructors of inductive types aren't allowed to start with the symbol λ. The error message is invalid introduction rule, atomic identifier expected.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@gebner, is this a restriction that could easily be lifted?

Copy link
Member

Choose a reason for hiding this comment

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

It's not really a restriction per se, λ_hom_inv just means something different, namely a lambda with an argument called _hom_inv. You can use French quotes though:

inductive Λ | «λ»

@semorrison
Copy link
Collaborator

Imagine I don't want to read hom_equiv (it isn't hard to do), but want to be convinced it is correct. Could we state
(C → D) ≃ (monoidal_functor (F C) D), with the forward direction being project (beefed up to be monoidal), and the backwards direction being λ G X, G.obj (free_monoidal_category.of X)?

I'm saying it's really essential or useful to do so here: I'm just making sure I understand!

@TwoFX
Copy link
Member Author

TwoFX commented Apr 30, 2021

Imagine I don't want to read hom_equiv (it isn't hard to do), but want to be convinced it is correct. Could we state
(C → D) ≃ (monoidal_functor (F C) D), with the forward direction being project (beefed up to be monoidal), and the backwards direction being λ G X, G.obj (free_monoidal_category.of X)?

I don't think this is true. To be precise, we get the left_inv part of the equiv, but not the right_inv. The reason is simply that not every monoidal_functor (F C) D will send 𝟙_ (F C) exactly to 𝟙_ D (only to something isomorphic to it), but this is always true for project f.

However, I'm guessing that the right_inv part holds up to natural isomorphism (I haven't checked this).

If you really care about correctness of hom_equiv, maybe the following weaker observation will satisfy you: if there was a relation missing in hom_equiv, then we wouldn't be able to show that free_monoidal_category C is a monoidal category, and if there were too many relations in hom_equiv, then we wouldn't be able to fulfill the proof obligation in project_map.

@semorrison
Copy link
Collaborator

bors d+

@bors
Copy link

bors bot commented May 1, 2021

✌️ TwoFX can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels May 1, 2021
@TwoFX
Copy link
Member Author

TwoFX commented May 1, 2021

bors r+

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label May 1, 2021
bors bot pushed a commit that referenced this pull request May 1, 2021
This PR contains a proof of the monoidal coherence theorem, stated in the following way: if `C` is any type, then the free monoidal category over `C` is a preorder.

This should immediately imply the statement needed in the `coherence` branch.
@bors
Copy link

bors bot commented May 1, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request May 1, 2021
This PR contains a proof of the monoidal coherence theorem, stated in the following way: if `C` is any type, then the free monoidal category over `C` is a preorder.

This should immediately imply the statement needed in the `coherence` branch.
@bors
Copy link

bors bot commented May 1, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(category_theory/monoidal): the monoidal coherence theorem [Merged by Bors] - feat(category_theory/monoidal): the monoidal coherence theorem May 1, 2021
@bors bors bot closed this May 1, 2021
@bors bors bot deleted the coherence_thm branch May 1, 2021 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants