An honest BIP327 Sign output passes the partial check
ProvedBitcoinMuSig.musig2_sign_partialSigVerifybip327bip340bitcoinelliptic-curveformal-verificationfrostmathlibmultisignaturemusig2schnorrsecp256k1
With : .
Preamble
import Definitions.Def_BitcoinMuSig open BitcoinMuSig BitcoinSig BitcoinTaproot
Formal statement
theorem BitcoinMuSig.musig2_sign_partialSigVerify {K M : Type*} [CommRing K] [AddCommGroup M]
[Module K M] (G : M) (d k₁ k₂ a b e g gacc ε : K) :
(ε * k₁ + b * (ε * k₂) + e * a * (g * gacc * d)) • G =
ε • (k₁ • G + b • (k₂ • G)) + (e * a * (g * gacc)) • (d • G) := by sorrySource
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.musig2_sign_partialSigVerify
Source file: Thm_BitcoinMuSig_musig2_sign_partialSigVerify.lean (one theorem; it builds on the MuSig definition file, which itself uses the secp256k1 signature and Taproot definition files).
Statement. Let be an arbitrary commutative ring and an arbitrary additive commutative group with a -module structure. For every and all scalars (no hypotheses),
Definitions used, unfolded
The generic algebraic setting
- (where present) is an arbitrary type of indices, with no structure assumed (it may be empty, infinite, etc.).
- is an arbitrary commutative ring (with ; it may be the zero ring).
- is an arbitrary additive commutative group equipped with a -module structure: a scalar multiplication , written , satisfying the module axioms with respect to the given addition of (, , , , , ). may be the trivial group.
- A finite set of indices (where present) may be empty; empty sums are .
- Nothing from the Bitcoin definition files enters this statement: in particular, the letter is a universally quantified element of , not the secp256k1 generator.
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.