Skip to content

refactor(Locallynameless): abbrev multiApp = List.foldl app - #710

Open
lengyijun wants to merge 7 commits into
leanprover:mainfrom
awesome-lambda-calculus:multiapp
Open

lengyijun wants to merge 7 commits into
leanprover:mainfrom
awesome-lambda-calculus:multiapp

Conversation

@lengyijun

@lengyijun lengyijun commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Replace the recursive multiApp definition with List.foldl app
Remove the now-unnecessary multiApp_tail lemma and adapt proofs to List.foldl_concat
grind [multiApp_tail] => grind
Make semanticMap_saturated use explicit grind only: performance consideration
New theorems : multiapp_openRec multiapp_fv step_multiApp_l_union steps_multiApp_l_union
Rename listFullBeta_cons_r/l to listFullBeta_append_r/l to reflect their general concatenation
Add specialized cons lemmas for reducing the head term or the tail list.

Fix #784

@lengyijun

lengyijun commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor Author

No option to allow maintainers to edit pull requests @chenson2018

@chenson2018

Copy link
Copy Markdown
Collaborator

!radar

@leanprover-radar

leanprover-radar commented Jul 12, 2026 •

Copy link
Copy Markdown

Benchmark results for a9b4873 against 056cf93 are in. There are significant results. @chenson2018

  • 🟥 build//instructions: +61.1G (+3.04%)

Large changes (1🟥)

1 hidden

@lengyijun

Copy link
Copy Markdown
Contributor Author

!radar

@leanprover-radar

leanprover-radar commented Jul 14, 2026 •

Copy link
Copy Markdown

Benchmark results for 4128bf4 against e5ed905 are in. No significant results found. @lengyijun

  • 🟥 build//instructions: +61.5G (+2.98%)

Medium changes (1🟥)

  • 1 hidden

@chenson2018 chenson2018 self-assigned this Jul 25, 2026
Comment thread Cslib/Languages/LambdaCalculus/LocallyNameless/Stlc/StrongNorm.lean Outdated
Comment thread Cslib/Languages/LambdaCalculus/LocallyNameless/Untyped/ListFullBeta.lean Outdated
@lengyijun

lengyijun commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor Author

When formalizing "2 vars are not enough", I have proved dozens of theorems related to this file

https://github.com/lengyijun/Fokker_challenge/blob/2varsareenough_new/FokkerChallenge/EnhancedCslib/FlipApp.lean

@lengyijun
lengyijun force-pushed the multiapp branch 2 times, most recently from 01b9a56 to 2e72322 Compare August 9, 2026 14:09
@lengyijun
lengyijun marked this pull request as draft August 10, 2026 00:40
@lengyijun
lengyijun force-pushed the multiapp branch 6 times, most recently from 7affea2 to 572a073 Compare September 2, 2026 05:25
@lengyijun lengyijun changed the title refactor(Locallynameless): Multiapp => List.foldl refactor(Locallynameless): multiApp => List.foldl app Sep 2, 2026
@lengyijun lengyijun changed the title refactor(Locallynameless): multiApp => List.foldl app refactor(Locallynameless): abbrev multiApp = List.foldl app Sep 2, 2026
@lengyijun
lengyijun force-pushed the multiapp branch 2 times, most recently from e182ced to c5a5623 Compare September 2, 2026 05:28
@lengyijun
lengyijun marked this pull request as ready for review September 2, 2026 05:30
@lengyijun
lengyijun force-pushed the multiapp branch 2 times, most recently from 5d92054 to 312307a Compare September 21, 2026 23:47
@lengyijun
lengyijun force-pushed the multiapp branch 3 times, most recently from 57712e5 to 5d6f38c Compare September 28, 2026 00:14
@lengyijun
lengyijun force-pushed the multiapp branch 2 times, most recently from be5a94a to 1960afa Compare October 5, 2026 00:29
@lengyijun
lengyijun requested a review from crei as a code owner October 5, 2026 00:29
| nil => grind [cases Xi]
| append_singleton Ps P ih =>
rw [multiApp_tail] at h_red
unfold multiApp at h_red

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we keep multiApp_tail instead of unfolding everywhere?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now use simp only [List.foldl_concat], so there’s no need to unfold multiApp anymore.

Comment thread Cslib/Languages/LambdaCalculus/LocallyNameless/Untyped/MultiApp.lean Outdated
@lengyijun
lengyijun force-pushed the multiapp branch 3 times, most recently from e49ea4a to a1ee076 Compare October 14, 2026 04:56
Replace the recursive multiApp definition with List.foldl app
Remove the now-unnecessary multiApp_tail lemma and adapt proofs to List.foldl_concat
Make semanticMap_saturated use explicit grind only lemmas for the new multiApp representation
New theorems : multiapp_openRec and multiapp_fv
Rename `listFullBeta_cons_r/l` to `listFullBeta_concat_r/l` to reflect their general concatenation behavior.
Add specialized `cons` lemmas for reducing the head term or the tail list.
Add `step_multiApp_l_union` to lift a single `(Xi R1 ⊔ Xi R2)` reduction through a multi-application.
Add `steps_multiApp_l_union` for the corresponding reflexive-transitive closure.
Use the new single-step lemma to simplify the proof of the multi-step result.
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.

listFullBeta_cons_r should rename to listFullBeta_concat_r

4 participants