Accepted headers respect the version floors after activation
ProvedBitcoinHeader.version_floorFor every header accepted by the contextual check against previous height : if then its version is at least 2; if then at least 3; if then at least 4.
import Definitions.Def_BitcoinHeader
theorem BitcoinHeader.version_floor (h : BitcoinHeader.Header) (prevHeight : Nat) (prevTimes : List Int)
(required : BitVec 32) (now : Int)
(hc : BitcoinHeader.contextualCheck h prevHeight prevTimes required now = true) :
(BitcoinHeader.BIP34Height ≤ prevHeight + 1 → 2 ≤ h.version) ∧
(BitcoinHeader.BIP66Height ≤ prevHeight + 1 → 3 ≤ h.version) ∧
(BitcoinHeader.BIP65Height ≤ prevHeight + 1 → 4 ≤ h.version) := 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)
For every Header — a record with an arbitrary integer field , an arbitrary integer field , and a 32-bit bit-vector field — every natural number (named prevHeight), every finite list of integers (named prevTimes, possibly empty), every 32-bit bit-vector (named required), and every integer (named now), under the single hypothesis that the Boolean-valued function evaluates to true, the statement asserts the conjunction of three implications (one-directional, not equivalences):
where , , are the constants BIP34Height, BIP66Height, BIP65Height, is natural-number addition, and etc. are non-strict integer inequalities. Equivalently: if then ; if then ; if then . Each implication is vacuously satisfied when its antecedent fails (e.g. all three hold trivially when ), and the conclusion places no lower bound on in that case; the conclusion also says nothing in the converse direction (a large version at a small is not addressed). The hypothesis, unfolded, is that all four of the following hold: ; , where is the entry at zero-based position of the non-decreasing sort of the first entries of (the upper-middle element for even ), or when ; ; and . This hypothesis is satisfiable (for instance by choosing , large, large and ), so the statement is not vacuous in general; but note that the parameters , and appear only in the hypothesis and not in the conclusion, and that the first three conjuncts of the hypothesis (bits, time, clock) are not used by the shape of the conclusion, which concerns only and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.