Skip to content

refactor(mathlib): polish Sturm and polynomial parsing APIs - #10125

Merged
kim-em merged 5 commits into
mainfrom
sturm-continuous-sign
Sep 8, 2026
Merged

kim-em merged 5 commits into
mainfrom
sturm-continuous-sign

Conversation

@kim-em

@kim-em kim-em commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

The Mathlib-facing Sturm development had several avoidable API wrinkles. This PR:

  • backports the general ContinuousOn.sign and IsPreconnected.sign_eq_of_continuousOn APIs from Mathlib #43512, then reduces the polynomial helper to a private specialization;
  • makes Sturm.firstSign return SignType directly, using 0 when no nonzero entry exists;
  • delegates natural-literal recognition to Lean's getNatValue? and renames the small integer-expression evaluator to evalIntCoeff.

It also updates the source synchronizer for the parser's new Mathlib home, Mathlib.Tactic.HexPolyZ.Parse. The temporary sign compatibility module can disappear once Hex's Mathlib pin includes the upstream lemmas.

Validation:

  • lake build HexPolyZMathlib HexBerlekampZassenhausMathlib HexRealRootsMathlib (9,413 jobs)
  • python3 scripts/check_sturm_sync.py /home/kim/worktrees/mathlib4/mathlib4-abel-ruffini-hex

🤖 Prepared with Codex

@kim-em kim-em changed the title refactor(Sturm): use general continuous sign API refactor(mathlib): polish Sturm and polynomial parsing APIs Sep 8, 2026
@kim-em
kim-em merged commit c2bb701 into main Sep 8, 2026
1 check passed
@kim-em
kim-em deleted the sturm-continuous-sign branch September 8, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant