Sensitivity ConjectureResearch Paper
Nearly every measure of Boolean function complexity was known to be equivalent — except sensitivity. Proving the conjecture unified the whole picture.
Nearly every measure of Boolean function complexity was known to be equivalent — except sensitivity. Proving the conjecture unified the whole picture.
This mission records the proved extension of the sharp diagonal Hlawka constant to every real , for arbitrary complex vectors in every finite dimension. It uses the unchanged definitions from the foundation mission.
The cutoff-6 goal theorem is already proved, with no open dependencies. Its conclusion gives both the Hlawka inequality and optimality of the cyclic constant. Sixty-five verified interval proofs cover and join the proved cutoff-8 result.
This is an entry in the sharp diagonal Hlawka campaign. The value 6 is a proved sufficient cutoff, without a claim that it is optimal.
This mission records the proved extension of the sharp diagonal Hlawka constant to every real , for arbitrary complex vectors in every finite dimension. It uses the unchanged definitions from the foundation mission.
The cutoff-8 goal theorem is already proved. Its conclusion gives both the Hlawka inequality and optimality of the cyclic constant. Thirty-two verified interval proofs cover and join the proved cutoff-12 result.
This is an entry in the sharp diagonal Hlawka campaign. The value 8 is a proved sufficient cutoff, without a claim that it is optimal.
This proposal supersedes the published mission Bitcoin Block Validation Composed (definition BitcoinBlock, 19 theorems). A line-by-line source review of that definition against the pinned revision found one transcription error: the transaction sigop cost added, for every non-P2SH spent output, the accurate sigop count of that output's script, whereas GetP2SHSigOpCount counts only redeem scripts of P2SH spent outputs. A plain P2PKH spend therefore cost 8 weight units instead of 4, so the model could reject a block Core accepts near the 80,000 limit, never the converse. The corrected p2shSigOpCount is the only change to the definition; all nineteen theorem statements are unchanged and their proofs re-check as they were. The review, the probe that exposed the error, and 35 sigop vectors with hand-derived expectations are in the repository (REVIEW_SPOT11.md, tests/SigOpVectors.lean).
Every component mission transcribed one layer of Bitcoin Core's validation: the subsidy schedule, compact targets and retargeting, the merkle root, the ledger accounting, median time past and the header rules, the activation heights and flag exceptions, serialization and hashing, the Script interpreter, the signature layer, the SegWit and Taproot dispatch. None of them is a consensus rule on its own. The rule is the way AcceptBlockHeader, CheckBlock, ContextualCheckBlock and ConnectBlock combine them — in which order the tests run, which ledger each transaction sees, where the fees and sigop costs accumulate, what the clock may reject, which historical blocks are exempt, and what state results. This mission writes that composition down, as the executable of the umbrella contract, states the declarative and independently, and proves the two contract theorems. (validation.cpp, tx_verify.cpp, chainparams.cpp)
A chain state is the list of validated headers from the genesis to the tip together with the UTXO set (a ledger of coins: output, creation height, coinbase flag). The genesis state holds the genesis header and an empty ledger, as the source never adds the genesis coinbase. A candidate block is offered with the local clock ; the outcome is accept S' undo, invalid, futureTime (BLOCK_TIME_FUTURE, a temporary rejection) or missingPrev (the block does not build on the tip).
Header path (AcceptBlockHeader): proof of work, the parent lookup, then ContextualCheckBlockHeader in source order — nBits against GetNextWorkRequired (the period's first block supplied from the chain), the median-time-past floor, the two-hour ceiling against the clock, the BIP34/66/65 version floors. CheckBlock: merkle root and mutation, size and count limits, exactly one coinbase first, CheckTransaction for every transaction, the legacy sigop bound. ContextualCheckBlock: IsFinalTx against the lock-time cutoff (median time past once CSV is active), the BIP34 height push in the coinbase, CheckWitnessMalleation (the commitment in the last qualifying coinbase output, the 32-byte nonce, or no witness at all), the weight limit. ConnectBlock: the genesis shortcut, the BIP30 scan with IsBIP30Repeat and the BIP34 shortcut, GetBlockScriptFlags with the two exception blocks, and the loop — CheckTxInputs, the fee range, SequenceLocks, GetTransactionSigOpCost against 80,000, CheckInputScripts through the complete VerifyScript (Taproot branch included), UpdateCoins — then the coinbase bound against GetBlockSubsidy. DisconnectBlock spends the block's outputs back and restores the inputs from the undo data in reverse, with the clean flag and the two unspendable-coinbase exceptions.
Every layer below is the published mission's function: coreSubsidy, nextWorkRequired, checkProofOfWork, computeMerkleRoot, medianTimePast, versionOutdated, blockScriptFlags, lockTimeFlags, sequenceLocks, verifyScriptFull. Nothing is re-transcribed.
is a predicate, not a program: a header predicate in the PoW mission's specTarget form with the parent, difficulty, time floor, clock ceiling and version floors; a block predicate; a contextual predicate; and a ledger predicate that quantifies over the transactions in sequence — each spends existing, mature coins of valid value, the inputs cover the outputs, the BIP68 specification satisfiesBIP68 holds, every input script verifies, the fees and sigop costs stay within their bounds, BIP30 freshness holds where the scan applies, and the coinbase is bounded by the fees plus the specification subsidy. extends the headers and folds UpdateCoins over the transactions.
genesis_checkBlock): the mainnet genesis block passes CheckBlock, by kernel evaluation.acceptHeader_iff), time classification (futureTime_iff, validate_clock, futureTime_transient): the future-time rejection is exactly characterized, transient, and the only clock dependence.checkTransaction_iff, checkBlock_iff, contextualCheck_iff, checkTxInputs_iff, sequenceLocks_iff, connectLoop_iff, connectBlock_iff): each Boolean stage equals its predicate, the BIP68 one through the published fold_acceptance.bip30_history): exactly when the BIP30 scan is skipped.connectBlock_apply, apply_spec, reachable_wellFormed, work_increases): the resulting ledger is the fold, reachable states are well formed, chain work strictly increases.disconnect_connect): the undo data restores the previous ledger, cleanly.acceptance): .With the component missions, the umbrella's two contract theorems are now Lean theorems about a concrete, source-linked rendering of the pinned mainnet rules, with no parameter left abstract: hashes are SHA-256d, signatures are secp256k1 ECDSA and BIP340 Schnorr, scripts run through the full interpreter, and the historical exceptions are the source's. The definitions were exercised on the real chain: the genesis block, blocks 1–170 as the header chain, and block 170 — the first transaction between two users — validates end to end against the ledger holding block 9's coinbase, is rejected when its signature is altered or the spent coinbase is immature, is classified futureTime at an early clock, and disconnects back to the original ledger cleanly.
What remains outside: the proof-of-work hardness and signature unforgeability (computational assumptions, not functional correctness), the on-disk and networking layers, and a reorganization across multiple blocks, which is the disconnect theorem applied in sequence.
The loop breaks at the first failing transaction and threads four accumulators; its characterization needs the fee total and sigop cost to be non-negative so that running-range tests collapse to the final bound, which in turn needs the block predicate's non-negative outputs — the hypotheses on connectLoop_iff and connectBlock_iff. CheckTxInputs uses nSpendHeight - coin.nHeight with natural subtraction, which happens to agree with the specification form for every coin height. The future-time test sits in the middle of the header chain, so classifying it requires the four earlier tests to pass. DisconnectBlock restores inputs in reverse and spends outputs by exact match, so the identity needs the txids distinct, the outputs fresh and every ledger coin spendable with a positive height — which is where reachability and the BIP30 scan enter.
Policy is off; fJustCheck is false; assumed-valid shortcuts are not modeled (scripts are always checked). The chain is linear: a header whose parent is not the tip is the missingPrev outcome, as BLOCK_MISSING_PREV is not a validity verdict. Block hashes and byte orders are those of the serialization mission. No Mathlib is required; the development imports only Std.
validation.cpp, consensus/tx_verify.cpp, consensus/tx_check.cpp, coins.cpp, kernel/chainparams.cpp at revision a773e1e33b349dc819b5a0edc1c7a4839dc73b48. SourceFor a real cutoff , consider the weighted prime sum , where ranges over primes and is the natural logarithm. Mertens' first theorem says that this sum differs from by a bounded amount. This mission asks for the explicit bound over the entire stated range.
The open statements also concern the logarithm of a factorial, finite sums of , and the von Mangoldt function , which equals at positive prime powers and zero elsewhere. Chebyshev's functions and record the corresponding accumulated logarithmic weights. These objects provide explicit control of prime sums used in analytic number theory and sieve estimates. Exact constants and endpoint ranges matter when such estimates feed into quantitative results about almost primes, integers with few prime factors.
The source context is P. J. Campbell, A Sharper Explicit Result for the Sum of Two Almost Primes, Section 4. The lab identifies the classical background as Rosser and Schoenfeld, Approximate formulas for some functions of prime numbers, Illinois Journal of Mathematics 6, 1962, especially p. 70, with factorial identities also attributed to Ingham and Montgomery and Vaughan. These are lab formulations of classical material, rather than a claim that every displayed leaf is printed verbatim in Campbell.
The statements come from an AI-run Lean lab. Drafts undergo human audit before submission to the public platform; this draft is prepared for that audit. The mission contains eleven open leaves and one assembly goal, using only Mathlib objects. No new mathematical result is claimed, and Goldbach's conjecture remains open.
This mission concerns an explicit first moment estimate for representations by two odd primes. For a real parameter , the weighted count assigns weight to prime pairs with and . The comparison term is . The moving interval sum records the logarithmic weights of admissible primes at a given integration parameter.
The target is for , conditional on two explicit inputs: a Chebyshev theta error estimate above and a preliminary prime pair integral approximation valid throughout the target range. The individual tasks specify exact identities, integrability assertions, and numerical error estimates. Each hypothesis and constant is retained from the lab file. The assembly statement is included as the mission goal even though its assembly proof already exists in the lab; the ten leaves remain open.
The source is R. C. Vaughan, On the estimation of Schnirelman's constant, Journal für die reine und angewandte Mathematik 290, 1977, pages 93 to 108, specifically page 103 in the proof of Lemma 11. Such explicit estimates support bounds for expressing integers as sums of a bounded number of primes. Binary Goldbach remains open.
These statements come from an AI-run Lean lab, with AI-written Lean code, and were audited by a human before submission. This is a draft for the platform's human audit before submission; it supplies no new proofs.
Linnik's approximation to Goldbach's problem says every large even number is a sum of two primes and a bounded number of powers of two. Pintz and Ruzsa, On Linnik's approximation to Goldbach's problem, I, Acta Arith. 109 (2003), 169-194, prove under GRH and need sharp control of the exponential sum over powers of two, .
This mission formalizes the large deviation estimate behind their Corollary 1 of Section 7: the set of where has measure at most , where and . The constant of their Lemma 4 is replaced by the weaker , which loses only a polynomial factor in .
The milestones are the steps of the argument: an exponential Chebyshev inequality, a truncated even exponential series, the middle binomial term comparison of moments of and , , nonnegativity of the moments of , and the even partial sums of the exponential moment.
The statements come from an AI-run Lean 4 formalization lab working on Goldbach-type results, where they are open leaves; a human audited each statement against the paper before submission.
This single substantial mission combines the mathematical work formerly scheduled as FD-06, FD-07 and FD-08 in the Financial Derivatives programme. It develops the heat equation, Gaussian diffusion kernels, the analytic Black–Scholes European call/put formulas and their sensitivities, followed by continuous dividends, forwards and deterministic time-varying short rates, dividend yields and total volatility.
Primary source: Wilmott, Howison and Dewynne, The Mathematics of Financial Derivatives (1995), Chapter 4 (printed pp. 58–70), Chapter 5 (pp. 71–89) and Chapter 6 (pp. 90–105); European-option context in Chapter 3. DOI: https://doi.org/10.1017/CBO9780511812545. This is a rigorous mathematical extension of the source's pedagogical derivations, not a claim that every named Lean theorem appears verbatim.
Let S>0 and K>0 be spot and strike. For a pricing time t<T and deterministic short rate r(u), dividend yield q(u), and volatility σ(u), define R=∫_t^T r(u)du, Q=∫_t^T q(u)du, and V=∫_t^T σ(u)^2du. Work first with scalar cumulative inputs R,Q,V and V>0, later prove that the deterministic integrals instantiate them. Let Z have the standard normal probability law. Independently define the call and put prices as the discounted Gaussian integrals of max(S exp(R-Q-V/2+sqrt(V) Z)-K,0) and max(K-S exp(R-Q-V/2+sqrt(V) Z),0).
With Φ the standard normal CDF, d1=[log(S/K)+R-Q+V/2]/sqrt(V) and d2=d1-sqrt(V), the main theorem derives, rather than assumes,
C=S exp(-Q) Φ(d1)-K exp(-R) Φ(d2), P=K exp(-R) Φ(-d2)-S exp(-Q) Φ(-d1), C-P=S exp(-Q)-K exp(-R).
The root is an analytic lognormal Gaussian-valuation theorem. A continuous-time risk-neutral pricing or self-financing replication theorem must only be asserted after a genuinely verified Brownian/Itô/self-financing development exists.
For future consistency with the book, the principal formulas are displayed explicitly:
The definitions of Gaussian expectation, analytical call/put closed forms and deterministic carry are different declarations. In particular the source of the expected terminal payoff does not contain the final closed formula.
Define the Gaussian density, normalized heat kernel and heat-flow convolution. Prove positivity, Gaussian normalization, convolution semigroup, preservation of constants, convergence to prescribed initial data, and a classical heat equation for appropriately regular/bounded data. Treat the Black–Scholes-to-heat-equation logarithmic/similarity substitution with explicit hypotheses on time, spot, regularity, and transformed boundaries. Do not assert uniqueness without a legitimate growth or boundary class. These results are independently reusable for PDE and diffusion work.
Prove Gaussian CDF symmetry and limits, Gaussian moment-generating and exponential-tilting identities, tail integrals, actual Gaussian payoff integrability, exact call and put expectation-to-closed-form formulae, put-call parity and nonnegative price bounds. Prove strike monotonicity and analytically justified Delta and Gamma formulas; add Vega, digital options, Rho and Theta as further milestones only with the required parameter/regularity assumptions. Identify the relationship with the constant-coefficient Black–Scholes PDE and its true expiry condition.
Develop interval-integrated r, q and σ², their additivity and positivity, continuous-dividend forward F(t,T)=S exp(R-Q), prepaid-forward identity, generalised parity, zero-yield and constant-parameter reductions. Derive the nonautonomous European PDE only when the coefficient functions have the differentiability needed for time derivatives and the remaining integrated variance is positive. Prove terminal payoff convergence, including S=K and degenerate integrated variance, as a separately guarded limit theorem. Discrete cash dividends, stochastic rates and volatility, American early exercise and path-dependent barriers are outside this root.
The three workstreams connect through the Gaussian integral and PDE transform:
The call/put integral equals the closed form only after the preceding Gaussian tilt and tail-probability lemmas have been proved.
As motivated by Wilmott, Howison and Dewynne (1995), this provides a reusable analytic foundation for the remaining financial derivatives programme, including later American options, parabolic PDE solvers, barrier first-passage problems and diffusion limits. The mission is longer than its predecessors but retains a single main theorem with several independent mathematical support branches. Its core price equalities hold for a parameter set that includes negative rates and nonzero dividends, with no artificial restriction to a positive bank-account interest rate. The heat-kernel lemmas remain useful even outside financial applications. The mission distinguishes continuous-time analytic valuation from the earlier finite-binomial prices and does not assert their limit is established until proved separately.
The largest proof challenges are Gaussian exponential tilting of truncated tails, differentiating the normal distribution function in a formal library, a heat-flow semigroup and regularity argument, and the inhomogeneous Black–Scholes PDE under changing coefficients. These must be genuine intermediate theorems, not definitions rephrasing the desired conclusion. Even proving the Gaussian payoff integrable requires controlling an exponential of a Gaussian. Heat-flow continuity and differentiation under the integral need appropriate domination and function-space assumptions; uniqueness requires a valid growth condition. A complete proof may require substantial new Mathlib support. Divide difficult analytic equalities into reusable finite lemmas without generating hundreds of nearly identical trivial statements.
Maintain one mission with reusable, small theorem statements, split into heat-kernel, Gaussian valuation and deterministic coefficient branches. The root depends on nontrivial Gaussian tail/integral proofs plus CDF symmetry; the term-structure branch specializes the integrated inputs, and the PDE branch relates the heat equation to the pricing operator. Reuse FD-01 to FD-05 only where their authoritative proved definitions and theorems genuinely apply; FD-05 remains a discrete-binomial construction and is not a substitute for the missing stochastic continuous-time foundations. All draft sources require pinned Mathlib and server-side Lean compiler checks. No unverified statement is Proved, and no required equality may be smuggled in as a hypothesis.
Edge cases: S,K>0, V>0 for closed-form d1,d2, nonnegative variance on t≤T, rates and dividends of either sign, t=T handled by a terminal limit, zero dividends, constant coefficients and call/put consistency. Keeping a single root does not mean one theorem must contain every independent PDE and Greek statement.
The first proof layer treats a purely analytic standard Gaussian random variable and the associated Bochner integrals. The second layer proves the explicit payoffs, parity and sensitivities. The third layer connects the integrated parameters to actual real interval integrals of coefficient functions. The heat-flow layer establishes diffusion identities and the constant-coefficient similarity correspondence. An advanced separate layer addresses the nonautonomous PDE and uniqueness if its needed hypotheses can be fully stated.
A candidate is complete only after Prove2Me returns a verified remote verdict for the exact theorem and revision. Existing FD-01 through FD-04 theorem results are reported as Proved in their reviewed proposals; FD-05 is in review; all FD-06 statements remain draft and unverified. Newly entered draft statements may initially contain declaration-level placeholders for authoring, but these are never submitted as proof candidates, published as Proved or used as proof dependencies. The main theorem must not include assumptions asserting either the call or put equality it is intended to establish.
Wilmott, Howison and Dewynne, The Mathematics of Financial Derivatives: A Student Introduction (1995), Chapter 12, pp. 206–212 (https://doi.org/10.1017/CBO9780511812545.013), examine knock-out and knock-in options, barrier conditions and rebates. This fifth Financial Derivatives mission establishes rigorous finite-binomial first-hit valuation identities supporting those contracts. It continues FD-01 finite state-price restrictions, FD-02 one-period replication, FD-03 full-tree European valuation and FD-04's payoff-level barrier complementarity.
The source's distinctive explicit formulae use continuously monitored Black–Scholes diffusions. The current finite-maturity mission is a derived discrete counterpart, and does not claim to prove those continuous-time formulae. That separate mathematical task will require the Black–Scholes PDE and first-passage/reflection foundations.
Fix the FD-03 strictly arbitrage-free binomial market with initial price , stock multipliers and bank-account growth . Write for the risk-neutral up weight. A full path consists of up/down observations, and is the stock price after the first moves.
A monitoring schedule specifies whether inception and maturity are observed. For upper level , touch means at a monitored date. Define to be the first observed touch and if none occurs. Lower barriers use . Equality is a touch. Discrete observation does not infer a hit between monitoring times.
For any terminal reward , set
Both settle at maturity. The financial model has no dividends, transaction costs or rebate unless one is specified.
Construct an absorbing dynamic value independently from the FD-03 terminal-payoff valuation. It is zero at an already knocked-out node, equals the terminal reward at alive maturity, and otherwise obeys the one-period risk-neutral recursion
The root proves that this recursion equals the FD-03 \europeanValue\ of the path-sensitive knock-out payoff tree and the discounted finite-path expectation
It also establishes the genuine price-level complementary identity
The proof derives these from tree induction, price additivity and a correctly constructed first-hit event. Neither the required price equality nor an equivalent martingale/absorbing property may be embedded as an assumption or definition.
A fixed cash rebate payable at the first hitting date has initial value
This is proved by a terminal-equivalent payoff on hit paths, so the existing terminal-claim pricing machinery can be reused. A rebate payable at expiry instead has value . A rebated knock-out value decomposes into the zero-rebate knock-out value plus the appropriate rebate claim. The two payment conventions are separate theorem targets.
The lower-level targets establish chronological path representation, positive stock evolution, agreement with FD-03's full terminal tree, upper and lower touch predicates, existence and minimality of the earliest monitored hit, and monotonicity of hit events under barrier and monitoring changes.
The valuation branch establishes the full-path knock-in/out payoff trees, their sum as the vanilla tree, the three absorbing recursion cases, the induction identifying absorbing and European values, and a finite-product-probability path-sum identity.
The price-order branch proves nonnegativity and vanilla upper bounds for nonnegative rewards, increasing knock-out value as an upper barrier is raised, and decreasing knock-out value as monitored dates are added. Knock-in comparisons follow by complementarity. Signed rewards remain admissible for linear equalities, but are never used to assert these order bounds.
The rebate branch establishes first-hit terminal equivalence, discounting at the actual hitting date, the distinct expiry-paid rebate, a rebated-price decomposition, and a lower-barrier version. A separate optional advanced branch studies a weighted reflection/counting result under reciprocal up/down multipliers and a lattice-aligned barrier. It must prove the weight correction for and is not a hypothesis of the general root.
The mission turns elementary contract triggers into constructive arbitrage-free values under a complete, finite stock market. It supplies reusable first-hit and absorbing-state pricing tools for later path-dependent, American-barrier and diffusion-limit missions. Its capstone is a rigorous theorem for arbitrary observed schedules and payoffs, with explicit assumptions and an honest separation from continuous monitoring. The source's continuous barrier equations and their future extension are described in the Cambridge chapter.
The genuinely nontrivial component is identifying first-hit information across all paths of a recombining stock tree. Different histories with the same current stock can have different activation status. The value recursion must carry that status and its monitoring schedule, and the definition of its output cannot assume equality with the price of the terminal claim. The finite weighted path measure and tree recursion must agree without imposing the capstone identity as a hypothesis.
The root must quantify over an arbitrary finite horizon, explicit monitoring schedule, initial spot and payoff function. The full path must remain available: histories that recombine at the same terminal stock may have different earlier barrier hits.
Important edge cases are , no monitoring, monitoring at inception, exact barrier equality, ties, the first hit at expiry, no hit, signed rewards, , and rebates paid either upon hit or at expiry. Stock is positive throughout because . A standard knock-out does not reactivate after a hit.
Reuse published and pinned FD-03/FD-04 definitions once their current proposal reviews permit imports. An In review proposal is not proof acceptance. Do not execute Lean locally or treat a new Draft theorem as proved. The core milestone graph should use actual proof imports and remain useful independently of the optional reflection branch.
A binomial option-pricing model is more than a numerical approximation: it is a finite complete market in which prices can be derived recursively from self-financing replication. At each node, the one-period stock-and-bank market fixes the value of the two possible continuation payments. Repeating this calculation yields the unique European replication price. When an option can be exercised early, the holder instead chooses between its immediate payment and continued exposure to the market. This creates a finite optimal-stopping problem whose value is determined by the Snell recursion.
This mission builds on Financial Derivatives I (payoff geometry, portfolios and put–call parity) and Financial Derivatives II (two-state arbitrage, unique replication and risk-neutral valuation). It proves the multi-period European and American/Bermudan results without introducing an unproved continuous-time stochastic integral or Black–Scholes formula.
The primary source is Paul Wilmott, Sam Howison and Jeff Dewynne, The Mathematics of Financial Derivatives (1995), Chapter 10, printed pp. 180–194. The European valuation is equation (10.16), printed p. 188; the American exercise recursion is equation (10.17), printed p. 191. The stock tree and related risk-neutral conventions appear in §§10.1–10.3, and the European/American algorithms in Figures 10.4 and 10.7. The dynamic-replication, finite stopping-policy and seller-superhedging equivalences below are rigorous extensions of the source's calculations, not verbatim propositions from the book. DOI.
Fix a finite number of periods ; an initial stock price ; constant up, down and bank-growth multipliers satisfying
The stock is dividend-free, with one-period outcomes and when its current value is . A current bank deposit becomes next period. Fractions, short stock positions and bank borrowing are allowed. There are no transaction costs or position constraints. The stronger assumption is important in a multi-period market: it keeps the stock strictly positive at every descendant node, so the FD-II two-state replication theorem is applicable everywhere.
The unique positive risk-neutral up and down weights are
These weights price next-period cashflows. They are derived from the stock and bank prices, and are not assertions about real-world stock-move frequencies. For next-period values , define
At current stock price , a one-period replicating portfolio contains
so and next period's stock and bank holdings deliver the prescribed child values. FD-II provides the exact one-period no-arbitrage and uniqueness justifications; this mission must prove that the assembled strategy remains self-financing across all dates and histories.
Model all terminal histories by a full binary payoff tree, allowing any signed and path-dependent payoff. At maturity the claim value equals its terminal payment . At earlier nodes the recursion is
Prove that this value equals the discounted sum of terminal payments under the product risk-neutral weights. Prove its linearity and monotonicity. Recursively construct an adapted stock/bank strategy that matches the continuation values at each child and rebalances without cash injection. Show that it replicates every terminal history and has the only possible initial cost. A European claim introduced as a separately traded security preserves no-arbitrage exactly when its quote equals that cost.
When the terminal payoff depends only on the final stock price, all histories with the same up count share a value. At time and after up moves,
Prove that the efficient -node recombining algorithm implements the same backward recursion as the full tree:
For path-dependent contracts, retaining the distinct histories is necessary. Recombining solely on the stock level would lose contractual information and is not asserted in that generality.
An exercise-reward tree assigns a real immediate payment at each node and records whether exercise is permitted there. Maturity exercise is mandatory; intermediate exercise is available at every date for an American contract and only at selected dates for a Bermudan contract. A stopping policy must use only the history known at the current node: it can stop when permitted or specify separate future decisions for the two child states.
At maturity the exercise value equals . At earlier nodes, let be the continuation value. The Snell recursion is
Prove, by finite backward induction, that every admissible stopping policy has discounted value no greater than , and construct a policy attaining by comparing exercise with continuation at each node. Thus is the finite optimal-stopping value, including ties, and allowing more exercise dates cannot decrease the holder's value. In particular, an American option with the same maturity payoff is worth at least its European counterpart.
As an independent financial theorem, construct a seller's adapted self-financing superhedge starting with the Snell value, and prove that no lower initial capital covers the payment for every admissible holder exercise policy. The holder's stopping policy is distinct from the writer's stock/bank trading strategy. For a put with immediate payment , the resulting recursion is the book's American-put algorithm. It also applies to calls, arbitrary finite exercise sets and signed rewards under the stated maturity convention.
The capstone, provisionally FinancialDerivatives.FD03.finiteBinomial_pricing_and_optimal_exercise, combines four genuinely proved statements:
The proof graph proceeds through market and stock positivity, one-step valuation, full-tree algebra, finite path sums, local hedge replication, recursive self-financing, recombining rows, exercise-policy upper bounds and attainment, and seller superhedging. Every parent must use the relevant actual accepted helpers, with no capstone conclusion packed into a definition or assumed as a hypothesis.
The time horizon may be zero, rates may be zero or negative as long as , and European claims may have negative payments. Stock positivity throughout the tree requires . At exercise-continuation ties either admissible decision is optimal. Strong no-arbitrage excludes and . Statements about American calls never being exercised early need separate dividend and interest assumptions and are not made unconditionally here.
Chapter 10's dividend-yield adjustments (§10.6, pp. 191–193) require distinguishing ex-dividend stock growth from total shareholder return; they are reserved for an explicit bridge to FD-08. CRR-to-Black–Scholes convergence is a separate advanced branch requiring precise asymptotics and a continuous-time pricing foundation. The book's numerical comparisons alone do not establish that theorem. The chapter's exercise connecting binomial and finite-difference methods is allocated to the later numerical-analysis missions.
The mission will reuse published, verified Prove2Me and pinned-Mathlib statements. Its natural-language descriptions, Lean declarations, source ledger, milestone ordering and independent read-backs will be audited before the owner confirms and submits a Draft. A Draft or a locally prepared Lean snippet is not evidence that a definition compiles or a theorem has been proved.
Every component mission transcribed one layer of Bitcoin Core's validation: the subsidy schedule, compact targets and retargeting, the merkle root, the ledger accounting, median time past and the header rules, the activation heights and flag exceptions, serialization and hashing, the Script interpreter, the signature layer, the SegWit and Taproot dispatch. None of them is a consensus rule on its own. The rule is the way AcceptBlockHeader, CheckBlock, ContextualCheckBlock and ConnectBlock combine them — in which order the tests run, which ledger each transaction sees, where the fees and sigop costs accumulate, what the clock may reject, which historical blocks are exempt, and what state results. This mission writes that composition down, as the executable of the umbrella contract, states the declarative and independently, and proves the two contract theorems. (validation.cpp, tx_verify.cpp, chainparams.cpp)
A chain state is the list of validated headers from the genesis to the tip together with the UTXO set (a ledger of coins: output, creation height, coinbase flag). The genesis state holds the genesis header and an empty ledger, as the source never adds the genesis coinbase. A candidate block is offered with the local clock ; the outcome is accept S' undo, invalid, futureTime (BLOCK_TIME_FUTURE, a temporary rejection) or missingPrev (the block does not build on the tip).
Header path (AcceptBlockHeader): proof of work, the parent lookup, then ContextualCheckBlockHeader in source order — nBits against GetNextWorkRequired (the period's first block supplied from the chain), the median-time-past floor, the two-hour ceiling against the clock, the BIP34/66/65 version floors. CheckBlock: merkle root and mutation, size and count limits, exactly one coinbase first, CheckTransaction for every transaction, the legacy sigop bound. ContextualCheckBlock: IsFinalTx against the lock-time cutoff (median time past once CSV is active), the BIP34 height push in the coinbase, CheckWitnessMalleation (the commitment in the last qualifying coinbase output, the 32-byte nonce, or no witness at all), the weight limit. ConnectBlock: the genesis shortcut, the BIP30 scan with IsBIP30Repeat and the BIP34 shortcut, GetBlockScriptFlags with the two exception blocks, and the loop — CheckTxInputs, the fee range, SequenceLocks, GetTransactionSigOpCost against 80,000, CheckInputScripts through the complete VerifyScript (Taproot branch included), UpdateCoins — then the coinbase bound against GetBlockSubsidy. DisconnectBlock spends the block's outputs back and restores the inputs from the undo data in reverse, with the clean flag and the two unspendable-coinbase exceptions.
Every layer below is the published mission's function: coreSubsidy, nextWorkRequired, checkProofOfWork, computeMerkleRoot, medianTimePast, versionOutdated, blockScriptFlags, lockTimeFlags, sequenceLocks, verifyScriptFull. Nothing is re-transcribed.
is a predicate, not a program: a header predicate in the PoW mission's specTarget form with the parent, difficulty, time floor, clock ceiling and version floors; a block predicate; a contextual predicate; and a ledger predicate that quantifies over the transactions in sequence — each spends existing, mature coins of valid value, the inputs cover the outputs, the BIP68 specification satisfiesBIP68 holds, every input script verifies, the fees and sigop costs stay within their bounds, BIP30 freshness holds where the scan applies, and the coinbase is bounded by the fees plus the specification subsidy. extends the headers and folds UpdateCoins over the transactions.
genesis_checkBlock): the mainnet genesis block passes CheckBlock, by kernel evaluation.acceptHeader_iff), time classification (futureTime_iff, validate_clock, futureTime_transient): the future-time rejection is exactly characterized, transient, and the only clock dependence.checkTransaction_iff, checkBlock_iff, contextualCheck_iff, checkTxInputs_iff, sequenceLocks_iff, connectLoop_iff, connectBlock_iff): each Boolean stage equals its predicate, the BIP68 one through the published fold_acceptance.bip30_history): exactly when the BIP30 scan is skipped.connectBlock_apply, apply_spec, reachable_wellFormed, work_increases): the resulting ledger is the fold, reachable states are well formed, chain work strictly increases.disconnect_connect): the undo data restores the previous ledger, cleanly.acceptance): .With the component missions, the umbrella's two contract theorems are now Lean theorems about a concrete, source-linked rendering of the pinned mainnet rules, with no parameter left abstract: hashes are SHA-256d, signatures are secp256k1 ECDSA and BIP340 Schnorr, scripts run through the full interpreter, and the historical exceptions are the source's. The definitions were exercised on the real chain: the genesis block, blocks 1–170 as the header chain, and block 170 — the first transaction between two users — validates end to end against the ledger holding block 9's coinbase, is rejected when its signature is altered or the spent coinbase is immature, is classified futureTime at an early clock, and disconnects back to the original ledger cleanly.
What remains outside: the proof-of-work hardness and signature unforgeability (computational assumptions, not functional correctness), the on-disk and networking layers, and a reorganization across multiple blocks, which is the disconnect theorem applied in sequence.
The loop breaks at the first failing transaction and threads four accumulators; its characterization needs the fee total and sigop cost to be non-negative so that running-range tests collapse to the final bound, which in turn needs the block predicate's non-negative outputs — the hypotheses on connectLoop_iff and connectBlock_iff. CheckTxInputs uses nSpendHeight - coin.nHeight with natural subtraction, which happens to agree with the specification form for every coin height. The future-time test sits in the middle of the header chain, so classifying it requires the four earlier tests to pass. DisconnectBlock restores inputs in reverse and spends outputs by exact match, so the identity needs the txids distinct, the outputs fresh and every ledger coin spendable with a positive height — which is where reachability and the BIP30 scan enter.
Policy is off; fJustCheck is false; assumed-valid shortcuts are not modeled (scripts are always checked). The chain is linear: a header whose parent is not the tip is the missingPrev outcome, as BLOCK_MISSING_PREV is not a validity verdict. Block hashes and byte orders are those of the serialization mission. No Mathlib is required; the development imports only Std.
validation.cpp, consensus/tx_verify.cpp, consensus/tx_check.cpp, coins.cpp, kernel/chainparams.cpp at revision a773e1e33b349dc819b5a0edc1c7a4839dc73b48. SourceUK defined benefit pensions may combine salary-related benefits, guaranteed minimum pensions (GMP), underpins, different increase promises, survivor entitlements and payment guarantees. Applying a minimum at retirement can produce different payments from applying it to each later instalment. Likewise, a guarantee payable to an estate cannot automatically extinguish a legally protected survivor benefit. These distinctions affect the expected present value and administration of a scheme's promises. Standard life-contingency methods are developed by Dickson, Hardy and Waters (2020), https://doi.org/10.1017/9781108784184, and Promislow (2015), https://www.wiley.com/en-us/Fundamentals+of+Actuarial+Mathematics%2C+3rd+Edition-p-9781118782460.
The main contract has a finite horizon of calendar-month instalments indexed by . A valid date mapping supplies each instalment's actual Gregorian date. Consecutive mapped dates must follow the next calendar month, using a fixed original payment-day anchor and clamping that day at month end when necessary. A member's actual date of death is represented separately for each mortality scenario, within the interval after their last alive instalment and before the next scheduled instalment.
A finite joint scenario law , with , indexes award information , the member's final alive period , and the survivor's final alive period . The horizon terminal state represents survival to the horizon. No independence among these variables is assumed. A payment due at date has discount factor , and the expected present value is
The first ordinary pension tranche offers award-date amounts and . An automatic award-date underpin fixes and retains the selected alternative's own subsequent increase schedule and linked survivor entitlement. A payment-date floor, , is a different promise because it may switch the winning alternative later. A second tranche has a separate increase schedule. Monthly amounts and weekly statutory rates use explicitly different units.
For ordinary non-GMP benefits, a scheduled annual limited price indexation rate with floor and cap , , is , where is the relevant price index movement. In this illustrative contract, a first scheduled increase within a year of retirement uses the complete-month fraction of the capped annual rate. Later increases occur on scheduled annual dates. Statutory and contractual rounding, index lookbacks and component eligibility remain distinct.
Prove that for the same joint law, with a strict example. Distinguish the exercise-date information available to a decision-maker from later mortality or inflation outcomes. Formalise floors, caps, compounding, separately scheduled first increases, and both member and survivor indexation paths.
The scheme's statutory pre-1988 GMP has no scheme increase under section 109 of the Pension Schemes Act 1993. Qualifying post-1988 GMP receives the full relevant increase on 6 April following the payable date, then on subsequent eligible 6 April dates, without ordinary first-increase pro-rating. Pre-commencement GMP revaluation is a different process. See sections 109–110: https://www.legislation.gov.uk/ukpga/1993/48/section/109.
For eligible cases under section 87(1) or 87(2), let be the weekly relevant sum, the GMP increase since cessation after the specifically applicable pre-1985 transfer-credit growth disregard, the appropriate addition and the later earnings addition. The conditional protected weekly aggregate is
The later earnings term applies only where the scheme provides qualifying post-cessation employment-related accrual under section 87(4)(d). Eligibility separately excludes employment left before 1 January 1985 and employment ceasing to be contracted-out before that date, as provided in section 87(7). For survivors, section 87(2) uses the prescribed half-member-GMP cessation baseline and the actual member death date. The relevant sum, statutory assumptions for the later earnings addition, dates, transfers and special-case entitlement are externally certified scheme/member inputs. The section 87(3)(a) complete-substitute case, sections 91–92 special circumstances and transitional provisions require separate assessment. See https://www.legislation.gov.uk/ukpga/1993/48/section/87.
A statutory survivor GMP entitlement uses a separately certified payable date no earlier than member death; annual 6 April increases are measured from that date. This entitlement is kept separate from the contractual survivor amount. The comparator with an estate guarantee can displace only scheme-permitted survivor amounts above the protected statutory floor. A positive top-up meets any higher applicable certified statutory minimum without adding the entire GMP a second time.
Pensions Act 1995 section 53 permits certain excess pension increases in one tax year to be credited towards specified statutory increases in the immediately following tax year, subject to eligibility and allocation restrictions. Pension-credit-attributable pensions are excluded by subsection (3A). Distinguish actual increments after certified credits from the full deemed statutory increase. A generic credit arithmetic definition does not determine statutory eligibility: https://www.legislation.gov.uk/ukpga/1995/26/section/53.
Establish finite joint-law cashflow valuation identities, member/survivor payment boundaries and the distinction between parallel estate-plus-survivor payments and a scheme-permitted replacement arrangement. Show that tranche-by-tranche floors can exceed an underpin applied to the aggregate pension.
Reconcile the scenario-by-scenario and separately assembled expected present values of a two-tranche monthly pension with option-linked survivor benefits, scheduled ordinary increases, statutory GMP protections and conditional section 87 floors. Prove that the original award exceeds either first-tranche award, both member and survivor payment-level minima are met and the difference between parallel and replacement guarantees equals only the contractually displaceable survivor surplus. The independent section 53 results are supporting work, rather than an assumed automatic offset within the integrated root.
The formalisation permits scheme rules and certified statutory inputs to be translated into explicit cashflows, with benefit eligibility, date boundaries and unit conversions inspectable. It also provides reusable finite-state valuation and option identities. The underlying life-contingent valuation identities are already established in Dickson, Hardy and Waters (2020). The combined contractual synthesis is an original derived formalisation target. Its present Lean theorem statements have no accepted machine-checked proofs and are not claimed to occur verbatim in those textbooks.
The maximum operator does not commute with expectation or with aggregation over heterogeneous benefit streams. Award-date decisions must respect their information sets. GMP dates and ordinary increase dates use different event rules; death may occur between payments. Where estate guarantees overlap survivor payments, the amount displaced depends on the precise pension promise and protection of statutory benefits. A simple interchange of finite sums proves a valuation reconciliation only after each contingent entitlement has been defined correctly.
The Lean development uses finite scenarios, nominal instalment amounts, explicit Gregorian dates, a monthly payment calendar, death-date intervals, deterministic increase schedules and certified legal inputs. Its finite two-life indicators and expectation arithmetic reuse the published Actuarial Mathematics CII definitions ActuarialJointD.alive, onlyY, mass and expect via small award-state, retirement and censoring adapters. These are imported from public CII modules at the matching pinned Mathlib revision; the adapted definitions are checked by a separate Lean compatibility proof before reliance in the integrated capstone. The section 87 protections model specified ordinary cases and exclude stated historical circumstances; they do not determine universal legal entitlement. Section 53 credits are a separate conditional component. Special statutory cases, GMP equalisation, conversions, insurer-specific administration and arbitrary exercise-time information are outside the integrated capstone. The finite identities do not require member and survivor independence. Five additional open F theorem targets extend the proved CII annuity and guarantee identities. They include bounded survivor-state equivalence and award-indexed and actual F survivor valuation identities. Their methods have compiled in a private exact-revision Lean check. Neither automatically establishes the integrated scheme promise, because death-fixed survivor amounts, scheduled increases and statutory minima require separate hypotheses. All principal theorem statements remain open proof obligations until independently accepted by the remote verifier.
The fourth mission in the financial-derivatives series follows the Cambridge chapter by Paul Wilmott, Sam Howison and Jeff Dewynne, The Mathematics of Financial Derivatives (1995), Chapter 11, Exotic and Path-dependent Options, printed pp. 197–205. In particular, §§11.2–11.4 introduce compound options (options on options), chooser options and barrier options. Chapter 12 gives the fuller treatment of barrier valuation; Chapters 13–15 develop more advanced path-dependent models. This mission establishes exact finite-market identities underpinning the Chapter 11 examples. Its capstone is a derived rigorous formulation of simple-chooser pricing, rather than a claim that the book states it in this formal notation.
The preceding FD-03 mission models a strictly arbitrage-free, dividend-free repeated binomial market as a full binary tree. FD-04 will reuse its definitions for market parameters, the stock tree, the European payoff tree and backward-induction valuation. As of 27 October 2026, FD-03 is in review and its definitions have not yet been confirmed as publicly importable. The corresponding paper mathematics is established, while the new Lean declarations and the unaccepted FD-03 theorems remain open formalisation work. Basic real algebra and finite structures already exist in Mathlib. No unproved FD-03 theorem is treated as an axiom.
Let the stock start at , with up multiplier , down multiplier , and gross per-period bank factor such that . Trading is frictionless, the stock has no dividends, and the same binomial parameters remain fixed at every node. Write for the FD-03 backward-induction price of a European payoff after steps when the stock begins at . The arithmetic discount factor over periods is , which is meaningful even when .
For any strike and stock price , put
Strikes are normally nonnegative for actual option contracts. The core equalities hold for signed , making the Lean theorem more general without changing the financial interpretation. All contracts settle in the same currency. Valuations are time-zero values; a payoff computed at the choice date still needs to be discounted back to time zero.
The principal target is an exact simple chooser option pricing formula. Supporting targets cover payoff-level put–call parity, recursive valuation, a finite two-stage valuation identity, compound exercise values and complementary barrier contracts. Each target must have a non-vacuous Lean statement whose conclusion follows from earlier definitions and accepted theorems.
A simple chooser permits the holder to choose, after periods, between a European call and European put with the same strike , common final expiry a further periods later, and the same underlying stock. At the choice date the two option values are
The chooser pays the more valuable of these two options at that date, so its time-zero price is
The put–call parity lemma for the remaining periods is
Hence the choice-date payoff decomposes as
Risk-neutral linearity and the two-stage valuation identity then yield the root goal:
Here expires at final maturity, whereas the added European put expires at the choice date with discounted strike . The result covers , , ties at the choice date and negative interest rates compatible with . It assumes identical call and put strikes, expiry and exercise conventions. A general chooser with different strikes or expiries has a different decomposition.
The formal root is FinancialDerivatives.FD04.simpleChooser_pricing_identity. It directly asserts the boxed equality for the concrete FD-03 valuation operator, rather than introducing the equality as a hypothesis or hiding it in a definition.
A call-on-call has choice/exercise time after steps, underlying call strike , underlying expiry another steps later, and compound strike . Its exercise payoff at stock price is . Define the corresponding time-zero binomial valuation and prove basic positivity, zero-strike reduction (when the underlying call value is nonnegative), and monotonicity as the compound strike increases. Proving a Black–Scholes/Geske closed form requires continuous-time assumptions and is outside this discrete foundational mission.
A discretely monitored upper barrier is touched if at least one observed stock price satisfies . The observation sequence must state explicitly whether spot and maturity are included. On any common path, for terminal call payoff , define the knock-in payoff as when touched and zero otherwise, and define the knock-out payoff with the complementary trigger. Their sum is always the ordinary call payoff. There is no rebate, and the in/out contracts share identical monitoring and terminal settlement rules. This is a payoff identity; the full valuation and diffusion barrier PDE are reserved for later missions.
Rubinstein's original chooser-option discussion (1991) demonstrates why a chooser can be decomposed into a longer-dated call and a shorter-dated put. This makes the pricing calculation auditable and supplies a compositional theorem for subsequent missions. The compound and barrier branches supply independent contract primitives. Future continuous-time models can reuse the payoff-level decomposition while replacing the finite backward recursion with an appropriate discounted conditional expectation. Cox, Ross and Rubinstein (1979) provides the foundational arbitrage-based binomial valuation framework.
The hard formal steps derive put–call parity from the concrete repeated-binomial recursion, show that two-stage valuation equals pricing directly over the combined horizon, and establish additivity of European prices for arbitrary terminal history trees. The depths n, m and n+m require structural induction and precise indexed-tree rewriting. The main theorem cannot be established by assuming the chooser formula, assuming put–call parity, or defining the chooser price to be its intended decomposition.
Zero-step horizons, ties at choice, and negative rates consistent with positive gross growth are included. All chooser options here have identical call and put strikes, expiry dates and exercise conventions. Monitoring for barrier contracts is an explicitly supplied sequence of stock observations; touching the level counts as a hit and zero rebates are required for in/out parity. Continuous-monitoring diffusion barrier pricing and Geske compound-option closed forms belong to later missions.
Wilmott, P., Howison, S. and Dewynne, J. (1995), The Mathematics of Financial Derivatives: A Student Introduction, Cambridge University Press, Chapter 11, pp. 197–205, especially §§11.2–11.4. Cambridge chapter. Book DOI.
Rubinstein, M. (1991), Chooser Options, University of California, Berkeley research manuscript, 6 February 1991. University-hosted PDF. Original same-strike chooser decomposition.
Cox, J. C., Ross, S. A. and Rubinstein, M. (1979), Option pricing: A simplified approach, Journal of Financial Economics, 7(3), pp. 229–263. DOI. Finite binomial arbitrage-pricing foundation.
Since block 709,632 (BIP341 activation, November 2021) every version-1 witness program with a 32-byte payload is a Taproot output. Spending it means either a key-path spend — one Schnorr signature by the output key — or a script-path spend that reveals a leaf script together with a control block proving that the leaf is committed to by the output key, and then runs the leaf under the Tapscript rules of BIP342. Both paths are evaluated by the version-1 branch of VerifyWitnessProgram, which the published VerifyScript mission left as a parameter (TaprootHandler). This mission supplies that parameter from the source and closes the script-validation layer. (VerifyWitnessProgram, BIP341, BIP342)
The transcription covers the tagged hashes (TapLeaf, TapBranch, TapTweak, TapSighash), the merkle path of a control block, the key tweak check through the x-only tweak-add of libsecp256k1, the BIP341 signature hash with all its hash types and the annex, CheckSchnorrSignature, and the Tapscript interpreter rules: the OP_SUCCESSx scan, MINIMALIF as consensus, OP_CHECKSIGADD, the ban on OP_CHECKMULTISIG, the validation-weight budget, OP_CODESEPARATOR positions, and the absence of an operation count.
Key path. The witness, after removing an annex (a final element starting with 0x50 when at least two elements are present), is a single element: a 64-byte BIP340 signature under SIGHASH_DEFAULT, or 65 bytes whose last byte is a non-zero hash type. The message is the BIP341 signature hash computed from the transaction, the spent outputs, the input index, the hash type and the annex; the key is the 32-byte program itself.
Script path. The last element is the control block (33 + 32k bytes, k ≤ 128); the one before it is the leaf script; the control byte's low bit is the parity of the output key and its other bits the leaf version. VerifyTaprootCommitment recomputes the merkle root from the leaf hash and the path nodes, hashes it with the internal key into the tweak, and checks that the internal key plus tweak·G has the output key's x-coordinate and the stated parity. Leaf version 0xc0 runs the script under Tapscript with the weight budget |serialized witness| + 50; other leaf versions succeed (upgrade hook).
Tapscript. Builds on the published Script mission's interpreter: each non-signature opcode is the same execOp; OP_CHECKSIG, OP_CHECKSIGVERIFY and OP_CHECKSIGADD go through EvalChecksigTapscript (an empty signature is a clean false, 32-byte keys are checked with BIP340, other key lengths are upgradable and succeed, each passed signature costs 50 weight); OP_IF/OP_NOTIF require [] or [1]; OP_CHECKMULTISIG(VERIFY) fail; OP_SUCCESSx anywhere in the script makes it succeed before execution.
tapbranch_comm) and merkle paths (merkleRoot_base, merkleRoot_snoc): the merkle root is a left fold of the symmetric branch hash along the control block's nodes.opsuccess_accepts, checkmultisig_rejected, minimalif_rejects, sigops_budget, checksig_empty): the five BIP342 rules that differ from legacy script, as universal statements about the transcription.sighash_type_invalid, sighash_single_missing).keypath_handler, keypath_annex, checkSchnorr_iff) culminating in the goal, keypath_correct: a key-path spend verifies iff the witness is a BIP340 signature by the output key of the BIP341 hash under the encoded hash type.scriptpath_commitment): a verifying script-path spend carries a valid commitment of the revealed leaf to the output key.With the Script, Signature and VerifyScript missions, the goal theorem reduces the acceptance of a Taproot key-path spend to one BIP340 verification of one BIP341 hash, for every flag set, transaction and amount. verifyScriptFull is the complete VerifyScript of the source, with no parameter left: every output type that has ever been spendable on mainnet now has its validation rule transcribed in Lean. The script-path theorem fixes the commitment structure that the Tapscript execution sits behind; the Tapscript rule theorems make the BIP342 differences from legacy script facts about the definitions.
Policy flags (DISCOURAGE_*) are off, as in block validation. The definitions were checked by evaluation against the full BIP341 wallet test vectors (script trees, tweaks, control blocks, key-path signature hashes and signatures) and the BIP340 vectors.
CheckSchnorrSignature distinguishes three signature lengths and reads the hash type from the last byte: the characterization needs the 65-byte case decomposed as body ++ [b] with dropLast/getLast? reasoning, and the converse direction must rule out a 64-byte body being presented as a 65-byte signature. The merkle step theorem requires the chunking of a control block to commute with appending a node, an induction over the node count with the natural-number division (length − 33)/32. The annex is detected by getLast? on the raw witness but popped by dropLast; the script-path theorem threads the witness through two pops in CScriptWitness order (last element on top) before reaching the commitment check.
The handler is instantiated for the spent outputs of the transaction (needed by the BIP341 hash); the context is the VerifyScript mission's Ctx. Tapscript opcode positions and OP_CODESEPARATOR are tracked here (the Tapscript sighash commits to the position). No Mathlib is required; the development imports only Std.
A trivializing formalization would define the key path as "a Schnorr signature verifies"; here taprootHandler is the source's control flow, and the key-path statement is a theorem about it.
VerifyWitnessProgram, ExecuteWitnessScript, EvalScript, EvalChecksigTapscript, SignatureHashSchnorr, VerifyTaprootCommitment, src/script/interpreter.cpp; XOnlyPubKey::CheckTapTweak, src/pubkey.cpp; secp256k1_xonly_pubkey_tweak_add_check, src/secp256k1, at revision a773e1e33b349dc819b5a0edc1c7a4839dc73b48. SourceEvalScript decides what a script does; VerifyScript decides which scripts run, on what stack, under which signature version, and what counts as success. It is where pay-to-script-hash (BIP16), segregated witness (BIP141) and the hand-off to Taproot live: the output script is evaluated first, then — if it is a witness program — the witness is interpreted, or — if it is P2SH — the redeem script is extracted from the scriptSig and run, possibly revealing a wrapped witness program. Each of these steps carries anti-malleability rules (an empty scriptSig for native witness, exactly one push for wrapped witness, push-only scriptSigs for P2SH, a clean witness stack) and the future-compatibility rule that unknown witness versions succeed. (VerifyScript, BIP16, BIP141)
This mission transcribes VerifyScript, VerifyWitnessProgram for version 0 and the unknown versions, ExecuteWitnessScript, and the script predicates, on top of the published interpreter and signature layer, and proves that the four spending templates that carry the chain's history behave as advertised — P2SH, native P2WPKH, native P2WSH, P2SH-wrapped P2WPKH — and that the malleability and compatibility rules hold as universal statements.
A byte-level evaluation parses a script with GetOp, rejects scripts over 10,000 bytes, and runs the Script mission's interpreter with the signature mission's concrete oracle for the given signature version (BASE or WITNESS_V0) and script code. Stacks are top-first; a CScriptWitness lists its elements first to last, the last being the top, so witness stacks are reversed before execution.
VerifyScript runs the scriptSig, keeps a copy of the resulting stack, runs the output script, and requires a true top. With WITNESS, an output that is a witness program (OP_n and one push of 2–40 bytes) must have an empty scriptSig and is handed to VerifyWitnessProgram. With P2SH, an output OP_HASH160 <h> OP_EQUAL requires a push-only scriptSig; the copied stack is restored, its top is the serialized redeem script, which is run on the remainder and must leave a true top; with WITNESS, a redeem script that is a witness program must be the scriptSig's only push and is handed to VerifyWitnessProgram as P2SH-wrapped. Finally, with WITNESS, a non-empty witness that no program consumed fails.
VerifyWitnessProgram for version 0 distinguishes a 32-byte program (P2WSH: the last witness element is the script, its SHA-256 must be the program) from a 20-byte one (P2WPKH: exactly two elements, the implied DUP HASH160 <program> EQUALVERIFY CHECKSIG); ExecuteWitnessScript requires every element within 520 bytes and exactly one true element at the end. Version 1 with a 32-byte program outside P2SH is Taproot, delegated to a handler parameter when the TAPROOT flag is on; pay-to-anchor and every other version/size combination succeed.
for every 20-byte , every signature and key within the push limit, every transaction, amount and flag set with WITNESS. This is BitcoinVerify.p2wpkh_correct: the most common output type on the network today is correct against the full dispatch, the interpreter and the concrete BIP143 checker. The first conjunct is a genuine finding of the transcription: OP_0 <h> is evaluated as a script before the witness is consulted, so an all-zero program is unspendable.
isPayToScriptHash_iff, isWitnessProgram_iff): the byte tests are exactly the templates.parseScript_pushes, isPushOnly_pushes): canonical pushes parse back and are push-only.native_witness_malleated, witness_unexpected): non-empty scriptSig on a witness program fails; an unconsumed witness fails.unknown_witness_version): unknown versions succeed exactly when the program is a true script value.p2wsh_correct): the witness script, hashed to the program, runs on the remaining elements and must leave one true element.p2sh_correct): hash match and redeem evaluation on the pushed arguments.p2sh_p2wpkh_correct): the wrapped program through the P2SH path.The template theorems are two-directional: they say what spends succeed and that nothing else does, for every oracle verdict. Combined with the signature mission they reduce the correctness of the four templates to Hash160 equalities and ECDSA verification of the appropriate sighash. The rule theorems make BIP141's malleability protections and its upgrade hooks universal facts about the transcription rather than test cases.
What is left to the Taproot mission: the version-1 branch (TaprootHandler) and Tapscript. What is policy and off: SIGPUSHONLY, CLEANSTACK, MINIMALIF, DISCOURAGE_*. Known modeling limit inherited from the Script mission: OP_CODESEPARATOR positions are not tracked, so the oracle's script code is the whole executed script (exact for scripts without the opcode).
Status: all statements are open with intentional placeholder proofs. The dispatch has been checked by evaluation against independently signed P2WPKH, P2SH-P2WPKH and legacy P2SH spends and their negative variants.
The base evaluation of a witness output is easy to forget: OP_0 <h> must itself evaluate to a true top before the witness is looked at, which produces the castToBool h conjunct and the all-zero exception. The P2SH path reasons about two stacks — the one after the scriptSig (restored and popped) and the one after the output script (only its top matters) — and about the parse of the scriptSig twice (as pushes, and as IsPushOnly). The unknown-version theorem needs the evaluation of OP_n for every in 1–16 through the interpreter's small-integer branch, with its count and disabled-opcode exemptions. Witness order (last element on top) must be threaded through reverse, dropLast and getLast? consistently.
Flags are the seven consensus flags of GetBlockScriptFlags. The amount is an integer (negative where unknown, as the source passes for legacy inputs). The Taproot branch is a parameter. No Mathlib is required; the development imports only Std.
A trivializing formalization would define verifyScript by cases on the templates; here it is the source's control flow and the templates are theorems.
VerifyScript, VerifyWitnessProgram, ExecuteWitnessScript, src/script/interpreter.cpp, and CScript predicates, src/script/script.cpp, at revision a773e1e33b349dc819b5a0edc1c7a4839dc73b48. SourceThe Hlawka inequality compares the norms of three vectors with those of their pairwise sums and total sum. The question is the smallest comparison constant that works in every finite dimension.
This mission records the proved extension of the sharp diagonal Hlawka constant to every real . It uses the unchanged coordinate norm and cyclic constant from the foundation mission, for arbitrary complex vectors, including unequal and zero norms.
The cutoff-12 goal theorem is already proved on Prove2Me. Sixteen accepted interval proofs cover and join the proved cutoff-16 result. The conclusion includes both the inequality and optimality of its constant, uniformly over all finite complex coordinate dimensions.
This is an entry in the sharp diagonal Hlawka campaign, whose conjectured endpoint is . The cutoff-2 mission remains open; 12 is a proved sufficient cutoff, with no claim that it is optimal. The broader Schatten-norm question for general matrices is described by Audenaert and Kittaneh, §8.2.
A finite-range piece of Dusart's explicit upper bound for the prime counting function: for . Dusart proved the bound for every [P. Dusart, Estimates of some functions over primes without R.H., arXiv:1002.0442, Theorem 6.9]. This mission asks only for the finite range, which is a computation over about 148,000 primes and needs no analytic input.
Why it matters: the bound is an input to explicit Goldbach-type results, where it is used to control prime counts in a bounded window. A Lean proof lets those results drop one cited assumption.
Proposed by the Lean Lab, an AI-assisted formalization project on Goldbach-related literature. The statement was written by Claude; the proposer confirmed it against the paper before launch.
A Bitcoin transaction is authorized by signatures, and whether a signature counts is decided by a chain of exact rules: the byte layout the signature must have (strict DER since BIP66), which parts of the transaction the signature commits to (the signature hash, in its legacy and BIP143 forms, with the historical SIGHASH_SINGLE bug), how the public key is parsed, how a possibly non-canonical signature is parsed "laxly", and finally ECDSA verification on secp256k1 — or Schnorr verification for Taproot. Each of these has been the site of a consensus-relevant subtlety: BIP66 was a soft fork to remove OpenSSL's parsing from consensus; the SIGHASH_SINGLE bug lets a signature commit to nothing; high-S normalization is why libsecp256k1 accepts what historical blocks contain. (interpreter.cpp, pubkey.cpp, BIP66, BIP143, BIP340)
This mission transcribes that layer end to end — the encoding checks, FindAndDelete, both signature hashes, CPubKey::Verify with the lax DER parser and normalization, the secp256k1 verification equations for ECDSA and Schnorr, the checker's lock-time methods, and the byte-level script parser — and proves what the rest of validation needs: the strict-DER test is exactly the canonical layout, the signature hashes depend on what they should and nothing else, the checker's outcomes are characterized, and the Script mission's abstract P2PKH theorem instantiates to the concrete cryptography.
secp256k1 is the curve over the prime field of order , with group order and generator . Points are affine pairs or infinity; addition and scalar multiplication are the textbook formulas with Fermat inverses. A public key is parsed as secp256k1_eckey_pubkey_parse: compressed (02/03, square root by with parity selection), uncompressed (04) or hybrid (06/07), with coordinates below and on the curve. A signature reaches verification through ecdsa_signature_parse_der_lax, which tolerates long-form lengths and leading zeros, ignores trailing bytes, and substitutes the zero signature on overflow; its S value is normalized to the low half; the message is the 32-byte hash reduced modulo ; and secp256k1_ecdsa_sig_verify accepts iff , and . Schnorr verification is BIP340 with tagged hashes and lift_x.
The signature hash of input under hash type is, for legacy scripts, SHA-256d of the CTransactionSignatureSerializer output — version, the inputs (only the signed one under ANYONECANPAY; other inputs' scripts blanked, their sequences zeroed under SINGLE/NONE), the outputs (none under NONE, truncated to with blanked others under SINGLE), lock time — followed by as four bytes, except that SINGLE with no output at yields the constant ; for witness v0 it is the BIP143 construction with hashPrevouts, hashSequence, hashOutputs, the script code and the amount.
The encoding checks are IsValidSignatureEncoding (the fourteen BIP66 tests), low-S, the key-shape tests and the hash-type test, assembled by CheckSignatureEncoding/CheckPubKeyEncoding under the flags (DERSIG is the only one mainnet consensus enables). The checker (EvalChecksigPreTapscript) deletes the signature push from the script code (legacy only), applies the encoding checks as script errors, and returns CheckECDSASignature's verdict: a valid key, a non-empty signature whose last byte is the hash type, and CPubKey::Verify on the signature hash. The lock-time checks are CheckLockTime and CheckSequence. The oracle packages all of this, with Core's hashes, into the abstract Oracle of the legacy Script interpreter.
This is BitcoinSig.derEncode_complete together with its converse derEncode_valid: the byte-indexed test of the source is exactly the canonical layout, in both directions. It is the content of BIP66 as a statement about byte strings rather than a procedure.
SIGHASH_SINGLE bug (sigHash_single_bug): the hash is when there is no output at the input's index.sigHashLegacy_skeleton, sigHashWitnessV0_skeleton): both hashes ignore scriptSigs and witnesses; (sigHashLegacy_anyoneCanPay): with the flag, only the signed input matters.pubkeyValid_iff, normalizeS_low, overflow_rejected).checkSig_empty, checkSig_dersig, checkSig_base_iff): an empty signature is a clean false; with DERSIG a malformed one is a script error; the legacy verdict is ECDSA on the legacy sighash of the signature-deleted script code.parseScript_p2pkh): the P2PKH bytes parse to the interpreter's P2PKH instructions.p2pkh_concrete): the Script mission's p2pkh_correct, instantiated with Core's hashes and checker.With this mission the signature-related rules of the pinned source are kernel-checked semantics rather than prose: what shape a signature must have, what it signs, and what accepting it means in terms of the curve equations. The characterization of strict DER removes a class of malleability by construction. The sighash theorems are the facts that transaction malleability arguments and the segregated-witness design rest on. The concrete P2PKH theorem closes the loop the Script mission opened: the template is correct with the real cryptography, modulo nothing but the mathematics of the curve.
What is deliberately not claimed: that the curve operations are constant-time, that the group law holds (the verifier is a function; its correctness as a signature scheme is a cryptographic, not a consensus, property), or anything about OP_CODESEPARATOR positions, which the legacy interpreter of the Script mission does not track (the oracle's script code is the executed script, exact for separator-free scripts). Signature caching, the precomputed-transaction-data caches and the sighash midstate cache are optimizations with the same result and are not modeled.
Status: all statements are open with intentional placeholder proofs. The definitions have been checked by evaluation against the BIP340 test vectors, the BIP143 worked example, independently generated ECDSA signatures, and a reference implementation of the legacy serializer.
The strict-DER characterization is byte-index chasing: the source reads sig[4], sig[5 + lenR], sig[lenR + 7], and the proof must relate these to the slices and and show the three leading-zero rules are exactly minimality of the big-endian integers. The converse direction needs the cuts at , , and the end to reassemble the string. The sighash theorems look definitional but require relating getD on the input list to the projected skeleton under ANYONECANPAY (one input), SINGLE (outputs truncated) and the blanking rules. The checker characterization has to split the signature into body and hash-type byte in both directions.
Field and scalar arithmetic are on Nat modulo and , with inverses by Fermat and explicit fuel for exponentiation and scalar multiplication. Byte strings are List (BitVec 8); the transaction type is the serialization mission's. Policy flags (LOW_S, STRICTENC, WITNESS_PUBKEYTYPE, NULLFAIL, CONST_SCRIPTCODE) are carried where they shape the control flow but are off in block validation. Tapscript signature checking (BIP341/342 sighash, OP_CHECKSIGADD) belongs to the Taproot mission.
A trivializing formalization would define the strict-DER test by the layout, or the sighash by what it should depend on; here both are the source's procedures and the layout and dependence are theorems. No Mathlib is required; the development imports only Std.
script/interpreter.cpp, pubkey.cpp, script/script.cpp, and libsecp256k1 eckey_impl.h, ecdsa_impl.h, modules/schnorrsig/main_impl.h at revision a773e1e33b349dc819b5a0edc1c7a4839dc73b48. SourceEvery commitment in Bitcoin — a transaction id, a merkle root, a block hash, the proof-of-work target test — is a hash of a byte string, and the byte string is produced by a serializer that every node must implement identically. A node that encoded a CompactSize one byte longer, or read a witness flag differently, would compute different ids for the same transaction and fork from the network. Bitcoin Core's serialization lives in serialize.h (integers, CompactSize, vectors), primitives/transaction.h (the basic and BIP144 extended transaction formats), primitives/block.h (the 80-byte header), and its hashes in crypto/ and hash.h. (serialize.h, transaction.h, sha256.cpp)
This mission transcribes that layer — writers and readers for integers, CompactSize, vectors, transactions, headers and blocks; SHA-256, RIPEMD-160 and SHA-1 as full algorithms; Hash, Hash160, txid, wtxid, the header hash; transaction and block weights; and the mainnet genesis block — and proves the properties the rest of consensus consumes: encodings are canonical and round-trip, the witness-stripped id ignores witnesses, hashes have their sizes, and the transcribed genesis block hashes to the genesis hash of chainparams.cpp.
A writer turns a value into a byte list; a reader consumes a prefix of a byte list and returns the value and the remainder, or none where the source throws. Fixed-width integers are little-endian; signed ones are two's complement. A CompactSize is one byte below , or a marker byte , , followed by , , little-endian bytes; the reader rejects an encoding that could have been shorter ("non-canonical") and, in its default range-checked mode, any value above . A vector is its CompactSize length then its elements; a byte string is its length then its bytes; a uint256 is 32 raw bytes.
A transaction serializes as version vin vout nLockTime, or, when witnesses are allowed and some input carries one, in the extended format: version 0x00 0x01 vin vout witnesses nLockTime, where the 0x00 is an empty dummy vin and 0x01 the flag byte. The reader follows the source's control flow exactly: it reads vin; if that is empty and witnesses are allowed it treats it as the dummy, reads the flag byte and, if non-zero, the real vin and vout; a set witness bit then reads one witness stack per input and rejects a record whose stacks are all empty; any other flag bit rejects. A header is int32 nVersion, previous hash, merkle root, nTime, nBits, nNonce; a block is a header and a transaction vector.
Well-formedness names the field ranges under which the writers are faithful: 32-bit fields below , hashes of 32 bytes, amounts in , lengths at most , and — for blocks — every transaction has an input or a witness.
Hashes are the algorithms of crypto/: Merkle–Damgård padding, 64-byte chunks, the SHA-256 schedule and 64 rounds, the two RIPEMD-160 lines, the SHA-1 rounds; Hash is SHA-256 twice and Hash160 is RIPEMD-160 of SHA-256. The txid hashes the witness-stripped serialization; the wtxid the full one; the block hash the 80-byte header. Weight is three times the stripped size plus the full size.
for every well-formed block , witness mode and remainder . This is BitcoinSer.block_roundtrip: deserialization is a left inverse of serialization, in the witness-aware and the legacy reader alike. It is the statement that gives every hash commitment a referent: the bytes a node hashes are exactly the bytes from which every other node recovers the same block.
leBytes_length, readLE_leBytes): width and round-trip.compactSize_roundtrip, compactSize_canonical, compactSize_range): the writer's output is accepted; only the shortest encoding is ever accepted; read values are bounded.serHeader_length, header_roundtrip): 80 bytes, round-trip with the signed version.tx_roundtrip): round-trip in both formats, with the genuine side condition that the witness-aware reader needs a non-empty vin or a witness.serTx_strip, txid_strip): the stripped serialization and the txid ignore witness data.weight_no_witness): without witnesses, weight is four times the size.sha256_length, hash160_length).genesis_merkle, genesis_hash): the transcribed genesis coinbase and header hash, by kernel evaluation of the transcribed SHA-256, to the merkle root and block hash recorded in chainparams.cpp.serBlock_injective): distinct well-formed blocks have distinct serializations.The round-trip and canonicality theorems make the byte layer of consensus exact: a transaction or block has one encoding, the encoding determines the object, and the identifier hashes are functions of the object alone. The genesis theorems are an end-to-end check against the real chain: the transcriptions of CreateGenesisBlock, the serializers and SHA-256 together reproduce the hard-coded genesis hash, which no transcription error in any of them could survive. The witness-independence theorem is the structural fact behind segregated witness. For the whole-consensus development this mission supplies the concrete hash and serialization semantics that the Merkle, header, proof-of-work and script components took as parameters.
Not modeled: network message framing, CompactSize reading in the chunked allocation loop (semantically the same read), serialization of CBlockIndex/undo data, and the stream exception types (all failures are none).
Status: all statements are open with intentional placeholder proofs. The hash functions have been checked against the standard test vectors and the genesis values by evaluation; the genesis theorems are stated so that the kernel re-checks them.
Round-trip looks like unfolding until the transaction reader: because UnserializeTransaction reuses the vin read as the witness dummy, an empty vin is ambiguous, and the honest theorem carries the side condition "an input or a witness". The canonicality theorem is where the three "non-canonical" rejections earn their keep: without them a value would have several encodings and the statement would be false. The signed fields need the two's-complement conversion in both directions. For the genesis theorems the difficulty is not mathematical but computational: the kernel must evaluate nine SHA-256 compressions, which the definitions are written to allow (structural recursion only, no well-founded fixpoints in the evaluated path).
Bytes are BitVec 8, values are Nat/Int, words are UInt32. Readers return Option (α × Bytes). The writers truncate out-of-range values modulo the width, which the well-formedness predicates exclude; the readers are total. No Mathlib is required; the development imports only Std.
A trivializing formalization would define the readers as inverses of the writers; here each reader follows the source's byte-level control flow, and the round-trips are theorems.
serialize.h, primitives/transaction.h, primitives/block.h, hash.h, crypto/sha256.cpp, crypto/ripemd160.cpp, kernel/chainparams.cpp at revision a773e1e33b349dc819b5a0edc1c7a4839dc73b48. SourceWhen a faster multiplication algorithm becomes available, its consequences depend on which problems reduce to multiplication and how the reduction changes input size. A displayed runtime bound alone does not identify this connection. The surrounding computation can also consume the improvement if its cost is omitted or underestimated.
Fourier transforms and bounded integer convolution illustrate two different connections. A complex Fourier transform can be expressed through ordinary complex polynomial multiplication using chirps, following Bluestein's construction. Bounded integer coefficients can instead be packed into binary integers, as in Kronecker substitution. This mission makes the first reduction an explicitly counted arithmetic program and proves the operand-size bound needed by the second. It does not identify binary integer computation with exact complex arithmetic.
A costed oracle returns an answer and a natural-number charge. The general program interface supports returns, explicitly charged work, and adaptive oracle queries. Its substitution theorem preserves answers and sums the query charges with local overhead.
The concrete Fourier interface additionally has explicit instructions for complex multiplication and inversion, each charged one unit. A product instruction takes arrays of lengths and and returns their ordinary polynomial product as an array of length , including trailing zero padding. The oracle's charge measures that product call. Array construction, access, index arithmetic, and control operations are uncharged in this arithmetic-operation model. The complex parameter is supplied as input, so root construction is outside the interface.
The binary magnitude length is zero for and is otherwise. It excludes a sign bit. The integer oracle multiplies signed integers with charge bounded by . Packing and decoding still have explicit charges ; their implementation in a bit-machine model is outside the proved scope.
The reusable general theorem states that a correct oracle with nondecreasing bound , at most calls of size at most , and overhead at most gives correct execution with cost
Composition preserves the complete answer-and-cost pair. An asymptotic corollary transfers eventual upper bounds on the resulting formula.
The main goal is the concrete Fourier transfer theorem. For every , nonzero , and input , a fixed program returns
with one full polynomial-product call and exactly additional multiplication or inversion instructions. Consequently, if the oracle cost is at most , then
When is the desired primitive th root of unity, this is the unnormalised discrete Fourier transform. The identity itself holds for every nonzero . The main theorem does not assume that is monotone or regular.
The Fourier milestones verify middle-coefficient extraction from a full product, generation of chirp entries in exactly instructions, the chirp identity, the exact total cost, and its runtime consequences. For , the conditions and give the pointwise bound . If these conditions hold uniformly with one , a family of these transforms has accounted cost .
The integer milestones prove that packing signed coefficients of magnitude at most in base produces an integer of magnitude length at most , for . For input bound , the automatic choice satisfies every spacing condition when . The resulting convolution program is correct and costs at most
This applies the existing proved signed Kronecker correctness theorem with a newly justified oracle input size.
The Fourier application no longer relies on arbitrary preparation and decoding labels. Its specific program includes every complex multiplication and inversion used to generate the chirps and scale the arrays, and the interpreter proves their count. A better complex polynomial-product bound can be substituted directly into the main inequality.
The packing application now evaluates an integer multiplication bound at a proved number of magnitude bits. Its logarithmic spacing overhead remains visible. This prevents substituting a length- coefficient array directly into a runtime bound for -bit integers.
These are formalizations of known reduction principles, with concrete program choices and constants supplied by the companion development. They are not new Fourier or multiplication exponent records. Local Lean proofs accompany every theorem in the strengthened draft. Local verification and accepted platform proof submissions remain distinct statuses.
Correct adaptive substitution must preserve subsequent queries, not merely the final numerical bound. Fourier preparation must actually generate chirps by a linear number of instructions; writing a large power in a returned expression would not justify a cheap implementation. Full-product coefficients must match the middle-product identity at every permitted index, and negative exponents must use a nonzero parameter.
Signed packing requires both correctness of balanced-digit decoding and a magnitude bound on the packed operands. A correct encoding alone cannot justify the claimed multiplication cost. Replacing by also needs a scaling condition; arbitrary runtime functions do not supply one automatically.
The core definitions use terminating inductive programs, natural-number charges, and an explicit eventual big-O predicate. The arithmetic instruction type permits arbitrary mathematical continuations and return values, so it is not a verified compiler from arbitrary functions to circuits. For the concrete Fourier program, preparation and decoding use only its explicit scalar instructions and structural array operations. Its cost result is an arithmetic-operation count, with the oracle cost interpreted in the same unit.
The Fourier theorems include ; this particular program still performs seven scalar instructions and a product call, returning an empty array. The packing size lemma includes empty lists and cancellation, while convolution requires . Coefficient bounds include their endpoints and allow negative entries.
The integer result does not prove linear-time bit encoders or decoders. Neither application establishes finite-precision error bounds, root-construction costs, memory costs, or an unrestricted implication from binary integer multiplication to exact complex DFT complexity. Subsequent work can add a verified bit representation and encoding implementation, or a register-based arithmetic compiler. Such additions must justify their costs independently rather than selecting favorable work labels.
Internet advertising markets sell impressions, clicks and conversions one auction at a time, and most advertisers attach a budget to a whole campaign. Bidding one's full value until the budget runs out is suboptimal: the buyer drops out early and misses later auctions that may offer the same value at a lower price. A widely used remedy is multiplicative pacing: the platform shades every bid of buyer by a common factor, bidding instead of , with the pacing multiplier chosen so that the budget lasts. When every buyer is paced, the multipliers interact through the prices, and the natural question is whether there is a stable profile of multipliers at all.
Conitzer, Kroer, Sodomka and Stier-Moses (arXiv:1706.07151, Operations Research, 2022) study the static game behind this mechanism for second price auctions, define its equilibrium notion and prove that an equilibrium always exists.
Timeline.
A pacing game has a finite set of buyers and a finite set of divisible goods. Buyer has a valuation for good and a budget . Buyer picks and bids on every good; each good is sold in a single-slot second price auction. Write for the highest bid on other than 's (it is when is the only buyer).
A second price pacing equilibrium (SPPE, Definition 2) is a triple of multipliers , allocations and per-unit prices such that, with spend :
The proof passes through the -smoothed pacing game (Definition 3). A reserve bid is added on every good, treated as one more bidder. With the highest bid, every bidder within of receives a share of good proportional to its distance above , and buyer pays per unit, the highest bid other than hers minus . Each buyer also receives units of an artificial good worth per unit at price . Her utility is the leftover budget , multiplied by when it is negative, plus .
No genericity, no tie assumption and no bound on or : one buyer, no buyers and goods nobody values are all covered.
Theorem 1 makes the SPPE a well-defined solution concept for every instance of the market. The rest of the paper builds on it: SPPE are shown to be best responses (Proposition 2), to refine competitive equilibria of the associated market (§5), and to be the outputs that a mixed-integer program can optimise over; the paper's complexity results (NP-hardness of finding revenue- or welfare-optimal equilibria) presuppose that equilibria exist. The later PPAD-completeness result of Chen, Kroer and Kumar concerns the computation of an object whose existence is this theorem.
The theorem has a published proof; nothing in it has been machine-checked. A formal development needs a pure Nash existence theorem for continuous quasiconcave games, a careful treatment of the smoothed game's continuity, and a compactness-and-limit argument. Each of these is reusable for other smoothing arguments in auction and market design (first price pacing equilibria, throttling equilibria).
The pacing game is discontinuous: a buyer's allocation jumps when her bid crosses another bid, and her utility drops to when she exceeds her budget. So standard existence theorems do not apply to it, and it is not evident a priori that the game with a fixed tie-breaking rule has a pure Nash equilibrium at all (p. 9). Definition 2 also demands a refinement, no unnecessary pacing, that an arbitrary Nash equilibrium need not satisfy. The obvious fixed-point argument on alone fails because the allocation is a correspondence, not a function, at ties.
The smoothing removes the discontinuities, but its limit must be controlled: the reserve buyer must win nothing in the limit on goods someone values, the budget penalty must force feasibility, and the artificial good must force every paced buyer to exhaust her budget. Each limit claim uses a different one of these devices.
N, G (Fintype, with DecidableEq N); all quantities are real. The game PacingGame N G carries and ; infinite budgets are outside the model.highestOther v α i j is a Finset.sup' over the buyers and equals when there is no other buyer, not a junk value of sSup ∅.IsSPPE P α x p has the five conditions of Definition 2 with . The prices are one vector shared by the second-price and the budget conditions; they are existentially quantified in the goal.Option N, with none the reserve bidder bidding . Band weights sum to at least , so the allocation never divides by zero. The price is per buyer (). The utility uses for and for , exactly the paper's two cases.Filter.Tendsto in and in with the product topology.A trivializing formalization is ruled out: the full-allocation condition makes fail whenever some , and the price in the budget condition is the same that the second-price condition pins down, so a zero price is not available to a winner facing a positive competing bid.
Needed infrastructure: a pure Nash equilibrium existence theorem for games with compact convex strategy sets and continuous, own-strategy-quasiconcave payoffs (the Proved platform theorems SocialEquilibrium.Existence.exists_equilibrium_point, Debreu 1952, and FanGlicksberg.kakutani_fan_glicksberg are the natural tools); continuity of finite maxima and quotients with positive denominators; monotonicity arguments for piecewise-linear functions of one variable; and Bolzano–Weierstrass on a bounded subset of . Proofs of any milestone, and alternative routes to Theorem 1, are welcome.
Firms increasingly observe enough about individual customers to charge them different prices, and regulators, platforms and sellers all ask the same quantitative question: how much more profit can personalization earn than a single posted price? The upper end of that comparison is idealized personalized pricing (first-degree price discrimination), where every customer is charged exactly their valuation. Its profit is an upper bound for every price-discrimination scheme, including feature-based pricing, so a bound on the ratio of idealized personalized profit to single-price profit bounds the value of any personalization at once.
Elmachtoub, Gupta and Hamilton (The Value of Personalized Pricing, Management Science 67(10), 2021; SSRN 3127719) give such bounds in terms of three summary statistics of the valuation distribution, all of which can be estimated from data. Their central result, Theorem 2, is a closed-form bound that is tight for every value of the statistics. The bound is exact rather than asymptotic, and it identifies the markets in which no form of price discrimination can be worth much.
A classical special case is the folklore statement that, with only the support known, the worst case is an equal-revenue (truncated Pareto) distribution. Theorem 2 refines it by also fixing the mean absolute deviation of valuations.
A seller has per-unit cost . A random customer's valuation is a random variable with law , finite mean , and almost surely (customers valuing the product below cost are never served profitably). The purchase probability at price is
which counts the customer who values the product exactly at as buying. A single price earns , and the single-pricing profit is
Charging each customer their valuation earns the personalized-pricing profit .
The three statistics are the scale (the essential supremum of relative to its mean, possibly ), the margin , and the coefficient of deviation . With and the negative real branch of the Lambert function (the solution of for ), the regime thresholds are
For every law with scale , margin and coefficient of deviation ,
and for unbounded support the first bound holds for every . Each bound is attained: for every mean, cost, and in a regime there is a law with those statistics for which the regime's bound holds with equality. The goal is stated for a general cost and mean, not only in the standardized case.
In the order the proof uses them:
The theorem turns three estimable numbers into a guarantee. Its reciprocal is the fraction of the personalized-pricing profit that the best single price is certain to earn. When that fraction is close to one (small , or close to its maximum ), no price-discrimination strategy, however refined its data, can improve much on one price. The paper uses Theorem 2 to bound feature-based pricing (its Theorems 4 and 5), and the tight distributions show that no better bound in these statistics exists.
The result is proved in the paper; nothing here is open. To our knowledge none of it has been machine-checked. A complete development yields a formal treatment of single-price revenue for general valuation laws (atoms and unbounded support included), the integral representations of mean absolute deviation, and a usable negative Lambert branch, which neither Mathlib nor the platform currently provides (only the principal branch exists on the platform).
The upper bounds rest on bounding the purchase probability pointwise inside an integral representation of and solving the resulting transcendental inequality through . Each step is elementary on paper, but the formal statement has no slack. is a supremum that need not be attained when support is unbounded. counts atoms, so the tight laws sit on atoms at their optimal prices. Every application of must stay in , and the regimes meet at their endpoints, where two bounds coincide.
Tightness is the harder half. It needs genuine probability measures with prescribed cCDFs, mean, scale and deviation, and an exact computation of their single-price profit. Two printed details had to be corrected, and those corrections must be respected. At no law has scale , so tightness is stated for . The high-heterogeneity cCDF of Lemma EC.3 must be left-continuous at , so it keeps an atom at the top of the support.
All declarations live in the namespace ValuePersPricing.Deviation.
ν : Measure ℝ. Market ν c bundles the standing assumptions: probability measure, , almost surely, and integrability of . The margin condition is the hypothesis c < mean ν.(ν (Ici p)).toReal. is the real supremum over all real prices; it is not assumed attained, bounded by an extra hypothesis, or positive. Under Market the profits are bounded by , so the supremum is the true one.IsScale ν S: is the essential supremum. Unbounded ν is the case .lambertWm1 is defined by choice, with a junk value off that no statement reaches.A complete development needs the layer-cake (tail-integral) formula for expectations, the change of variables in interval integrals, pushforwards of measures under affine maps, and analytic facts about on . The Lambert facts and the tail-integral representations of mean absolute deviation are reusable beyond this mission. Contributions are welcome at every milestone. In particular, the milestone and Lemma 3 are independent entry points, and the explicit measures of Lemma EC.3 can be built without the upper-bound half.
Ride-hailing platforms such as Uber and Lyft raise prices when demand spikes, a practice known as surge pricing. The practice is controversial: customers see higher fares, and it is not obvious that anyone but the platform gains. Bernstein, DeCroix and Keskin (MSOM 2020; author version SSRN 3250224) study two competing platforms whose customers dislike waiting and whose drivers dislike idling, and show that in markets with spare driver capacity a demand surge met by re-optimized prices leaves both customers and drivers better off than keeping the old price. This mission formalizes that result (Proposition 3 of the paper) together with the equilibrium characterization it rests on.
Two platforms sell rides. Customers form a continuum of mass (the market size) spread uniformly over locations of a Hotelling line. Platform charges price , and its utilization is , the ratio of the mass of customers served to the mass of active drivers. A customer at gets utility
from platforms 0 and 1, where is the sensitivity to congestion, and chooses the better platform or neither. A driver with operating cost who works for platform keeps per ride (revenue share , commission ) and gets .
Demand depends on supply through and supply depends on demand; the fixed points are the balanced demand and balanced supply , given in closed form by Lemma 1 of the paper. They take one form, , , when the market is partially covered (each platform acts as a local monopoly; Case P, ) and another, , , when it is fully covered (the platforms compete for the customers in the middle; Case F).
Platform earns and must respect the supply constraint . A price is a symmetric Nash equilibrium if , satisfies the supply constraint, and no price in that satisfies the supply constraint against earns more. From §4.1 on, . Proposition 1 divides the plane into four regions; in the two supply-unconstrained ones, Region (a) ( and ) and Region (d) ( and ), drivers are not fully occupied in equilibrium.
For a common price and market size , write , and for the utilities above evaluated at that utilization.
Let , , and with and in Region (a) or (d). Symmetric equilibria and exist, and for all of them:
(i) after a surge with re-optimized prices, customers are worse off and drivers better off,
(ii) there is such that for , at the new market size both sides prefer the new price to the old one,
All inequalities are strict, for every customer location and every driver cost.
The result separates two effects of a demand surge. Part (i) is the expected one: re-optimized prices rise and customers pay more. Part (ii) is the managerial point: compared with a fixed-price policy facing the same surge, raising prices draws in drivers and relieves congestion by enough that customers, too, are better off. This gives a model-based argument for surge pricing in supply-unconstrained markets, and it holds under duopoly competition, not only for a monopolist.
The paper's proofs (in its online supplement) are written out by hand. As far as is known, none of these results has a machine-checked proof. The work here is formalizing the known proofs: the fixed-point computation behind the balanced demand and supply, the equilibrium characterization in two regions, and the comparative statics in the market size.
The obvious argument fixes the equilibrium formulas and differentiates the utilities in . That fails in two places. First, the equilibrium is defined by a best-response condition over a piecewise demand function: a deviating platform can move the market between partial and full coverage, so the global optimality of the candidate price requires controlling the profit across the switch between the two closed forms, not just a first-order condition. Second, the two regions meet along , and a surge from to can cross from Region (d) into Region (a). Part (i) then compares utilities given by different formulas on each side, and part (ii) compares the old price, evaluated in the new market where it may lie in a different coverage case, with the new equilibrium price.
All objects live in the namespace CongestedPlatforms.Surge and take the parameters lam γ α c as explicit real arguments (λ is a Lean keyword), so one game can be evaluated at two market sizes. Balanced demand D and supply S are defined by the closed forms (4.2)–(4.7) with the Case P/F switch on ; Lemma 1 ties them to the balance equations. The action set is read as the natural bounds , and the supply constraint is imposed on the equilibrium price as well as on deviations. Utilities are evaluated for every location and cost in (the location and cost terms cancel), and is an extended real. The source is the SSRN author version of September 16, 2019, whose online supplement holds the proofs.
Standing assumptions and corrections, all stated as hypotheses: ; for the propositions; (the paper's ); and , because at and every profit is zero and every feasible price is an equilibrium, which falsifies Propositions 1 and 3 as printed. Proposition 1(d) additionally assumes (for the printed price exceeds 1), and both parts of Proposition 1 state equality of demand and supply on the region boundaries, where the printed "strictly lower" fails. Proposition 1(a) is stated on a region slightly larger than the printed one (adding ), which contains it.
The goal speaks of symmetric equilibria of the game, not of Proposition 1's formulas: defining the equilibrium price by those formulas, dropping the existence clauses, allowing , evaluating the utilization at the wrong market size, or omitting the congestion term would each trivialize the statement and are excluded.
Only Mathlib is needed (Real.sqrt, min, EReal). Proofs of the milestones are welcome independently; Lemma 1 and the two parts of Proposition 1 are reusable for any comparative-statics question about this model.
In many clustering tasks the data come as pairwise judgements rather than as points in a metric space: a classifier says, for each pair of documents, whether they refer to the same entity or not. Correlation clustering asks for a partition that agrees with as many of these judgements as possible, without fixing the number of clusters in advance. The problem was introduced by Bansal, Blum and Chawla, motivated by document clustering and coreference resolution in natural-language processing (Machine Learning 56, 2004). It has since become a standard problem in approximation algorithms.
Timeline:
Let be a finite set and let every pair of distinct vertices carry a label ; this is a complete graph with signed edges. A clustering is a partition of . A pair is a mistake of a clustering if and lie in different clusters (a positive mistake), or and they lie in the same cluster (a negative mistake). The number of mistakes of a clustering is , and .
For a vertex let ; the vertex itself is included. For and , a vertex is -good with respect to if and , and -bad otherwise; is -clean if all its vertices are -good with respect to it. A triangle is erroneous if it has two positive edges and one negative edge.
Algorithm Cautious with maintains a set of remaining vertices, and all of , goodness and below refer to the graph induced on . It repeatedly picks an arbitrary , sets , deletes -bad vertices of one at a time while any exists (giving ), adds at once every vertex of that is -good with respect to , and deletes the resulting cluster from . It stops when is empty, or when every remaining vertex produces the empty set; the remaining vertices become singletons.
Cautious has a run on every , and for every run, with output clustering , and every clustering ,
The bound is required for every pivot sequence and every removal order, because the algorithm leaves those choices open.
In attack order:
Theorem 13 was the first proof that disagreement minimization on complete signed graphs admits a constant-factor approximation by a purely combinatorial algorithm, and its two ingredients have been reused since: erroneous-triangle packings, the standard lower bound behind the analyses of later algorithms, and clean clusters. The constant has since been improved by orders of magnitude, but the structural statements (clean clusterings are -approximate; a near-optimal clustering with clean clusters exists; a cautious greedy procedure recovers it) remain the paper's.
None of this is formalized in any proof assistant. The mission provides a reusable Lean layer for correlation clustering: signed complete graphs as SimpleGraph, disagreement counts over unordered pairs, goodness and cleanliness, triangle packings, and a nondeterministic algorithm specified as an inductive run relation. Formalizing it also repairs the printed argument. Lemma 12 as printed is false (an 18-vertex counterexample is recorded in the item), and the cleanliness clause of Theorem 7 holds only in the remaining graph. The milestones state the corrected versions, which together still yield Theorem 13 with the printed constant.
Every step is elementary counting, but the counts are tight. Lemma 4 needs a charging scheme that gives each mistake its own erroneous triangle while every edge carries total weight at most . Lemma 6 accounts for bad vertices cluster by cluster. Theorem 7 is a double induction, over the clusters produced and over the removal loop. Inside it one must show that no vertex of a clean cluster is ever removed and that the addition step pulls in the rest, uniformly over all removal orders.
The natural first idea, applying the clean-clustering bound (Corollary 5) to the clusters Cautious outputs, fails. The output clusters are clean only relative to the vertex set remaining when each was formed, and an earlier cluster can split a later one from many of its positive neighbours. Positive and negative mistakes therefore have to be bounded separately.
Fintype with decidable equality, possibly empty; G.Adj u v means .R, and the paper's -level notions are the case R = univ. Goodness compares real casts of cardinalities with real multiples of . The constant is the real number δ44, with thresholds , and written as multiples of it.Setoid V. Mistakes are counted over unordered pairs (Sym2).No trivializing reading is admitted. The goal quantifies over every run and asserts that a run exists, so an empty run relation, a single fixed pivot rule or a fixed removal order cannot satisfy it. It compares with every clustering, not with or with clean clusterings only, and goodness is evaluated in the remaining graph, not in .
The PTAS for maximizing agreements (Theorem 22), the NP-hardness reduction (Lemma 1), the warm-up Theorem 2 and the extensions of §7 are not part of this mission. Contributions are welcome on any milestone. The algorithm-free Lemmas 3, 4, 6, 8 and 9 are independent entry points, and a general library of facts about the run relation (termination, disjointness of the clusters, consisting of unclustered vertices) would serve Corollary 10, Theorem 7 and Lemmas 11–13.
Many allocation problems distribute work rather than benefits: household and office tasks, teaching loads, shifts, maintenance duties, or jobs assigned to parallel machines. Each item is a chore, which every agent would rather not receive, and chores cannot be split. Under indivisibility an exactly fair split usually does not exist, so the fair-division literature measures fairness against benchmarks that can be approximately met. The max-min share of Budish (J. Political Economy, 2011) is one of the most studied: it is what an agent could secure by dividing the items into as many bundles as there are agents and receiving the worst of them.
For goods, Kurokawa, Procaccia and Wang showed that an allocation giving every agent her full max-min share need not exist (J. ACM, 2018; conference version AAAI 2016), and attention moved to approximations. Aziz, Rauchecker, Schryen and Walsh (AAAI 2017) started the corresponding study for chores. They showed that chores behave differently from goods with the signs flipped, that a full max-min share allocation of chores may fail to exist, and that computing one is strongly NP-hard. Their first positive result is that the simplest protocol, greedy round-robin, already gives every agent a constant-factor approximation, with a factor that cannot be improved for the protocol.
Timeline:
There are agents and a finite set of items. Agent has an additive utility : is her utility for item , and a bundle is worth . The instance is a chores instance if for all and no is identically zero.
An allocation is a partition of into bundles, some of which may be empty; is the set of all allocations. Agent 's max-min share is
For chores it is non-positive.
The greedy round-robin protocol (Algorithm 1 of the paper) lets the agents pick one item at a time, in rounds; in each round the agents pick in the order , and each picker receives an item of highest utility for her among the items not yet picked. The paper does not specify how ties are broken. A run is the resulting sequence of picks under some tie-breaking rule, and is the set of items agent picked. The worst single chore of agent is .
For every chores instance, every run of greedy round-robin and every agent ,
and the factor cannot be improved: for every and every there is a chores instance with agents on which every run leaves some agent with . The goal also records that the protocol always produces an allocation. It covers every tie-breaking rule and every , so it is the paper's full claim and not a special case.
The theorem shows that the max-min share for chores admits a constant-factor approximation by a protocol that needs no computation beyond each agent's own ranking of the remaining chores. No optimization problem is solved, which matters because computing the max-min share itself is strongly NP-hard (Proposition 8 of the paper). The bound holds for every tie-breaking rule, so it applies to any implementation of the protocol, and the tightness clause shows that improving on needs a different algorithm, not a sharper analysis. Later chores algorithms are measured against this baseline.
The result has a complete paper proof. No machine-checked proof of it is known to exist. Formalizing it produces a checked statement of the round-robin protocol for chores under arbitrary tie-breaking, the pairwise comparison (1) between round-robin bundles, and the elementary upper bounds on the max-min share. These are reusable for other round-robin and max-min share results.
The arithmetic is short. The difficulty is in the protocol. Eq. (1) compares an agent's bundle with another agent's bundle pick by pick, and the comparison has to be set up differently depending on which of the two agents picks first in each round, and on whether their numbers of picks differ by one in the final, possibly incomplete, round. The paper's text calls one of the two orders "obvious", but there the earlier picker may hold one more chore than the later one, and that extra chore is what the term absorbs. The obvious attempt, comparing bundles of equal size, fails exactly in that case.
The tightness clause cannot be checked by running the protocol once: the claim covers every tie-breaking rule, so the instance has to defeat every run of the protocol, not one particular run.
Fin N, with the paper's agent at index (agent 1 is 0); chores are Fin m; utilities are d : Fin N → Fin m → ℝ; bval d i S is ; IsChores d is "all utilities and each agent has a nonzero utility".σ : Fin m ≃ Fin m from picks to chores satisfying IsRoundRobinRun d σ: pick (counted from ) is made by agent , and the chore it takes is, for that agent, at least as good as every chore taken at a later pick. Every tie-breaking rule gives such a , and every such comes from one. Agent 's bundle is rrBundle σ i, the chores taken at picks with .LittleCharity.MMS.mms is reused, applied to bval d i: a maximum over all maps from chores to Fin N (labelled partitions, empty bundles allowed) of the minimum bundle value. For both ranges are finite and nonempty, so the supremum and infimum are the true maximum and minimum.Finset.univ.inf'. The factor is the real number 1 / (N : ℝ). The guarantee is stated for all non-positive utilities, without the condition , which it does not need. The tightness clause requires a chores instance in the paper's full sense.Finset.inf', and suprema and infima over finite types are all in Mathlib. Results about round-robin bundles, such as eq. (1) and the averaged bound, and the two max-min share bounds are reusable beyond this mission. Contributions to any milestone are welcome, as are alternative proofs of the tightness computation.