The Fundamental Theorem of Asset Pricing, Formalized in Lean 4

summary

The gist

The Fundamental Theorem of Asset Pricing states that a market is free of arbitrage exactly when it admits an equivalent martingale measure The paper formalizes this theorem in Lean 4 over Mathlib in…

In short

This paper formalizes the Fundamental Theorem of Asset Pricing—that a market is free of arbitrage if and only if an equivalent martingale measure exists—using Lean 4 over Mathlib. It proves this theorem in three specific settings: a finite-state market, a scalar one-period market on an arbitrary space, and a multi-asset one-period market with finitely many assets. The work provides machine-checked proofs for these cases.

Key concepts

Arbitrage
In finance, arbitrage means finding a trading strategy where you guarantee a non-negative gain with no downside risk other than zero. The paper defines this mathematically as a position whose discounted gain is non-negative almost surely, but not identically zero.
Equivalent Martingale Measure (EMM)
An EMM is essentially an 'equivalent probability measure' under which the discounted asset prices behave like martingales. For a market to be arbitrage-free, such a measure must exist. In the one-period settings, this means the expected value of returns under this specific measure must be zero.
Finite State Market Geometry
In finite-state markets, the condition for no arbitrage is geometric: it means the set of attainable discounted gains forms a linear subspace that does not intersect the non-negative cone except at zero. This separation is proven using tools from convex geometry like the Hahn–Banach theorem.
Variational Construction
For multi-asset one-period markets, finding an EMM is done by minimizing a specific smooth convex function related to the expected softplus of the gain. The minimizer $ heta_0$ then serves as a fair pricing measure, ensuring that the resulting weight $z$ is strictly between 0 and 1.

Terminology used across episodes

This episode discusses

The paper

The Fundamental Theorem of Asset Pricing, Formalized in Lean 4 · Read on arXiv

Transcript

Introduction to the show: ident: Quantitative Finance. The day in quantitative finance: models of markets, risk and prices.

Ruth: I'm Ruth.

Warren: And I'm Warren, here with Iris.

Ruth: We're looking at the paper: "The Fundamental Theorem of Asset Pricing, Formalized in Lean 4".

Warren: Here's the gist of the paper. The Fundamental Theorem of Asset Pricing states that a market is free of arbitrage exactly when it admits an equivalent martingale measure The paper formalizes this theorem in Lean 4 over Mathlib in three settings: a finite-state market over a finite horizon (Harrison–Pliska), a oneperiod market on an arbitrary probability space with a single scalar return (Föllmer–Schied), and a one-period market with finitely many assets Market Definitions and Arbitrage Condition In each setting a position in the traded assets produces a discounted gain, and an arbitrage is a position whose gain is non-negative with no downside risk yet not identically zero The settings differ only in what a position is and how its gain is formed In the finite-state model a filtration F = (Ft)t≤T on a finite probability space carries an adapted discounted price process S0,..., ST; a strategy φ is predictable, with φt+1 measurable for Ft, and its discounted gain is the martingale transform (φ · S)T = ∑t<T φt+1(St+1 − St) In the scalar one-period model a single discounted excess return Y: omega → R is held in position θ ∈ R, with gain θ Y In the d-asset one-period model the return Y: omega → F takes values in a finite-dimensional inner-product space F (the d-asset market is F = Rd), a constant position θ ∈ F is held, and the gain is the inner product ⟨θ, Y⟩ Write G for the discounted gain of a position No arbitrage is the statement that no position has G ≥ 0 P-almost surely and P(G > 0) > 0 An equivalent martingale measure is a probability measure Q with Q ∼ P under which the discounted prices are fair: in the one-period settings, Y is Q-integrable with EQ

Y: = 0 (vector-valued in the d-asset case); in the finite-state setting, S is a Q-martingale for F The Lean predicate is IsEMM, and the equivalence Q ∼ P is recorded as the pair Q ≪ P and P ≪ Q, which is what lets a Q-almost-sure statement transfer back to P The Finite State Market Geometry In the finite-state market the equivalent martingale measure is, almost literally, a separating hyperplane Fix a finite probability space (omega, P) with full support, a filtration F, an adapted scalar discounted price S, and a finite horizon T The discounted gains attainable by predictable strategies form a linear subspace of Romega, the image of the martingale transform; call it the gains subspace No arbitrage says exactly that this subspace meets the non-negative cone only at the origin, equivalently that it is disjoint from the standard simplex of probability vectors on omega The simplex is compact and convex, and the gains subspace is closed because it is finitedimensional, so the geometric Hahn–Banach theorem strictly separates them Negating and reading off those values produces a strictly positive vector q that annihilates every attainable gain: a measure under which every martingale transform has zero expectation Scalar and Multi-Asset Constructions The scalar one-period market allows the equivalent martingale measure to be written down directly, with no separation at all Integrability is bought by tempering The balancing core is exists isEMM of pos-tails; removing the integrability assumption by the tempering above gives exists isEMM of-noArbitrage, and with the forward direction of §2 the biconditional The d-asset one-period theorem replaces separation with finding a minimiser of a single smooth convex function on the finite-dimensional space F The Variational Construction The construction rests on one function, f(θ) = E

