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] - chore(algebra/parity): Reduce imports #17391

Closed
wants to merge 6 commits into from

Conversation

YaelDillies
Copy link
Collaborator

This PR takes the stance that algebra.parity is a basic pure algebra file, and thus moves all the zpow material to algebra.field.basic and algebra.order.field.power, and the irreducible material to algebra.associated.


Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) t-order Order hierarchy labels Nov 6, 2022
@semorrison
Copy link
Collaborator

I like it!

bors d+

@bors
Copy link

bors bot commented Nov 6, 2022

✌️ YaelDillies 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 Nov 6, 2022
@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request Nov 9, 2022
This PR takes the stance that `algebra.parity` is a basic pure algebra file, and thus moves all the `zpow` material to `algebra.field.basic` and `algebra.order.field.power`, and the `irreducible` material to `algebra.associated`.
@bors
Copy link

bors bot commented Nov 9, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(algebra/parity): Reduce imports [Merged by Bors] - chore(algebra/parity): Reduce imports Nov 9, 2022
@bors bors bot closed this Nov 9, 2022
@bors bors bot deleted the reduce_parity_imports branch November 9, 2022 20:59
YaelDillies added a commit to leanprover-community/mathlib4 that referenced this pull request Apr 3, 2024
Parity of elements in a group/ring is a basic algebraic concept, but it currently requires importing a bunch of algebraic order theory. As a consequence, `Algebra.Parity` currently holds a bunch of lemmas that really belong in earlier files but cannot due to import cycles.

This PR moves the content of `Algebra.Parity` to
* `Algebra.Group.Even` for the definition of `IsSquare` and `Even`
* `Algebra.Ring.Parity` for the definition of `Odd` and ring properties of `Even`
* `Algebra.Order.Group.Abs`, `Algebra.Order.Ring.Abs`, `Algebra.Order.Ring.Canonical`, `Algebra.Order.Sub.Canonical`, `Algebra.GroupPower.Order` for the various algebraic order properties of `Even` and `Odd`

As a result, `Even`/`Odd` are available much more widely without awkward dependencies and algebraic order lemmas are now in the correct files. The only slight downfall is that two lemmas in `Algebra.Ring.Parity` are stated using `Set.range`, hence I had to weaken a few `assert_not_exists` to forbidding `Data.Set.Basic` instead of `Data.Set.Defs`. This is inconsequential.

This is a followup to leanprover-community/mathlib#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated
YaelDillies added a commit to leanprover-community/mathlib4 that referenced this pull request May 11, 2024
Parity of elements in a group/ring is a basic algebraic concept, but it currently requires importing a bunch of algebraic order theory. As a consequence, `Algebra.Parity` currently holds a bunch of lemmas that really belong in earlier files but cannot due to import cycles.

This PR moves the content of `Algebra.Parity` to
* `Algebra.Group.Even` for the definition of `IsSquare` and `Even`
* `Algebra.Ring.Parity` for the definition of `Odd` and ring properties of `Even`
* `Algebra.Order.Group.Abs`, `Algebra.Order.Ring.Abs`, `Algebra.Order.Ring.Canonical`, `Algebra.Order.Sub.Canonical`, `Algebra.GroupPower.Order` for the various algebraic order properties of `Even` and `Odd`

As a result, `Even`/`Odd` are available much more widely without awkward dependencies and algebraic order lemmas are now in the correct files. The only slight downfall is that two lemmas in `Algebra.Ring.Parity` are stated using `Set.range`, hence I had to weaken a few `assert_not_exists` to forbidding `Data.Set.Basic` instead of `Data.Set.Defs`. This is inconsequential.

A side-effect of this PR is that I had to move some `bit0`/`bit1` lemmas. I could not find anywhere sensible to put them, so I am currently keeping them in `Algebra.Parity`. As a result, I had to reprove a few lemmas in `Algebra.GroupPower.Order`. I took the opportunity to generalise them.

This is a followup to leanprover-community/mathlib#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 15, 2024
Parity of elements in a group/ring is a basic algebraic concept, but it currently requires importing a bunch of algebraic order theory. As a consequence, `Algebra.Parity` currently holds a bunch of lemmas that really belong in earlier files but cannot due to import cycles.

