Every evicted transaction paid strictly less than its replacement
ProvedBitcoinReplacement.fee_strictly_increasesFor a rate with positive numerator, a valid replacement and any R.evicted: t.fee < R.new.fee. With a zero incremental relay fee the inequality can be an equality, hence the hypothesis.
import Definitions.Def_BitcoinReplacement
theorem BitcoinReplacement.fee_strictly_increases (rate : BitcoinReplacement.FeeRate)
(hr : 0 < rate.fee) (R : BitcoinReplacement.Replacement)
(hR : BitcoinReplacement.Valid rate R) (t : BitcoinReplacement.Tx) (ht : t ∈ R.evicted) :
t.fee < R.new.fee := 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: BitcoinReplacement.fee_strictly_increases
Setting (unfolded from the preamble). All declarations live in a namespace BitcoinReplacement. A transaction is a pair of natural numbers together with a proof that ; may be . Two transactions are equal exactly when their fees and virtual sizes agree. A fee rate is a pair of natural numbers together with a proof that ; may be , and nothing identifies with . For a fee rate and a natural number ,
computed with natural-number (rounding-down) division; since the inner subtraction is exact, and the value equals . In particular , and for every whenever .
A replacement consists of a transaction , a multiset of transactions , a multiset of transactions , and a proof that as multisets (every transaction value occurs in at most as many times as it occurs in ). Either multiset may be empty, may itself occur in , and no other relation between the three components is imposed. For a multiset of transactions, , summed with multiplicity, so .
is valid at rate (written ) when all three of the following hold:
- () for every transaction value occurring in , (a strict cross-multiplied comparison in ; vacuously true when is empty; nothing is required of elements of that do not occur in );
- (, first conjunct) ;
- (, second conjunct) , where is truncated natural-number subtraction (it returns when the subtrahend exceeds the minuend; under item 2 it coincides with ordinary subtraction).
Statement. For every fee rate such that (the numerator of the rate is positive), every replacement such that holds (all three conditions above), and every transaction that occurs in the multiset , the following strict inequality of natural numbers holds:
Edge cases and scope. The membership hypothesis is (the larger multiset), so the conclusion covers every evicted transaction, whether or not it occurs in . If is empty the statement is vacuous. The hypothesis constrains only the numerator; may be arbitrarily large, so the ratio may be arbitrarily small but is nonzero, and consequently for every . Nothing is asserted about virtual sizes or fee rates of versus , only about raw fees.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.