betrusted-ed25519-verified/verification/Proofs
mrwulf 3bad795029 verification: pin the whole declaration surface (P1-b)
Phase 2b asks the kernel whether any AXIOM is declared under Proofs/. Phase 3
pins the cones of the named certificates. Between them sat every other
declaration in the corpus — around three thousand of them — and a helper lemma
quietly acquiring a hash oracle in its cone moved nothing either phase looked
at.

Phase 2c closes that. Ported from ltl-accumulator-verified, where a nine-attack
self-test proved a source-regex enumerator evadable by attributed, private,
indented and `instance` declarations and by a nested-namespace basename
collision. Reading the compiled environment sees what the kernel saw; no name
shape hides. Every constant contributes module, name, kind and full axiom cone,
and the observed set must equal inventory-allowlist.txt exactly in BOTH
directions, with a count trailer so a truncated run cannot pass as an empty
diff.

FOUR THINGS THIS BUILD GOT WRONG, each caught by a check rather than by review:

  - The number of inventory drivers is a per-repo FACT, not an assumption.
    dalek and anza cannot import their corpus as one environment (Proofs.Basic
    and Proofs.ConstSpecs both declare CurveFieldProofs.zero_spec); risc0 and
    betrusted have no Proofs.Basic at all. Determined by compiling a probe.
    check.sh now DISCOVERS its drivers from the filesystem instead of naming
    two, and the generator refuses to split out a module the repo lacks.

  - The split let one real declaration hide behind another's entry. Keyed on
    name alone, the two zero_specs produced byte-identical records, so 3022
    declarations were covered by 3021 allowlist entries. Caught by the count
    trailer. Every record now carries its originating module.

  - The gate's success line said "single sanctioned axiom", inherited from the
    accumulator's policy. This corpus permits NONE. A success message
    describing a different rule is how an assertion stops meaning anything.

  - selftest-axgate.sh lifted Phase 2b with a range ending at "Phase 3", so
    inserting Phase 2c between them made it swallow the new phase and die on
    variables only check.sh defines — surfacing as the BASELINE case failing,
    a self-test blaming a gate for its own extraction bug. Both self-tests now
    stop at the next phase marker whatever it is called, and refuse to run if
    they capture more than one phase. The guard is the fix; the range was the
    symptom.

WHAT THIS IS NOT, recorded in TRUSTED-BASE.md at the same length as the claim:

  - No independent cone walker. The accumulator cross-checks collectAxioms
    against a hand-written walker. Ported here it was wrong in BOTH directions
    on mathlib's inductive shapes: EdPoint gave [] against the kernel's three
    axioms, and once extended, ProjPoint gave three against the kernel's none.
    Two implementations disagreeing both ways are a second wrong answer, not a
    check. These cones rest on collectAxioms alone.

  - Thirteen Proofs/Scalar* modules are inventoried by nothing — the
    second-button seam, still open. Phase 2c names every uncovered module on
    every run so the omission is visible rather than inferred.

selftest-inventory.sh exercises the shipping gate with six cases, each
asserting a specific diagnostic, including the one that matters: a cone
widened by one oracle while name, module and kind stay put. Negative-tested by
disabling the gate's diff, which turns two cases red including one for the
wrong reason, correctly reported as such.

Verified green: 20 runs across the four repositories (four buttons, four
harness, four inventory, four axgate, four binding self-tests), zero red. The
four check-scalar.sh greens from the preceding sweep stand: that script neither
reads the pin file nor changed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-30 01:20:20 +02:00
..
AddSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
Audit.lean verification: bind the statements, the specifications, and the model (P1-a) 2026-07-29 00:38:22 +02:00
CompressSpec.lean PHASE-2 HALF-LIFT on the betrusted fork: verify_accepts_iff_point, button-enforced 2026-07-05 16:57:57 +02:00
ConstSpecs.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
DecompressMain.lean PHASE 2 COMPLETE ON BETRUSTED: THE FULL POINT-LEVEL LIFT 2026-07-06 01:53:39 +02:00
DecompressSpec.lean PHASE 2 COMPLETE ON BETRUSTED: THE FULL POINT-LEVEL LIFT 2026-07-06 01:53:39 +02:00
Denote.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
DsmLoopSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:07:59 +02:00
DsmMulSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:10 +02:00
DsmNafLoadSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:10 +02:00
DsmNafLoopSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:10 +02:00
DsmNafMath.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:10 +02:00
DsmNafSpec.lean NAF encoder proven end-to-end + the phase-1 double-scalar-mul apex 2026-07-04 16:52:10 +02:00
DsmStepSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:07:59 +02:00
DsmTableSpec.lean Double-scalar-mul proof campaign, bricks 1-3: table, digit step, loop 2026-07-04 15:07:59 +02:00
EdAddAffNiels.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:31 +02:00
EdAddProjNiels.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:31 +02:00
EdConvert.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:31 +02:00
EdCurve.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:31 +02:00
EdDenote.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:31 +02:00
EdDouble.lean group-law layer: complete twisted Edwards addition law proven 2026-07-02 17:11:28 +02:00
EdMain.lean lean-guard: disable core dumps (no more apport popups on capped aborts) 2026-07-02 16:23:31 +02:00
FeQ.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
Field.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
FieldMain.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
FromBytesSpec.lean PHASE 2 COMPLETE ON BETRUSTED: THE FULL POINT-LEVEL LIFT 2026-07-06 01:53:39 +02:00
Inventory.lean verification: pin the whole declaration surface (P1-b) 2026-07-30 01:20:20 +02:00
InventoryCore.lean verification: pin the whole declaration surface (P1-b) 2026-07-30 01:20:20 +02:00
InvertSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
MulSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
P25519.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
PointEqSpec.lean THE POINT-LEVEL VERIFICATION EQUATION on the betrusted fork: 2026-07-05 19:25:55 +02:00
PointLiftSpec.lean PHASE-2 HALF-LIFT on the betrusted fork: verify_accepts_iff_point, button-enforced 2026-07-05 16:57:57 +02:00
ReduceSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
ScalarAddSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
ScalarBytesSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 11:00:52 +02:00
ScalarDenote.lean Merge scalar into CurveField: one type universe, serial-only backend 2026-07-04 22:20:26 +02:00
ScalarFromBytesSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 11:00:52 +02:00
ScalarFullMulSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
ScalarLoop.lean scalar layer: add+sub fully proven mod l against THIS fork's v4 extraction 2026-07-03 18:45:17 +02:00
ScalarMain.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
ScalarMontSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
ScalarMulSpec.lean Scalar layer complete: Montgomery reduction + full mul ported, scalarImplementation aggregate 2026-07-03 21:46:57 +02:00
ScalarPackSpec.lean PHASE-2 HALF-LIFT on the betrusted fork: verify_accepts_iff_point, button-enforced 2026-07-05 16:57:57 +02:00
ScalarReduceSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
ScalarSubSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
ScalarUnpackSpec.lean Hash-to-scalar PROVEN: from_bytes_wide_spec - Scalar::from_hash's reduction is exact mod l 2026-07-04 11:00:52 +02:00
ScalarWideSpec.lean Signature layer, first bricks: canonicity closure + hash-to-scalar foundation 2026-07-03 23:18:34 +02:00
SigApexSpec.lean THE SIGNATURE APEX on the betrusted fork: verify_accepts_iff, button-enforced 2026-07-04 22:49:19 +02:00
Square2Spec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
SquareSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
SubNegSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
ToBytesMath.lean PHASE-2 HALF-LIFT on the betrusted fork: verify_accepts_iff_point, button-enforced 2026-07-05 16:57:57 +02:00
ToBytesSpec.lean PHASE-2 HALF-LIFT on the betrusted fork: verify_accepts_iff_point, button-enforced 2026-07-05 16:57:57 +02:00