Commit graph

3 commits

Author SHA1 Message Date
8440b53bdc 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 (28 defs)
  - verification/gen/CurveScalar/{TypesExternal,FunsExternal}.lean: hand-written
    external models (subtle.Choice + 2 subtle fns; namespace = curve25519)
  - 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 four 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:19:58 +02:00
90c019b8d4 group-law layer: complete twisted Edwards addition law proven
Extraction widened to backend::serial::curve_models + edwards (matching the
reference recipe; extra opaque: backend::scalar_fits_in_128_bits — a
post-reference NAF-path helper whose generated code trips an Aeneas
namespace-shadowing wart). Reference Ed* suite compiles UNCHANGED (same
crate namespace). All proofs pass; both certificates axiom-clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 15:04:25 +02:00
7018fdc3a1 field layer: 14 proofs pass, fieldImplementation axiom-clean
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 14:42:46 +02:00