English

ZFLean: a framework for set-level mathematics in Lean

Logic in Computer Science 2026-04-28 v1

Abstract

We present ZFLean, a Lean 4 library for doing core mathematics inside a model of ZFC with the ergonomics expected of typed Mathlib developments. Building on Mathlib's ZFC model, we contribute a relational calculus for sets with rewriting hints and small predictable tactics, canonical set-theoretic constructions -- Booleans, naturals, integers, sums/option -- and bridges between ZFC objects and Lean's native types enabling mixed set-level/typed proofs. The layer reduces boilerplate for extensional reasoning while remaining compatible with vanilla Mathlib. We discuss library organization and usage patterns that lower the friction of set-theoretic formalization in a dependently typed assistant. We demonstrate typical use of the framework with a case study exercising our constructions and relational calculus through a proof of an isomorphism theorem on curried functions.

Keywords

Cite

@article{arxiv.2604.24195,
  title  = {ZFLean: a framework for set-level mathematics in Lean},
  author = {Vincent Trélat},
  journal= {arXiv preprint arXiv:2604.24195},
  year   = {2026}
}
R2 v1 2026-07-01T12:36:39.122Z