The txid does not depend on witness data
ProvedBitcoinSer.txid_stripFor every transaction: — the segregated-witness property that signatures can change without changing the transaction id.
import Definitions.Def_BitcoinSer
theorem BitcoinSer.txid_strip (tx : Tx) : BitcoinSer.txid tx = BitcoinSer.txid tx.stripWitness := by sorry
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: BitcoinSer.txid_strip
Binders and hypothesis. A single transaction record , unrestricted (any inputs, outputs, witnesses, field values; well-formedness not assumed). No hypotheses.
Conclusion. The transaction identifier of equals the transaction identifier of its witness-stripped copy:
Unfolding. , where is the file's own implementation (pad to a multiple of 64 bytes with a big-endian bit length, compress 64-byte chunks with the 64-round schedule and the 64-entry constant table from the 8-word initial value, emit 8 big-endian words). clears every input's witness list, leaving all else unchanged. The witness-free serializer always uses flag : it emits the 4-byte version, the CompactSize-prefixed inputs (outpoint, script, sequence; never the witness), the CompactSize-prefixed outputs and the 4-byte lock time — no marker, no witness section — so it is insensitive to the witness field. Hence both sides of the equation are of the same byte string. The statement is, after unfolding, an instance of "equal inputs give equal hashes" applied to the equality (which is the separate serTx_strip), though this theorem is stated directly and does not reference that one.
Both sides are 32-byte strings by construction of (not asserted here). The edge cases are the same as for serTx_strip: no inputs, no witnesses (reflexive), truncated field values.
What is not said. Nothing about : it is not claimed that (which would fail when has a witness, since then hashes ), nor that (true by the definition of when there is no witness, but not stated). Nothing about the hash function's properties (length, collision resistance, agreement with any standard), nor about well-formedness, nor about any relation between and . It is one equality of hash values for every .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.