Skip to content

feat(CombinatoryLogic): add Church-encoded list infrastructure for SKI terms#331

Merged
chenson2018 merged 5 commits intoleanprover:mainfrom
jessealama:ski-church-encoding
Feb 17, 2026
Merged

feat(CombinatoryLogic): add Church-encoded list infrastructure for SKI terms#331
chenson2018 merged 5 commits intoleanprover:mainfrom
jessealama:ski-church-encoding

Conversation

@jessealama
Copy link
Contributor

@jessealama jessealama commented Feb 11, 2026

Adds Church-encoded list operations (nil, cons, head, tail) for SKI combinatory logic, along with conversions to/from Church numerals and helper combinators (PrependZero, SuccHead).

Head is defined via a general HeadD that takes an arbitrary default value; Head specializes to default 0.

This is a stepping stone toward proving the equivalence of SKI combinatory logic with Mathlib's Turing machines.

Copy link
Contributor

@thomaskwaring thomaskwaring left a comment

Choose a reason for hiding this comment

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

Looks great to me :-)

Copy link
Contributor

@thomaskwaring thomaskwaring left a comment

Choose a reason for hiding this comment

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

looks good to me!

Add B_tail_mred and C_head_mred convenience lemmas.
Scope grind attributes; use forward mode (→) where appropriate.
Remove grind from isChurch_trans to avoid cascading instantiations.
@jessealama jessealama force-pushed the ski-church-encoding branch 2 times, most recently from 07eb042 to 7920a16 Compare February 17, 2026 15:46
…I terms

Adds Church-encoded list operations (nil, cons, head, tail) along with
conversions to/from Church numerals and helper combinators (PrependZero,
SuccHead). Head is defined via a general HeadD with arbitrary default.

Thanks to @thomaskwaring for suggesting the HeadD generalization.
Copy link
Collaborator

@chenson2018 chenson2018 left a comment

Choose a reason for hiding this comment

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

Some small style reviews, but this looks good to me.

jessealama and others added 3 commits February 17, 2026 19:19
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Co-authored-by: Chris Henson <46805207+chenson2018@users.noreply.github.com>
Thanks to chenson2018 for the feedback.
@jessealama
Copy link
Contributor Author

Some small style reviews, but this looks good to me.

Thank you! I took a look. Nice idea about the structure for Church pair verification.

@chenson2018 chenson2018 added this pull request to the merge queue Feb 17, 2026
Merged via the queue into leanprover:main with commit b13a672 Feb 17, 2026
2 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.

3 participants