[Merged by Bors] - chore: Move sign of power lemmas#11986
Closed
YaelDillies wants to merge 12 commits intomasterfrom
Closed
[Merged by Bors] - chore: Move sign of power lemmas#11986YaelDillies wants to merge 12 commits intomasterfrom
YaelDillies wants to merge 12 commits intomasterfrom
Conversation
* Generalise the lemmas in `Algebra.Parity` from `LinearOrderedRing` to `LinearOrderedSemiring` + `ExistsAddOfLE`. This means they now apply to eg `ℕ`. * Move them to `Algebra.GroupPower.Order`. * For this to work, I must swap the order of import between `Algebra.GroupPower.Order` and `Algebra.Parity`. This means that I need to weaken one `assert_not_exists` to allow importing `Data.Set.Defs`. This is inconsequential. * Rename a bunch of variables in `Algebra.Parity` as I need a new lemma about `a b : α` and `m n : ℕ` but the names were used as `m n : α` and `a b : ℕ`.
This was referenced Apr 7, 2024
eric-wieser
reviewed
Apr 18, 2024
Parcly-Taxel
approved these changes
Apr 20, 2024
Ruben-VandeVelde
requested changes
Apr 20, 2024
Contributor
Ruben-VandeVelde
left a comment
There was a problem hiding this comment.
I think this is doing a bit too much at once, but I'll try to split it up a bit myself. Please give me a day or two.
This was referenced Apr 20, 2024
Contributor
Author
|
I did the minimal amount of fixes, but if you can find something smaller I'm all ears! |
71875c8 to
d5b974e
Compare
eric-wieser
reviewed
Apr 24, 2024
Comment on lines
-305
to
-313
| theorem pow_bit0_pos_of_neg (ha : a < 0) (n : ℕ) : 0 < a ^ bit0 n := by | ||
| rw [pow_bit0'] | ||
| exact pow_pos (mul_pos_of_neg_of_neg ha ha) _ | ||
| #align pow_bit0_pos_of_neg pow_bit0_pos_of_neg | ||
|
|
||
| theorem pow_bit1_neg (ha : a < 0) (n : ℕ) : a ^ bit1 n < 0 := by | ||
| rw [bit1, pow_succ'] | ||
| exact mul_neg_of_neg_of_pos ha (pow_bit0_pos_of_neg ha n) | ||
| #align pow_bit1_neg pow_bit1_neg |
Contributor
Author
There was a problem hiding this comment.
They were about long-deprecated declarations, so I simply removed them instead of trying to move them
Contributor
|
This looks good to me. @Ruben-VandeVelde, what exactly would you like to simplify in this PR? |
Contributor
Author
|
@Vierkantor, it was done. See #12288 and #12289 |
Ruben-VandeVelde
approved these changes
May 6, 2024
Contributor
Ruben-VandeVelde
left a comment
There was a problem hiding this comment.
Apologies for the delay.
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
mathlib-bors bot
pushed a commit
that referenced
this pull request
May 7, 2024
* Move the sign of power lemmas from `Algebra.Parity` to `Algebra.GroupPower.Order`. * For this to work, I must swap the order of import between `Algebra.GroupPower.Order` and `Algebra.Parity`. This means that I need to weaken one `assert_not_exists` to allow importing `Data.Set.Defs`. This is inconsequential. * Use them to golf and deprecate the `bit0`/`bit1` lemmas * Delete the deprecated `pow_bit0_abs`, `pow_bit0_pos_of_neg`, `pow_bit1_neg` Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
Contributor
|
Pull request successfully merged into master. Build succeeded: |
apnelson1
pushed a commit
that referenced
this pull request
May 12, 2024
* Move the sign of power lemmas from `Algebra.Parity` to `Algebra.GroupPower.Order`. * For this to work, I must swap the order of import between `Algebra.GroupPower.Order` and `Algebra.Parity`. This means that I need to weaken one `assert_not_exists` to allow importing `Data.Set.Defs`. This is inconsequential. * Use them to golf and deprecate the `bit0`/`bit1` lemmas * Delete the deprecated `pow_bit0_abs`, `pow_bit0_pos_of_neg`, `pow_bit1_neg` Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
callesonne
pushed a commit
that referenced
this pull request
May 16, 2024
* Move the sign of power lemmas from `Algebra.Parity` to `Algebra.GroupPower.Order`. * For this to work, I must swap the order of import between `Algebra.GroupPower.Order` and `Algebra.Parity`. This means that I need to weaken one `assert_not_exists` to allow importing `Data.Set.Defs`. This is inconsequential. * Use them to golf and deprecate the `bit0`/`bit1` lemmas * Delete the deprecated `pow_bit0_abs`, `pow_bit0_pos_of_neg`, `pow_bit1_neg` Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Algebra.ParitytoAlgebra.GroupPower.Order.Algebra.GroupPower.OrderandAlgebra.Parity. This means that I need to weaken oneassert_not_existsto allow importingData.Set.Defs. This is inconsequential.bit0/bit1lemmaspow_bit0_abs,pow_bit0_pos_of_neg,pow_bit1_neg