betrusted-ed25519-verified/verification/Proofs
mrwulf 6120f9bb17 Add scalar-layer foundation (Scalar52 arithmetic mod ℓ)
Transpile the Scalar52 limb backend (backend::serial::u64::scalar
add/sub/mul/square/montgomery_*) from Rust to Lean via Charon/Aeneas,
scoped at the function level to the iterator-free arithmetic core.

  - verification/extract-scalar.sh: function-level Charon/Aeneas extraction
  - verification/gen/CurveScalar/{Types,Funs}.lean: transpiled model (27 defs).
    This fork (v4.1.2) implements Scalar52::sub's constant-time conditional add
    with a pure arithmetic mask (constants::L[i] & underflow_mask), so the
    extraction pulls in NO external functions or types (unlike v5 dalek, which
    routes sub through subtle, and v4.1.3, which uses a local black_box).
  - verification/gen/CurveScalar/{TypesExternal,FunsExternal}.lean: decl-free
    stub modules kept so the check manifest is uniform across forks.
  - verification/Proofs/ScalarDenote.lean: semantic foundation — Scalar52
    denotation into ℤ/ℓℤ, limb-bound invariant, and L_val (the transpiled
    constants::L denotes exactly the group order ℓ, kernel-checked).
  - verification/check-scalar.sh: guarded compile of the gen modules plus the
    denotation foundation.

check-scalar.sh passes: gen compiles; denotation + L = ℓ proven.
add/sub/mul remain in progress.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 21:27:33 +02:00
..
AddSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
ConstSpecs.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
Denote.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +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
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
ReduceSpec.lean field layer: proofs pass, fieldImplementation axiom-clean 2026-07-02 14:38:53 +02:00
ScalarDenote.lean Add scalar-layer foundation (Scalar52 arithmetic mod ℓ) 2026-07-02 21:27:33 +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