Repository navigation
fix: reference-manual breakage from the reference-manual update (lean4#16627) - #283
Merged
Merged
Conversation
…4#16627) `downstream-lean4#274` adapted `extended-examples/IndexMapGrind.lean` to lean4#16627 (`maxTraceChildren` now truncates pinned `grind` diagnostics) by adding `set_option maxTraceChildren 0 in` before the `#check_msgs`-pinned `eraseSwap` block, so that the full trace was printed again. Upstream fixed the same breakage the other way round in leanprover/reference-manual#1008 (merged into `nightly-testing` as 226acc32c): it regenerated the expected output *with* the two `N more entries...` lines. The update merge kept both sides — the downstream `set_option` touches a line upstream never changed — so the option suppressed the very truncation the new expectation requires, and `IndexMapGrind` failed with a `#check_msgs` mismatch. `Tutorial.Grind.IndexMap`, which builds `IndexMapGrind` as a nested project, failed behind it. Delete the stale `set_option`; the file is now byte-identical to upstream. `lake build` is green (1680 jobs); `reference-manual` defines no test or lint driver.
This was referenced Nov 25, 2026
Contributor
Author
Build report for fix: reference-manual breakage from the reference-manual update (lean4#16627)Turned green:
Stayed red
Stayed green
|
Kha
pushed a commit
that referenced
this pull request
Nov 26, 2026
Replaces #273, which went `CONFLICTING` on `Mathlib/Data/Int/Init.lean`. That file was fixed straight on `master` as `d9ac508c` by `Rob23oba` — the same two `cast` goals, spelled `cast (by congr 1; lia)` where #273's first commit had `cast (congrArg motive (by lia))`. This PR is #273's **second** commit, unchanged, rebased onto `d9ac508c`: the remaining 54 `lia` sites in 27 modules. #273 carried nothing else and is now closed. To turn `master` green this also needs the still-open #279 (`mathlib4`, lean4#16680) and #283 (`reference-manual`), plus the `nightly-2026-11-25` bump together with #281 (`import-graph`) — see **Verified** below. ### `mathlib4` — lean4#16668 (`leodemoura`) lean4#16668 makes `lia` skip facts that are irrelevant to linear integer arithmetic, and the negated goal is filtered along with them: an `Eq`/`Ne` whose relation type is not one `lia` treats as arithmetic is relevant to no active solver, so it is dropped before the arithmetic hypotheses are ever consulted. 54 sites in 27 modules lost their proof that way — type equalities behind `eqToHom`, `Finset` memberships, `ENNReal` disequalities, a `Prod` equality. `lia -filterFacts` processes all facts again, which is the escape hatch the change ships and what its author suggested for these sites. Three of them sat under `try`/`any_goals`, where the failure was silent and surfaced as unsolved goals further down. [Run 45598923234](https://github.com/leanprover/downstream-lean4/actions/runs/45598923234) is the first to get past `Mathlib.Data.Int.Init`, so it is also the first that shows this whole layer. Part of what it reports needs no change of its own: `Counterexamples/AharoniKorman.lean:757`/`758` call `mem_sdiff` an `Ambiguous term` only while the `lia` above them fails, and the `unknown metavariable` / `(kernel) declaration has metavariables` errors in `HasSpectralSequence`, `CochainComplex` and `CommShiftTwo` are those files' own sorried `lia` goals reaching the kernel. Both clear with the `-filterFacts` sites. ### Verified On `nightly-2026-11-24`, with #279 applied: - `lake build --wfail Mathlib Archive Counterexamples Wanted cache` — green, 18661 jobs, 0 warnings - `lake test --iofail` — green - `lake lint` — green `test` and `lint` only run at all once the `Lean.SourceInfo.getLeading?` duplicate is gone, which is #281. On this nightly that means the inlined-`match` form #281 carried before `mhuisi` replaced it with core's `getLeading?` for `nightly-2026-11-25`; that form was applied locally for these two phases, and is no part of this PR. <!-- downstream-watch: unattended --> Co-authored-by: downstream-lean4[bot] <downstream-lean4[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <[email protected]>
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.
Fix for the
reference-manualhalf of run 45592905939 (nightly-2026-11-24). One commit. The rest of the red set is either carried by PRs that are already open or cannot be fixed on this nightly at all — see "Rest of the red set" below.reference-manual— stalemaxTraceChildrenadaptationextended-examples/IndexMapGrind.leanpins thegrinddiagnostics of theeraseSwapexample in a#check_msgsdocstring. lean4#16627 madeMessageData.formatrespectmaxTraceChildren, so that output grew twoN more entries... (increase maxTraceChildren to see more)lines.Both sides then adapted, in opposite directions:
set_option maxTraceChildren 0 inabove the block, so the full trace is printed again and the old expectation still matches;nightly-testingas226acc32c) regenerated the expected output with the two truncation lines.downstream: update repo reference-manual(3d92f74) merged the second one in. The two changes touch different lines, so there was no conflict and both survived — and theset_optionsuppresses exactly the truncation the new expectation requires.IndexMapGrindfailed withand
Tutorial.Grind.IndexMap, which buildsIndexMapGrindas a nested project to resolve its anchors, failed behind it at 76 sites withBuild process failed..Fix: delete the now-stale
set_option. The file is byte-identical to upstream226acc32cagain.Verified:
lake buildgreen, 1680/1680 jobs, withIndexMapGrindandTutorial.Grind.IndexMapgenuinely recompiled rather than replayed.reference-manualdefines no test or lint driver (lake check-testandlake check-lintboth exit 1), sobuildis its full set of phases. Built with elan v4.4.0 first onPATH, matching CI, because the manual pinselan --helpoutput.Superseded PRs closed
The same
reference-manualupdate rewroteManual/VCGen.lean,Tutorial/VCGen.leanandManual/NotationsMacros/DoElab.leanupstream, which makes #268 (lean4#16557, lean4#16569) and #275 (lean4#16451) unnecessary: all three modules compiled green in the verification build without them, and both PRs had becomeCONFLICTINGagainstmaster. Closed as superseded.Rest of the red set, not in this PR
Verified on
3d92f744with the open #273 and #279 applied locally:mathlib4build — green.lake build Mathlib Archive Counterexamples Wanted cache --wfail: 18661 jobs, 0 warnings.Mathlib.Data.Int.Init(lia, lean4#16668) was fixed by fix: mathlib4 breakage from nightly-2026-11-22 (lean4#16668) #273's hunk; master has since taken a different fix for that one file directly (d9ac508c,congr 1; liainstead ofcongrArg motive), so fix: mathlib4 breakage from nightly-2026-11-22 (lean4#16668) #273 will need itsData/Int/Init.leanhunk dropped, but its other 27 files are still the nextlialayers.Pentagonal.Ring(lean4#16680) is fixed by fix: mathlib4 breakage from nightly-2026-11-23 (lean4#16680) #279.mathlib4test and lint — still red, and not fixable on this nightly. Once the build is unblocked, both phases hit the clash that also keepsimport-graphred:environment already contains 'Lean.SourceInfo.getLeading?' from ImportGraph.Lean.Syntax. 22MathlibTestmodules fail on it, andbatteries/runLinterdies with the same message as anuncaught exception, solake lintnever runs a linter at all. CI has never reached these phases, because themathlib4build failed first.repl— also this clash, not theliacascade. Itstestphase fails attest/Mathlib/test/H20231020, and it still fails with Mathlib fully built: the REPL reports no error forimport Mathlib.…but hands back an environment with none of Mathlib's contents, so the followingopen BigOperators/Real/Nat/Topologyall fail withunknown namespace. A plainlake env leanon a one-lineimport Mathlib.Basic.Real.Basicin that project shows what the REPL swallows:import Lean.Fmt.Util.Basic failed, environment already contains 'Lean.SourceInfo.getLeading?'. So the duplicate breaks every non-module consumer of Mathlib, not onlyImportGraphTest— Mathlib's own module-system build does not seeImportGraph's private imports, but a non-module importer does.import-graph—ImportGraphTestfails with the same clash. fix: import-graph breakage from nightly-2026-11-24 (lean4#15218) #281 fixes it by deleting the duplicate and using the core declaration that lean4#16718 moved intoInit.Prelude; that needsnightly-2026-11-25or later, so fix: import-graph breakage from nightly-2026-11-24 (lean4#15218) #281 is deliberately red on the current nightly (its own run 45411679303 failsImportGraph.Lean.SyntaxwithInvalid field getLeading?). Nothing here changes that and no competing fix is proposed — this is the PR author's own call.cslib— skipped behindmathlib4, left to its own bot.So merging this PR, #273 and #279 does not turn
mastergreen:mathlib4's test and lint phases,import-graphandreplall need thenightly-2026-11-25bump together with #281.