Repository navigation
feat: eta-expand recursor major for subsingleton structures - #15371
Merged
Merged
Conversation
4 of 9 tasks
Contributor
Author
|
downstream |
arthur-adjedj
force-pushed
the
eta-singleton-major
branch
from
October 11, 2026 12:03
616c9d5 to
c389eb8
Compare
Contributor
Author
|
changelog-language |
arthur-adjedj
marked this pull request as ready for review
October 11, 2026 12:36
arthur-adjedj
requested review from
TwoFX,
datokrat and
leodemoura
as code owners
October 11, 2026 12:36
nomeata
added a commit
to leanprover/lean-kernel-arena
that referenced
this pull request
Oct 11, 2026
…264) Tests for the eta-related changes planned in leanprover/lean4#14977: * corner-cases/eta-struct-major-no-whnf: structure eta on a recursor major before reducing it (leanprover/lean4#15351) * corner-cases/eta-struct-major-and: structure eta on a major in `Prop`, like `And` (leanprover/lean4#15371, leanprover/lean4#3213) * corner-cases/eta-struct-major-and-no-whnf: both together, with a non-normalizing proof as major * corner-cases/eta-unit-like-{pi,struct,proof-field,nested}: the extended unit-like criterion (leanprover/lean4#15372, leanprover/lean4#2258) * corner-cases/eta-rec-struct: eta-expansion of a structure recursor missing its major (leanprover/lean4#15374) * bugs/eta-ctor-alias: a soundness bug in a draft of leanprover/lean4#15373 and point the existing corner-cases/eta-ctor and corner-cases/eta-rule-k at leanprover/lean4#15373 and leanprover/lean4#15374. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
warning: this test leads to an infinite loop rather than a maxHeartBeats/maxRecDepth error in previous Lean versions
arthur-adjedj
force-pushed
the
eta-singleton-major
branch
from
October 12, 2026 18:32
b061792 to
0cbe4ed
Compare
The test is not longer relevant, as the path the soundness bug originally took cannot be reached anymore with this PR, and is generally too sensitive to isDefEq bugs to be adapted reliably (eg leanprover#15103 also breaks it).
arthur-adjedj
force-pushed
the
eta-singleton-major
branch
from
October 12, 2026 19:37
0cbe4ed to
7e2b336
Compare
arthur-adjedj
marked this pull request as draft
October 14, 2026 23:36
arthur-adjedj
force-pushed
the
eta-singleton-major
branch
from
October 18, 2026 19:40
b8dca12 to
98c6cf7
Compare
|
The adaptation PR for this PR is leanprover/downstream-lean4#115. |
arthur-adjedj
marked this pull request as ready for review
October 19, 2026 08:35
Contributor
Author
|
!bench |
|
Benchmark results for 98c6cf7 against 2c2bdd9 are in. There are significant results. @arthur-adjedj
Large changes (3🟥)
Medium changes (12🟥)
Small changes (2✅, 266🟥)
|
nomeata
approved these changes
Oct 20, 2026
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 PR expands the condition for which the major of a recursor can be eta-expanded. Namely, subsingleton structures such as
Andshould be eta-expanded in this situation.Remove the test
kernel_is_prop_issue.leanas that test no longer reaches the code it used to test.Related to #14977
Closes #3213