A block header serializes to 80 bytes
ProvedBitcoinSer.serHeader_lengthFor every well-formed header : .
import Definitions.Def_BitcoinSer
theorem BitcoinSer.serHeader_length (h : Header) (hw : h.wf) : (BitcoinSer.serHeader h).length = 80 := 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.serHeader_length
Binders and hypothesis. A header record and one hypothesis , which unfolds to the conjunction
Here is an integer (signed), the two hash fields are byte strings of a priori unrestricted length, and time/bits/nonce are natural numbers.
Conclusion. The serialized header has exactly 80 bytes:
Unfolding. . The pieces have lengths (since is of a reduced value, always 4 bytes), , (both emitted raw, with no length prefix), and . So the length is for any header, and the theorem's content is exactly that under the two length conjuncts of this is .
Of the seven conjuncts of , only and are relevant to the length; the range conditions on version, time, bits and nonce are assumed but play no role, because the fixed-width encoders produce 4 bytes regardless of the value (they truncate rather than grow). The hypothesis is thus stronger than what the conclusion needs; a reader might expect the statement to assume only the two length equalities.
What is not said. Nothing about headers that are not well-formed; in particular the theorem does not say that a header with hash fields of other lengths serializes to something other than 80 bytes (though by the formula it would). Nothing about the content of the bytes, the position of fields, byte order, or the readability of the serialization (that is header_roundtrip). Nothing about , blocks, or . The statement is a single length equality under the full assumption.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.