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(group_theory/free_product): equivalence with reduced words #7395

Closed
wants to merge 23 commits into from

Conversation

dwarn
Copy link
Collaborator

@dwarn dwarn commented Apr 28, 2021

@dwarn dwarn added the RFC Request for comment label Apr 28, 2021
@dwarn
Copy link
Collaborator Author

dwarn commented Apr 29, 2021

I marked this RFC because there are a couple open design questions. Most importantly: should we have a canonical definition of the coproduct, and if so what should it be? There is already a nice "automated" construction in algebra.category.Mon.colimits. The construction there is diametrically opposite to the one here. This one is sort of "maximally efficient": we only ever consider expressions in normal form, there is no need to quotient, we needed to know beforehand what the normal forms should be (so this doesn't work for say general pushouts, where there is no normal form), we need some decidability assumptions to compute in the coproduct, and we can easily tell when two elements of the coproduct are distinct. The construction in algebra.category.Mon.colimits is maximally inefficient: you start with all sorts of syntactic expressions then quotient to get rid of redundancy, you don't need to know anything about monoids beforehand, the construction is the same for any colimit, and there is no way to prove that two elements of the coproduct are distinct other than showing they map to distinct things in some other monoid. For better or worse, you get the universal property and nothing else. A third, sort of intermediate, construction would be to quotient a certain list monoid, analogously to the current construction of free groups.

If we don't define the coproduct as reduced words, we can still use the material in this PR to prove that the coproduct doesn't make too many identifications -- you just need to let the coproduct act on the reduced words. If we do define the coproduct as reduced words, there is still the question of decidability assumptions. It doesn't seem ideal to have multiplication depend on decidability instances. Should we use classical instances throughout?

I should say that constructively, the approach in this PR is not as satisfying as the current construction of free groups. By working with unreduced words, then quotienting and proving confluence, you get constructive proofs of various injectivity statements, even without decidability assumptions. However Lean can't tell the difference between constructive and non-constructive proofs of injectivity. The upshot of the approach in this PR is that it's considerably simpler than dealing with confluence.

@github-actions github-actions bot added merge-conflict Please `git merge origin/master` then a bot will remove this label. and removed merge-conflict Please `git merge origin/master` then a bot will remove this label. labels May 3, 2021
@dwarn dwarn changed the title feat(group_theory/coproduct): indexed coproduct of groups and monoids feat(group_theory/free_product): define free products May 3, 2021
@dwarn
Copy link
Collaborator Author

dwarn commented May 3, 2021

I noticed that there's an old WIP PR #2578 by @urkud which does the same thing as this one, but with a different approach. I also cleaned this one up a bit.

@dwarn dwarn added the awaiting-review The author would like community review of the PR label May 3, 2021
@semorrison
Copy link
Collaborator

Sorry, I'm not going to have a chance to look at this soon; limited Lean time. One request would just be that David's explanation above about the relationship with algebra.category.Mon.colimits goes into doc-strings somewhere! It's very helpful.

@dwarn
Copy link
Collaborator Author

dwarn commented May 10, 2021

After thinking a bit about this, I would slightly prefer to change the setup here, starting from some quotient definition of the free product as in #2578, and then proving that it's equiv with reduced words. Currently I jump through some hoops to give free_product its monoid structure and universal property without too much duplication. I think starting from another free product, and proving that it's equiv with reduced words, would make the argument more focused. There wouldn't be too much work involved in this change, but I won't have time for it anytime soon.

@sgouezel sgouezel added the WIP Work in progress label May 10, 2021
@sgouezel
Copy link
Collaborator

ok, seems reasonable. Let me mark this as WIP then.

@sgouezel sgouezel removed the awaiting-review The author would like community review of the PR label May 10, 2021
@dwarn dwarn added awaiting-review The author would like community review of the PR and removed RFC Request for comment WIP Work in progress labels Jul 8, 2021
@dwarn dwarn requested a review from ChrisHughes24 July 24, 2021 19:32
@ChrisHughes24
Copy link
Member

The only comment I have on this is that it's often not a good idea to define a new type only to prove it's isomorphic to another type. My feeling is that either word should either be the definition of the coproduct or all the structure that is currently on word should be put directly on the coproduct. So my feeling is that the type word shouldn't be part of the API, the API should be a map from coproduct to lists with a proof that the result is reduced etc., and the map from lists to coproduct etc, as well as an induction principle and stuff like that, all defined directly on the coproduct.

@dwarn
Copy link
Collaborator Author

dwarn commented Jul 30, 2021

@ChrisHughes24 this sounds reasonable -- the API should mainly expose one of free_product and word, and probably it should be free_product (word is not always so nice because you need decidable instances, and putting a monoid structure on word directly gets a little confusing). In this perspective, word is there only to give things like decidable equality to the free_product.

I haven't thought much about creating an API in this PR. But it should be straightforward to build an API on top of this, proving things like decidable equality in free_product. Lemmas about word that are in this PR might not be too useful outside of proving the equivalence with free_product, so I'm not sure they should be transferred to free_product.

@jcommelin
Copy link
Member

I think it would be good to see more API before merging this. @dwarn Do you think you can add some?

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 26, 2021
@dwarn
Copy link
Collaborator Author

dwarn commented Sep 9, 2021

I added some decidable equality instances and reorganized the code to be more user friendly.

I'm not sure what else to add. Maybe an analogue of equiv_pair for free_product instead of just word (you need something similar to this to prove that free_group (fin 2) is not amenable / Banach-Tarski), but maybe this is better left for another PR.

@dwarn dwarn added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Sep 9, 2021
Copy link
Collaborator

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

src/group_theory/free_product.lean Outdated Show resolved Hide resolved
src/group_theory/free_product.lean Outdated Show resolved Hide resolved
@sgouezel
Copy link
Collaborator

bors r+
Thanks!

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 13, 2021
bors bot pushed a commit that referenced this pull request Sep 13, 2021
We show that each element of the free product is represented by a unique reduced word.
@bors
Copy link

bors bot commented Sep 13, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 13, 2021
We show that each element of the free product is represented by a unique reduced word.
@bors
Copy link

bors bot commented Sep 13, 2021

Build failed:

@sgouezel
Copy link
Collaborator

Can you merge master and fix the build?
bors r-

@ChrisHughes24
Copy link
Member

bors merge

bors bot pushed a commit that referenced this pull request Sep 14, 2021
We show that each element of the free product is represented by a unique reduced word.
@bors
Copy link

bors bot commented Sep 14, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(group_theory/free_product): equivalence with reduced words [Merged by Bors] - feat(group_theory/free_product): equivalence with reduced words Sep 14, 2021
@bors bors bot closed this Sep 14, 2021
@bors bors bot deleted the grpcoproduct branch September 14, 2021 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

6 participants