# Recipe — reproduce the k = 46 even-signature computation All paths are project-relative. The engine is stdlib + numpy/scipy + `python-flint` (`pip install python-flint`). No absolute paths appear in any published file. ## 1. Unit tests (exact + independent) ``` .venv/bin/python3 research/0022/tests/test_even_engine.py ``` Runs: partition/permutation counts; `T_m` against explicit permutation enumeration; `K_m(e, P_λP_μ)` against **sympy** symbolic integration over the simplex; exact-vs-float entries; plain `M_k` against the Polymath8b Krylov table; and the `M_{50,1/25}(d=11)` reference. ## 2. Degree sweeps (exact entries, high-precision eigensolve) ``` cd research/0022 SAH_PREC=512 ../../.venv/bin/python3 src/sweep.py out/sweep_k46_eps25_861.json "46:25/861:15,17,19,21" SAH_PREC=1024 ../../.venv/bin/python3 src/sweep.py out/sweep_k46_eps25_861.json "46:25/861:23,25,27" ``` `src/run_hp.py K EPS D BLOCK PREC OUT` runs one configuration and prints a JSON line; `src/sweep.py` runs a list and appends. `EPS` is a plain fraction string (`1/25`, `25/861`, `79/1250`, `0`). ## 3. Exact certificate ``` ../../.venv/bin/python3 src/certificate.py 46 25/861 19 1000000000 out/cert_k46_eps25_861_d19.json ``` Prints the exact rational `Q_τ(c)` for `τ = 4` and `τ = 1/A`. A positive value is a proof of `M_{46,ε} > τ`. ## 4. Budget price ``` ../../.venv/bin/python3 src/cap_price_hp.py 46 25/861 19 20000 out/cap_hp_eps25_d19.json ``` Monte-Carlo mass fraction of the extremal polynomial inside the source's large-coordinate budget. ## 5. Independent cross-checks ``` ../../.venv/bin/python3 src/whiten_eig.py 50 1/25 15 80 # mpmath Cholesky + double eig ../../.venv/bin/python3 src/ref_eig.py 50 1/25 11 120 # mpmath-only ``` ## 6. Lean ``` bash /scripts/lean-check.sh \ research/0022/lean/TwinPrimeThreshold.lean ``` Compiles clean with Mathlib (threshold arithmetic + the certificate reduction). ## 7. Package ``` ../../.venv/bin/python3 build_spec.py # scrub gate -> index.md + spec_direction.json ```