This PR moves the content of `Algebra.Parity` to
* `Algebra.Group.Even` for the definition of `IsSquare` and `Even`
* `Algebra.Ring.Parity` for the definition of `Odd` and ring properties of `Even`
* `Algebra.Order.Group.Abs`, `Algebra.Order.Ring.Abs`, `Algebra.Order.Ring.Canonical`, `Algebra.Order.Sub.Canonical`, `Algebra.GroupPower.Order` for the various algebraic order properties of `Even` and `Odd`

As a result, `Even`/`Odd` are available much more widely without awkward dependencies and algebraic order lemmas are now in the correct files. The only slight downfall is that two lemmas in `Algebra.Ring.Parity` are stated using `Set.range`, hence I had to weaken a few `assert_not_exists` to forbidding `Data.Set.Basic` instead of `Data.Set.Defs`. This is inconsequential.

A side-effect of this PR is that I had to move some `bit0`/`bit1` lemmas. I could not find anywhere sensible to put them, so I am currently keeping them in `Algebra.Parity`. As a result, I had to reprove a few lemmas in `Algebra.GroupPower.Order`. I took the opportunity to generalise them.

This is a followup to leanprover-community/mathlib#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.
callesonne pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 16, 2024
Parity of elements in a group/ring is a basic algebraic concept, but it currently requires importing a bunch of algebraic order theory. As a consequence, `Algebra.Parity` currently holds a bunch of lemmas that really belong in earlier files but cannot due to import cycles.

This PR moves the content of `Algebra.Parity` to
* `Algebra.Group.Even` for the definition of `IsSquare` and `Even`
* `Algebra.Ring.Parity` for the definition of `Odd` and ring properties of `Even`
* `Algebra.Order.Group.Abs`, `Algebra.Order.Ring.Abs`, `Algebra.Order.Ring.Canonical`, `Algebra.Order.Sub.Canonical`, `Algebra.GroupPower.Order` for the various algebraic order properties of `Even` and `Odd`

As a result, `Even`/`Odd` are available much more widely without awkward dependencies and algebraic order lemmas are now in the correct files. The only slight downfall is that two lemmas in `Algebra.Ring.Parity` are stated using `Set.range`, hence I had to weaken a few `assert_not_exists` to forbidding `Data.Set.Basic` instead of `Data.Set.Defs`. This is inconsequential.

A side-effect of this PR is that I had to move some `bit0`/`bit1` lemmas. I could not find anywhere sensible to put them, so I am currently keeping them in `Algebra.Parity`. As a result, I had to reprove a few lemmas in `Algebra.GroupPower.Order`. I took the opportunity to generalise them.

This is a followup to leanprover-community/mathlib#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.
grunweg pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 17, 2024
Parity of elements in a group/ring is a basic algebraic concept, but it currently requires importing a bunch of algebraic order theory. As a consequence, `Algebra.Parity` currently holds a bunch of lemmas that really belong in earlier files but cannot due to import cycles.

This PR moves the content of `Algebra.Parity` to
* `Algebra.Group.Even` for the definition of `IsSquare` and `Even`
* `Algebra.Ring.Parity` for the definition of `Odd` and ring properties of `Even`
* `Algebra.Order.Group.Abs`, `Algebra.Order.Ring.Abs`, `Algebra.Order.Ring.Canonical`, `Algebra.Order.Sub.Canonical`, `Algebra.GroupPower.Order` for the various algebraic order properties of `Even` and `Odd`

As a result, `Even`/`Odd` are available much more widely without awkward dependencies and algebraic order lemmas are now in the correct files. The only slight downfall is that two lemmas in `Algebra.Ring.Parity` are stated using `Set.range`, hence I had to weaken a few `assert_not_exists` to forbidding `Data.Set.Basic` instead of `Data.Set.Defs`. This is inconsequential.

A side-effect of this PR is that I had to move some `bit0`/`bit1` lemmas. I could not find anywhere sensible to put them, so I am currently keeping them in `Algebra.Parity`. As a result, I had to reprove a few lemmas in `Algebra.GroupPower.Order`. I took the opportunity to generalise them.

This is a followup to leanprover-community/mathlib#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.
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. t-algebra Algebra (groups, rings, fields etc) t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants