Skip to content

[#15066] feat: virtual one-field structures - #59

Draft
downstream-lean4[bot] wants to merge 15 commits into
masterfrom
adaptation-15066
Draft

downstream-lean4[bot] wants to merge 15 commits into
masterfrom
adaptation-15066

Conversation

@downstream-lean4

Copy link
Copy Markdown
Contributor

This is the adaptation PR for leanprover/lean4#15066.

@downstream-lean4 downstream-lean4 Bot added adaptation This is an adaptation PR for a PR in the lean4 repository. toolchain-available labels Sep 8, 2026
@downstream-lean4

Copy link
Copy Markdown
Contributor Author

Build report for Merge remote-tracking branch 'bot/adaptation-15066' into adaptation-15066

Turned red:

Repo Critical Build Test Lint
mathlib4 ✅ ✅ in 1173s ✅ in 47s 🟥 in 103s
reference-manual ✅ 🟥 in 75s ⏭️ ⏭️
Stayed green
Repo Critical Build Test Lint
aesop ✅ ✅ in 17s ✅ in 5s ⏭️
batteries ✅ ✅ in 14s ✅ in 4s ✅ in 2s
import-graph ✅ ✅ in 3s ✅ in 3s ⏭️
lean4-cli ✅ ✅ in 3s ✅ in 0s ⏭️
plausible ✅ ✅ in 3s ✅ in 2s ⏭️
ProofWidgets4 ✅ ✅ in 5s ✅ in 1s ⏭️
quote4 ✅ ✅ in 6s ✅ in 1s ⏭️
BibtexQuery ✅ in 3s ⏭️ ⏭️
comparator ✅ in 3s ⏭️ ⏭️
cslib ✅ in 35s ✅ in 8s ✅ in 3s
doc-gen4 ✅ in 15s ⏭️ ⏭️
illuminate ✅ in 8s ✅ in 10s ⏭️
lean4-unicode-basic ✅ in 4s ⏭️ ⏭️
lean4export ✅ in 3s ✅ in 7s ⏭️
LeanSearchClient ✅ in 2s ✅ in 0s ⏭️
leansqlite ✅ in 9s ✅ in 15s ⏭️
nerodia ✅ in 5s ✅ in 20s ⏭️
repl ✅ in 4s ✅ in 58s ⏭️
verso ✅ in 127s ✅ in 87s ⏭️
verso-slides ✅ in 61s ✅ in 6s ⏭️
verso-web-components ✅ in 35s ⏭️ ⏭️

View run

Kha added a commit that referenced this pull request Sep 11, 2026
Fixes the red `master` after the bump to `nightly-2026-09-11` ([run
34590361152](https://github.com/leanprover/downstream-lean4/actions/runs/34590361152)).
One commit, `mathlib4` only.

## mathlib4

**Cause.** The bump commit changes only `lean-toolchain`, yet
`Mathlib.FieldTheory.Galois.IsGaloisGroup` stops compiling:

```
error: Mathlib/FieldTheory/Galois/IsGaloisGroup.lean:225:6: failed to synthesize
    Algebra K ↥(IsScalarTower.toAlgHom K F L).fieldRange
  (deterministic) timeout at `typeclass`, maximum number of heartbeats (20000) has been reached
```

It is a small drift. With Mathlib's `leanOptions` (`maxSynthPendingDepth
:= 3`), `synthInstance.maxHeartbeats 21000` is already enough on
`nightly-2026-09-11`. The adaptation branches for lean4#15090 (#64) and
lean4#15066 (#59) hit the same error once their pr-releases were based
on lean4 master past `nightly-2026-09-10`; `pr-release-15090-0d7390f`
(based on the `nightly-2026-09-10` commit) was fine and
`pr-release-15090-61a42c0` (based on lean4#15098) was not. That puts the
cause among lean4#15001, #15093, #15060, #15048, #15107 and #15098. None
of these obviously changes allocation counts inside instance synthesis,
so I have not pinned it to one PR.

**Fix.** `set_option synthInstance.maxHeartbeats 80000 in` on
`IsGaloisGroup.of_isScalarTower`, with the justifying comment the style
linter asks for. This copies #64's hunk verbatim (the resulting blob is
identical to the one on `adaptation-15090`), so merging #64 later stays
clean. #59 raises the same limit to 40000 and will conflict on this line
either way.

**Verified locally** on `nightly-2026-09-11`: `lake build Mathlib
Archive Counterexamples Wanted --wfail`, `lake test --iofail` and `lake
lint` all pass.

## cslib

CI skipped it behind mathlib4, so it has not been built on this nightly.
**Verified locally**, no change needed: `lake build --wfail --iofail`,
`lake test --wfail --iofail` and `lake lint` all pass.

## repl

Its `lake test` failed only as a knock-on: `test.sh` builds real Mathlib
in `test/Mathlib`, which stopped at the same `IsGaloisGroup` error, and
`H20231110` then failed because `Real` was unavailable. No change
needed. **Verified locally**: `lake build` and `lake test` pass with
this fix.

## Unfinished

Nothing.

<!-- downstream-watch: unattended -->

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adaptation This is an adaptation PR for a PR in the lean4 repository. cache-available toolchain-available

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant