Commit 2024-05-15 09:43 3e51ad14
View on Github →move(Algebra/Parity): Split file (#12829)
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.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 somebit0/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 https://github.com/leanprover-community/mathlib/pull/17391 motivated by https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Mathlib.2EAlgebra.2EAssociated and the move-only part of #11863.