# Authoritative Reference Implementation and Test Report **Implementation:** `omega_alpha_reference.py` **Version:** 1.0.0 **Runtime:** Python 3.10+ **Dependencies:** Python standard library only **Test status:** **PASS** ## 1. Scope The implementation covers the finite, exactly testable parts of the Omega-Alpha synthesis: - high-precision verification of \(\phi\), \(\pi\), \(\lambda_\Omega\), and \(\kappa\); - fixed rational protocol constants \(S,Q,N\); - the exact Euclidean boundary-witness contraction and reconstruction; - the full \(N\)-step witness identity; - reversible 15-bit byte folding; - byte and 16-bit monotone codebooks; - corrected Newman-Ramanujan ellipse-coordinate values; - negative tests for malformed witnesses and non-codeword inputs. The implementation does not treat `Decimal` arithmetic as symbolic exact arithmetic. Exactness begins after the integer protocol constants are fixed. ## 2. Verified constants The reference evaluation uses Decimal arithmetic, \(\sqrt{5}\), and Machin's formula \[ \pi=16\arctan(1/5)-4\arctan(1/239). \] The following values were reproduced: | Quantity | Verified value | |---|---:| | \(\phi\) | `1.61803398874989484820458683436563811772030917980576` | | \(\pi\) | `3.14159265358979323846264338327950288419716939937511` | | \(\lambda_\Omega\) | `0.33994977134477892957670280932127919355100990501426` | | \(\kappa=-\log\lambda_\Omega\) | `1.07895740362416456641369720327285296513863541099576` | | \(\lambda_\Omega^{23}\) | `1.66931896786205854202278982544429603856787514680458E-11` | | \(S\) | `1000000000000000` | | \(Q\) | `339949771344778` | | \(N\) | `23` | The scaled floor \(Q=\lfloor S\lambda_\Omega\rfloor\) was independently re-evaluated at 70 and 90 decimal digits; both evaluations returned the protocol integer `339949771344778`. ## 3. Exact boundary-witness kernel For each integer state \(d_k\), the implementation computes \[ d_{k+1}=\left\lfloor\frac{Qd_k}{S}\right\rfloor, \qquad \rho_k=Qd_k-Sd_{k+1}. \] Reverse reconstruction validates \[ d_k=\frac{Sd_{k+1}+\rho_k}{Q} \] by checking: 1. integer types with `bool` rejected; 2. \(0\le\rho_k