log 1 + e⟨θ,Y⟩: , the expected softplus of the gain The gradient is ∇ f(θ) = Eσ(⟨θ,Y⟩) Y, the Y-average weighted by the logistic of the current gain Coercivity and continuity give a minimiser θ0 of f on N⊥; as f is flat along N, the same θ0 minimises f over all of F The weight z = σ(⟨θ0, Y⟩) lies strictly between 0 and 1: it is bounded, strictly positive, and makes Y fair The three theorems above are complete and machine-checked: the finite-state multi-period market, the scalar one-period market on an arbitrary space, and the d-asset one-period market on an arbitrary space, each a biconditional between no arbitrage and the existence of an equivalent martingale measure The general multi-period theorem remains open in this development The Artifact The development is part of a Lean 4 library that builds against pinned versions of its dependencies: the Lean toolchain at v4.31.0 and Mathlib at revision fabf563a Honesty about what the kernel accepts is enforced rather than asserted The results, their modules, and their benchmark entries are collected in Table 1 References

1: J.

Ruth: M.

Warren: Harrison, D.

Ruth: M.

Paper summary: Ruth: Looking at "The Fundamental Theorem of Asset Pricing, Formalized in Lean four" by Raphael Coelho, it’s clear the authors have built a very solid foundation for this theorem <ref:2606.28990#pg1>. It shows that the equivalence between no arbitrage and an equivalent martingale measure isn't just a theoretical statement; it can be checked rigorously in Lean four over Mathlib <ref:2606.28990#pg1>.

Warren: And the way they've structured it, moving from finite state to scalar one-period to multi-asset one-period, shows how the geometry of separating hyperplanes gives way to constructing an explicit minimizer for a smooth convex potential <ref:2606.28990#pg1>.

Iris: The authors explicitly state that this construction uses no Hahn–Banach theorem, no L zero-closedness argument, no measurable selection, and no non-redundancy hypothesis <ref:2606.28990#pg3>, which is a strong statement about the independence of their approach.

Ruth: That really speaks to the power of formalization here; they aren't relying on those extra tools to prove the core equivalence in this way, which is what makes it feel more complete for checking <ref:2606.28990#pg1>.

Warren: So, what does this mean for us in practice? It means that when we look at these simpler market structures—the finite horizon or one-period models—we have a machine that can verify the no-arbitrage condition against the existence of a martingale measure <ref:2606.28990#pg3>.

Iris: The implications are that this formalization provides a very concrete way to check whether the expected discounted gain of any position vanishes under measure Q, which directly relates to whether a position is an arbitrage opportunity <ref:2606.28990#pg3>.

Ruth: It's about building trust in these foundational concepts by subjecting them to this level of computational scrutiny using Lean four <ref:2606.28990#pg1>.

Warren: And for the multi-asset case, it gives us a specific formula—the minimizer of the expected softplus—to look at when we want to confirm if a market is free of arbitrage <ref:2606.28990#pg1>.

Conclusion: Ruth: So, we're wrapping up this look at the paper "The Fundamental Theorem of Asset Pricing, Formalized in Lean four." It really boils down to showing that when you check the no-arbitrage condition against an equivalent martingale measure, it always works across these three different market setups.

Warren: Right. It’s not just a theoretical statement anymore; they built a machine in Lean four to verify that for each case—finite state, one period scalar, and multi-asset one period—the no-arbitrage condition is exactly equivalent to finding that martingale measure.

Iris: What I'm seeing is the rigor of the proof structure. They’re not just stating something; they’re doing a formal check on how those geometric separations or those minimizers actually work in practice within the computer system.

Ruth: The authors, Coelho and others, really pushed this into a computational setting. It takes you from abstract economics to something that can be machine-checked for consistency.

Warren: And what it changes for us is the confidence we have in these foundational theorems when we try to apply them to actual trading or pricing models. If the math holds up under this formal scrutiny, then our assumptions about market fairness get a much stronger backing.

Iris: It shifts the focus from "does this theorem hold?" to "how do I check if my specific model fits into one of these three verified structures?" that’s a big change for econometricians.

Ruth: Exactly. The real implication is that we can use these formal tools to stress-test market theories much more thoroughly than just running simulations.

Warren: It sets a high bar for what we expect from the next level of formal verification in quantitative finance. And it opens the door to looking at those multi-period markets, which they left as an open problem.

More episodes

← Home