ZFLean: a framework for set-level mathematics in Lean

📅 2026-04-27
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenges of formalizing set theory in dependently typed proof assistants, where boilerplate code is often excessive and integration with typed libraries is difficult. Building upon Lean 4’s Mathlib, the authors develop a set-theoretic framework over a model of ZFC that incorporates relational calculus, lightweight automation with predictable behavior, and standard set constructions. Crucially, it enables seamless interoperability between ZFC objects and Lean’s native types for the first time, supporting hybrid set/type reasoning. The framework substantially reduces boilerplate in scalable set-theoretic proofs while remaining fully compatible with Mathlib. Its expressiveness and practicality are demonstrated through complete formalizations of Boolean values, natural numbers, integers, and the Curry isomorphism theorem.

Technology Category

Knowledge Representation and Reasoning: Automated Reasoning and Theorem ProvingConstraint Satisfaction and Optimization: Satisfiability Modulo TheoriesReasoning under Uncertainty: Other Foundations of Reasoning under Uncertainty

Application Category

Semantics and Knowledge: Scalable techniques for the creation, curation, publication, maintenance, and consumption of large, Web-based, structured, reusable, knowledge graphs and ontologiesGraph Algorithms and Modeling for the Web: Foundation models and LLMs for Web-related graphsSystems and Infrastructure for Web, Mobile and WoT: Applied ML and AI for Web-based mobile applications
📝 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.
Problem

Research questions and friction points this paper is trying to address.

ZFC
set theory
formalization
Lean
dependent types
Innovation

Methods, ideas, or system contributions that make the work stand out.

ZFC formalization
relational calculus
set-theoretic constructions
type-set bridging
Lean 4
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
V
Vincent Trélat
Université de Lorraine, CNRS, INRIA, Nancy, France