Repository navigation
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to Zulip and join the Lean community. |
PR summary b263a5953aImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
| Current number | Change | Type (weak) |
|---|---|---|
| exposed public sections | 5077 | 1 |
Current commit b263a5953a
Reference commit 94ef6b8954
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.py pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
kim-em
left a comment
There was a problem hiding this comment.
🤖 Claude says: Thanks, this is a clean and well-documented PR. A few small suggestions inline; all proposed code has been compiled against this branch.
There was a problem hiding this comment.
Are you anticipating creating more files in this new directory in further PRs, or could this just be Polynomial/Sturm.lean or Polynomial/SturmSequence.lean?
There was a problem hiding this comment.
Yes, this is the first of a sequence of PRs to add the Sturm-Tarski theorem. My plan is to add the other relevant concepts for the proof in this folder.
|
bors merge |
This PR defines `Polynomial.sturmSeq p q`, the Sturm sequence (signed remainder sequence) of two polynomials over a field: the list `[p, q, -(p % q), …]` of successive negated remainders, ending at the last nonzero one. It also proves its basic API: * `sturmSeq_cons`, `sturmSeq_zero`, `sturmSeq_zero_right`, `sturmSeq_eq_nil_iff`: unfolding and degenerate cases; * `mem_sturmSeq_self`, `head?_sturmSeq`, `zero_notMem_sturmSeq`: membership facts; * `dvd_of_mem_sturmSeq`: every common divisor of `p` and `q` divides every entry; * `sturmSeq_mul_left`: `sturmSeq (r * p) (r * q) = (sturmSeq p q).map (r * ·)` for `r ≠ 0`. It also adds `Polynomial.neg_mod` and `Polynomial.mul_mod_mul_left` to `FieldDivision.lean`, used in the proof of `sturmSeq_mul_left`. This is the second PR of a series formalizing the Sturm–Tarski theorem, following #43783 (`List.signVariations`). The development is a port of Wenda Li's Isabelle/AFP entry. The remaining parts (local sign of a polynomial to the right of a point, the Cauchy index, and the theorem itself) will follow in separate PRs. See also #43512. The definition and the original proofs were written by hand. Claude Code (Fable 5.1) was used to simplify part of the proofs and to review the code. Co-authored-by: Pedro Saccomani <[email protected]> Co-authored-by: Sarah Azevedo Pereira <[email protected]>
|
Pull request successfully merged into master. Build succeeded: |
…#43954) This PR defines `Polynomial.sturmSeq p q`, the Sturm sequence (signed remainder sequence) of two polynomials over a field: the list `[p, q, -(p % q), …]` of successive negated remainders, ending at the last nonzero one. It also proves its basic API: * `sturmSeq_cons`, `sturmSeq_zero`, `sturmSeq_zero_right`, `sturmSeq_eq_nil_iff`: unfolding and degenerate cases; * `mem_sturmSeq_self`, `head?_sturmSeq`, `zero_notMem_sturmSeq`: membership facts; * `dvd_of_mem_sturmSeq`: every common divisor of `p` and `q` divides every entry; * `sturmSeq_mul_left`: `sturmSeq (r * p) (r * q) = (sturmSeq p q).map (r * ·)` for `r ≠ 0`. It also adds `Polynomial.neg_mod` and `Polynomial.mul_mod_mul_left` to `FieldDivision.lean`, used in the proof of `sturmSeq_mul_left`. This is the second PR of a series formalizing the Sturm–Tarski theorem, following leanprover-community#43783 (`List.signVariations`). The development is a port of Wenda Li's Isabelle/AFP entry. The remaining parts (local sign of a polynomial to the right of a point, the Cauchy index, and the theorem itself) will follow in separate PRs. See also leanprover-community#43512. The definition and the original proofs were written by hand. Claude Code (Fable 5.1) was used to simplify part of the proofs and to review the code. Co-authored-by: Pedro Saccomani <[email protected]> Co-authored-by: Sarah Azevedo Pereira <[email protected]>
…e right of a point (#44248) This PR defines `Polynomial.signRight x p : SignType`, the sign that a real polynomial `p` takes on a sufficiently small interval `(x, x + ε)`, as the limit of `sign (p.eval y)` as `y → x` from the right, and develops its basic API: * `eventually_sign_eq_signRight`, `signRight_eq_iff`: the defining property and its uniqueness; * `signRight_eq_zero_iff`: `signRight x p = 0` iff `p = 0`; * `signRight_mul`, `signRight_neg`, `signRight_C`: `signRight x` is multiplicative, commutes with negation and agrees with `SignType.sign` on constants; * `signRight_of_eval_ne_zero`, `signRight_of_eval_eq_zero`: the computation rule `signRight x p = sign (p.eval x)` if `p.eval x ≠ 0`, and `signRight x p = signRight x (derivative p)` otherwise (via the mean value theorem). This is the local invariant behind Sturm's theorem: it determines the direction in which the sign of a Sturm sequence changes across a root, and it will be used to define the Cauchy index in the next PR of the series. This is the third PR of a series formalising the Sturm–Tarski theorem, following #43783 (`List.signVariations`) and #43954 (`Polynomial.sturmSeq`). Everything is stated over `ℝ`; the statements hold over any real closed field, and the implementation notes record what is needed to generalise them. Co-authored-by: Pedro Saccomani <[email protected]> Co-authored-by: Sarah Pereira <[email protected]> Co-authored-by: Kim Morrison <[email protected]> Co-authored-by: Oliver Nash <[email protected]> Co-authored-by: Oliver Nash <[email protected]>
This PR defines
Polynomial.sturmSeq p q, the Sturm sequence (signed remainder sequence) of twopolynomials over a field: the list
[p, q, -(p % q), …]of successive negated remainders, ending atthe last nonzero one. It also proves its basic API:
sturmSeq_cons,sturmSeq_zero,sturmSeq_zero_right,sturmSeq_eq_nil_iff: unfolding anddegenerate cases;
mem_sturmSeq_self,head?_sturmSeq,zero_notMem_sturmSeq: membership facts;dvd_of_mem_sturmSeq: every common divisor ofpandqdivides every entry;sturmSeq_mul_left:sturmSeq (r * p) (r * q) = (sturmSeq p q).map (r * ·)forr ≠ 0.It also adds
Polynomial.neg_modandPolynomial.mul_mod_mul_lefttoFieldDivision.lean, usedin the proof of
sturmSeq_mul_left.This is the second PR of a series formalizing the Sturm–Tarski theorem, following #43783
(
List.signVariations). The development is a port of Wenda Li's Isabelle/AFP entry. The remainingparts (local sign of a polynomial to the right of a point, the Cauchy index, and the theorem
itself) will follow in separate PRs. See also #43512.
The definition and the original proofs were written by hand. Claude Code (Fable 5.1) was used to
simplify part of the proofs and to review the code.
Co-authored-by: Pedro Saccomani [email protected]
Co-authored-by: Sarah Azevedo Pereira [email protected]