Skip to content

[Merged by Bors] - chore: Delete Algebra.Parity#11863

Closed
YaelDillies wants to merge 29 commits intomasterfrom
delete_algebra_parity
Closed

[Merged by Bors] - chore: Delete Algebra.Parity#11863
YaelDillies wants to merge 29 commits intomasterfrom
delete_algebra_parity

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies commented 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/mathlib3#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated
@YaelDillies YaelDillies added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) labels Apr 3, 2024
@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 3, 2024
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 6, 2024
@ghost ghost added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 6, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 7, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 8, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 14, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Apr 20, 2024
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 13, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 13, 2024
mathlib-bors bot pushed a commit 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/mathlib3#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label May 15, 2024
@ghost
Copy link
Copy Markdown

ghost commented May 15, 2024

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 15, 2024
@YaelDillies YaelDillies force-pushed the delete_algebra_parity branch from fdb836e to 02cdd78 Compare May 15, 2024 11:19
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 15, 2024
@YaelDillies YaelDillies changed the title move(Algebra/Parity): Split file chore: Delete Algebra.Parity May 15, 2024
callesonne pushed a commit 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/mathlib3#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 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/mathlib3#17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 17, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 17, 2024
@jcommelin
Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels May 22, 2024
mathlib-bors bot pushed a commit that referenced this pull request May 22, 2024
#12829 made `Algebra.Parity` almost empty. This PR deletes it.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented May 22, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: Delete Algebra.Parity [Merged by Bors] - chore: Delete Algebra.Parity May 22, 2024
@mathlib-bors mathlib-bors bot closed this May 22, 2024
@mathlib-bors mathlib-bors bot deleted the delete_algebra_parity branch May 22, 2024 13:33
callesonne pushed a commit that referenced this pull request Jun 4, 2024
#12829 made `Algebra.Parity` almost empty. This PR deletes it.
js2357 pushed a commit that referenced this pull request Jun 18, 2024
#12829 made `Algebra.Parity` almost empty. This PR deletes it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants