Reflections on Trusting Lean
Lean's type theory (CIC plus choice, propositional extensionality and proof irrelevance) is known to be equiconsistent with ZFC plus infinitely many strongly inaccessible cardinals. Equiconsistency alone does not guarantee that the two systems prove the same statements.
Translations of second-order arithmetic formulas into both Lean's type theory and ZFC_∞ are defined. Werner's set model inside CIC is used for one direction. Carneiro's set-theoretic model of Lean, via its reduction to W-types, is used for the converse. The implication from the internal ZFC_n model to the Lean statement was implemented in Lean 4.
A second-order arithmetic sentence is provable in ZFC_∞ if and only if its translation, viewed as a Lean type, is inhabited. So Lean proofs of arithmetic statements, such as the twin prime conjecture, are as trustworthy as ZFC_∞ proofs.
