feat(real-roots-mathlib): checked root counts and a simpler Sturm API - #10101
Merged
Merged
Conversation
kim-em
force-pushed
the
nauty-applications
branch
from
September 7, 2026 12:27
ede4b1a to
5561ec6
Compare
added 9 commits
September 7, 2026 12:29
# Conflicts: # scripts/bench/check_graphiso_sweep_freshness.py # scripts/bench/graphiso_pernode_fit.py # scripts/bench/sweep_freshness.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the Hex side of Mathlib #43512, where
real_root_countremoves the 61-line hand-written calculus argument for the real roots ofX ^ 5 - 4 * X + 2, reducing the Abel–Ruffini archive file from 175 to 127 lines.Add
by real_root_countand the term formreal_root_count ptoHexRealRootsMathlib. They certify the number of distinct real roots of a closed, squarefree integer-coefficient polynomial overℚof positive degree. Hex proposes a signed remainder chain; ordinary Lean proofs check the polynomial identities, positive factors, derivative relation, and variation count.This carries the mathematical and elaborator improvements from Mathlib #43512 back into the Hex source of truth:
roots.Nodup, and permit equal interval endpoints.ℝ.Hex.DensePoly.divMod, and add focused diagnostics and regression tests.scripts/check_sturm_sync.py /path/to/mathlibcompares the five library modules and both test modules after translating module paths, namespaces, and documentation markup. The README documents the new entry point, and the release test target includes both new test modules. The companion copies can become re-exports once Hex's Mathlib pin contains the development.Validation: full
lake build;lake build HexReleaseTests, including root-count, Sturm endpoint, and existing isolation regression tests; release-manifest validation; the seven-module sync check; andgit diff --check. The monorepo retains its pre-existingsorrywarnings in unrelated multivariate libraries and line-length warnings in the manual; this change introduces none. The corresponding Mathlib theorem and certificate axiom audits report onlypropext,Classical.choice, andQuot.sound.HexArith and HexModArith’s C build recipes set
TMPDIRto the object directory for each compiler process. This supports Mathlib’s Landlock sandbox, which allows writes inside.lakebut forbids/tmp, including whenccis a compiler wrapper. Release sync copies the selected recipes from the monorepo Lake file; its tests check preservation of the mirror skeleton, idempotence, and rejection of missing or ambiguous helpers. All three affected C objects were rebuilt under Landlock with/tmpunwritable. HexArith also drops two unused privatebv_decidelemmas whose external solver had the same temporary-file problem; the general Newton/Hensel proof already establishes every refinement used by the public theorem.The performance freshness checks now parse the Lake file by declaration and mechanically compare only the build configuration reachable from each measured executable. Regression tests ensure that changes to the nauty helpers or cactus target still invalidate graph-isomorphism measurements, while unrelated library and test targets do not. The full post-merge build completes successfully (11,223 jobs), and the factorization freshness, graph-isomorphism freshness, per-node fit, and committed-figure checks pass.