Merkle root of no transactions
ProvedBitcoinMerkle.root_nilFor every pairwise hash and zero hash , : the empty list yields the zero hash with the mutation flag clear, as if (hashes.size() == 0) return uint256();.
import Definitions.Def_BitcoinMerkle
theorem BitcoinMerkle.root_nil {H : Type} [DecidableEq H] (c : H → H → H) (z : H) :
BitcoinMerkle.computeMerkleRoot c z [] = (z, false) := 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: BitcoinMerkle.root_nil
Binders and assumptions. is an arbitrary type with decidable equality (for the Boolean is exactly when ). is an arbitrary two-argument operation and an arbitrary element; nothing is assumed about either. There are no further hypotheses.
Conclusion.
an equality of ordered pairs in : the first component of the result on the empty list is exactly , and the second component is exactly .
Unfolding (computeMerkleRoot). , where (rootLoop) on a list and Boolean is
with the first entry of or if , Boolean "or", (pairUp) given by , , , and (hasEqualPair) the Boolean , . For the empty list the loop test fails, so the loop body (and hence , , and ) is never invoked; the result is .
What is and is not claimed. The statement is about the single input only. It asserts that the default element is returned as the first component (so plays no role) and that the mutation flag is . It holds for every and every . It says nothing about nonempty inputs.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.