Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The acceptance theorem: C(S,B,t) accepts iff V(S,B,t)

Proved
BitcoinBlockV2.acceptance

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

bip30bip34bitcoinbitcoin-mainnetblock-validationconnectblockconsensusformal-verificationundo

For every chain state SSS reachable from the genesis, candidate block BBB and clock reading ttt:

R(S)⟹(∃S′ u. validate(S,B,t)=accept(S′,u)  ⟺  Valid(S,B,t)).R(S) \Longrightarrow \big(\exists S'\,u.\ \mathrm{validate}(S,B,t) = \mathrm{accept}(S',u) \iff \mathrm{Valid}(S,B,t)\big).R(S)⟹(∃S′u. validate(S,B,t)=accept(S′,u)⟺Valid(S,B,t)).

The source-linked validation path — AcceptBlockHeader, CheckBlock, ContextualCheckBlock, ConnectBlock with the published subsidy, difficulty, median-time, activation, merkle, script and BIP68 transcriptions — accepts exactly when the declarative specification admits the block: the header predicate (a valid compact target met by the hash, the tip as parent, the required difficulty, the median-time floor, the two-hour ceiling, the version floors), the block predicate, the contextual predicate, and the ledger predicate (BIP30 where it applies, every transaction admissible in sequence with the BIP68 specification and every input script verifying, the coinbase bounded by fees plus the specification subsidy).

Formalization Note. The reachability hypothesis is carried as in the goal contract; the equivalence holds for every state. Temporary future-time rejections are a separate outcome (futureTime_iff, futureTime_transient), and the resulting state is ApplySpec (apply_spec).

Preamble
import Definitions.Def_BitcoinBlockV2
import Definitions.Def_BitcoinSer
Formal statement
theorem BitcoinBlockV2.acceptance (S : ChainState) (b : BitcoinSer.Block) (now : Int) (hR : BitcoinBlockV2.Reachable S) :
    BitcoinBlockV2.accepts S b now ↔ BitcoinBlockV2.Valid S b now := by sorry
Source
Bitcoin Core a773e1e33b349dc819b5a0edc1c7a4839dc73b48: AcceptBlockHeader, CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, CheckMerkleRoot, CheckWitnessMalleation, ContextualCheckBlock, ConnectBlock, GetBlockScriptFlags, IsBIP30Repeat, IsBIP30Unspendable, UpdateCoins, DisconnectBlock, ApplyTxInUndo, src/validation.cpp: https://github.com/bitcoin/bitcoin/blob/a773e1e33b349dc819b5a0edc1c7a4839dc73b48/src/validation.cpp; CheckTransaction (consensus/tx_check.cpp); IsFinalTx, GetLegacySigOpCount, GetP2SHSigOpCount, GetTransactionSigOpCost, CheckTxInputs (consensus/tx_verify.cpp); CScript::GetSigOpCount, IsUnspendable (script/script.cpp, script.h); CountWitnessSigOps (script/interpreter.cpp); AddCoin, SpendCoin, AddCoins (coins.cpp); GetBlockProof (chain.cpp); GetWitnessCommitmentIndex, GetBlockWeight (consensus/validation.h); CMainParams (kernel/chainparams.cpp)
Human review
  • Endorsed by Shuze Chen · Oct 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by pitimespi · Oct 28, 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