Skip to content

[Merged by Bors] - feat: derivations of (univariate) polynomials - #6023

Closed
kbuzzard wants to merge 10 commits into
masterfrom
kbuzzard-polynomial-derivation
Closed

kbuzzard wants to merge 10 commits into
masterfrom
kbuzzard-polynomial-derivation

Conversation

@kbuzzard

Copy link
Copy Markdown
Member

An R-derivation from R[X] is determined by its value on X. Joint work with Richard Hill, who needs this stuff for his work on power series. We followed MvPolynomial.Derivation .


Open in Gitpod

@kbuzzard kbuzzard added awaiting-review t-algebra Algebra (groups, rings, fields, etc) labels Jul 20, 2023
Comment thread Mathlib/Data/Polynomial/AlgebraMap.lean Resolved
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
@eric-wieser eric-wieser added awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. and removed awaiting-review labels Jul 28, 2023
@kbuzzard kbuzzard added awaiting-review and removed awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. labels Jul 28, 2023
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
map_one_eq_zero' := derivative_one
leibniz' f g := by simp [mul_comm, add_comm, derivative_mul]

variable [AddCommMonoid A] [Module R A] [Module (Polynomial R) A]

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.

Indexing a typeclass on a non-carrier type will eventually cause pain.

For example, we might one day have another ring S with R ≃+* S and wish to use some result which includes the term Module (Polynomial R) A in a proof that discusses Module (Polynomial S) A.

I wonder could we avoid doing this by introducing a PolynomialAlgebra typeclass along the lines of:

class PolynomialAlgebra (R P : Type _) [CommSemiring R] [Semiring P] extends Algebra R P :=
  (X : P)
  -- TODO add axioms that are equivalent to the map that sends `Polynomial.X` to `PolynomialAlgebra.X` extending to a full algebra equivalence: `R[X] ≃ₐ[R] P`

Alternatively we could introduce a typeclass for this specific situation since we know a module over R[X] is "the same as" a module over R together with an R-linear endomorphism (scalar action of X):

class PolynomialModule (R M : Type _) [Semiring R] [AddCommMonoid M] extends Module R M :=
  (X : M →ₗ[R] M)

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.

Note that @kbuzzard is just copying what we already did for MvPolynomial in this PR, not that that invalidates your comment.

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.

Good point, I think we can live with this for now but I predict one day we'll want something like PolynomialAlgebra or PolynomialModule.

Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
Comment thread Mathlib/Data/Polynomial/Derivation.lean Resolved
@ocfnash

ocfnash commented Aug 2, 2023

Copy link
Copy Markdown
Contributor

bors merge

@github-actions github-actions Bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Aug 2, 2023
bors Bot pushed a commit that referenced this pull request Aug 2, 2023
An R-derivation from `R[X]` is determined by its value on `X`. Joint work with Richard Hill, who needs this stuff for his work on power series. We followed `MvPolynomial.Derivation` .




Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Oliver Nash <[email protected]>
@bors

bors Bot commented Aug 2, 2023

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors Bot changed the title feat: derivations of (univariate) polynomials [Merged by Bors] - feat: derivations of (univariate) polynomials Aug 2, 2023
@bors bors Bot closed this Aug 2, 2023
@bors
bors Bot deleted the kbuzzard-polynomial-derivation branch August 2, 2023 19:29
kim-em pushed a commit that referenced this pull request Aug 3, 2023
An R-derivation from `R[X]` is determined by its value on `X`. Joint work with Richard Hill, who needs this stuff for his work on power series. We followed `MvPolynomial.Derivation` .




Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Oliver Nash <[email protected]>
kim-em pushed a commit that referenced this pull request Aug 3, 2023
An R-derivation from `R[X]` is determined by its value on `X`. Joint work with Richard Hill, who needs this stuff for his work on power series. We followed `MvPolynomial.Derivation` .




Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Oliver Nash <[email protected]>
kim-em pushed a commit that referenced this pull request Aug 14, 2023
An R-derivation from `R[X]` is determined by its value on `X`. Joint work with Richard Hill, who needs this stuff for his work on power series. We followed `MvPolynomial.Derivation` .




Co-authored-by: Eric Wieser <[email protected]>
Co-authored-by: Oliver Nash <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants