Skip to content

[Merged by Bors] - feat(Algebra/MvPolynomial/Basic): coeff_C_of_ne_zero and coeff_add_single_C#39623

Closed
justus-springer wants to merge 13 commits into
leanprover-community:masterfrom
justus-springer:justus/MvPolynomial_coeff_C_lemmas
Closed

[Merged by Bors] - feat(Algebra/MvPolynomial/Basic): coeff_C_of_ne_zero and coeff_add_single_C#39623
justus-springer wants to merge 13 commits into
leanprover-community:masterfrom
justus-springer:justus/MvPolynomial_coeff_C_lemmas

Conversation

@justus-springer

@justus-springer justus-springer commented May 20, 2026

Copy link
Copy Markdown
Collaborator

These lemmas are multivariate analogs to Polynomial.coeff_C_of_ne_zero, Polynomial.coeff_C_succ and PowerSeries.coeff_C_of_ne_zero and PowerSeries.coeff_succ_C. They are useful for defining partial derivatives for multivariate power series, see PR #39626.


Open in Gitpod

@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown

PR summary dde92fab4e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

++ coeff_C_of_ne_zero
++ coeff_add_single_C

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit dde92fa).

  • +4 new declarations
  • −0 removed declarations
+MvPolynomial.coeff_C_of_ne_zero
+MvPolynomial.coeff_add_single_C
+MvPowerSeries.coeff_C_of_ne_zero
+MvPowerSeries.coeff_add_single_C

No changes to strong technical debt.

No changes to weak technical debt.

Current commit dde92fab4e
Reference commit fa97836994

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

Comment thread Mathlib/Algebra/MvPolynomial/Basic.lean Outdated
@wwylele

wwylele commented May 20, 2026

Copy link
Copy Markdown
Collaborator

It looks like there is build failure due to the rename of existing lemma. I suggest putting the rename in a separate PR

@justus-springer

Copy link
Copy Markdown
Collaborator Author

Yes, this occurrence must have slipped through. I've split off the renaming as #39632.

mathlib-bors Bot pushed a commit that referenced this pull request May 20, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label May 20, 2026
@mathlib-dependent-issues mathlib-dependent-issues Bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label May 20, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

@justus-springer justus-springer changed the title feat(Algebra/MvPolynomial/Basic): coeff_ne_zero_C and coeff_add_single_C feat(Algebra/MvPolynomial/Basic): coeff_C_of_ne_zero and coeff_add_single_C May 20, 2026
RaggedR pushed a commit to RaggedR/mathlib4 that referenced this pull request May 22, 2026

@Hagb Hagb left a comment

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.

Maybe with NeZero so that it can simplify cases with other positive literals? I am not sure whether it is a good practice here though.

Comment thread Mathlib/Algebra/MvPolynomial/Basic.lean Outdated
Comment thread Mathlib/RingTheory/MvPowerSeries/Basic.lean Outdated
justus-springer and others added 2 commits May 25, 2026 09:28
Co-authored-by: Hagb (Junyu Guo 郭俊余) <hagbgreen@yahoo.com>
Co-authored-by: Hagb (Junyu Guo 郭俊余) <hagbgreen@yahoo.com>
b-mehta pushed a commit to b-mehta/mathlib4 that referenced this pull request Jun 2, 2026
Bergschaf pushed a commit to Bergschaf/mathlib4 that referenced this pull request Jun 3, 2026
Comment thread Mathlib/Algebra/MvPolynomial/Basic.lean Outdated
@faenuccio

Copy link
Copy Markdown
Contributor

@justus-springer Can you update master here as well? Thanks

@justus-springer justus-springer added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 20, 2026
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 20, 2026
@justus-springer

Copy link
Copy Markdown
Collaborator Author

@faenuccio I updated master, no changes were necessary. Is this mergeable soon?

Comment thread Mathlib/Algebra/MvPolynomial/Basic.lean Outdated
Comment thread Mathlib/RingTheory/MvPowerSeries/Basic.lean Outdated
Co-authored-by: Noah Walker <noahwalker3.14@gmail.com>

@tb65536 tb65536 left a 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.

Thanks!

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by tb65536.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 23, 2026

@riccardobrasca riccardobrasca left a comment

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.

Thanks!

bors d+

Comment thread Mathlib/Algebra/MvPolynomial/Basic.lean Outdated
Comment thread Mathlib/RingTheory/MvPowerSeries/Basic.lean Outdated
@mathlib-bors

mathlib-bors Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

✌️ justus-springer can now approve this pull request until 2026-07-07 13:14 UTC (in 2 weeks). To approve and merge, reply with bors r+. More detailed instructions are available here.

⚠️ This delegation only covers changes within Archive/**, Counterexamples/**, docs/**, DownstreamTest/**, Mathlib/**, MathlibTest/**, widget/**, Archive.lean, Counterexamples.lean, docs.lean, Mathlib.lean; an author commit touching anything else will revoke it. Bors also revokes it if a later push changes too many files for it to check the full list — even if it stays within scope.

@mathlib-triage mathlib-triage Bot added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Jun 23, 2026
@justus-springer justus-springer added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 24, 2026
@github-actions github-actions Bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 24, 2026
@justus-springer

Copy link
Copy Markdown
Collaborator Author

bors r+

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Jun 24, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jun 24, 2026
…_single_C` (#39623)

These lemmas are multivariate analogs to `Polynomial.coeff_C_of_ne_zero`, `Polynomial.coeff_C_succ` and `PowerSeries.coeff_C_of_ne_zero` and `PowerSeries.coeff_succ_C`. They are useful for defining partial derivatives for multivariate power series, see PR #39626.

- [x] depends on: #39632
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Jun 24, 2026
@mathlib-bors

mathlib-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title feat(Algebra/MvPolynomial/Basic): coeff_C_of_ne_zero and coeff_add_single_C [Merged by Bors] - feat(Algebra/MvPolynomial/Basic): coeff_C_of_ne_zero and coeff_add_single_C Jun 24, 2026
@mathlib-bors mathlib-bors Bot closed this Jun 24, 2026
@mathlib-bors mathlib-bors Bot removed the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jun 24, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Jul 16, 2026
#39626)

Previously, we had formal derivatives for `PowerSeries` and `Polynomial` and formal partial derivatives for `MvPolynomial`, but no formal partial derivatives for `MvPowerSeries`. This PR adds them. Furthermore, `PowerSeries.derivative` is refactored to be defined in terms of `MvPowerSeries.pderiv`, which reduces code duplication (In particular, there is no need to define the bare function `PowerSeries.derivativeFun` anymore).

Most proofs are direct generalizations from the univariate case. I only had to add a few missing API lemmas, which I am PR'ing separately below:

- [x] depends on: #39623 
- [x] depends on: #39624 
- [x] depends on: #39625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants