dalek-ed25519-verified/verification/Proofs
mrwulf 37bf01fc6f Account for every constant the kernel sees, by set containment
THE GAP. The capability matrix in the control repo — built after the author
answered a capability question by grepping for a FILENAME rather than for the
property, three times in one session — asked whether each repository's auditor
enumerates itself. The four ed25519 forks answered no. Following that up found
something larger: `Proofs/Audit.lean`, the statement-binding driver from P1-a,
is compiled, is a member of the manifest, and was enumerated by NOTHING. The
kernel counted 3058 declarations where the inventory accounted for 3022, and
26 of the 36 missing were its.

THE PROPERTY, now enforced: every constant the kernel sees under this button's
manifest must appear, BY NAME, in either the corpus inventory or the
instruments' own surface. `emitDrivers` in InventoryCore walks the audit
modules and fails closed on an axiom (which would widen the trusted base
outside every cone) or on a standalone claim (which no certificate covers and
no allowlist pins), while admitting the obligations the elaborator generates
for a definition declared alongside it.

TWO WRONG FORMULATIONS FIRST, both recorded because the second is instructive:

  · `kernel = corpus + instruments + N_DRIVERS`, where the last term was
    justified as a per-driver "self-observation blind spot". It fitted dalek
    and anza (2 drivers, residual 2) and broke on risc0 and betrusted
    (1 driver, residual 2). The residual is 2 everywhere and has nothing to do
    with drivers. This was curve-fitting from a sample of one, and it was named
    as the highest-risk claim in the round-7 self-assessment BEFORE the data
    refuted it.
  · distinct-by-name counting, which collapses `CurveFieldProofs.zero_spec` —
    a name that genuinely denotes two different declarations, in Proofs.Basic
    and Proofs.ConstSpecs, walked by two drivers with separate environments.

THE MEASURED CAUSE of the residual. Lean materialises equation lemmas lazily,
when something forces an unfold, and each module that forces one gets its own
copy in its object file. `CurveFieldProofs.denote.eq_1` sits in both
SubNegSpec.olean and ConstSpecs.olean; `CurveFieldProofs.limbsVal.eq_1` in both
ReduceSpec.olean and ConstSpecs.olean. The kernel gate reads object files and
counts both copies; the environment holds one constant per name. Counts cannot
relate those two views in either direction — so the check compares SETS, which
is the idiom the rest of this estate already uses, and no constant remains that
could be widened to make a red run green.

Negative-tested: with the instrument walk disabled, the check names
Proofs.Audit's declarations as unaccounted.

ANZA also lacked one allowlist row, `subtle.Choice...from.eq_1`, the same
lazy-materialisation effect seen from the other side. Verified rather than
assumed before adding it: the parent is declared in gen/CurveField/
FunsExternal.lean — the model, pinned by bytes and not inventoried by
declaration — the lemma materialised in Proofs.CompressSpec which forced the
unfold, and all three other forks carry the lemma row while none carries the
parent.

CONSEQUENCE WORTH DISCLOSING: the audited declaration surface is not purely a
function of the corpus source. It depends on which proofs forced which
unfolds. This is now a known gap in the round-7 kit.

Also corrected here: Proofs/Inventory.lean's header claimed the audit drivers
were excluded from the compile manifest. They are lines 42-44 of PROOFS.

Certified by a full sweep: both buttons, all four forks, purged trees. 8/8.
2026-08-01 16:10:59 +02:00
..
AddSpec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
Audit.lean verification: bind the statements, the specifications, and the model (P1-a) 2026-07-29 00:38:17 +02:00
Basic.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
CompressSpec.lean Phase 2, brick 1 complete: ed_compress_spec - compress emits the canonical 2026-07-05 13:33:58 +02:00
ConstSpecs.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
DecompressMain.lean PHASE 2 COMPLETE ON DALEK: THE FULL POINT-LEVEL LIFT 2026-07-06 00:05:55 +02:00
DecompressSpec.lean Phase 2, decompress part 2b: THE SQUARE-ROOT WALK PROVEN 2026-07-05 22:03:57 +02:00
Denote.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
DsmLoopSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:30:18 +02:00
DsmMulSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:06 +02:00
DsmNafLoadSpec.lean NAF campaign stages 1-2: LE load walks + the digit loop's arithmetic core 2026-07-04 15:30:18 +02:00
DsmNafLoopSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:06 +02:00
DsmNafMath.lean NAF campaign stages 1-2: LE load walks + the digit loop's arithmetic core 2026-07-04 15:30:18 +02:00
DsmNafSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:06 +02:00
DsmStepSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:30:18 +02:00
DsmTableSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:30:18 +02:00
EdAddAffNiels.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
EdAddProjNiels.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
EdConvert.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
EdCurve.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
EdDenote.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
EdDouble.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
EdMain.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 14:50:42 +02:00
FeQ.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
Field.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
FieldMain.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
FromBytesSpec.lean Phase 2, decompress step 2: THE BYTE PARSER PROVEN (from_bytes_spec, 2026-07-05 22:55:18 +02:00
Inventory.lean Account for every constant the kernel sees, by set containment 2026-08-01 16:10:59 +02:00
InventoryBasic.lean Account for every constant the kernel sees, by set containment 2026-08-01 16:10:59 +02:00
InventoryCore.lean Account for every constant the kernel sees, by set containment 2026-08-01 16:10:59 +02:00
InventoryScalar.lean verification: close the two-button seam and level up the scalar button (P0-b) 2026-07-30 12:30:26 +02:00
InvertSpec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
MulSpec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
P25519.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
PointEqSpec.lean THE POINT-LEVEL VERIFICATION EQUATION: verify_accepts_iff_point_eq, 2026-07-05 18:27:25 +02:00
PointLiftSpec.lean PHASE 2 HALF-LIFT PROVEN: verify_accepts_iff_point, button-enforced 2026-07-05 16:06:23 +02:00
ReduceSpec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
ScalarAddSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
ScalarBytesSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 10:31:32 +02:00
ScalarDenote.lean Merge scalar into CurveField; integrate the verify glue against the model 2026-07-04 18:13:58 +02:00
ScalarFromBytesSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 10:31:32 +02:00
ScalarFullMulSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
ScalarLoop.lean scalar: generic loop-combinator lemmas (loop_step, range_next_lt/ge_spec) 2026-07-02 21:47:47 +02:00
ScalarMain.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
ScalarMontSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
ScalarMulSpec.lean scalar layer: mul_internal proven — Montgomery frontier phase A down 2026-07-03 18:56:04 +02:00
ScalarPackSpec.lean Phase 2, half-lift prerequisite: the hash-to-scalar entry is canonical 2026-07-05 14:10:09 +02:00
ScalarReduceSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
ScalarSubSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
ScalarUnpackSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 10:31:32 +02:00
ScalarWideSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:29 +02:00
SigApexSpec.lean THE SIGNATURE APEX: the EdDSA verification equation, proven and audited 2026-07-04 19:45:55 +02:00
Square2Spec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
SquareSpec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
SubNegSpec.lean field layer: 14 proofs pass, fieldImplementation axiom-clean 2026-07-02 14:17:44 +02:00
ToBytesMath.lean Phase 2, half-lift prerequisite: the hash-to-scalar entry is canonical 2026-07-05 14:10:09 +02:00
ToBytesSpec.lean Phase 2, brick 1a: to_bytes canonicity proven (to_bytes_spec, kernel-audited) 2026-07-05 13:10:43 +02:00