Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The Taproot exception block enforces every flag except Taproot

Proved
BitcoinActivation.taproot_exception

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

bitcoinbitcoin-mainnetconsensusformal-verificationscript-flagssoft-fork-activation

For every height h≥481,824h \ge 481{,}824h≥481,824 — in particular the exception block's height 692,261692{,}261692,261 — the flags of the Taproot exception block are P2SH | WITNESS | DERSIG | CHECKLOCKTIMEVERIFY | CHECKSEQUENCEVERIFY | NULLDUMMY: the exception removes TAPROOT only, and the height-gated rules are all active.

Preamble
import Definitions.Def_BitcoinActivation
Formal statement
theorem BitcoinActivation.taproot_exception (height : Nat) (h : 481824 ≤ height) :
    BitcoinActivation.blockScriptFlags height .taprootBlock = ⟨true, true, false, true, true, true, true⟩ := by sorry
Source
Bitcoin Core a773e1e33b349dc819b5a0edc1c7a4839dc73b48: GetBlockScriptFlags, src/validation.cpp lines 2249-2288: https://github.com/bitcoin/bitcoin/blob/a773e1e33b349dc819b5a0edc1c7a4839dc73b48/src/validation.cpp#L2249; DeploymentActiveAt / DeploymentActiveAfter (buried), src/deploymentstatus.h; BuriedDeployment and DeploymentHeight, src/consensus/params.h; CMainParams BIP34Height, BIP65Height, BIP66Height, CSVHeight, SegwitHeight, script_flag_exceptions, src/kernel/chainparams.cpp; LOCKTIME_VERIFY_SEQUENCE, src/consensus/consensus.h; nLockTimeFlags in ConnectBlock, src/validation.cpp line 2478
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: BitcoinActivation.taproot_exception

Binders and hypothesis. Universally quantified over one natural number h∈Nh \in \mathbb{N}h∈N ("height"), with the single hypothesis

481824≤h481824 \le h481824≤h

(non-strict, so h=481824h = 481824h=481824 itself is included). Nothing is asserted for h<481824h < 481824h<481824.

Conclusion. An equality in the seven-field Boolean record type ScriptFlags\mathsf{ScriptFlags}ScriptFlags (fields in order p2sh,witness,taproot,dersig,cltv,csv,nulldummy\mathsf{p2sh}, \mathsf{witness}, \mathsf{taproot}, \mathsf{dersig}, \mathsf{cltv}, \mathsf{csv}, \mathsf{nulldummy}p2sh,witness,taproot,dersig,cltv,csv,nulldummy):

blockScriptFlags(h,taprootBlock)  =  ⟨T, T, F, T, T, T, T⟩,\mathsf{blockScriptFlags}(h, \mathsf{taprootBlock}) \;=\; \langle \mathsf{T},\ \mathsf{T},\ \mathsf{F},\ \mathsf{T},\ \mathsf{T},\ \mathsf{T},\ \mathsf{T}\rangle,blockScriptFlags(h,taprootBlock)=⟨T, T, F, T, T, T, T⟩,

i.e. the record with p2sh=witness=true\mathsf{p2sh} = \mathsf{witness} = \mathsf{true}p2sh=witness=true, taproot=false\mathsf{taproot} = \mathsf{false}taproot=false, and dersig=cltv=csv=nulldummy=true\mathsf{dersig} = \mathsf{cltv} = \mathsf{csv} = \mathsf{nulldummy} = \mathsf{true}dersig=cltv=csv=nulldummy=true. Here taprootBlock\mathsf{taprootBlock}taprootBlock is one of the three labels of ScriptException={none,bip16Block,taprootBlock}\mathsf{ScriptException} = \{\mathsf{none}, \mathsf{bip16Block}, \mathsf{taprootBlock}\}ScriptException={none,bip16Block,taprootBlock}. Record equality means all seven fields agree.

Unfolding the left-hand side. blockScriptFlags(h,taprootBlock)\mathsf{blockScriptFlags}(h, \mathsf{taprootBlock})blockScriptFlags(h,taprootBlock) starts from f=exceptionBase(taprootBlock)=⟨T,T,F,F,F,F,F⟩f = \mathsf{exceptionBase}(\mathsf{taprootBlock}) = \langle \mathsf{T},\mathsf{T},\mathsf{F},\mathsf{F},\mathsf{F},\mathsf{F},\mathsf{F}\ranglef=exceptionBase(taprootBlock)=⟨T,T,F,F,F,F,F⟩, keeps the first three fields (p2sh=T\mathsf{p2sh} = \mathsf{T}p2sh=T, witness=T\mathsf{witness} = \mathsf{T}witness=T, taproot=F\mathsf{taproot} = \mathsf{F}taproot=F) unchanged, and sets

dersig=F∨[ 363725≤h ],cltv=F∨[ 388381≤h ],csv=F∨[ 419328≤h ],nulldummy=F∨[ 481824≤h ],\mathsf{dersig} = \mathsf{F} \lor [\,363725 \le h\,],\quad \mathsf{cltv} = \mathsf{F} \lor [\,388381 \le h\,],\quad \mathsf{csv} = \mathsf{F} \lor [\,419328 \le h\,],\quad \mathsf{nulldummy} = \mathsf{F} \lor [\,481824 \le h\,],dersig=F∨[363725≤h],cltv=F∨[388381≤h],csv=F∨[419328≤h],nulldummy=F∨[481824≤h],

where [ P ][\,P\,][P] is the Boolean truth value of the decidable inequality PPP and ∨\lor∨ is Boolean OR. So the left-hand side is

⟨T, T, F, [ 363725≤h ], [ 388381≤h ], [ 419328≤h ], [ 481824≤h ]⟩.\big\langle \mathsf{T},\ \mathsf{T},\ \mathsf{F},\ [\,363725 \le h\,],\ [\,388381 \le h\,],\ [\,419328 \le h\,],\ [\,481824 \le h\,]\big\rangle .⟨T, T, F, [363725≤h], [388381≤h], [419328≤h], [481824≤h]⟩.

What the statement asserts, concretely. For every h≥481824h \ge 481824h≥481824, each of the four tests [ 363725≤h ][\,363725 \le h\,][363725≤h], [ 388381≤h ][\,388381 \le h\,][388381≤h], [ 419328≤h ][\,419328 \le h\,][419328≤h], [ 481824≤h ][\,481824 \le h\,][481824≤h] equals true\mathsf{true}true, while the taproot\mathsf{taproot}taproot field stays false\mathsf{false}false because it is copied from the exception base and is never modified by the height. The threshold 481824481824481824 is the tabulated height of the label segwit\mathsf{segwit}segwit. Only the exception label taprootBlock\mathsf{taprootBlock}taprootBlock is covered; nothing is said about the other two labels at these heights, nor about this label at lower heights.

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