Repository navigation
fix: mathlib4 breakage from nightly-2026-10-16 (reapply #174) - #176
Merged
Merged
Conversation
`downstream: reset repo mathlib4` (d700dff) switched the `mathlib4` subrepo from `mathlib4-nightly-testing` to `leanprover-community/mathlib4` `master` (`chore: switch mathlib to new nightly model`, 53b5956), which reverted the deletion merged as #174 and brought the collision back: error: Mathlib/Data/Ordering/Basic.lean:37:20: `Ordering.dthen` has already been declared `Ordering.dthen` and the `@[simp]` lemma `Ordering.dthen_eq_then` moved into core in lean4#15317 (`feat: add `Bool.dand` and `Ordering.dthen` along with more lemmas`), which landed in `nightly-2026-10-16`. Core's `Ordering.dthen` has mathlib's signature and its two equations, and core's `dthen_eq_then` is the same statement, also `@[simp]` — so both mathlib copies are plain duplicates. Delete both, as #174 did. Under the new model mathlib master is a release-toolchain branch, so this adaptation now has to live here and reach mathlib through the `bump/v4.37.0` export rather than through `nightly-testing`. Co-Authored-By: Claude Opus 5 <[email protected]>
Contributor
Author
Build report for fix: mathlib4 breakage from nightly-2026-10-16Turned green:
Stayed green
|
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.
masteris red again onnightly-2026-10-16(run 38962929561) with the very error #174 fixed and merged this morning:cslib(skipped behind it) andrepl(its test phase compiles Mathlib) fall over with it; every other repo is green.Why it came back
chore: switch mathlib to new nightly model(53b5956) repointed themathlib4entry inrepos.tomlfromleanprover-community/mathlib4-nightly-testing@nightly-testingtoleanprover-community/mathlib4@master, and thedownstream: reset repo mathlib4(d700dff) that followed reset the subrepo onto mathlibmaster— 196 files, including a plain revert of #174's deletion. Mathlibmasterbuilds on a release toolchain and so still carries both declarations.This is not a one-off: under the new model every nightly adaptation that
nightly-testingused to carry now has to live here and reach mathlib through thebump/v4.37.0export, so each such reset will need its adaptations re-landed in the monorepo.mathlib4
lean4#15317 (feat: add
Bool.dandandOrdering.dthenalong with more lemmas, Robin Arnez) movedOrdering.dtheninto core. Core'sOrdering.dthenhas mathlib's signature and mathlib's two equations, and core also ships@[simp] theorem Ordering.dthen_eq_then— the same statement, the same attribute, as mathlib's lemma inMathlib/Data/Ordering/Lemmas.lean. Both mathlib copies are therefore plain duplicates (and keeping the lemma while dropping the definition would just move the collision onto the lemma's name), so this deletes both — the same two hunks as #174, which applied unchanged.Nothing else from lean4#15317 collides:
Bool.dand,Bool.Reflects.of_imp, the root-namespace instanceforall_forall_prop_decidableand thethen/dandlemma batch have no mathlib counterparts, and mathlib has no other user ofOrdering.dthen.Verified locally on
d04c02ceMathlib Archive Counterexamples Wanted cache --wfail, 18446 jobs recompiled, 0 errors, 0 warningslake test --iofail, 18972 jobsLinting passed for Mathlib.--wfail --iofail, 6694 jobs, 0 warnings--wfail --iofail, 18735 jobsLinting passed for Cslib.lake buildlake test— 71 cases PASSED, 0 failed, including thetest/Mathlibbatchcslibandreplare green unpatched on this master; they only neededmathlib4to build. Nothing was left unfinished.