The TapLeaf and TapBranch tags hash differently
ProvedBitcoinTapSoundnessV2.tapleaf_ne_tapbranchsha256 (ascii "TapLeaf") ≠ sha256 (ascii "TapBranch"), by kernel computation of the model's SHA-256.
import Definitions.Def_BitcoinTapSoundnessV2 import Definitions.Def_BitcoinSer import Definitions.Def_BitcoinSig open BitcoinTapSoundnessV2 BitcoinSer BitcoinTaproot
theorem BitcoinTapSoundnessV2.tapleaf_ne_tapbranch :
BitcoinSer.sha256 (BitcoinSig.ascii "TapLeaf") ≠ BitcoinSer.sha256 (BitcoinSig.ascii "TapBranch") := 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: BitcoinTapSoundnessV2.tapleaf_ne_tapbranch
Statement. A closed proposition with no binders and no hypotheses:
Unfoldings. is the list of UTF-8 code units of the string , each taken as one 8-bit byte; so is the 7-byte string and is the 9-byte string . is the bundle's executable SHA-256: a total function on byte strings that appends the byte , zero bytes until the length is , and the original bit-length as 8 big-endian bytes; splits the padded string into 64-byte chunks; folds the SHA-256 compression function (message schedule, 64 rounds with the standard round constants) over the chunks from the standard initial state; and emits the eight 32-bit state words as big-endian 4-byte groups, a 32-byte string.
What is asserted. The two 32-byte strings obtained by applying this concrete function to these two concrete byte strings are different byte strings (they differ in at least one of their 32 positions). Nothing is asserted about any other tag, about the tagged-hash construction, or about collision resistance in general; the statement concerns exactly these two fixed inputs.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.