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

feat(data/equiv/algebra): add add_equiv and mul_equiv #789

Merged
merged 17 commits into from
Mar 22, 2019

Conversation

kbuzzard
Copy link
Member

@kbuzzard kbuzzard commented Mar 5, 2019

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • for tactics:
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

@kbuzzard
Copy link
Member Author

kbuzzard commented Mar 5, 2019

I needed these for the perfectoid project; basically I did what I needed, but it seemed comparable with what had been done for ring_equiv.

@cipher1024 cipher1024 requested review from johoelzl and ChrisHughes24 and removed request for johoelzl March 5, 2019 22:53
src/algebra/group.lean Show resolved Hide resolved
src/algebra/group.lean Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
@jcommelin
Copy link
Member

How long will it take before we also need add_monoid_equiv and add_group_equiv and then we don't have subscript letters for those...

@ChrisHughes24
Copy link
Member

How long will it take before we also need add_monoid_equiv and add_group_equiv and then we don't have subscript letters for those...

I think it would be good if is_group_hom := is_monoid_hom and group_equiv := monoid_equiv. Then we could use notation like ≃+ and ≃* I guess.

@ChrisHughes24
Copy link
Member

In fact, it turns out that for surjective functions, you don't need the map_one axiom for a monoid hom, so we could just do add preserving equivs and mul preserving equivs.

@kbuzzard
Copy link
Member Author

kbuzzard commented Mar 7, 2019

I've now switched to mul_equiv, which is an equiv of types with has_mul, with the equiv preserving the multiplication. This means that one no longer needs monoid_equiv or group_equiv because they both turn out to be special cases of mul_equiv. I added add_equiv for good measure.

Copy link
Member

@ChrisHughes24 ChrisHughes24 left a comment

Choose a reason for hiding this comment

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

It would be good to have to_additive attributes everywhere.

src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Outdated Show resolved Hide resolved
src/data/equiv/algebra.lean Show resolved Hide resolved
src/data/equiv/algebra.lean Show resolved Hide resolved
@johoelzl johoelzl removed their request for review March 12, 2019 07:06
@kbuzzard kbuzzard changed the title feat(data/equiv/algebra): add monoid_equiv and group_equiv feat(data/equiv/algebra): add add_equiv and mul_equiv Mar 17, 2019
src/algebra/group.lean Show resolved Hide resolved
src/algebra/group.lean Outdated Show resolved Hide resolved
@kbuzzard
Copy link
Member Author

It would be good to have to_additive attributes everywhere.

I have added them to everything I added, and to some stuff which other people have added too (now I understand how it all works)

@ChrisHughes24 ChrisHughes24 merged commit 989efab into master Mar 22, 2019
@ChrisHughes24 ChrisHughes24 deleted the kmb-group-equiv branch March 22, 2019 00:28
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…munity#789)

* feat(data/equiv/algebra): add monoid_equiv and group_equiv

* refactor; now using mul_equiv; adding add_equiv

* tidy

* namechange broke my code; now fixed

* next effort

* switching is_mul_hom back to explicit args

* removing more implicits

* typo

* switching back to implicits (to fix mathlib breakage)

* Making is_mul_hom and is_add_hom classes

* adding more to_additive
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.

None yet

3 participants