The Fundamental Theorem of Asset Pricing, Formalized in Lean 4
Raphael Coelho
q-fin.MF
Jun 27, 2026 · v1
TL;DR
Formalizes the Fundamental Theorem of Asset Pricing in Lean 4 over Mathlib in three market settings.
Abstract
The Fundamental Theorem of Asset Pricing states that a market is free of arbitrage exactly when it admits an equivalent martingale measure. We formalize it in Lean 4 over Mathlib in three settings: a finite-state market over a finite horizon (Harrison-Pliska), a one-period market on an arbitrary probability space with a single scalar return (Follmer-Schied), and a one-period market with finitely many assets. The finite case is the geometry of a separating hyperplane; the scalar one-period case is an elementary change of measure. In the $d$-asset case the equivalent martingale measure is constructed explicitly, as the minimiser of the smooth convex potential $\mathbb{E}[\log(1+e^{\langleθ,Y\rangle})]$: absence of arbitrage is precisely coercivity of the potential, its first-order condition is the martingale property, and the minimiser's logistic weight is the density of the measure. The construction uses no Hahn-Banach theorem, no $L^0$-closedness argument, no measurable selection, and no non-redundancy hypothesis. To our knowledge this is the first machine-checked Fundamental Theorem of Asset Pricing in any proof assistant. The boundary is explicit: the general multi-period Dalang-Morton-Willinger theorem lies outside the development. Every theorem is sorry-free, each headline result's axioms are pinned to Mathlib's classical defaults by a build-enforced gate, and the whole is reproducible from a pinned toolchain.
Problem
No machine-checked Fundamental Theorem of Asset Pricing existed in any proof assistant, despite its centrality to arbitrage-free pricing theory.
Approach
Formalizes the FTAP in Lean 4 over Mathlib in three settings: a finite-state multi-period market (Harrison-Pliska, via separating hyperplane), a scalar one-period market on an arbitrary probability space (elementary change of measure), and a d-asset one-period market (explicit construction of the equivalent martingale measure as the minimizer of a smooth convex softplus potential). The d-asset case avoids Hahn-Banach entirely.
Results
All three biconditional theorems are sorry-free and axiom-pinned to Mathlib's classical defaults. The library contains 292 catalogued theorems (257 complete formalizations), released under Apache 2.0.