Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - chore(algebra/order/with_zero): Move unrelated lemmas #15676

Closed
wants to merge 11 commits into from

Conversation

YaelDillies
Copy link
Collaborator

Move a bunch of lemmas that were not about whatever_with_zero from algebra.order.with_zero to algebra.group_power.order. Delete nat.le_zero_iff in favor of le_zero_iff.


This is preparatory work to be able to import algebra.order.with_zero earlier (in particular in algebra.order.field).

Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. t-algebra Algebra (groups, rings, fields etc) t-order Order hierarchy labels Jul 25, 2022
@YaelDillies YaelDillies removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Aug 4, 2022
@@ -49,7 +49,7 @@ A `pow` form of `nat.factorization_choose_le`
lemma pow_factorization_choose_le (hn : 0 < n) : p ^ (choose n k).factorization p ≤ n :=
begin
cases le_or_lt p 1,
{ exact (pow_le_pow_of_le h).trans ((le_of_eq (one_pow _)).trans hn) },
{ exact (pow_le_pow_of_le_left' h _).trans ((le_of_eq (one_pow _)).trans hn) },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this coming from a rename?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I deleted pow_le_pow_of_le because it duplicates pow_le_pow_of_le_left'.

@@ -106,7 +106,7 @@ end
@[simp, to_additive]
lemma prod_take_mul_prod_drop :
∀ (L : list M) (i : ℕ), (L.take i).prod * (L.drop i).prod = L.prod
| [] i := by simp
| [] i := by simp [@zero_le' ℕ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These @zero_le' ℕ are somewhat ugly. Can you fix that regression please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how... This is a bug in to_additive that shows only now because of the import changes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has come up before in #10767

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Aug 10, 2022
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Aug 21, 2022
Copy link
Collaborator

@ericrbg ericrbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, hopefully @[to_additive] can get fixed :/

@@ -106,7 +106,7 @@ end
@[simp, to_additive]
lemma prod_take_mul_prod_drop :
∀ (L : list M) (i : ℕ), (L.take i).prod * (L.drop i).prod = L.prod
| [] i := by simp
| [] i := by simp [@zero_le' ℕ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has come up before in #10767

@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Aug 24, 2022
bors bot pushed a commit that referenced this pull request Aug 24, 2022
Move a bunch of lemmas that were not about `whatever_with_zero` from `algebra.order.with_zero` to `algebra.group_power.order`. Delete `nat.le_zero_iff` in favor of `le_zero_iff`.
@bors
Copy link

bors bot commented Aug 24, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title chore(algebra/order/with_zero): Move unrelated lemmas [Merged by Bors] - chore(algebra/order/with_zero): Move unrelated lemmas Aug 24, 2022
@bors bors bot closed this Aug 24, 2022
@bors bors bot deleted the move_order_with_zero branch August 24, 2022 09:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-algebra Algebra (groups, rings, fields etc) t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants