The generator has order exactly n
ProvedBitcoinMuSig.addOrderOf_Gptbip327bip340bitcoinelliptic-curveformal-verificationfrostmathlibmultisignaturemusig2schnorrsecp256k1
addOrderOf Gpt = n.
Preamble
import Definitions.Def_BitcoinMuSig open BitcoinMuSig BitcoinSig BitcoinTaproot
Formal statement
theorem BitcoinMuSig.addOrderOf_Gpt : addOrderOf Gpt = n := by sorry
Source
BIP327 MuSig2 for BIP340-compatible multi-signatures (KeyAgg, ApplyTweak, NonceAgg, GetSessionValues, PartialSigVerifyInternal, PartialSigAgg): https://github.com/bitcoin/bips/blob/master/bip-0327.mediawiki; BIP340 Schnorr signatures; RFC 9591 FROST (Lagrange-coefficient aggregation); secp256k1 (SEC 2); Mathlib's WeierstrassCurve.Affine group law; the signature mission's executable curve (BitcoinSig.padd, pmul, schnorrVerify)
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: BitcoinMuSig.addOrderOf_Gpt
Source file: Thm_BitcoinMuSig_addOrderOf_Gpt.lean (one theorem; it builds on the MuSig definition file, which itself uses the secp256k1 signature and Taproot definition files).
Statement. There are no variables and no hypotheses. The theorem asserts that the additive order of the point in the group equals the natural number :
Here Mathlib's additive order is the least positive natural number with if such an exists, and is if no positive kills . Since , the statement says exactly: , and for every natural with .
Definitions used, unfolded
Constants
- is a fixed natural number (the field modulus).
- is a fixed natural number (written in hexadecimal).
- and are fixed natural numbers ( is even: its last hexadecimal digit is ).
The Mathlib curve and its point group
- denotes Mathlib's . For a natural number , is its residue . The definition file registers, as a global instance, the fact that is prime (proved there by a Lucas–Pratt certificate); this instance is what makes a field, which Mathlib needs to put a group structure on curve points.
- is the Weierstrass curve over with coefficients and , i.e. the curve
- is Mathlib's type of points of : a point is either the point at infinity, written , or an affine point with (carrying a proof that it is nonsingular). It is equipped with Mathlib's chord-and-tangent addition, which makes it an additive commutative group with neutral element and negation , .
- For and , ( summands, ). For , is the usual integer multiple ( for ).
- is the affine point .
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.