#!/bin/sh # End-to-end verification: replay all 74 DRAT certificates and verify the Lean 4 proof. # Usage: sh verify_all.sh set -eu root=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) if [ -d "$HOME/.elan/bin" ]; then PATH="$HOME/.elan/bin:$PATH" export PATH fi missing=0 if ! command -v cc >/dev/null 2>&1; then missing=1 cat >&2 <<'EOF' Missing prerequisite: C compiler ('cc'). Install build-essential / clang / gcc via your system package manager (e.g., 'sudo apt install build-essential'). EOF fi if ! command -v julia >/dev/null 2>&1; then missing=1 cat >&2 <<'EOF' Missing prerequisite: Julia (https://julialang.org/). Install Julia (e.g., via juliaup: 'curl -fsSL https://install.julialang.org | sh') and install QuickEnv.jl: 'julia -e "using Pkg; Pkg.add(\"QuickEnv\")"'. EOF fi if ! command -v lake >/dev/null 2>&1; then missing=1 cat >&2 <<'EOF' Missing prerequisite: Lean 4 / elan ('lake'). Install elan (which uses lean/lean-toolchain automatically): curl https://elan.lean-lang.org/elan-init.sh -sSf | sh EOF fi if [ "$missing" -ne 0 ]; then echo "Install the missing prerequisite(s) above and re-run: sh verify_all.sh" >&2 exit 1 fi echo "=== Step 1/2: Replaying all 74 DRAT certificates ===" sh "$root/replay.sh" echo "=== Step 2/2: Building and verifying Lean 4 proof ===" sh "$root/verify_lean.sh" echo "=== Full verification complete ==="