#!/usr/bin/env python3 """Exact integer certification of the v87 BB index and coefficient wrapper. The proof uses the audited v22/v86 Vojta, arithmetic, elliptic geometry and compiler lemmas. This checker does not independently prove those lemmas or evaluate Busy Beaver. It is read-only and source-independent. """ from __future__ import annotations import argparse import json import math from pathlib import Path ROOT=Path(__file__).resolve().parents[1] HERE=ROOT/"computation/bb_v87" def main(): ap=argparse.ArgumentParser(description=__doc__) ap.add_argument("--report",type=Path) args=ap.parse_args() record=json.loads((HERE/"certificate.json").read_text()) assert record["schema"]=="diophantine-bb-compact-v87" m,dim=10,9 psi=math.prod(3*j+1 for j in range(2,m*dim+1)) lam=2**(m*m)*(8*m*dim)**(m*dim) * 3**8 * 4 * (math.factorial(10)*3**8)**(3*m) assert (lam.bit_length(),psi.bit_length())==(2004,602) kappa=27160+16032*psi assert kappa.bit_length()==616 assert kappa==int(record["kappa"]) assert 2**6154_000_000 and kappa>330_770 assert kappa.bit_length()<=1000 # source fixed-literal loader t1=2**20*(16*kappa+2**186+1)*(2**186+3) assert 2**825