Skip to content

feat: FullEta.step_lc_l#589

Merged
chenson2018 merged 4 commits into
leanprover:mainfrom
lengyijun:FullEta.step_lc_l
May 23, 2026
Merged

feat: FullEta.step_lc_l#589
chenson2018 merged 4 commits into
leanprover:mainfrom
lengyijun:FullEta.step_lc_l

Conversation

@lengyijun
Copy link
Copy Markdown
Contributor

@lengyijun lengyijun commented May 21, 2026

This PR adds a missing lemma to the FullEta development in the locally nameless untyped λ‑calculus:
a proof that the source term of a single‑step η‑reduction is locally closed. It also moves the definition of LcAt earlier to avoid some duplication of proofs about LC.

New Lemmas

FullEta.step_lc_l : Proves that the left side of an η-reduction step (M ⭢ηᶠ M') is locally closed.
Uses induction on the reduction step and the grind tactic.

lcAt_openRec_above_lcAt : Shows that opening a term at a higher index than its locally closed level leaves it unchanged.

Refactored Lemmas

open_lc : Simplified proof using lcAt_openRec_above_lcAt and lcAt_iff_LC.

PR description is generated by AI

This PR introduces FullEta.step_lc_l and lcAt_openRec_above_lcAt
@lengyijun lengyijun requested a review from chenson2018 as a code owner May 21, 2026 12:32
@lengyijun
Copy link
Copy Markdown
Contributor Author

lengyijun commented May 21, 2026

Compared to FullBeta.step_lc_l, FullEta.step_lc_l requires HasFresh

@lengyijun
Copy link
Copy Markdown
Contributor Author

Fail to find theorem N.LC -> N.openRec i M = N, so I prove it with LcAt

@chenson2018
Copy link
Copy Markdown
Collaborator

I took the liberty of moving around imports so that any generalizations of LcAt don't get duplicated.

@chenson2018
Copy link
Copy Markdown
Collaborator

The PR description is very large proportional to the change, maybe just the first line is needed? If AI was used, it is our policy is that this is disclosed when opening the PR.

Comment thread Cslib/Languages/LambdaCalculus/LocallyNameless/Untyped/FullEta.lean Outdated
….lean

Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
@lengyijun
Copy link
Copy Markdown
Contributor Author

If AI was used, it is our policy is that this is disclosed when opening the PR.

Not mentioned in CONTRIBUTING.md

@lengyijun lengyijun requested a review from chenson2018 May 23, 2026 00:24
@chenson2018
Copy link
Copy Markdown
Collaborator

If AI was used, it is our policy is that this is disclosed when opening the PR.

Not mentioned in CONTRIBUTING.md

This has been a policy for some time in alignment with Mathlib, but you are correct that it was not documented. I have opened a PR to correct this oversight. Thank you for complying in the meantime! I made an additional small edit to include the change I made to the import structure.

@chenson2018 chenson2018 added this pull request to the merge queue May 23, 2026
Merged via the queue into leanprover:main with commit 6cc5327 May 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants