An empty path commits to the leaf
ProvedBitcoinTaproot.merkleRoot_baseFor a 33-byte control block (no path nodes), taprootMerkleRoot control leaf = leaf: the merkle root of a single-leaf tree is the leaf hash itself.
import Definitions.Def_BitcoinTaproot open BitcoinTaproot BitcoinSer BitcoinSig BitcoinVerify open BitcoinScript hiding Bytes Byte
theorem BitcoinTaproot.merkleRoot_base (control leaf : Bytes) (h : control.length = BitcoinTaproot.TAPROOT_CONTROL_BASE_SIZE) :
BitcoinTaproot.taprootMerkleRoot control leaf = leaf := by sorryRead-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: BitcoinTaproot.merkleRoot_base
Binders. , : byte strings (finite lists of 8-bit values).
Hypothesis. (the constant TAPROOT_CONTROL_BASE_SIZE, which is ).
Conclusion.
Unfolded: is the left fold of over the list starting from , i.e. , , result . Here is built by first computing the node count (natural-number subtraction, truncated at ), dropping the first bytes of , and then taking successive chunks of bytes (each chunk is "take " of what remains, then "drop "). With the count is , the node list is empty, and the fold returns its starting value unchanged; (the tagged hash of the lexicographically ordered concatenation of its two arguments) is never applied.
Edge cases the quantifiers include. of any length including empty; the contents of the control bytes are unconstrained (no parity, key, or on-curve condition is involved).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.