Skip to content

feat(untyped): define CBN and Standard evaluation strategies#671

Open
m-ow wants to merge 4 commits into
leanprover:mainfrom
m-ow:feat/standard-reduction
Open

feat(untyped): define CBN and Standard evaluation strategies#671
m-ow wants to merge 4 commits into
leanprover:mainfrom
m-ow:feat/standard-reduction

Conversation

@m-ow

@m-ow m-ow commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

This is the first step towards the Standardization Theorem.

Instead of the classic (and painful) Barendregt approach, I defined Standard reduction
relying on CBN to find the head redex, which makes the proofs much nicer.

@lengyijun

lengyijun commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Hi, I am doing something similar.
I have verified eta-postpone theorem yet.

I also have verified leftmost theorem in debruijn index.

We are working on https://github.com/awesome-lambda-calculus/Fokker_challenge , normalization theorem is of most importance to us.

@m-ow

m-ow commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Hi! Really cool project!
You mentioned using De Bruijn indices, but I'm writing the Standardization theorem in Locally Nameless.
Are you planning to open a PR to add the De Bruijn representation? Let's coordinate our efforts to avoid duplicating work.

@m-ow

m-ow commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Just read through your docs and I'm glad to see the project officially uses Locally Nameless.
I also noticed that you are currently blocked by the Standardization theorem. I can focus my efforts there so your team can use it soon. Let me know what you think and how you'd like to proceed!

@lengyijun

Copy link
Copy Markdown
Contributor

awesome-lambda-calculus/Fokker_challenge#3

@chenson2018 chenson2018 left a comment

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.

Looks straightforward, just a couple of small golfs:

lemma cbn_lc_l (step : M ⭢ₙ N) : LC M := by
induction step
all_goals grind

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.

Suggested change
induction step with grind

Comment on lines +45 to +49
induction step
case base beta_step =>
cases beta_step
apply beta_lc <;> assumption
case app lc_z _ lc_n => exact LC.app lc_n lc_z

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.

This seems reasonable:

Suggested change
induction step
case base beta_step =>
cases beta_step
apply beta_lc <;> assumption
case app lc_z _ lc_n => exact LC.app lc_n lc_z
induction step with grind

variable {M N : Term Var}

/-- The left side of a standard reduction is locally closed. -/
lemma stand_lc_l (step : M ⭢ₛ N) : LC M := by

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.

I think for the other reduction strategies we namespace all these lemmas. Especially since you do so for Standard.lc_refl below this feels odd.

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.

3 participants