chore: drop UIntN.max_def/min_def, now in core - #29
Merged
Conversation
Core generates `protected theorem min_def`/`max_def` for each `UIntN`, so the copies in `Batteries/Data/UInt.lean` clash. Because core's are `protected`, the bare `rw [max_def]`/`rw [min_def]` in `toNat_max`/`toNat_min` no longer resolve either, so those uses are now qualified.
Contributor
Build report for batteries: drop
|
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| reference-manual | ✅ | ✅ in 22s | ⏭️ | ⏭️ |
| repl | ✅ in 1s | ✅ in 1072s | ⏭️ |
Stayed red
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| aesop | ✅ | ⏭️ | ⏭️ | ⏭️ |
| batteries | ✅ | 🟥 in 7s | ⏭️ | ⏭️ |
| mathlib4 | ✅ | ⏭️ | ⏭️ | ⏭️ |
| cslib | ⏭️ | ⏭️ | ⏭️ |
Stayed green
| Repo | Critical | Build | Test | Lint |
|---|---|---|---|---|
| import-graph | ✅ | ✅ in 2s | ✅ in 3s | ⏭️ |
| lean4-cli | ✅ | ✅ in 1s | ✅ in 0s | ⏭️ |
| plausible | ✅ | ✅ in 1s | ✅ in 2s | ⏭️ |
| ProofWidgets4 | ✅ | ✅ in 3s | ✅ in 1s | ⏭️ |
| quote4 | ✅ | ✅ in 2s | ✅ in 1s | ⏭️ |
| BibtexQuery | ✅ in 1s | ⏭️ | ⏭️ | |
| comparator | ✅ in 2s | ⏭️ | ⏭️ | |
| doc-gen4 | ✅ in 3s | ⏭️ | ⏭️ | |
| illuminate | ✅ in 3s | ✅ in 10s | ⏭️ | |
| lean4-unicode-basic | ✅ in 2s | ⏭️ | ⏭️ | |
| lean4export | ✅ in 0s | ✅ in 7s | ⏭️ | |
| LeanSearchClient | ✅ in 1s | ✅ in 0s | ⏭️ | |
| leansqlite | ✅ in 4s | ✅ in 16s | ⏭️ | |
| verso | ✅ in 36s | ✅ in 84s | ⏭️ | |
| verso-slides | ✅ in 5s | ✅ in 6s | ⏭️ | |
| verso-web-components | ✅ in 30s | ⏭️ | ⏭️ |
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.
Core now generates
protected theorem min_def/max_deffor eachUIntN, sothe copies in
Batteries/Data/UInt.leanare duplicates and fail with"has already been declared".
Because core's versions are
protected, the barerw [max_def]/rw [min_def]in
toNat_max/toNat_minno longer resolve either — that is the source of theaccompanying "Unknown identifier" and "unsolved goals" errors. Those uses are now
qualified.
lake testpasses and all modules build onnightly-2026-08-29.This does not make batteries green on its own. With this fixed, the build
reaches
runLinter:exe, which still fails to link:libLake.areferencesl_LeanExport_parseStream,initialize_LeanExport_Parseandruntime_initialize_LeanExport_Parse, defined inlibLeanExport.abut absentfrom Lake's link line and from
libleanshared.so. That needs a fix in lean4.🤖 Generated with Claude Code