mirror of
https://github.com/allaunthefox/SilverSight.git
synced 2026-07-31 01:25:21 +00:00
Adapted from Peng et al. (2026) pipeline-math verify.sh:
1. SHA pin check — frozen theorem stubs pinned in frozen.sha256
2. Banned keywords — sorry/native_decide/admit blocked in proof files
3. lake build clean — 0 errors, 0 unexpected warnings
4. #print axioms — proof depends only on {propext, Class.choice, Quot.sound}
5. Discharge gate — @Frozen = @Proof := rfl (type-level gate)
Frozen theorem template in docs/frozen_template/:
Defs.lean — SHA-pinned definitions
Theorems.lean — SHA-pinned sorry stubs
Proofs/ — LLM fills these
Discharge.lean — rfl discharge gate
Solution.lean — clean exports
verify_lean.py: standalone 5-check (no LLM)
16 lines
586 B
Bash
16 lines
586 B
Bash
#!/usr/bin/env bash
|
|
# Generate frozen.sha256 from Defs.lean and Theorems.lean.
|
|
# Run after SETUP is complete and before proofs are filled.
|
|
set -euo pipefail
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
PINS="$REPO_ROOT/scripts/frozen.sha256"
|
|
echo "# SHA-256 pins for frozen files. Generated $(date -u '+%Y-%m-%dT%H:%M:%SZ')." > "$PINS"
|
|
for f in Defs.lean Theorems.lean; do
|
|
fpath="$REPO_ROOT/$f"
|
|
if [ -f "$fpath" ]; then
|
|
sha=$(sha256sum "$fpath" | awk '{print $1}')
|
|
echo "$sha $f" >> "$PINS"
|
|
echo "Pinned: $f ($sha)"
|
|
fi
|
|
done
|
|
echo "Written to $PINS"
|