mirror of
https://github.com/saymrwulf/pasta-pallas-verified.git
synced 2026-09-09 20:50:32 +00:00
Proven & compiling (check.sh): PPallas primality cert, Denote (Montgomery denotation + Canon), HelperSpecs (adc/sbb/mac exact specs), SubNegSpec (sub/neg), ConstSpecs (R/R2/INV/zero/one) — all against the real extraction, no bridge axioms. Diagnosed and documented: add/mul/montgomery_reduce/square/invert/FieldMain overflow the Lean kernel's proof-checking memory because omega certificates with 2^256/2^512-scale coefficients (intrinsic to 4x64 Montgomery arithmetic) exceed the kernel budget. Drafts + the standalone-proven montgomery accounting lemma retained under Proofs/drafts/. Fix (linear_combination + context-free big-coefficient lemmas) is mechanical, not yet complete. Documented honestly, not shipped behind an axiom. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
37 lines
1.6 KiB
Bash
Executable file
37 lines
1.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# THE button for the pasta field FOUNDATION (what is proven & compiles today).
|
|
# Layers add/mul/reduce/square/invert/FieldMain are drafted but withheld from
|
|
# this manifest pending a kernel-certificate reformulation (see README + the
|
|
# standalone-proven accounting lemma in Proofs/_Accounting.lean). Nothing in
|
|
# this manifest depends on them; every file here compiles axiom-clean.
|
|
set -uo pipefail
|
|
source ~/aeneas-toolchain/env.sh
|
|
HERE="$(cd "$(dirname "$0")" && pwd)"
|
|
AENEAS_LEAN="$AENEAS_HOME/backends/lean"
|
|
GEN=(PallasFp/TypesExternal PallasFp/Types PallasFp/FunsExternal PallasFp/Funs)
|
|
PROOFS=(PPallas Denote HelperSpecs SubNegSpec ConstSpecs)
|
|
|
|
echo "=== Phase 1: stub/axiom-smuggling audit ==="
|
|
if grep -rn 'by trivial' "$HERE"/Proofs/*Spec*.lean 2>/dev/null; then echo STUB; exit 1; fi
|
|
if grep -rn ' : True :=' "$HERE"/Proofs/*.lean 2>/dev/null; then echo STUB; exit 1; fi
|
|
if grep -rnE '^(private |protected |noncomputable )*axiom ' "$HERE"/Proofs/*.lean 2>/dev/null; then
|
|
echo "AXIOM under Proofs/ — forbidden"; exit 1; fi
|
|
echo " clean"
|
|
|
|
echo "=== Phase 2: compile (guarded) ==="
|
|
cd "$AENEAS_LEAN"
|
|
lake env bash -c "
|
|
set -uo pipefail
|
|
cd '$HERE/gen' && export LEAN_PATH=\"\$LEAN_PATH:\$PWD:$HERE\"
|
|
for m in ${GEN[*]}; do
|
|
echo \" · gen \$m\"
|
|
LEAN_TIMEOUT=300 LEAN_MEM_MB=6144 '$HERE/lean-guard' \"\$m.lean\" || exit 1
|
|
done
|
|
cd '$HERE'
|
|
for m in ${PROOFS[*]}; do
|
|
echo \" · proof \$m\"
|
|
LEAN_TIMEOUT=400 LEAN_MEM_MB=8192 '$HERE/lean-guard' \"Proofs/\$m.lean\" || exit 1
|
|
done
|
|
" || { echo FAIL; exit 1; }
|
|
echo ""
|
|
echo "PASTA FOUNDATION: ALL PROOFS PASS (primality, denotation, adc/sbb/mac, sub/neg, constants)."
|