Repository navigation
fix: cslib breakage from mathlib gaining Set.Finite.measure_lt_top_of_sigmaFinite - #129
Closed
downstream-lean4[bot] wants to merge 1 commit into
Closed
downstream-lean4[bot] wants to merge 1 commit into
downstream-lean4[bot] wants to merge 1 commit into
Conversation
…f_sigmaFinite` The merge with mathlib master brought in mathlib4#44381, which adds `Set.Finite.measure_lt_top_of_sigmaFinite` to `Mathlib/MeasureTheory/Measure/Typeclasses/SFinite.lean`. `Cslib.Foundations.MeasureTheory.FiniteSupport` carried its own copy under the same `_root_` name — with a `TODO: delete once Mathlib PR 44381 is available` on it — so the module now fails with `has already been declared`. Deleted the local copy, as the TODO asked. Its only use, `HasFiniteSupport.isFiniteMeasure`, resolves to mathlib's lemma, which has the same statement.
Contributor
Author
Build report for fix: cslib breakage from mathlib gaining
|
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| cslib | ✅ in 3s | ✅ in 10s | ✅ in 3s |
Stayed red
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| verso-slides | 🟥 in 26s | ⏭️ | ⏭️ |
Stayed green
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| aesop | ✅ | ✅ in 0s | ✅ in 5s | ⏭️ |
| batteries | ✅ | ✅ in 0s | ✅ in 4s | ✅ in 2s |
| import-graph | ✅ | ✅ in 2s | ✅ in 4s | ⏭️ |
| lean4-cli | ✅ | ✅ in 0s | ✅ in 0s | ⏭️ |
| mathlib4 | ✅ | ✅ in 1m 0s | ✅ in 49s | ✅ in 1m 36s |
| plausible | ✅ | ✅ in 0s | ✅ in 2s | ⏭️ |
| ProofWidgets4 | ✅ | ✅ in 1s | ✅ in 1s | ⏭️ |
| quote4 | ✅ | ✅ in 0s | ✅ in 1s | ⏭️ |
| reference-manual | ✅ | ✅ in 9s | ⏭️ | ⏭️ |
| BibtexQuery | ✅ in 1s | ⏭️ | ⏭️ | |
| comparator | ✅ in 2s | ⏭️ | ⏭️ | |
| doc-gen4 | ✅ in 1s | ⏭️ | ⏭️ | |
| illuminate | ✅ in 1s | ✅ in 10s | ⏭️ | |
| lean4-unicode-basic | ✅ in 0s | ⏭️ | ⏭️ | |
| lean4export | ✅ in 0s | ✅ in 7s | ⏭️ | |
| LeanSearchClient | ✅ in 0s | ✅ in 0s | ⏭️ | |
| leansqlite | ✅ in 3s | ✅ in 17s | ⏭️ | |
| nerodia | ✅ in 1s | ✅ in 21s | ⏭️ | |
| repl | ✅ in 0s | ✅ in 49s | ⏭️ | |
| verso | ✅ in 15s | ✅ in 2m 50s | ⏭️ | |
| verso-web-components | ✅ in 24s | ⏭️ | ⏭️ |
Kha
pushed a commit
that referenced
this pull request
Oct 4, 2026
Run [37207955571](https://github.com/leanprover/downstream-lean4/actions/runs/37207955571) on `nightly-2026-10-04` went red in `mathlib4` (critical) and `repl`, with `cslib` skipped behind `mathlib4`. The cause is not the nightly — it is the `downstream: update repo batteries` merge 4cfce6c, which brought in [batteries#1990](leanprover-community/batteries#1990). ## mathlib4 batteries#1990 lets `on_goal` act on several goals at once. It introduces ```lean syntax goalNum := "-"? num ``` and replaces `elab "on_goal " reverse:"-"? n:num " => " seq:tacticSeq` with `elab "on_goal " ns:goalNum+ " => " seq:tacticSeq`, and `pick_goal` likewise. That breaks Mathlib in two independent ways. **1. The `on_goal` quotations in `Mathlib.Tactic.ClickSuggestions.Util`** — `$n₁` is now a `TSyntax goalNum` where the code wants a `NumLit`, and the term-position quotation wants a `goalNum` where `Syntax.mkNatLit` gives a `NumLit`. This is the only error CI reported. The fix is the author's own adaptation, [mathlib4#44446](leanprover-community/mathlib4#44446), applied verbatim: annotate the three antiquotations `:num`. **2. The syntax node kinds were renamed.** The `-` used to be an atom of the tactic syntax itself and is now part of `goalNum`, so the generated kinds change: | old | new | | --- | --- | | `Batteries.Tactic.«tacticOn_goal-_=>_»` | `Batteries.Tactic.«tacticOn_goal_=>_»` | | `Batteries.Tactic.«tacticPick_goal-_»` | `Batteries.Tactic.tacticPick_goal_` | Mathlib's `multiGoal` and `unusedTactic` linters keep those kinds in exclusion lists, written out by name, so after the rename neither linter recognises `on_goal` or `pick_goal` as focusing the goal any more and every use in Mathlib starts warning — `--wfail` turns that into a build failure. Renamed in `Mathlib/Tactic/Linter/Multigoal.lean` (both entries) and `Mathlib/Tactic/Linter/UnusedTacticExtension.lean`. 44446 does not carry this half, because upstream Mathlib still builds against the pre-#1990 batteries, where the old kinds exist and the exclusions work. Upstream will need it at its next batteries bump. (`Mathlib/Tactic/Linter/FlexibleLinter.lean:299` holds a third such entry, under the pre-Batteries name `Std.Tactic.«tacticOn_goal-_=>_»`. It has been dead since the rename to batteries and is left alone here — reviving it would change that linter's output, which is not this breakage.) Verified locally on 4cfce6c + `nightly-2026-10-04`: * `lake build Mathlib Archive Counterexamples Wanted cache --wfail` — 18352 jobs, no warnings * `lake test --iofail` — 18868 jobs * `lake lint` — `Linting passed for Mathlib.` `repl`, whose `test` phase failed on the very same module, needs no change of its own: `lake build` and `lake test` pass here, including the `test/Mathlib` build and the `on_goal` case of the `test/*.in` suite. ## Not fixed here `cslib` and `verso-slides` are the two repos this run left red that are already covered by open PRs, and no second fix is opened for them: * `cslib` — [#129](#129), the `Set.Finite.measure_lt_top_of_sigmaFinite` clash. It was *skipped* in this run behind `mathlib4`, so CI has not run it since `nightly-2026-10-03`. Re-verified here on top of this commit, with #129 applied: `lake build --wfail --iofail` (6646 jobs), `lake test --wfail --iofail` (18601 jobs) and `lake lint` all pass. * `verso-slides` — [#126](#126), the `SubVerso.Examples` re-export. Re-verified with #126 applied: `lake build` (749 jobs) and `lake test -- --no-playwright` pass. Nothing was left unfinished: every phase of every repo in this run's red set passes locally, given those two PRs. <!-- downstream-watch: unattended --> Co-authored-by: downstream-lean4[bot] <downstream-lean4[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <[email protected]>
Contributor
Author
|
Superseded: upstream cslib made the same deletion, and the bot merge |
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.
masterfailed incslibandverso-slidesin run37173055764,
which the build report counts green because both repos are noncritical. This PR
fixes
cslib;verso-slidesis already covered by#126, which is still
open.
cslib —
Set.Finite.measure_lt_top_of_sigmaFinitedeclared twiceThe merge with mathlib master (
downstream: update repo mathlib4, the verycommit this run built) brought in
mathlib4#44381,
which adds
Set.Finite.measure_lt_top_of_sigmaFinitetoMathlib/MeasureTheory/Measure/Typeclasses/SFinite.lean.Cslib.Foundations.MeasureTheory.FiniteSupportcarried its own copy under thesame
_root_name, so the module fails withThe copy was always meant to be temporary — its docstring reads "TODO: delete
once Mathlib PR 44381
is available" — so the fix is to do what the TODO asked and delete it. The only
use,
HasFiniteSupport.isFiniteMeasure, now resolves to mathlib's lemma, whichhas the same statement.
mathlib4#44381 is merged in mathlib master, so upstream
cslibwill hit the sameclash with its next mathlib bump;
cslibis wired up for automated export, sothis deletion goes out as its adaptation PR.
Verified locally on
nightly-2026-10-03lake build --wfail --iofaillake test --wfail --iofaillake lintcslibLinting passed for CslibNothing was left unfinished on
cslib.verso-slidesis untouched here andstays red on
masteruntil #126 merges.