Normalization yields a low S
ProvedBitcoinSig.normalizeS_lowFor every , isHighS (normalizeS s) = false: after normalization .
import Definitions.Def_BitcoinSig open BitcoinSig BitcoinSer
theorem BitcoinSig.normalizeS_low (s : Nat) (hs : s < BitcoinSig.n) :
BitcoinSig.isHighS (BitcoinSig.normalizeS s) = false := 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: BitcoinSig.normalizeS_low
Binders and hypothesis. Universally quantified over a natural number , with one hypothesis : , where is the constant
No other property of (primality, being a group order) is used or asserted.
Conclusion.
Unfolding. isHighS is the Boolean decision of , where is natural-number (floor) division; since is odd, . normalizeS is: (natural-number subtraction, truncated at ) if isHighS , and otherwise. So the conclusion reads: let
then . Under : in the first case , so ; in the second case by definition of the branch. The statement is purely arithmetic on natural numbers.
Edge cases. is allowed (not high, normalizes to ). is not high and is left unchanged. is high and maps to . The hypothesis excludes ; for such the definition would give , also not high, but the theorem does not cover it.
What is not said. The statement does not say anything for . It does not say that normalizeS is congruent to modulo , nor that it is non-zero, nor that it is below . It does not say that normalization preserves or changes the outcome of any signature verification (ecdsaVerifyRaw, pubkeyVerify). It does not say that normalizeS is idempotent, nor that it is the identity on low values (though both follow from the definition, they are not asserted). It does not mention checkLowS or byte-string signatures at all: it is about a bare natural number.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.