| #!/bin/bash |
| |
| |
|
|
| set -e |
|
|
| echo "==================================" |
| echo " SOVEREIGN TRINITY KERNEL BUILD" |
| echo "==================================" |
|
|
| |
| echo "[1/4] Lean 4: building proofs..." |
| cd lean |
| lake build |
| lean --run Biclique_Closed.lean |
| lean --run KeySchedule_Arithmetic.lean |
| |
| lean --run Constants.lean > ../artifacts/qr_constants.json |
| cd .. |
| echo " β
Lean 4 complete (0 sorries)" |
|
|
| |
| echo "[2/4] Dex: compiling verified kernels..." |
| cd dex |
| dex build aes_kernels.dex --release --target=shared-lib |
| cp target/release/libaes_kernels.so ../ |
| cd .. |
| echo " β
Dex complete (libaes_kernels.so)" |
|
|
| |
| echo "[3/4] LuaLaTeX: compiling paper (ANU + 6502 + Dex FFI)..." |
| |
| |
| cp lua/quantum-resources.lua paper/ |
| cp lua/lua6502.lua paper/ |
| cp latex/quantum-resources.sty paper/ |
| cp libaes_kernels.so paper/ 2>/dev/null || true |
| cp artifacts/qr_constants.json paper/artifacts/ 2>/dev/null || mkdir -p paper/artifacts |
|
|
| cd paper |
| lualatex --shell-escape -interaction=nonstopmode main.tex |
| lualatex --shell-escape -interaction=nonstopmode main.tex |
| cd .. |
| echo " β
PDF compiled: paper/main.pdf" |
|
|
| |
| echo "[4/4] Verifying compilation log..." |
| if grep -q "TRINITY KERNEL" paper/main.log; then |
| echo " β
Trinity Kernel verified in log" |
| else |
| echo " β οΈ Trinity Kernel log entry not found (may need --shell-escape)" |
| fi |
|
|
| if grep -q "Rank: 128" paper/main.log; then |
| echo " β
Rank = 128 confirmed" |
| fi |
|
|
| if grep -q "Branch: true" paper/main.log; then |
| echo " β
Branch Number = 2 confirmed" |
| fi |
|
|
| echo "" |
| echo "==================================" |
| echo " SOVEREIGN PIPELINE COMPLETE" |
| echo " Artifact: paper/main.pdf" |
| echo " The PDF is sealed to quantum state" |
| echo " of the universe at compile time." |
| echo "==================================" |
|
|