English

A Modular Lean 4 Framework for Confluence and Strong Normalization of Lambda Calculi with Products and Sums

Logic in Computer Science 2025-12-11 v1

Abstract

We present Metatheory, a comprehensive library for programming language foundations in Lean 4. The library features a modular framework for proving confluence of abstract rewriting systems using three classical proof techniques: the diamond property, Newmans lemma, and the Hindley-Rosen lemma. These are instantiated across six case studies including untyped lambda calculus, combinatory logic, term rewriting, simply typed lambda calculus, and STLC with products and sums. All theorems are fully mechanized with zero axioms or sorry statements. We provide complete proofs of de Bruijn substitution infrastructure and demonstrate strong normalization via logical relations. To our knowledge, this is the first comprehensive confluence and normalization framework for Lean 4.

Keywords

Cite

@article{arxiv.2512.09280,
  title  = {A Modular Lean 4 Framework for Confluence and Strong Normalization of Lambda Calculi with Products and Sums},
  author = {Arthur Ramos and Anjolina Oliveira and Ruy de Queiroz and Tiago de Veras},
  journal= {arXiv preprint arXiv:2512.09280},
  year   = {2025}
}

Comments

15 pages, 2 figures, 1 table. Complete Lean 4 formalization with 10,367 lines of code and 497 fully mechanized theorems

R2 v1 2026-07-01T08:18:16.567Z