Skip to content

[Merged by Bors] - feat:Polynomial.derivative_C_mul#19048

Closed
seewoo5 wants to merge 3 commits intomasterfrom
feature/derivative_C_mul
Closed

[Merged by Bors] - feat:Polynomial.derivative_C_mul#19048
seewoo5 wants to merge 3 commits intomasterfrom
feature/derivative_C_mul

Conversation

@seewoo5
Copy link
Copy Markdown
Collaborator

@seewoo5 seewoo5 commented Nov 14, 2024

Add Polynomial.derivative_C_mul. Note that Polynomial.iterative_derivative_C_mul already exists.


Related: This exists as a lemma in #18882 now.

Open in Gitpod

@seewoo5 seewoo5 added the t-algebra Algebra (groups, rings, fields, etc) label Nov 14, 2024
@seewoo5 seewoo5 self-assigned this Nov 14, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 14, 2024

PR summary 746c4e05b5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ derivative_C_mul

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

bors d+

derivative^[k] (C a * p) = C a * derivative^[k] p := by
simp_rw [← smul_eq_C_mul, iterate_derivative_smul]

theorem derivative_C_mul (a : R) (p : R[X]) :
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
theorem derivative_C_mul (a : R) (p : R[X]) :
@[simp]
theorem derivative_C_mul (a : R) (p : R[X]) :

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I found that this gives the following build(lint?) error link

/- The `simpNF` linter reports:
SOME SIMP LEMMAS ARE NOT IN SIMP-NORMAL FORM.
see note [simp-normal form] for tips how to debug this.
https://leanprover-community.github.io/mathlib_docs/notes.html#simp-normal%[20](https://github.com/leanprover-community/mathlib4/actions/runs/11844166189/job/33006753558?pr=19048#step:24:21)form -/
-- Mathlib.Algebra.Polynomial.Derivative
Error: ././././Mathlib/Algebra/Polynomial/Derivative.lean:149:1: error: @Polynomial.derivative_C_mul simp can prove this:
  by simp only [@Polynomial.derivative_mul, @Polynomial.derivative_C, @zero_mul, @zero_add]
One of the lemmas above could be a duplicate.
If that's not the case try reordering lemmas or adding @[priority].

How can I fix this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah then ignore Johan's suggestion

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The error message is basically telling you that "this thing you're marking as @[simp] can itself be solved with simp (move it down to line 300 and see), so either don't mark this as simp or you're doing something wrong!"

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 15, 2024

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

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Nov 15, 2024
@seewoo5
Copy link
Copy Markdown
Collaborator Author

seewoo5 commented Nov 15, 2024

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Nov 15, 2024
Add `Polynomial.derivative_C_mul`. Note that `Polynomial.iterative_derivative_C_mul` already exists.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Nov 15, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat:Polynomial.derivative_C_mul [Merged by Bors] - feat:Polynomial.derivative_C_mul Nov 15, 2024
@mathlib-bors mathlib-bors bot closed this Nov 15, 2024
@mathlib-bors mathlib-bors bot deleted the feature/derivative_C_mul branch November 15, 2024 16:35
TobiasLeichtfried pushed a commit that referenced this pull request Nov 21, 2024
Add `Polynomial.derivative_C_mul`. Note that `Polynomial.iterative_derivative_C_mul` already exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants