Skip to content

fix: mathlib4 breakage from nightly-2026-11-22 (lean4#16668) - #284

Merged
Kha merged 1 commit into
masterfrom
push-ntkpxxtxlmls
Nov 26, 2026
Merged

Kha merged 1 commit into
masterfrom
push-ntkpxxtxlmls

Conversation

@downstream-lean4

Copy link
Copy Markdown
Contributor

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 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.

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.

Co-Authored-By: Claude Opus 5 <[email protected]>
@downstream-lean4

Copy link
Copy Markdown
Contributor Author

Build report for fix: mathlib4 breakage from nightly-2026-11-22 (lean4#16668)

Stayed red
Repo Critical Build Test Lint
import-graph ✅ ✅ in 2s 🟥 in 4s ⏭️
mathlib4 ✅ 🟥 in 8m 40s ⏭️ ⏭️
reference-manual ✅ 🟥 in 5m 25s ⏭️ ⏭️
cslib 🛑 by mathlib4 ⏭️ ⏭️
repl ✅ in 0s 🟥 in 3m 31s ⏭️
Stayed green
Repo Critical Build Test Lint
aesop ✅ ✅ in 0s ✅ in 4s ⏭️
batteries ✅ ✅ in 0s ✅ in 3s ✅ in 2s
lean4-cli ✅ ✅ in 0s ✅ in 0s ⏭️
plausible ✅ ✅ in 0s ✅ in 2s ⏭️
ProofWidgets4 ✅ ✅ in 1s ✅ in 1s ⏭️
quote4 ✅ ✅ in 0s ✅ in 1s ⏭️
BibtexQuery ✅ in 2s ⏭️ ⏭️
doc-gen4 ✅ in 6s ⏭️ ⏭️
illuminate ✅ in 0s ✅ in 9s ⏭️
lean4-unicode-basic ✅ in 3s ⏭️ ⏭️
lean4export ✅ in 0s ✅ in 5s ⏭️
LeanSearchClient ✅ in 0s ✅ in 0s ⏭️
leansqlite ✅ in 6s ✅ in 16s ⏭️
nerodia ✅ in 0s ✅ in 23s ⏭️
verso ✅ in 1m 14s ✅ in 3m 16s ⏭️
verso-slides ✅ in 16s ✅ in 9s ⏭️
verso-web-components ✅ in 3s ⏭️ ⏭️

View run

@Kha
Kha merged commit 2914fa9 into master Nov 26, 2026
17 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant