feat: de Bruijn Syntax for Untyped Lambda Calculus and a proof of Church-Rosser with Parallel Reduction#475
feat: de Bruijn Syntax for Untyped Lambda Calculus and a proof of Church-Rosser with Parallel Reduction#475zayn7lie wants to merge 13 commits intoleanprover:mainfrom
Conversation
chenson2018
left a comment
There was a problem hiding this comment.
Hi, thanks for your interest in contributing to CSLib! We do have Church-Rosser for locally nameless binding, but I think we are interested in having the more common de Bruijn indices representation as well.
I see there is a disclosure of AI usage, but this looks like its been mostly cleaned up pretty well, so thank you.
Below are some initial reviews about making this fit into CSLib conventions.
| | app t₁ t₂ ih₁ ih₂ => simp_all | ||
|
|
||
| /-- Communitivity of incre. -/ | ||
| public theorem incre_comm {i j k l t} : |
There was a problem hiding this comment.
I think we can clean up some of the arithmetic in theorems like this, but I'll wait until we have more high-level changes done first to give specific suggestions.
| | appL {t t' u} : Beta t t' → Beta (t·u) (t'·u) | ||
| | appR {t u u'} : Beta u u' → Beta (t·u) (t·u') | ||
| | red (t' s : Term) : Beta ((λ.t')·s) (t'.sub 0 s) | ||
| public abbrev BetaStar := Relation.ReflTransGen Beta |
There was a problem hiding this comment.
We use the attribute reduction_sys for generating notations for reductions and the multi-step closure.
There was a problem hiding this comment.
There was a problem hiding this comment.
There was a problem hiding this comment.
At the same time, would you know how to type ⭢ in Lean for single reduction?
Thanks for notification, sorry for confusion. |
…lation`, and add `rtc_eq_of_sandwich`
…lation`, and add `rtc_eq_of_sandwich`
…multi-step closure
I don't understand this comment. It looks as I would expect for this binding scheme. |
Please read the header comment docs of |
|
Can you rename |
I am somehow hesitant to do that. The current |
|
I agree that we should almost always use the notation and corresponding naming, which is then based off I've started a second pass of reviews which I'll try to have complete in a few days. |
Main contributions
Par) and its basic properties.Diamond,Confluent) for binary relations.The development follows the classical proof strategy:
parallel reduction -> diamond -> confluence -> Church–Rosser.Design choices
(
Diamond,Confluent) to keep the proof modular.Use of AI