Skip to content

chore: drop UIntN.max_def/min_def, now in core - #29

Merged
Kha merged 1 commit into
masterfrom
batteries-uint-max-min-def
Aug 29, 2026
Merged

chore: drop UIntN.max_def/min_def, now in core#29
Kha merged 1 commit into
masterfrom
batteries-uint-max-min-def

Conversation

@Kha

@Kha Kha commented Aug 29, 2026

Copy link
Copy Markdown
Member

Core now generates protected theorem min_def/max_def for each UIntN, so
the copies in Batteries/Data/UInt.lean are duplicates and fail with
"has already been declared".

Because core's versions are protected, the bare rw [max_def] / rw [min_def]
in toNat_max / toNat_min no longer resolve either — that is the source of the
accompanying "Unknown identifier" and "unsolved goals" errors. Those uses are now
qualified.

lake test passes and all modules build on nightly-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.a references
l_LeanExport_parseStream, initialize_LeanExport_Parse and
runtime_initialize_LeanExport_Parse, defined in libLeanExport.a but absent
from Lake's link line and from libleanshared.so. That needs a fix in lean4.

🤖 Generated with Claude Code

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.
@Kha
Kha merged commit 8372c07 into master Aug 29, 2026
1 check failed
@downstream-lean4

Copy link
Copy Markdown
Contributor

Build report for batteries: drop UIntN.max_def/min_def, now in core

Turned green:

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 ⏭️ ⏭️

View run

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