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

refactor(algebra/group): generalise and extend the API for with_zero #762

Merged
merged 4 commits into from Feb 28, 2019

Conversation

jcommelin
Copy link
Member

TO CONTRIBUTORS:

Make sure you have:

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

For reviewers: code review check list

@ChrisHughes24
Copy link
Member

It's not obvious what's changed here. Can you give a summary?

@jcommelin
Copy link
Member Author

(1) Before this patch, you don't automatically have an instance of has_one on with_one X, but only if X is a semigroup. This PR sets up the instances for with_one (and with_zero) in a more granular fashion.
(2) If G is a group, then with_zero G has a monoid structure with division (code comes from the perfectoid project, and was written partly by Kenny and Chris, I think).

@ChrisHughes24 ChrisHughes24 merged commit e6a3ca8 into master Feb 28, 2019
@ChrisHughes24 ChrisHughes24 deleted the with-zero branch February 28, 2019 17:20
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…eanprover-community#762)

* refactor(algebra/group): generalise and extend the API for with_zero

* Shorter proof. Thanks Chris

* Travis, try your best
YaelDillies added a commit to leanprover-community/mathlib4 that referenced this pull request Apr 22, 2024
Everything under `Algebra.Group` should be additivisable. Therefore I move the `GroupWithZero` instances for `WithZero` from `Algebra.Group.WithOne.Defs` and the whole of `Algebra.Group.WithOne.Units` to a new file `Algebra.GroupWithZero.WithZero`. I credit Mario for leanprover-community/mathlib@ad92a9b and Johan for leanprover-community/mathlib#762.
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 23, 2024
Everything under `Algebra.Group` should be additivisable. Therefore I move the `GroupWithZero` instances for `WithZero` from `Algebra.Group.WithOne.Defs` and the whole of `Algebra.Group.WithOne.Units` to a new file `Algebra.GroupWithZero.WithZero`. I credit Mario for leanprover-community/mathlib@ad92a9b and Johan for leanprover-community/mathlib#762.

Use the opportunity to slightly clean up the code:
* Replace `:=` by `where` in instance declarations
* Add missing explicit arguments to `coe` lemmas
* Add missing `section ... end`
Jun2M pushed a commit to leanprover-community/mathlib4 that referenced this pull request Apr 24, 2024
Everything under `Algebra.Group` should be additivisable. Therefore I move the `GroupWithZero` instances for `WithZero` from `Algebra.Group.WithOne.Defs` and the whole of `Algebra.Group.WithOne.Units` to a new file `Algebra.GroupWithZero.WithZero`. I credit Mario for leanprover-community/mathlib@ad92a9b and Johan for leanprover-community/mathlib#762.

Use the opportunity to slightly clean up the code:
* Replace `:=` by `where` in instance declarations
* Add missing explicit arguments to `coe` lemmas
* Add missing `section ... end`
callesonne pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 16, 2024
Everything under `Algebra.Group` should be additivisable. Therefore I move the `GroupWithZero` instances for `WithZero` from `Algebra.Group.WithOne.Defs` and the whole of `Algebra.Group.WithOne.Units` to a new file `Algebra.GroupWithZero.WithZero`. I credit Mario for leanprover-community/mathlib@ad92a9b and Johan for leanprover-community/mathlib#762.

Use the opportunity to slightly clean up the code:
* Replace `:=` by `where` in instance declarations
* Add missing explicit arguments to `coe` lemmas
* Add missing `section ... end`
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

2 participants