Repository navigation
[#15687] fix: make unfold on non-recursive definitions independent of eq_def realization - #265
Open
downstream-lean4[bot] wants to merge 5 commits into
Open
downstream-lean4[bot] wants to merge 5 commits into
downstream-lean4[bot] wants to merge 5 commits into
Conversation
With lean4#15687, `unfold` on a non-recursive definition always unfolds by plain delta expansion and no longer reduces the resulting `match` on a constructor. In `pack_unpack`, `unfold pack` therefore leaves the `let`s inside a match arm where `extract_lets` cannot find them. Reduce the match with `dsimp -zeta only` first. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Contributor
Author
Build report for downstream: follow upstream PRStayed green
|
skip-checks: true
Contributor
Author
|
The automatic merge failed. @Kha, please fix any merge conflicts and merge this PR manually. |
Kha
pushed a commit
that referenced
this pull request
Nov 23, 2026
1 of 4 for [run 45055845730](https://github.com/leanprover/downstream-lean4/actions/runs/45055845730), with #273, #274 and #275 — one PR per author of the upstream change behind each breakage, so each asks that author for review. This one stands alone: `batteries` and `aesop` go green with it and nothing else. `batteries` was the only repo that CI could build this round: `aesop`, `mathlib4` and `cslib` were all skipped behind it, so this unblocks three more repos. ### `batteries` — lean4#15687 (`Kha`) lean4#15687 makes `unfold` on a non-recursive definition independent of whether `f.eq_def` happens to have been realized already: it now always unfolds by plain delta expansion, and so no longer reduces the resulting `match` on a constructor. In `Float.Model.UnpackedFloat.pack_unpack`, `unfold pack` therefore leaves the two `have`s of `pack`'s `.finite` arm *inside* the unreduced `match`, where `extract_lets` cannot reach them: ``` Batteries/Data/Float/Lemmas/Basic.lean:77:4: Tactic `extract_lets` failed: made no progress Batteries/Data/Float/Lemmas/Basic.lean:94:4: Tactic `extract_lets` failed: made no progress ``` Fix: reduce the match with `dsimp -zeta only` before `extract_lets`, in both the subnormal and the normal case. This is byte-for-byte the hunk the bot already carries on `adaptation-15687` (#265) and `adaptation-16623` (#266) — both now `CONFLICTING`, because upstream has since split `Batteries/Data/Float/Lemmas.lean` into `Batteries/Data/Float/Lemmas/{Basic,Arithmetic,Order}.lean`, so neither can merge as it stands. Applying it at the new location is what makes `master` build. **Verified:** `batteries` `lake build --wfail`, `lake test` and `lake lint` all green; `aesop` `lake build --wfail` and `lake test` green (it has no lint driver). <!-- downstream-watch: unattended --> Co-authored-by: downstream-lean4[bot] <downstream-lean4[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <[email protected]>
This branch has not been deployed
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.
This is the adaptation PR for leanprover/lean4#15687.