Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 10 commits into from

Conversation

kbuzzard
Copy link
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 The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Jul 20, 2023
Mathlib/Data/Polynomial/AlgebraMap.lean Outdated Show resolved Hide resolved
Mathlib/Data/Polynomial/Derivation.lean Outdated Show resolved Hide resolved
Mathlib/Data/Polynomial/Derivation.lean Outdated Show resolved Hide resolved
Mathlib/Data/Polynomial/Derivation.lean Outdated Show resolved Hide resolved
Mathlib/Data/Polynomial/Derivation.lean Show resolved Hide resolved
@eric-wieser eric-wieser 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 Jul 28, 2023
@kbuzzard kbuzzard 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 Jul 28, 2023
kbuzzard and others added 2 commits July 29, 2023 10:16
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
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
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
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
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.

@ocfnash
Copy link
Contributor

ocfnash commented Aug 2, 2023

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR 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 <wieser.eric@gmail.com>
Co-authored-by: Oliver Nash <github@olivernash.org>
@bors
Copy link

bors bot commented Aug 2, 2023

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
semorrison 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 <wieser.eric@gmail.com>
Co-authored-by: Oliver Nash <github@olivernash.org>
semorrison 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 <wieser.eric@gmail.com>
Co-authored-by: Oliver Nash <github@olivernash.org>
semorrison 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 <wieser.eric@gmail.com>
Co-authored-by: Oliver Nash <github@olivernash.org>
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.

None yet

3 participants