Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Advancing one interval halves the subsidy

Proved
BitcoinSubsidy.subsidy_halving

by pitimespi · Oct 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

bitcoinbitcoin-mainnetblock-subsidyconsensusformal-verificationissuance

For every block height h∈Nh \in \mathbb Nh∈N,

coreSubsidy(h+210000)=⌊coreSubsidy(h)2⌋.\mathrm{coreSubsidy}(h + 210000) = \left\lfloor \frac{\mathrm{coreSubsidy}(h)}{2} \right\rfloor .coreSubsidy(h+210000)=⌊2coreSubsidy(h)​⌋.

Moving forward by exactly one halving interval halves the subsidy, with the remainder discarded. This is the defining recurrence of the schedule stated directly on the implementation; iterating it from height 000 reproduces the sequence 50,25,12.5,…50, 25, 12.5, \dots50,25,12.5,… bitcoin.

Preamble
import Definitions.Def_BitcoinSubsidy
Formal statement
theorem BitcoinSubsidy.subsidy_halving (height : Nat) :
    coreSubsidy (height + halvingInterval) = coreSubsidy height / 2 := by sorry
Source
Bitcoin Core a773e1e33b349dc819b5a0edc1c7a4839dc73b48, GetBlockSubsidy, src/validation.cpp lines 1833-1844: https://github.com/bitcoin/bitcoin/blob/a773e1e33b349dc819b5a0edc1c7a4839dc73b48/src/validation.cpp#L1833; COIN and MAX_MONEY, src/consensus/amount.h: https://github.com/bitcoin/bitcoin/blob/a773e1e33b349dc819b5a0edc1c7a4839dc73b48/src/consensus/amount.h; nSubsidyHalvingInterval = 210000, CMainParams, src/kernel/chainparams.cpp: https://github.com/bitcoin/bitcoin/blob/a773e1e33b349dc819b5a0edc1c7a4839dc73b48/src/kernel/chainparams.cpp
Read-back

What the Lean code literally says, in plain math · claude-fable-5-1 (independent sub-agent, blind: Lean code + auditor instructions only)

Read-back: theorem BitcoinSubsidy.subsidy_halving

Binders. One universally quantified natural number h∈N={0,1,2,… }h \in \mathbb{N} = \{0, 1, 2, \dots\}h∈N={0,1,2,…} (named "height"). No hypotheses; the claim is made for every hhh, including h=0h = 0h=0 and arbitrarily large hhh.

Statement. For every h∈Nh \in \mathbb{N}h∈N,

coreSubsidy(h+210,000)=⌊coreSubsidy(h)2⌋,\mathrm{coreSubsidy}(h + 210{,}000) = \left\lfloor \frac{\mathrm{coreSubsidy}(h)}{2} \right\rfloor ,coreSubsidy(h+210,000)=⌊2coreSubsidy(h)​⌋,

where 210,000=halvingInterval210{,}000 = \mathrm{halvingInterval}210,000=halvingInterval and the division by 222 on the right-hand side is truncating natural-number division (so if coreSubsidy(h)\mathrm{coreSubsidy}(h)coreSubsidy(h) is odd, the right-hand side is (coreSubsidy(h)−1)/2(\mathrm{coreSubsidy}(h) - 1)/2(coreSubsidy(h)−1)/2, and if coreSubsidy(h)=1\mathrm{coreSubsidy}(h) = 1coreSubsidy(h)=1 the right-hand side is 000).

Both sides unfold via the definition: for any height xxx, with kx=⌊x/210,000⌋k_x = \lfloor x / 210{,}000 \rfloorkx​=⌊x/210,000⌋,

coreSubsidy(x)={0if 64≤kx,⌊5,000,000,000/2kx⌋if kx≤63,\mathrm{coreSubsidy}(x) = \begin{cases} 0 & \text{if } 64 \le k_x,\\[4pt] \left\lfloor 5{,}000{,}000{,}000 / 2^{k_x} \right\rfloor & \text{if } k_x \le 63, \end{cases}coreSubsidy(x)={0⌊5,000,000,000/2kx​⌋​if 64≤kx​,if kx​≤63,​

with 5,000,000,000=50⋅COIN5{,}000{,}000{,}000 = 50 \cdot \mathrm{COIN}5,000,000,000=50⋅COIN, COIN=108\mathrm{COIN} = 10^8COIN=108, and the second branch a right shift of 5,000,000,0005{,}000{,}000{,}0005,000,000,000 by kxk_xkx​ bits. Note that ⌊(h+210,000)/210,000⌋=⌊h/210,000⌋+1\lfloor (h + 210{,}000) / 210{,}000 \rfloor = \lfloor h / 210{,}000 \rfloor + 1⌊(h+210,000)/210,000⌋=⌊h/210,000⌋+1, so the left-hand side uses one more halving than the right-hand side's inner value.

What is literally asserted. Moving the height forward by exactly 210,000210{,}000210,000 changes the value from coreSubsidy(h)\mathrm{coreSubsidy}(h)coreSubsidy(h) to its truncated half. The statement covers, in particular:

  • heights hhh with ⌊h/210,000⌋=63\lfloor h / 210{,}000 \rfloor = 63⌊h/210,000⌋=63, for which the left-hand side falls into the explicit 64≤k64 \le k64≤k branch and equals 000, so the statement there asserts 0=⌊coreSubsidy(h)/2⌋0 = \lfloor \mathrm{coreSubsidy}(h) / 2 \rfloor0=⌊coreSubsidy(h)/2⌋;
  • heights hhh with ⌊h/210,000⌋≥64\lfloor h / 210{,}000 \rfloor \ge 64⌊h/210,000⌋≥64, for which both sides are 000 by the first branch;
  • the general case kh≤62k_h \le 62kh​≤62, where the statement asserts ⌊5,000,000,000/2kh+1⌋=⌊⌊5,000,000,000/2kh⌋/2⌋\lfloor 5{,}000{,}000{,}000 / 2^{k_h + 1} \rfloor = \lfloor \lfloor 5{,}000{,}000{,}000 / 2^{k_h} \rfloor / 2 \rfloor⌊5,000,000,000/2kh​+1⌋=⌊⌊5,000,000,000/2kh​⌋/2⌋, an identity between two truncated divisions.

The statement is an equality (not merely ≤\le≤), it concerns only shifts by exactly one interval of 210,000210{,}000210,000 (not by a general multiple), and it says nothing about specSubsidy.

The file supplies only the statement; the proof is left as a placeholder.

Human review
  • Endorsed by Shuze Chen · Oct 26, 2026

    Confirmed by the moderator at approval.

  • Endorsed by pitimespi · Oct 26, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me