[Merged by Bors] - move(Algebra/Parity): Split file#12829
[Merged by Bors] - move(Algebra/Parity): Split file#12829YaelDillies wants to merge 7 commits intomasterfrom
Conversation
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.
|
Yaël, thank you for the new PR, as this gives me a way of testing some improvements to the This is a summary of just the names that have changed in this PR: Does this seem a reasonable output? |
|
|
|
The script is just text-based and it is supposed to be a quick check that does not require CI to have run. So, I think that it is fair if it flags as missing a The main idea is to help focus from the +474-478 lines to just checking the 4 highlighted lemmas. This seems like a good simplification for reviewers. |
|
Yeah, makes sense. The rest of the list looks good. |
|
Ok, thanks for confirming. I will make the very short diff available as an option, then. |
|
Ruben-VandeVelde
left a comment
There was a problem hiding this comment.
Thanks!
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
|
bors r+ |
@adomani, there seems to be a formatting issue |
|
Thanks for the report! I can remove the extra |
|
Merge conflict. |
Fixes a formatting issue in the output of `move-decls`. As reported in #12829. On that PR, the new script reports *** * `+` Additive.instDecidablePredEven * `--` [DecidablePred * `-` even_abs * `+` isSquare_mabs * `+` Multiplicative.instDecidablePredIsSquare
|
bors r+ |
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.
|
Pull request successfully merged into master. Build succeeded: |
Fixes a formatting issue in the output of `move-decls`. As reported in #12829. On that PR, the new script reports *** * `+` Additive.instDecidablePredEven * `--` [DecidablePred * `-` even_abs * `+` isSquare_mabs * `+` Multiplicative.instDecidablePredIsSquare
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.
Fixes a formatting issue in the output of `move-decls`. As reported in #12829. On that PR, the new script reports *** * `+` Additive.instDecidablePredEven * `--` [DecidablePred * `-` even_abs * `+` isSquare_mabs * `+` Multiplicative.instDecidablePredIsSquare
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.
#12829 made `Algebra.Parity` almost empty. This PR deletes it.
#12829 made `Algebra.Parity` almost empty. This PR deletes it.
#12829 made `Algebra.Parity` almost empty. This PR deletes it.
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.Paritycurrently holds a bunch of lemmas that really belong in earlier files but cannot due to import cycles.This PR moves the content of
Algebra.ParitytoAlgebra.Group.Evenfor the definition ofIsSquareandEvenAlgebra.Ring.Parityfor the definition ofOddand ring properties ofEvenAlgebra.Order.Group.Abs,Algebra.Order.Ring.Abs,Algebra.Order.Ring.Canonical,Algebra.Order.Sub.Canonical,Algebra.GroupPower.Orderfor the various algebraic order properties ofEvenandOddAs a result,
Even/Oddare 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 inAlgebra.Ring.Parityare stated usingSet.range, hence I had to weaken a fewassert_not_existsto forbiddingData.Set.Basicinstead ofData.Set.Defs. This is inconsequential.A side-effect of this PR is that I had to move some
bit0/bit1lemmas. I could not find anywhere sensible to put them, so I am currently keeping them inAlgebra.Parity. As a result, I had to reprove a few lemmas inAlgebra.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.