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

[Merged by Bors] - lemmas about coeff for compute_degree #15694

Closed
wants to merge 11 commits into from

Conversation

adomani
Copy link
Collaborator

@adomani adomani commented Jul 26, 2022

This PR proves 5 lemmas about coeffs of polynomials under products, multiplications, sums and differences.

I also moved an already existing ring lemma to a previously non-existing section on ring.

These lemmas are useful for the compute_degree tactic of #15691.


Open in Gitpod

@adomani adomani added awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Jul 26, 2022
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
src/data/polynomial/degree/lemmas.lean Outdated Show resolved Hide resolved
@ocfnash ocfnash 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 1, 2022
adomani and others added 3 commits August 1, 2022 11:43
@adomani adomani 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 1, 2022
@adomani
Copy link
Collaborator Author

adomani commented Aug 1, 2022

Oliver, thank you very much for your comments: I implemented all of them!

adomani and others added 3 commits August 1, 2022 15:05
Co-authored-by: Oliver Nash <github@olivernash.org>
Copy link
Collaborator

@ocfnash ocfnash left a comment

Choose a reason for hiding this comment

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

Thanks!

I think it's worth adding one more lemma.

bors d+


variables [ring R] {p q : R[X]}

lemma nat_degree_sub_le_iff_left (qn : q.nat_degree ≤ n) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about also adding the "right" version of this lemma:

lemma nat_degree_sub_le_iff_right (pn : p.nat_degree ≤ n) :
  (p - q).nat_degree ≤ n ↔ q.nat_degree ≤ n :=

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done! I also added the "symmetric" lemma

lemma nat_degree_sub : (p - q).nat_degree = (q - p).nat_degree  :=

@bors
Copy link

bors bot commented Aug 1, 2022

✌️ adomani can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Aug 1, 2022
@adomani
Copy link
Collaborator Author

adomani commented Aug 1, 2022

bors r+

bors bot pushed a commit that referenced this pull request Aug 1, 2022
This PR proves 5 lemmas about `coeff`s of polynomials under products, multiplications, sums and differences.

I also moved an already existing `ring` lemma to a previously non-existing section on `ring`.

These lemmas are useful for the `compute_degree` tactic of #15691.
@bors
Copy link

bors bot commented Aug 1, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title lemmas about coeff for compute_degree [Merged by Bors] - lemmas about coeff for compute_degree Aug 1, 2022
@bors bors bot closed this Aug 1, 2022
@bors bors bot deleted the adomani_coeff_lemmas branch August 1, 2022 21:43
khwilson pushed a commit that referenced this pull request Aug 2, 2022
This PR proves 5 lemmas about `coeff`s of polynomials under products, multiplications, sums and differences.

I also moved an already existing `ring` lemma to a previously non-existing section on `ring`.

These lemmas are useful for the `compute_degree` tactic of #15691.
bors bot pushed a commit that referenced this pull request Aug 8, 2022
…been renamed in an earlier PR (#15819)

In #15694 I was asked to modify some of these lemmas, but forgot to update their names to their new statements.  This PR corrects this oversight.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
delegated The PR author may merge after reviewing final suggestions. t-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants