diff --git a/.github/workflows/c8-window-coefficient-d3-torus.yml b/.github/workflows/c8-window-coefficient-d3-torus.yml new file mode 100644 index 000000000..dc49ec669 --- /dev/null +++ b/.github/workflows/c8-window-coefficient-d3-torus.yml @@ -0,0 +1,85 @@ +name: C8 window coefficient d3 torus + +'on': + pull_request: + paths: + - 'frontiers/c8_window_coefficient_d3_torus_20260930/**' + - '.github/workflows/c8-window-coefficient-d3-torus.yml' + - 'imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md' + - 'coefficients/side24_v1/PROOF.md' + - 'coefficients/side24_v1/ENCLOSURE.json' + workflow_dispatch: + +permissions: + contents: read + +jobs: + certify-and-reject-mutants: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + persist-credentials: false + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: '3.11.16' + - name: Verify sources and pins, replay both modes, reject mutants + env: + PYTHONDONTWRITEBYTECODE: '1' + run: | + set -euo pipefail + python -B -S - <<'PY' + import concurrent.futures, hashlib, json, pathlib, subprocess, sys + root = pathlib.Path('frontiers/c8_window_coefficient_d3_torus_20260930').resolve() + manifest_doc = json.loads((root / 'SOURCE_FILES.json').read_text()) + manifest = manifest_doc['files'] + present = sorted(p.name for p in root.iterdir()) + expected_names = sorted([e['path'] for e in manifest] + ['SOURCE_FILES.json']) + if present != expected_names: + raise ValueError('packet tree differs from manifest: ' + repr(present)) + for entry in manifest: + path = root / entry['path'] + if pathlib.PurePosixPath(entry['path']).name != entry['path'] or path.is_symlink(): + raise ValueError('flat regular source required: ' + entry['path']) + data = path.read_bytes() + if len(data) != entry['bytes'] or hashlib.sha256(data).hexdigest() != entry['sha256']: + raise ValueError('source identity mismatch: ' + entry['path']) + # main-resident pins: the consumed sources must be the cited bytes + for pin in manifest_doc['pins_on_main']: + if not pin.get('workflow_checked'): + continue + p = pathlib.Path(pin['path']) + if p.is_symlink() or not p.is_file(): + raise ValueError('pinned source missing: ' + pin['path']) + data = p.read_bytes() + blob = hashlib.sha1(b'blob %d\0' % len(data) + data).hexdigest() + if blob != pin['git_blob']: + raise ValueError('pinned source drifted: ' + pin['path'] + ' ' + blob) + # the SIDE24 enclosure quoted inside the script must be the one on main + enc = json.loads(pathlib.Path('coefficients/side24_v1/ENCLOSURE.json').read_text())['dimensions']['3'] + src = (root / 'window_coefficient_d3.py').read_text() + if ('"%s", "%s"' % (enc['lower'], enc['upper'])) not in src: + raise ValueError('SIDE24 d = 3 enclosure quoted in the script differs from ENCLOSURE.json') + script = str(root / 'window_coefficient_d3.py') + expected = (root / 'RESULTS.json').read_bytes() + mutants = ['image-shells', 'lambda-min', 'sandwich-swap', 'window-scale', 'd3-cross', 'schur-sign', 'sphere', 'tau-cross', 'tail-dropped', 'no-owen', 'gamma-shape'] + def mutant_rc(args): + flags, m = args + return m, flags, subprocess.run([sys.executable, *flags, script, '--mutant', m], + capture_output=True, timeout=1500).returncode + for flags in (['-B', '-S'], ['-B', '-O', '-S']): + out = subprocess.run([sys.executable, *flags, script], + check=True, capture_output=True, timeout=1500).stdout + if out != expected: + raise RuntimeError('output differs from RESULTS.json under ' + ' '.join(flags)) + doc = json.loads(out) + if not (doc['passed'] and len(doc['checks']) == 15 and all(doc['checks'].values())): + raise RuntimeError('certification did not pass under ' + ' '.join(flags)) + with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool: + for m, fl, rc in pool.map(mutant_rc, [(flags, m) for m in mutants]): + if rc != 1: + raise RuntimeError('mutant ' + m + ' not rejected under ' + ' '.join(fl)) + print(json.dumps({'scientific_effect': 'NONE', 'mathematical_acceptance': False, 'certified_enclosures': True, 'C8': 'OPEN'})) + PY + git diff --exit-code diff --git a/frontiers/c8_window_coefficient_d3_torus_20260930/NOTE.md b/frontiers/c8_window_coefficient_d3_torus_20260930/NOTE.md new file mode 100644 index 000000000..549dc7cc3 --- /dev/null +++ b/frontiers/c8_window_coefficient_d3_torus_20260930/NOTE.md @@ -0,0 +1,232 @@ +# The compact-window coefficient `c_{B,K}` in `d = 3`: transfer to the torus for every `L ≥ 10` and every frame + +**Object** `CL-C8-WINDOW-COEFFICIENT-D3-TORUS-20260930-v1` · **scientific effect NONE** · declarative record, `executed: false` · +base `main 3e0a91b` · claim: Math-#197 comment 5921235693 · companion: Math-#197 (`frontiers/c8_window_coefficient_planar_20260930`, +head `63e123f`), whose §4 gives the `d = 3` reference closed form and states "no torus transfer is made in `d = 3`"; this record +supplies that transfer. Catalog entry C8 stays OPEN; no register, GRAPH, STATUS or catalog surface is touched. Same GitHub account +as every lane: zero organizational-independence credit. Claude reads of this record count for nothing. The author will not merge. + +## 0. Statement + +Let `f` be the unit-variance stationary Gaussian field on `R³/(LZ³)` with the parent kernel `K_L` of [LP] §1, `B = [b_−, b_+]` a birth +window and `K = [k_−, k_+]` a gap window, compact and of positive length with a positive gap floor: `−∞ < b_− < b_+ < ∞` and +`0 < k_− < k_+ < ∞`. This is [LP] Theorem B's hypothesis (lines 16 and 37 of the pinned [LP]). Let `c^(3)_{B,K}` be the leading +coefficient of [LP] Theorem B for the pairs with birth in `B` and scaled gap in `K` ([LP] (11.3), §15; both stated for every `d`). +Windows outside that hypothesis are treated in §7. + +**Proposition (d = 3 torus transfer).** For every `L ≥ 10` and every frame, `c^(3)_{B,K}` lies in the interval computed by +`window_coefficient_d3.py` from the entry box of radius `E^(3)_10 = 2.058·10⁻¹¹`; on the C8 band `B = [0, 1]`, `K = [1/2, 2]`, + +``` +c^(3)_{B,K}(torus, every L ≥ 10, every frame) ∈ [0.00097438236231621369, 0.00097438236973228725] (relative half-width 3.8e-9), +c^(3)_{B,K}(reference) = 0.0009743823660242504624710565467842206863682961221797073…, +c^(3)_{B,K}(torus, L = 24) = the reference digits to 55 places (arithmetic-limited). +``` + +The same holds on every window of §5, with relative half-width at most `4.3·10⁻⁹` at `L ≥ 10`; the full window reproduces SIDE24's +`c_{3,24}` interval. + +## 1. The object + +[LP] (11.3) reads `c_{B,K} = 4 ∫_{B×K×S^{d−1}} k^{−2/3} π_0 z_0 db dk dσ` with `z_0 = 36k² E[det(A)² 1{A ≺ 0} | f = b, V = 0]` and, by +§15, `π_0 = p_{(f,V)}(b, 0) p_G(0) φ_τ(12k)`, `p_{(f,V)}(b, 0) = p_V(0) p_{f|V=0}(b)`. In `d = 3`, frame `(u, w_1, w_2)`, `G = ∇f ∈ R³`, +`V = (f_uu, f_uw1, f_uw2)`, `A = (f_{w_i w_j})` the `2×2` transverse Hessian, `t = f_uuu`, `τ² = Var(t | G = 0)`: + +``` +c^(3)_{B,K} = 144 ∫_{S²} p_G(0) p_V(0) I_B(u) J_K(u) dσ(u), +I_B(u) = ∫_B p_{f|V=0}(b) E[det(A)² 1{A ≺ 0} | f = b, V = 0] db = E[1{f ∈ B} det(A)² 1{A ≺ 0} | V = 0], +J_K(u) = ∫_K k^{4/3} φ_τ(12k) dk. (1.1) +``` + +Odd and even derivatives are independent for an even kernel, so `(G, t)` is independent of `(f, V, A)`. For the reference kernel +Math-#197 §4 gives `I^ref_B = ∫_B φ_{2/3}(b) m_{3,b} db` with `m_{3,b} = (b³ + b)φ(b) + (b⁴ + 2b² + 7)Φ(b) − 4√2 e^{−b²/4} Φ(b/√2)`, +and `c^(3,ref)_{B,K} = c_{3,ref} F^(3)_B G_K`. What fails on the torus is that the conditional mean of `A` given `f = b, V = 0` is +`b·μ` with `μ` only close to `−I`, and the truncated cone moment then has no closed form. + +## 2. The sandwich lemma + +**Lemma S.** Let `X = (f, A_11, A_12, A_22)` be centred Gaussian with covariance `C'`, `C` a positive definite `4×4` matrix and +`0 ≤ ε < 1` with `(1 − ε) C ≤ C' ≤ (1 + ε) C`. For `g(x) = 1{x_f ∈ B} det(A)² 1{A ≺ 0}` and `I^C_B := E_C[g]`, + +``` +(1 − ε)⁴/(1 + ε)² · I^C_{B/√(1−ε)} ≤ E_{C'}[g] ≤ (1 + ε)⁴/(1 − ε)² · I^C_{B/√(1+ε)}, B/s = [b_−/s, b_+/s]. +``` + +*Proof.* `det C' ≥ (1 − ε)⁴ det C` and `C'^{−1} ≥ C^{−1}/(1 + ε)`, so +`p_{C'}(x) ≤ (1 − ε)^{−2} (2π)^{−2} det(C)^{−1/2} exp(−xᵀC^{−1}x/(2(1+ε))) = ((1+ε)/(1−ε))² p_{(1+ε)C}(x)`. Since `g ≥ 0`, +`E_{C'}[g] ≤ ((1+ε)/(1−ε))² E_{(1+ε)C}[g] = ((1+ε)/(1−ε))² E_C[g(√(1+ε) Y)]`. Now `det(sA)² = s⁴ det(A)²`, `1{sA ≺ 0} = 1{A ≺ 0}` and +`1{s y_f ∈ B} = 1{y_f ∈ B/s}`, so `E_C[g(sY)] = s⁴ I^C_{B/s}`, giving the upper bound with `s⁴ = (1+ε)²`. The lower bound is the same +argument with `det C' ≤ (1 + ε)⁴ det C`, `C'^{−1} ≤ C^{−1}/(1 − ε)` and `s² = 1 − ε`. ∎ + +The birth window is the only ingredient that is not homogeneous; the lemma trades the unknown covariance for a rescaled window +(`b_± ↦ b_±/√(1 ± ε)`) under the known one. This is SIDE24 §4's argument, which there applies to the full window only (`B = R` is +scale-invariant); Math-#197 §3 notes that it "does not" apply to a window as such. Two exact tests (rule `SANDWICH_EXACT_SCALING`): +for `C' = (1 + η) C_ref'` exactly, `E_{C'}[g] = (1 + η)² I^ref_{B/√(1+η)}`, and this value lies inside the sandwich with `ε = |η|` for +`η ∈ {±1/50, ±1/200}` and five windows, among them `[3, 7/2]` and `[−7/2, −3]`, where the window rescaling dominates the density +factor (the mutants that rescale the wrong way or exchange the two rescalings fail there, and their bounds come out of order, rule +`SANDWICH_ORDERED`). + +## 3. The reference law and the eigenvalue floor + +The reference covariances come from `Cov(∂^a f, ∂^b f) = (−1)^{|a|} ∂^{a+b} e^{−|z|²/2}|_0` and +`∂^α e^{−|z|²/2}|_0 = Π_i (−1)^{α_i/2} (α_i − 1)!!` (even `α`), computed in exact rationals. Conditioning `(f, A_11, A_12, A_22)` on +`V = 0` (`Cov V = diag(3, 1, 1)`, only `f_uu` correlated with `f, A_11, A_22`, with covariances `(−1, 1, 1)`): + +``` +C'_ref = [[2/3, −2/3, 0, −2/3], [−2/3, 8/3, 0, 2/3], [0, 0, 1, 0], [−2/3, 2/3, 0, 8/3]], +A | f = b, V = 0 ~ N(−b(1, 0, 1), diag(2, 1, 2)) = −b I + Q, τ² = 15 − 9 = 6, det Cov V = 3, det Cov G = 1 +``` + +(rule `REFERENCE_EXACT`; this is Math-#197 §4's law). Its eigenvalues are `2 ± √(8/3)`, `2` (on `(0, 1, 0, −1)`) and `1` (the `A_12` +coordinate), so `λ_min = 2 − √(8/3) = 0.367`; the script certifies the floor `C'_ref ≥ I/3` exactly by Sylvester's criterion on +`C'_ref − I/3` in rationals (rule `LAMBDA_FLOOR`; SIDE24 §3 has the same floor `1/3` for the full jet). Hence for any `C'`, +`‖C'_ref^{−1/2}(C' − C'_ref)C'_ref^{−1/2}‖ ≤ 3 ‖C' − C'_ref‖_F`, and `ε := 3 ‖C' − C'_ref‖_F` satisfies the hypothesis of Lemma S. + +`I^ref_B` is Math-#197 §4's closed form, evaluated with interval endpoints: `∫ φ_{2/3}(b)(b³ + b)φ(b) db = −(2b²/5 + 18/25)e^{−5b²/4}/(2πσ)`, +`∫ φ_{2/3}(b)(b⁴ + 2b² + 7)Φ(b) db = σ⁴G_4 + 2σ²G_2 + 7G_0` at `x = b/σ`, slope `σ = √(2/3)`, and +`∫ φ_{2/3}(b) 4√2 e^{−b²/4}Φ(b/√2) db = (4/σ) G_0(√2 b; 1/2)`, with Math-#197's Owen primitives `G_0..G_4` (code reused verbatim). +The full window returns `29/6 − √6` to `1e-50` (rule `D2_EXACT`) and `m_{3,b}` agrees with the direct double integral at six points +(rule `M3_FLOAT`). + +## 4. The torus: image bound, entry box, `ε` + +**Image bound in `d = 3`.** As in Math-#197 §3 (the contraction bound `|D^q φ(x)| ≤ 76|x|⁶φ(x)` for `|x| ≥ 1`, `q ≤ 6`, any unit +directions, `|D^q φ(0)| ≤ 15`, the normalization `S ≥ 1`), with the `d = 3` shell count: `|n|_∞ = j` holds +`(2j+1)³ − (2j−1)³ = 24j² + 2 ≤ 26 j²` points with `|n|² ≤ 3j²`, so `Σ_{n≠0} |n|⁶ e^{−L²|n|²/2} ≤ 702 Σ_j j⁸ e^{−L²j²/2} ≤ 1404 e^{−L²/2}` +(ratio of successive terms at most `2⁸ e^{−3L²/2} < 1/2` for `L ≥ 10`), and every covariance entry of the 3-jet of `K_L`, in every +frame, is within + +``` +E^(3)_L = 1404 (76 L⁶ + 15) e^{−L²/2}: E^(3)_10 ≈ 2.0581e-11, E^(3)_12 ≈ 1.7142e-20, E^(3)_24 ≈ 1.7086e-112 (rule IMAGE_BOUND) +``` + +of its reference value; `E^(3)_L` decreases in `L`, so the `L = 10` box contains the jet of every `L ≥ 10` in every frame. + +**Interval evaluation.** The class `Space3(E)` widens the 28 entries of the even block `(f, f_uu, f_uw1, f_uw2, A_11, A_12, A_22)` +(other than `Var f = 1`) and the 10 entries of the odd block `(f_u, f_w1, f_w2, t)` by `±E`, and evaluates `p_G(0) = (2π)^{−3/2} det(Cov G)^{−1/2}`, +`τ² = Var t − cᵀ Cov(G)^{−1} c`, `p_V(0) = (2π)^{−3/2} det(Cov V)^{−1/2}` and the Schur complement `C'` of `V` in `(f, A)` by interval +linear algebra (adjugate inverses); `ε = 3·‖C' − C'_ref‖_F` with each entry's deviation the supremum over its interval. Every quantity +depends on the frame only through the entries, so one box bounds the integrand of (1.1) for every `u`, and `|S²| = 4π`. Values +(rule `EPSILON`): + +``` +ε(L ≥ 10) ≤ 5.972e-10, ε(L ≥ 12) ≤ 4.975e-19, ε(L = 24) ≤ 3.9e-58 (arithmetic-limited), ε(E = 0) ≤ 4.4e-59; +τ²(L ≥ 10) ∈ [5.9999999989, 6.0000000011], p_G p_V (L ≥ 10) ∈ [0.0023275540107205, 0.0023275540109761]. +``` + +Then `c^(3)_{B,K} ∈ 144 · 4π · [p_G p_V] · Lemma S(I^ref, ε) · J_K(τ²)` with `J_K` by Math-#197 (2.2) at the interval `τ²`. + +## 5. Values (`RESULTS.json`) + +`F^(3)_B` and `G_K` are Math-#197's (its `birth_factor_d3_reference` table, reproduced here); `c^(3,ref) = c_{3,ref} F^(3)_B G_K`, +`c_{3,ref} = 0.0417759318405983433429366654285755564666815196…` (SIDE24 (1) at `d = 3`). + +| `B` | `K` | `c^(3)` reference | torus, every `L ≥ 10`, every frame | rel. half-width | +|---|---|---|---|---| +| `[0,1]` | `[1/2,2]` | `0.00097438236602425046247…` | `[0.00097438236231621369, 0.00097438236973228725]` | `3.8e-9` | +| `[0,1]` | `(0,∞)` | `0.01446277713931286117278…` | `[0.01446277709167767642, 0.01446277718694804608]` | `3.3e-9` | +| `[−1,1]` | `[1/2,2]` | `0.00110183822983417559227…` | `[0.00110183822558582647, 0.00110183823408252473]` | `3.9e-9` | +| `[−2,2]` | `[1/2,2]` | `0.00244005150534917491086…` | `[0.00244005149542905292, 0.00244005151526929694]` | `4.1e-9` | +| `[0,∞)` | `[1/2,2]` | `0.00268447988228775572900…` | `[0.00268447987082819968, 0.00268447989374731182]` | `4.3e-9` | +| `(−∞,0]` | `[1/2,2]` | `0.00013003706128481170262…` | `[0.00013003706072970715, 0.00013003706183991626]` | `4.3e-9` | +| `R` | `[1/2,2]` | `0.00281451694357256743162…` | `[0.00281451693155790684, 0.00281451695558722807]` | `4.3e-9` | +| `R` | `(0,∞)` | `0.04177593184059834334293…` | `[0.04177593168364896978, 0.04177593199754771747]` | `3.8e-9` | + +At `L = 24` every enclosure agrees with the reference to about 55 digits; the full window lies inside SIDE24's `c_{3,24}` interval +`[0.04177593184059834334, 0.04177593184059834335]` (rule `SIDE24_CONSISTENT`). The C8 band carries `34.6 %` of the `d = 3` birth mass +(against `48.3 %` in `d = 2`: `m_{3,b}` rises faster in `b`, so the mass sits higher) and `6.74 %` of the gap mass (the gap factor is +dimension-free), `2.33 %` in all. + +**Float control (not part of the certificate).** For a non-scalar perturbation of the even block (five entries moved by `±10⁻³`, +e.g. `Cov(f, A_12) = 10⁻³`, so that `A_12 | f = b` acquires the mean `0.001 b` and the conditional mean is no longer a multiple of the +identity), `ε = 8.12·10⁻³`; a float evaluation of `I'_B` (the `A_12`-integral over `|A_12| < √(A_11 A_22)` in closed form through +truncated normal moments, then Gauss–Legendre in `A_11, A_22` and `b`; the same code reproduces `I^ref_B` to `2·10⁻⁹` relative on these windows, the rule's gate being `10⁻⁷` relative) lies inside +the sandwich on `[0, 1]`, `[−1/2, 3/2]` and `[1, 2]` (`0.82683` in `[0.79096, 0.86102]`, etc.; rule `FLOAT_CONTROL`). + +## 6. Rules, mutants, verification + +`python3 -B -S window_coefficient_d3.py` (also `-B -O -S`; about ten seconds) prints `RESULTS.json` and exits `0` only if all fifteen +rules hold: `REFERENCE_EXACT`, `LAMBDA_FLOOR`, `D2_EXACT`, `M3_FLOAT`, `IMAGE_BOUND`, `EPSILON`, `SANDWICH_EXACT_SCALING`, `FLOAT_CONTROL`, +`FACTORIZATION` (the pipeline at `E = 0` reproduces `c_{3,ref} F^(3)_B G_K` on all twelve windows), `SIDE24_CONSISTENT`, `NESTING` (the +`L ≥ 10` enclosure contains the reference and intersects the `L = 24` one, which is `10⁴⁰` times narrower), `WIDTHS`, `SANDWICH_ORDERED`, +`LIBRARY_EXACT`, `PINNED`. Eleven mutants exit `1` in both interpreter modes: `image-shells` (`13j²` shells), `lambda-min` (floor `1`), +`sandwich-swap` (the two rescalings exchanged), `window-scale` (`B·s` for `B/s`), `d3-cross` (the cross term of (4.1) halved), +`schur-sign`, `sphere` (`2π` for `4π`), `tau-cross` (`Cov(t, f_u)` dropped), `no-owen`, `gamma-shape`, and `tail-dropped` (series tails +dropped; rejected when the truncated incomplete gamma function, evaluated at the two ends of an interval argument, comes back out of +order and the interval class refuses the empty interval). The hosted workflow replays manifest, pins, both modes byte for byte, the +SIDE24 `d = 3` interval quoted in the script, and the mutants. + +## 7. What this does not do + +- It encloses `c^(3)_{B,K}` for the torus; it does not revalidate [LP] Theorems B and §15 (consumed at their scope), and it does not + review Math-#197. +- Not `d ≥ 4` window coefficients: Lemma S holds in every `d` (with `n = 1 + m(m+1)/2` coordinates and degree `2m`), but the reference + birth integral `I^ref_B` for `m ≥ 3` with a window is not in closed form (the full-window value is Math-#199/#201 and #200/#202); a + certified quadrature in `b` would supply it. +- **Windows outside [LP] Theorem B's hypothesis.** Theorem B assumes compact windows of positive length with a positive gap floor: + `−∞ < b_− < b_+ < ∞` and `0 < k_− < k_+ < ∞`. Three kinds of window fall outside it: + - a gap window that touches `k = 0` or `∞`, such as the tabulated `K = (0,∞)`; + - an unbounded `B`: `[0,∞)`, `(−∞,0]`, `R`; + - a singleton window, `b_− = b_+` or `k_− = k_+`. There (1.1) is zero and does not inherit Theorem B's positive coefficient. No + singleton window is tabulated. + + For these windows the values are the coefficient integrals (1.1) on those sets only. Theorem B's asymptotic statement is not + extended to them; the full window is [LP] (15.2)'s `c_{3,L}`. +- Not `C`, `r_*` or `z_*`; C8 stays OPEN; no register surface is touched; `executed: false`. + +## 8. Provenance + +Pins on `main 3e0a91b` (workflow-checked): [LP] `imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md` blob `dfed3b8d` +((11.3), §15); SIDE24 `coefficients/side24_v1/PROOF.md` blob `44b66f04` (§§2–4: image bound, `C_ref ≥ I/3`, scaling argument) and +`ENCLOSURE.json` blob `57af39a0` (the `d = 3` interval quoted in the script). Companion, not on `main`: Math-#197 at `63e123f`, +`window_coefficient.py` blob `43b4f51b` (the interval class, special functions, Owen primitives and incomplete gamma reused verbatim; +`F3_ref` generalized to interval endpoints), `NOTE.md` blob `56d99b48` (§4: the `d = 3` closed form (4.1)), `RESULTS.json` blob +`95443edf` (its `d = 3` reference factors, reproduced here). No external numerical library is used. + +## 9. Current disposition + +- **Head / owner:** see the PR's disposition block; branch `claude/c8-window-d3-torus-20260930` (base `main 3e0a91b`); author lane + Anthropic / Claude (`session_017Mi3hxjaxV45x6zo6o1ee3`). +- **Claim:** Lemma S and its use; the `d = 3` image bound; the certified `ε`; the torus enclosures of `c^(3)_{B,K}` for every `L ≥ 10` + and every frame, and for `L = 24`, on the windows of §5. No theorem of [LP] or SIDE24 is proved or reviewed. +- **Completed review scopes** (OpenAI / Codex; the PR's disposition block has the table): + - C40, Slices A and B (§§1–4): PASS_TECHNICAL, no actionable findings (review 5373331587 at `b875a46`). + - C41, Slice C (§§5–7): overall AMEND (review 5373681438 at `b875a46`). The numerical assembly, the full-precision + `RESULTS.json` and the cone controls were PASS_TECHNICAL; the reporting was AMEND, finding C41-205-C-01. C41's verdict stands as + given. + - C42, bounded check of v1.1: PASS_TECHNICAL (review 5374044722 at `01d09e9`). It resolved C41-205-C-01 for the successor head. + - C43, bounded check of v1.2: AMEND (review 5377957341 at `c0d8e92`), findings C43-205-H-01 and C43-205-H-02, both fixed in v1.3 + (§10). +- **Unresolved finding IDs:** none on the author side. C43-205-H-01 and C43-205-H-02 are fixed in v1.3 and await the reviewer's + bounded check. +- **Validation:** 15/15 rules in both modes, byte-identical output; 11/11 mutants rejected in both modes; workflow replayed locally. +- **Next action:** the reviewer's bounded check of v1.3; amendments on this branch, recorded in `SOURCE_FILES.json`. Author will not + merge. + +## 10. Revisions + +- **v1.1 (C41-205-C-01, review 5373681438).** The upper endpoints of the eight torus intervals in §5, and of the C8-band interval in + §0, were truncated instead of rounded up. The displayed intervals therefore did not contain the certified intervals of + `RESULTS.json` that they summarize. + - Every displayed interval is now rounded outward: lower endpoints down, upper endpoints up, at the displayed precision. An exact + containment audit against `RESULTS.json` passes for every bracketed interval in this note. + - The two `±` statements of §4 are replaced by explicit outward intervals. The old `p_G p_V` line did not contain the certified + upper endpoint. + - The float-control accuracy in §5 is stated as relative. + - The `ε` values of §4 are stated as upper bounds rounded up, and the image-bound values as approximations. + + The script, `RESULTS.json`, every certified value, the rules and the mutants are unchanged. +- **v1.2 (gap-window hypothesis; reporting only).** §0 said `k_− ≥ 0`, which admits a gap window touching `k = 0`. [LP] Theorem B + assumes `0 < k_− ≤ k_+ < ∞`, and §0 now states that hypothesis. A new §7 bullet says that windows outside it, including the + tabulated `K = (0,∞)` and the unbounded `B`, are coefficient integrals only. The PR body already said so; the NOTE now does too. + The same wording defect was found by Codex on Math-#213 (thread 4151593177) and is repaired in every packet of the series. The + script, `RESULTS.json`, the rules and the mutants are byte-unchanged. +- **v1.3 (C43, review 5377957341; reporting only).** + - **C43-205-H-01 (positive lengths).** [LP] Theorem B also requires `B` and `K` to have positive length (line 37 of the pinned + [LP]). The v1.2 statement allowed singleton windows such as `K = [1, 1]`, where (1.1) is zero. §0 now states + `−∞ < b_− < b_+ < ∞` and `0 < k_− < k_+ < ∞`, and §7 classes singleton windows with the other windows outside the hypothesis. + Every tabulated window has positive length, so no value changes. + - **C43-205-H-02 (review history).** v1.2's §9 summarized C41 as PASS_TECHNICAL with a reporting finding. C41's verdict was overall + AMEND: the numerical assembly, `RESULTS.json` and the cone controls PASS_TECHNICAL, the reporting AMEND (C41-205-C-01). §9 now + records that split, C42's resolution at `01d09e9`, and C43's review. + - The script, `RESULTS.json`, the workflow, the rules and the mutants are byte-unchanged. diff --git a/frontiers/c8_window_coefficient_d3_torus_20260930/RESULTS.json b/frontiers/c8_window_coefficient_d3_torus_20260930/RESULTS.json new file mode 100644 index 000000000..8dcf45c59 --- /dev/null +++ b/frontiers/c8_window_coefficient_d3_torus_20260930/RESULTS.json @@ -0,0 +1,519 @@ +{ + "object": "CL-C8-WINDOW-COEFFICIENT-D3-TORUS-20260930-v1", + "scientific_effect": "NONE", + "certified": true, + "mutant": null, + "passed": true, + "checks": { + "REFERENCE_EXACT": true, + "LAMBDA_FLOOR": true, + "D2_EXACT": true, + "M3_FLOAT": true, + "IMAGE_BOUND": true, + "EPSILON": true, + "SANDWICH_EXACT_SCALING": true, + "FLOAT_CONTROL": true, + "FACTORIZATION": true, + "SIDE24_CONSISTENT": true, + "NESTING": true, + "WIDTHS": true, + "SANDWICH_ORDERED": true, + "LIBRARY_EXACT": true, + "PINNED": true + }, + "c8_band": { + "B": "[0,1]", + "K": "[1/2,2]", + "c3_reference": [ + "0.000974382366024250462471056546784220686368296122179707362638252", + "0.000974382366024250462471056546784220686368296122179707370102007" + ], + "c3_reference_digits": "0.0009743823660242504624710565467842206863682961221797073", + "c3_torus_every_L_ge_10_every_frame": [ + "0.000974382362316213697860721349461520480606061012227473656079847", + "0.000974382369732287240468918159546766005816097578008094864206538" + ], + "c3_torus_L_24": [ + "0.000974382366024250462471056546784220686368296122179707366356250", + "0.000974382366024250462471056546784220686368296122179707366383759" + ], + "relative_half_width_L_ge_10": "3.80552534067805628522259025789125222776080696221141891151088E-9" + }, + "full_window": { + "c_3_ref": [ + "0.0417759318405983433429366654285755564666815196610447378743467", + "0.0417759318405983433429366654285755564666815196610447378851238" + ], + "c3_torus_every_L_ge_10": [ + "0.0417759316836489697815347794528472783983367009261463188325775", + "0.0417759319975477174627664262372833323705342226587159288898515" + ], + "c3_torus_L_24": [ + "0.0417759318405983433429366654285755564666815196610447378742311", + "0.0417759318405983433429366654285755564666815196610447378852391" + ], + "SIDE24_c_3_24": [ + "0.04177593184059834334", + "0.04177593184059834335" + ] + }, + "windows": { + "B=[0,1] K=[1/2,2]": { + "F3_B": [ + "0.346198792034071727129720724651084304927686716063723499474705", + "0.346198792034071727129720724651084304927686716063723499476462" + ], + "G_K": [ + "0.067371733425641667348844418474402773431540422159891980011888", + "0.067371733425641667348844418474402773431540422159891980510232" + ], + "c3_ref": [ + "0.000974382366024250462471056546784220686368296122179707362638252", + "0.000974382366024250462471056546784220686368296122179707370102007" + ], + "c3_pipeline_E0": [ + "0.000974382366024250462471056546784220686368296122179707366359132", + "0.000974382366024250462471056546784220686368296122179707366381289" + ], + "c3_torus_L_ge_10": [ + "0.000974382362316213697860721349461520480606061012227473656079847", + "0.000974382369732287240468918159546766005816097578008094864206538" + ], + "c3_torus_L_24": [ + "0.000974382366024250462471056546784220686368296122179707366356250", + "0.000974382366024250462471056546784220686368296122179707366383759" + ] + }, + "B=[0,1] K=[0,inf]": { + "F3_B": [ + "0.346198792034071727129720724651084304927686716063723499474705", + "0.346198792034071727129720724651084304927686716063723499476462" + ], + "G_K": [ + "0.999999999999999999999999999999999999999999999999999999742690", + "1.00000000000000000000000000000000000000000000000000000025731" + ], + "c3_ref": [ + "0.0144627771393128611727885937262505486090544075784199598219250", + "0.0144627771393128611727885937262505486090544075784199598331725" + ], + "c3_pipeline_E0": [ + "0.0144627771393128611727885937262505486090544075784199598256385", + "0.0144627771393128611727885937262505486090544075784199598294616" + ], + "c3_torus_L_ge_10": [ + "0.0144627770916776764203508299494194751472682325822024531325495", + "0.0144627771869480460749370984051332367904169825419551677892973" + ], + "c3_torus_L_24": [ + "0.0144627771393128611727885937262505486090544075784199598256103", + "0.0144627771393128611727885937262505486090544075784199598294887" + ] + }, + "B=[-1,1] K=[1/2,2]": { + "F3_B": [ + "0.391483956900814659103354232937101800571780379194523060847778", + "0.391483956900814659103354232937101800571780379194523060850329" + ], + "G_K": [ + "0.067371733425641667348844418474402773431540422159891980011888", + "0.067371733425641667348844418474402773431540422159891980510232" + ], + "c3_ref": [ + "0.00110183822983417559227488327247458245089634654946010030758751", + "0.00110183822983417559227488327247458245089634654946010031602917" + ], + "c3_pipeline_E0": [ + "0.00110183822983417559227488327247458245089634654946010031179508", + "0.00110183822983417559227488327247458245089634654946010031182184" + ], + "c3_torus_L_ge_10": [ + "0.00110183822558582647617416100699900406433575400386957141408938", + "0.00110183823408252472392525191001771760726980446310551593698096" + ], + "c3_torus_L_24": [ + "0.00110183822983417559227488327247458245089634654946010031179173", + "0.00110183822983417559227488327247458245089634654946010031182468" + ] + }, + "B=[-1,1] K=[0,inf]": { + "F3_B": [ + "0.391483956900814659103354232937101800571780379194523060847778", + "0.391483956900814659103354232937101800571780379194523060850329" + ], + "G_K": [ + "0.999999999999999999999999999999999999999999999999999999742690", + "1.00000000000000000000000000000000000000000000000000000025731" + ], + "c3_ref": [ + "0.0163546071001761726586526688444772957621874527159837454933900", + "0.0163546071001761726586526688444772957621874527159837455061323" + ], + "c3_pipeline_E0": [ + "0.0163546071001761726586526688444772957621874527159837454975889", + "0.0163546071001761726586526688444772957621874527159837455019372" + ], + "c3_torus_L_ge_10": [ + "0.0163546070454895202911322592722734945446068832160146321445914", + "0.0163546071548628252007266358592073361569143886130247148295789" + ], + "c3_torus_L_24": [ + "0.0163546071001761726586526688444772957621874527159837454975556", + "0.0163546071001761726586526688444772957621874527159837455019686" + ] + }, + "B=[-2,2] K=[1/2,2]": { + "F3_B": [ + "0.866952146414130272672777763387197228415467480447458119616856", + "0.866952146414130272672777763387197228415467480447458119619497" + ], + "G_K": [ + "0.067371733425641667348844418474402773431540422159891980011888", + "0.067371733425641667348844418474402773431540422159891980510232" + ], + "c3_ref": [ + "0.00244005150534917491086226190801064996594862838322692369754218", + "0.00244005150534917491086226190801064996594862838322692371622799" + ], + "c3_pipeline_E0": [ + "0.00244005150534917491086226190801064996594862838322692370686000", + "0.00244005150534917491086226190801064996594862838322692370691040" + ], + "c3_torus_L_ge_10": [ + "0.00244005149542905292553643969404846868415155359690862763212834", + "0.00244005151526929693398104440899253152429205846341977638209540" + ], + "c3_torus_L_24": [ + "0.00244005150534917491086226190801064996594862838322692370685260", + "0.00244005150534917491086226190801064996594862838322692370691687" + ] + }, + "B=[-2,2] K=[0,inf]": { + "F3_B": [ + "0.866952146414130272672777763387197228415467480447458119616856", + "0.866952146414130272672777763387197228415467480447458119619497" + ], + "G_K": [ + "0.999999999999999999999999999999999999999999999999999999742690", + "1.00000000000000000000000000000000000000000000000000000025731" + ], + "c3_ref": [ + "0.0362177337776571417295101265938810899735627419074340694645977", + "0.0362177337776571417295101265938810899735627419074340694926898" + ], + "c3_pipeline_E0": [ + "0.0362177337776571417295101265938810899735627419074340694738966", + "0.0362177337776571417295101265938810899735627419074340694833946" + ], + "c3_torus_L_ge_10": [ + "0.0362177336489518882987531394079504427814006218395831216409453", + "0.0362177339063623955888804504808701049518692707958382869140100" + ], + "c3_torus_L_24": [ + "0.0362177337776571417295101265938810899735627419074340694738232", + "0.0362177337776571417295101265938810899735627419074340694834669" + ] + }, + "B=[0,inf] K=[1/2,2]": { + "F3_B": [ + "0.953797733717050929943324920145130749895702338311747743575500", + "0.953797733717050929943324920145130749895702338311747743575995" + ], + "G_K": [ + "0.067371733425641667348844418474402773431540422159891980011888", + "0.067371733425641667348844418474402773431540422159891980510232" + ], + "c3_ref": [ + "0.00268447988228775572900505119734452233033601235448083393366792", + "0.00268447988228775572900505119734452233033601235448083395421876" + ], + "c3_pipeline_E0": [ + "0.00268447988228775572900505119734452233033601235448083394391915", + "0.00268447988228775572900505119734452233033601235448083394396761" + ], + "c3_torus_L_ge_10": [ + "0.00268447987082819968857687439653311530651506519757139551714556", + "0.00268447989374731181568565822637068681314014018592291042320215" + ], + "c3_torus_L_24": [ + "0.00268447988228775572900505119734452233033601235448083394391062", + "0.00268447988228775572900505119734452233033601235448083394397510" + ] + }, + "B=[0,inf] K=[0,inf]": { + "F3_B": [ + "0.953797733717050929943324920145130749895702338311747743575500", + "0.953797733717050929943324920145130749895702338311747743575995" + ], + "G_K": [ + "0.999999999999999999999999999999999999999999999999999999742690", + "1.00000000000000000000000000000000000000000000000000000025731" + ], + "c3_ref": [ + "0.0398457891134806880195986326257893980125826578895988371753271", + "0.0398457891134806880195986326257893980125826578895988372061326" + ], + "c3_pipeline_E0": [ + "0.0398457891134806880195986326257893980125826578895988371855577", + "0.0398457891134806880195986326257893980125826578895988371959036" + ], + "c3_torus_L_ge_10": [ + "0.0398457889637827312084226832139897572041159880209498454043214", + "0.0398457892631786453634018234977138644472977538662467471614741" + ], + "c3_torus_L_24": [ + "0.0398457891134806880195986326257893980125826578895988371854713", + "0.0398457891134806880195986326257893980125826578895988371959885" + ] + }, + "B=[-inf,0] K=[1/2,2]": { + "F3_B": [ + "0.0462022662829490700566750798548692501042976616882522564240307", + "0.0462022662829490700566750798548692501042976616882522564244651" + ], + "G_K": [ + "0.067371733425641667348844418474402773431540422159891980011888", + "0.067371733425641667348844418474402773431540422159891980510232" + ], + "c3_ref": [ + "0.000130037061284811702621563048905531361801614460090361518958436", + "0.000130037061284811702621563048905531361801614460090361519955081" + ], + "c3_pipeline_E0": [ + "0.000130037061284811702621563048905531361801614460090361519455008", + "0.000130037061284811702621563048905531361801614460090361519458513" + ], + "c3_torus_L_ge_10": [ + "0.000130037060729707154825157381484593609877505984934152517256856", + "0.000130037061839916252658451181418426944017753193094068245008129" + ], + "c3_torus_L_24": [ + "0.000130037061284811702621563048905531361801614460090361519454596", + "0.000130037061284811702621563048905531361801614460090361519458875" + ] + }, + "B=[-inf,0] K=[0,inf]": { + "F3_B": [ + "0.0462022662829490700566750798548692501042976616882522564240307", + "0.0462022662829490700566750798548692501042976616882522564244651" + ], + "G_K": [ + "0.999999999999999999999999999999999999999999999999999999742690", + "1.00000000000000000000000000000000000000000000000000000025731" + ], + "c3_ref": [ + "0.00193014272711765532333803280278615845409886177144590068825050", + "0.00193014272711765532333803280278615845409886177144590068975988" + ], + "c3_pipeline_E0": [ + "0.00193014272711765532333803280278615845409886177144590068874607", + "0.00193014272711765532333803280278615845409886177144590068926439" + ], + "c3_torus_L_ge_10": [ + "0.00193014271986623857311209623885752119422071290519647342823786", + "0.00193014273436907209936460273956946792323646879246918172839518" + ], + "c3_torus_L_24": [ + "0.00193014272711765532333803280278615845409886177144590068874189", + "0.00193014272711765532333803280278615845409886177144590068926849" + ] + }, + "B=[-inf,inf] K=[1/2,2]": { + "F3_B": [ + "0.999999999999999999999999999999999999999999999999999999999970", + "1.00000000000000000000000000000000000000000000000000000000003" + ], + "G_K": [ + "0.067371733425641667348844418474402773431540422159891980011888", + "0.067371733425641667348844418474402773431540422159891980510232" + ], + "c3_ref": [ + "0.00281451694357256743162661424625005369213762681457119545262759", + "0.00281451694357256743162661424625005369213762681457119547417263" + ], + "c3_pipeline_E0": [ + "0.00281451694357256743162661424625005369213762681457119546337538", + "0.00281451694357256743162661424625005369213762681457119546342492" + ], + "c3_torus_L_ge_10": [ + "0.00281451693155790684340203177801770891639257118250554803440365", + "0.00281451695558722806834410940778911375715789337901697866820908" + ], + "c3_torus_L_24": [ + "0.00281451694357256743162661424625005369213762681457119546336643", + "0.00281451694357256743162661424625005369213762681457119546343278" + ] + }, + "B=[-inf,inf] K=[0,inf]": { + "F3_B": [ + "0.999999999999999999999999999999999999999999999999999999999970", + "1.00000000000000000000000000000000000000000000000000000000003" + ], + "G_K": [ + "0.999999999999999999999999999999999999999999999999999999742690", + "1.00000000000000000000000000000000000000000000000000000025731" + ], + "c3_ref": [ + "0.0417759318405983433429366654285755564666815196610447378635960", + "0.0417759318405983433429366654285755564666815196610447378958745" + ], + "c3_pipeline_E0": [ + "0.0417759318405983433429366654285755564666815196610447378743219", + "0.0417759318405983433429366654285755564666815196610447378851501" + ], + "c3_torus_L_ge_10": [ + "0.0417759316836489697815347794528472783983367009261463188325775", + "0.0417759319975477174627664262372833323705342226587159288898515" + ], + "c3_torus_L_24": [ + "0.0417759318405983433429366654285755564666815196610447378742311", + "0.0417759318405983433429366654285755564666815196610447378852391" + ] + } + }, + "transfer": { + "E3_10": [ + "2.05805364396613681239191058239938065835311079511529608553774E-11", + "2.05805364396613681239191058239938065835311079511529608553779E-11" + ], + "E3_12": [ + "1.71421585658899834989417684767389002055594753860017650559741E-20", + "1.71421585658899834989417684767389002055594753860017650559744E-20" + ], + "E3_24": [ + "1.70858804255899794678433367117385227445444088200608977804205E-112", + "1.70858804255899794678433367117385227445444088200608977804207E-112" + ], + "eps_L_ge_10": "5.97190288209931992059459998511201758964824533079540184327128E-10", + "eps_L_ge_12": "4.97418065062994181485778118740663605155082575860859079295391E-19", + "eps_L_24": "3.82132176085709903675650977388397975516024315550377638890295E-58", + "eps_E0": "4.31624837098144758743769425774642452799703633771371641183684E-59", + "lambda_floor": "1/3", + "lambda_min_exact": "2 - sqrt(8/3)", + "tau2_L_ge_10": [ + "5.99999999892981210505374427848173890436431773144176231372353", + "6.00000000107018789482088241139107118330441343747601192437509" + ], + "pG_pV_L_ge_10": [ + "0.00232755401072053669190484005181751943633166184941659314058490", + "0.00232755401097601567929900294622790561736550944555636928271290" + ] + }, + "reference": { + "C_prime": [ + [ + "2/3", + "-2/3", + "0", + "-2/3" + ], + [ + "-2/3", + "8/3", + "0", + "2/3" + ], + [ + "0", + "0", + "1", + "0" + ], + [ + "-2/3", + "2/3", + "0", + "8/3" + ] + ], + "A_given_f_mean": [ + "-1", + "0", + "-1" + ], + "A_given_f_cov": [ + [ + "2", + "0", + "0" + ], + [ + "0", + "1", + "0" + ], + [ + "0", + "0", + "2" + ] + ], + "tau2": "6", + "det_Cov_V": "3", + "D_2": [ + "2.38384359055015523513604925862744194136738585267666320490062", + "2.38384359055015523513604925862744194136738585267666320490067" + ], + "I_full": [ + "2.38384359055015523513604925862744194136738585267666320490060", + "2.38384359055015523513604925862744194136738585267666320490068" + ] + }, + "float_control": { + "perturbation_of_even_block": { + "0,5": "1/1000", + "4,4": "1/500", + "4,6": "1/1000", + "1,5": "-1/1000", + "2,4": "1/1000" + }, + "eps": "0.00812182307120759679997201108498768113698935287565547921116909", + "windows": { + "[0,1]": { + "float_reference": "0.8252837728", + "float_perturbed": "0.8268334615", + "sandwich": [ + "0.790964753983860140123544620021636271081367368718746954702898", + "0.861018179261328410495115690165108406134737473912348566463941" + ] + }, + "[-1/2,3/2]": { + "float_reference": "1.562469486", + "float_perturbed": "1.565128758", + "sandwich": [ + "1.49522309147943926580696943043415095655026381691451376688912", + "1.63255334952972646465845513242466914142640996601722842448201" + ] + }, + "[1,2]": { + "float_reference": "1.131261394", + "float_perturbed": "1.132612357", + "sandwich": [ + "1.07783704056505344180720882819897437867330451955475855926573", + "1.18710019011283320155291608894542000216817894942825247618003" + ] + } + } + }, + "constants": { + "pi": [ + "3.14159265358979323846264338327950288419716939937510582097457", + "3.14159265358979323846264338327950288419716939937510582097528" + ], + "Gamma(7/6)": [ + "0.927719333630039200708349482534621018566466519145475576700351", + "0.927719333630039200708349482534621018566466519145475576939062" + ], + "(3/2)^(1/3)": [ + "1.14471424255333186780804221193967700891590692078793107209905", + "1.14471424255333186780804221193967700891590692078793107209906" + ] + }, + "exact_relations": { + "window coefficient": "c^(3)_{B,K} = 144 int_{S^2} p_G(0) p_V(0) I_B(u) J_K(u) dsigma(u), I_B = E[1{f in B} det(A)^2 1{A<0} | V=0] ([LP] (11.3), section 15)", + "reference": "(f, A11, A12, A22) | V=0 has covariance C'_ref (above); A | f=b, V=0 = -b I + Q; I^ref_B = int_B phi_{2/3} m_{3,b} db (Math-#197 (4.1))", + "sandwich": "(1-eps) C'_ref <= C' <= (1+eps) C'_ref => (1-eps)^4/(1+eps)^2 I^ref_{B/sqrt(1-eps)} <= I'_B <= (1+eps)^4/(1-eps)^2 I^ref_{B/sqrt(1+eps)}", + "epsilon": "eps = ||C' - C'_ref||_F / lambda0, lambda0 = 1/3 <= lambda_min(C'_ref) = 2 - sqrt(8/3)", + "image bound": "E^(3)_L = 1404 (76 L^6 + 15) exp(-L^2/2)" + } +} diff --git a/frontiers/c8_window_coefficient_d3_torus_20260930/SOURCE_FILES.json b/frontiers/c8_window_coefficient_d3_torus_20260930/SOURCE_FILES.json new file mode 100644 index 000000000..b1f4b7d65 --- /dev/null +++ b/frontiers/c8_window_coefficient_d3_torus_20260930/SOURCE_FILES.json @@ -0,0 +1,110 @@ +{ + "schema": 1, + "object": "CL-C8-WINDOW-COEFFICIENT-D3-TORUS-20260930-v1", + "scientific_effect": "NONE", + "certified": true, + "review_status": "AUTHOR_SIDE_CERTIFIED_ENCLOSURE_NONAUTHOR_READS_OPEN", + "disposition": "CERTIFIED_TORUS_ENCLOSURE_OF_THE_D3_WINDOW_COEFFICIENT_NO_REGISTER_CHANGE_C8_OPEN", + "declarative": true, + "executed": false, + "base": "3e0a91b69892b9717564c592e7a966492a81566a", + "claim": "https://github.com/d6g8k5htny-coder/Math-/pull/197#issuecomment-5921235693", + "pins_on_main": [ + { + "label": "LP", + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "git_blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "role": "(11.3) the window coefficient in every d; section 15 factorization p_(f,V)(b,0) p_G(0) phi_tau(12k), z_0 = 36 k^2 E[det(A)^2 1{A<0} | f=b, V=0]", + "workflow_checked": true + }, + { + "label": "S24", + "path": "coefficients/side24_v1/PROOF.md", + "git_blob": "44b66f04f89fcd87383b3603fa69f1feb64cdddd", + "role": "sections 2-4: image bound (76|x|^6 contraction bound, normalization), C_ref >= I/3, the covariance-sandwich scaling argument generalized here to a birth window", + "workflow_checked": true + }, + { + "label": "ENC", + "path": "coefficients/side24_v1/ENCLOSURE.json", + "git_blob": "57af39a05e14ed0ba8ebc00a9b4aca4dffb067c7", + "role": "the d = 3 enclosure of c_{3,24} quoted in the script (rule SIDE24_CONSISTENT)", + "workflow_checked": true + } + ], + "companion_not_on_main": [ + { + "pr": "https://github.com/d6g8k5htny-coder/Math-/pull/197", + "commit": "63e123f", + "path": "frontiers/c8_window_coefficient_planar_20260930/window_coefficient.py", + "git_blob": "43b4f51ba0e29c38468c40b4648f683848a3b218", + "role": "interval class, erf, Owen's T, Owen primitives G_0..G_4, incomplete gamma, library_exact reused verbatim; F3_ref generalized to interval endpoints" + }, + { + "pr": "https://github.com/d6g8k5htny-coder/Math-/pull/197", + "commit": "63e123f", + "path": "frontiers/c8_window_coefficient_planar_20260930/NOTE.md", + "git_blob": "56d99b48d2d28152029dd099d9a985495399149c", + "role": "section 4: the d = 3 reference closed form m_{3,b} (4.1) and its three window primitives; the stated gap (no torus transfer in d = 3)" + }, + { + "pr": "https://github.com/d6g8k5htny-coder/Math-/pull/197", + "commit": "63e123f", + "path": "frontiers/c8_window_coefficient_planar_20260930/RESULTS.json", + "git_blob": "95443edfcfb8466a31e93b16fae9c19bada77e86", + "role": "birth_factor_d3_reference: the d = 3 reference factors reproduced here" + } + ], + "revisions": [ + { + "version": "v1.1", + "finding": "C41-205-C-01", + "review": "https://github.com/d6g8k5htny-coder/Math-/pull/205#pullrequestreview-5373681438", + "change": "NOTE.md only: displayed intervals rounded outward (eight section-5 upper endpoints and the section-0 C8 interval had been truncated downward); the section-4 tau^2 and p_G p_V lines given as explicit outward intervals; eps values stated as rounded-up upper bounds; float-control accuracy stated as relative", + "unchanged": [ + "window_coefficient_d3.py", + "RESULTS.json" + ] + }, + { + "version": "v1.2", + "finding": "gap-window hypothesis wording (same defect as Codex thread 4151593177 on Math-#213)", + "review": "https://github.com/d6g8k5htny-coder/Math-/pull/213#discussion_r4151593177", + "change": "NOTE.md only: section 0 states [LP] Theorem B hypothesis 0 < k_- <= k_+ < infinity instead of k_- >= 0; section 7 says windows touching k = 0 or infinity (including the tabulated K = (0,infinity)) and unbounded B are coefficient integrals only", + "unchanged": [ + "window_coefficient_d3.py", + "RESULTS.json" + ] + }, + { + "version": "v1.3", + "finding": "C43-205-H-01 (positive lengths), C43-205-H-02 (C41 review history)", + "review": "https://github.com/d6g8k5htny-coder/Math-/pull/205#pullrequestreview-5377957341", + "change": "NOTE.md only: section 0 states [LP] Theorem B hypothesis as compact windows of positive length, -infinity < b_- < b_+ < infinity and 0 < k_- < k_+ < infinity (pinned [LP] lines 16 and 37); section 7 classes singleton windows (b_- = b_+ or k_- = k_+) outside the hypothesis with zero-touching or infinite gap windows and unbounded B; section 9 records C41 as overall AMEND (numerical PASS_TECHNICAL, reporting AMEND C41-205-C-01), C42 resolution and C43", + "unchanged": [ + "window_coefficient_d3.py", + "RESULTS.json" + ] + } + ], + "files": [ + { + "path": "NOTE.md", + "bytes": 19206, + "sha256": "0e5a94e16ab35ff0be16ff6bafbeb6dd02bb50271b2caff5a8090f913b85e459", + "git_blob": "549dc7cc3e8ce9b330fa20f6ade98d81c5fe4aaa" + }, + { + "path": "RESULTS.json", + "bytes": 18390, + "sha256": "7f11bc47f01fdf4433187d128a44003fe0c268a48b0703430788c7d06da965df", + "git_blob": "8dcf45c592fd0a6d1fcc7fdb957458f52204607a" + }, + { + "path": "window_coefficient_d3.py", + "bytes": 37850, + "sha256": "e05e47fc966f34ae19cc7ddbbac805a763fb330bbf4f9cfff8b7e0078b7db664", + "git_blob": "ba24b3802eb0baf5ade65d49fd47ca862972f8bd" + } + ] +} diff --git a/frontiers/c8_window_coefficient_d3_torus_20260930/window_coefficient_d3.py b/frontiers/c8_window_coefficient_d3_torus_20260930/window_coefficient_d3.py new file mode 100644 index 000000000..ba24b3802 --- /dev/null +++ b/frontiers/c8_window_coefficient_d3_torus_20260930/window_coefficient_d3.py @@ -0,0 +1,881 @@ +"""The compact-window coefficient c_{B,K} of [LP] Theorem B in d = 3: transfer to the torus for every L >= 10 and every frame. + +Standard library only. Run from anywhere: python -B -S window_coefficient_d3.py [--mutant NAME] (about ten seconds) +Every printed interval [lo, hi] is a rigorous enclosure: interval arithmetic over `decimal` (60 digits, directed rounding; exp +and sqrt widened by two units in the last place and checked against exact rational brackets by rule LIBRARY_EXACT), pi by +Machin, fractional powers by exact integer roots, erf and the lower incomplete gamma function by positive series with geometric +tails, Owen's T and arctan by alternating series bracketed by consecutive partial sums (the Math-#197 toolkit, unchanged). + +Object ([LP] = imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md, (11.3) with the section 15 factorization, +both stated for every d; frame (u, w1, w2), G = grad f, V = (f_uu, f_uw1, f_uw2), A the transverse Hessian, t = f_uuu): + + c^(3)_{B,K} = 144 int_{S^2} p_G(0) p_V(0) I_B(u) J_K(u) dsigma(u), I_B(u) = E[1{f in B} det(A)^2 1{A < 0} | V = 0], + J_K(u) = int_K k^(4/3) phi_tau(12 k) dk, tau^2 = Var(t | G = 0). + +Math-#197 section 4 gives the reference kernel's I^ref_B in closed form (A | f = b, V = 0 = -b I + Q) and leaves the torus +open: under the perturbed entries the conditional mean of A is no longer -b I. Here I_B is an expectation of a nonnegative +function under the centred Gaussian (f, A11, A12, A22) | V = 0; if its covariance satisfies (1-eps) C'_ref <= C' <= (1+eps) +C'_ref, the density comparison and the degree-4 homogeneity of det(A)^2 give + + (1-eps)^4/(1+eps)^2 I^ref_{B/sqrt(1-eps)} <= I'_B <= (1+eps)^4/(1-eps)^2 I^ref_{B/sqrt(1+eps)}, + +so the birth window, the only non-homogeneous ingredient, is merely rescaled and the reference closed form is evaluated at the +interval endpoints b/sqrt(1 +- eps). eps = ||C' - C'_ref||_F / (1/3) over the entry box of the d = 3 image bound +E^(3)_L = 1404 (76 L^6 + 15) exp(-L^2/2) (C'_ref >= I/3 exactly: its smallest eigenvalue is 2 - sqrt(8/3)); p_G(0), p_V(0) +and tau^2 are evaluated over the same box. One enclosure covers every frame and every L >= 10. Scientific effect NONE. +""" +import argparse +import json +import math +import sys +import time +from decimal import Decimal, Context, ROUND_FLOOR, ROUND_CEILING, ROUND_HALF_EVEN, setcontext +from fractions import Fraction as Fr + +MUTANTS = ("image-shells", "lambda-min", "sandwich-swap", "window-scale", "d3-cross", "schur-sign", "sphere", "tau-cross", + "tail-dropped", "no-owen", "gamma-shape") +MUT = None + +PREC = 60 +CF = Context(prec=PREC, rounding=ROUND_FLOOR, Emin=-9999999, Emax=9999999) +CC = Context(prec=PREC, rounding=ROUND_CEILING, Emin=-9999999, Emax=9999999) +CE = Context(prec=PREC, rounding=ROUND_HALF_EVEN, Emin=-9999999, Emax=9999999) +# Every arithmetic step below names one of the three contexts; operator syntax on Decimals would round to the thread's +# current context, which is widened as a safety net (rule LIBRARY_EXACT checks exp, sqrt and the negation). +setcontext(Context(prec=2 * PREC + 20, rounding=ROUND_HALF_EVEN, Emin=-9999999, Emax=9999999)) +ZERO, ONE, HALF = Decimal(0), Decimal(1), Decimal("0.5") +INF = math.inf +ROOT_DIGITS = 70 +SIDE24_D3 = ("0.04177593184059834334", "0.04177593184059834335") # coefficients/side24_v1/ENCLOSURE.json, dimensions.3 +PINNED = {"c_3_ref": "0.0417759318405983433429366654285755564666815196", "F3|[0,1]": "0.3461987920340717271297207246510843049276867160", "c3|[0,1]x[1/2,2] ref": "0.000974382366024250462471056546784220686368296122", "pi": "3.14159265358979323846264338327950288419716939937510"} + + +# ---------------- interval arithmetic and special functions (Math-#197 toolkit, unchanged) +def ulp(x): + if x == 0: + return Decimal(1).scaleb(-PREC - 30) + return Decimal(1).scaleb(x.adjusted() - PREC + 1) + + +class Iv: + """Closed interval [lo, hi] of Decimals; every operation encloses the exact result.""" + __slots__ = ("lo", "hi") + + def __init__(self, lo, hi=None): + if hi is None: + hi = lo + if lo > hi: + raise ValueError("empty interval") + self.lo, self.hi = lo, hi + + @staticmethod + def frac(q): + q = Fr(q) + n, d = Decimal(q.numerator), Decimal(q.denominator) + return Iv(CF.divide(n, d), CC.divide(n, d)) + + @staticmethod + def of(x): + return x if isinstance(x, Iv) else Iv.frac(x) + + def __add__(a, b): + b = Iv.of(b) + return Iv(CF.add(a.lo, b.lo), CC.add(a.hi, b.hi)) + __radd__ = __add__ + + def __neg__(a): + return Iv(a.hi.copy_negate(), a.lo.copy_negate()) # exact: unary minus would round to the default context + + def __sub__(a, b): + b = Iv.of(b) + return Iv(CF.subtract(a.lo, b.hi), CC.subtract(a.hi, b.lo)) + + def __rsub__(a, b): + return Iv.of(b) - a + + def __mul__(a, b): + b = Iv.of(b) + c = [(x, y) for x in (a.lo, a.hi) for y in (b.lo, b.hi)] + return Iv(min(CF.multiply(x, y) for x, y in c), max(CC.multiply(x, y) for x, y in c)) + __rmul__ = __mul__ + + def __truediv__(a, b): + b = Iv.of(b) + if b.lo <= 0 <= b.hi: + raise ZeroDivisionError("interval division by an interval containing 0") + c = [(x, y) for x in (a.lo, a.hi) for y in (b.lo, b.hi)] + return Iv(min(CF.divide(x, y) for x, y in c), max(CC.divide(x, y) for x, y in c)) + + def __rtruediv__(a, b): + return Iv.of(b) / a + + def sq(a): + if a.lo <= 0 <= a.hi: + return Iv(ZERO, max(CC.multiply(a.lo, a.lo), CC.multiply(a.hi, a.hi))) + return a * a + + def exp(a): + lo, hi = CE.exp(a.lo), CE.exp(a.hi) + return Iv(max(ZERO, CF.subtract(lo, CC.multiply(Decimal(2), ulp(lo)))), CC.add(hi, CC.multiply(Decimal(2), ulp(hi)))) + + def sqrt(a): + if a.lo < 0: + raise ValueError("sqrt of an interval with negative part") + lo, hi = CE.sqrt(a.lo), CE.sqrt(a.hi) + return Iv(max(ZERO, CF.subtract(lo, CC.multiply(Decimal(2), ulp(lo)))), CC.add(hi, CC.multiply(Decimal(2), ulp(hi)))) + + def width(a): + return CC.subtract(a.hi, a.lo) + + def contains(a, x): + x = Iv.of(x) + return a.lo <= x.lo and x.hi <= a.hi + + def intersects(a, b): + return a.lo <= b.hi and b.lo <= a.hi + + def mag(a): + return max(abs(a.lo), abs(a.hi)) + + def mid_float(a): + return float((a.lo + a.hi) / 2) + + def pair(a): + return [str(a.lo), str(a.hi)] + + +def hull(a, b): + return Iv(min(a.lo, b.lo), max(a.hi, b.hi)) + + +def inroot(N, n): + """floor(N ** (1/n)) for integers N >= 0, n >= 1: integer Newton iteration started above the root.""" + if N < 2: + return N + x = 1 << ((N.bit_length() + n - 1) // n) + while True: + y = ((n - 1) * x + N // pow(x, n - 1)) // n + if y >= x: + break + x = y + if not (pow(x, n) <= N < pow(x + 1, n)): + raise ValueError("integer root failed") + return x + + +def root_frac(q, n): + """Rigorous bracket of q ** (1/n) for a positive rational q, width 10^-ROOT_DIGITS.""" + q = Fr(q) + if q <= 0: + raise ValueError("root of a nonpositive number") + p, d = q.numerator, q.denominator + scale = 10 ** ROOT_DIGITS + r = inroot(p * d ** (n - 1) * scale ** n, n) + den = d * scale + return Iv(Iv.frac(Fr(r, den)).lo, Iv.frac(Fr(r + 1, den)).hi) + + +def root_iv(x, n): + """x ** (1/n) for an interval x > 0 (monotone: endpoint brackets).""" + return Iv(root_frac(Fr(x.lo), n).lo, root_frac(Fr(x.hi), n).hi) + + +def pi_interval(): + def atan_inv(n, terms): + x = Fr(1, n) + partial, sums = Iv(ZERO), [] + for m in range(terms + 2): + t = Iv.frac(x ** (2 * m + 1) / (2 * m + 1)) + partial = partial + t if m % 2 == 0 else partial - t + sums.append(partial) + return hull(sums[-1], sums[-2]) # alternating series with decreasing terms + return atan_inv(5, 44) * 16 - atan_inv(239, 22) * 4 + + +PI = pi_interval() +SQRT2 = Iv.frac(2).sqrt() +SQRT3 = Iv.frac(3).sqrt() +SQRT2PI = (2 * PI).sqrt() +SQRTPI = PI.sqrt() +TINY = Decimal(10) ** (-PREC - 8) + + +def erf_point(x, coarse=False): + """erf(x) at a Decimal point: (2/sqrt pi) exp(-x^2) sum_n 2^n x^(2n+1)/(2n+1)!!, positive terms; once the term ratio + 2x^2/(2n+3) is at most 1/2 the omitted tail is at most twice the first omitted term. coarse=True stops at that point + (a valid, wider enclosure used by TRUNCATION_NESTING); the production run continues until the tail is negligible.""" + tail = MUT != "tail-dropped" + coarse = coarse or not tail + if x < 0: + return -erf_point(-x, coarse) + if x == 0: + return Iv(ZERO) + X = Iv(x) + x2 = X * X + t, S, n = X, Iv(ZERO), 0 + while True: + S = S + t + ratio = x2 * 2 / (2 * n + 3) + t = t * ratio + n += 1 + if ratio.hi <= HALF and (coarse or t.hi < S.lo * TINY): + break + if n > 200000: + raise RuntimeError("erf series did not converge") + rest = Iv(ZERO, CC.multiply(Decimal(2), t.hi)) if tail else Iv(ZERO) + return (S + rest) * (-x2).exp() * 2 / SQRTPI + + +def erf_iv(x, coarse=False): + return Iv(erf_point(x.lo, coarse).lo, erf_point(x.hi, coarse).hi) + + +def Phi(x): + return (1 + erf_iv(x / SQRT2)) / 2 + + +def phi(x): + return (-(x.sq()) / 2).exp() / SQRT2PI + + +def atan_iv(a, N=90): + """arctan(a) for an interval 0 <= a <= 1: halve the argument, then the alternating series bracketed by consecutive + partial sums (for each fixed argument the terms decrease, so the value lies between them).""" + a1 = a / (1 + (1 + a.sq()).sqrt()) + a1sq, p, S, prev = a1.sq(), a1, Iv(ZERO), None + for n in range(N + 1): + t = p / (2 * n + 1) + prev = S + S = S + t if n % 2 == 0 else S - t + p = p * a1sq + return 2 * hull(prev, S) + + +def owen_T(h, a, N=160, bracket=True): + """Owen's T(h, a) = (1/2 pi) int_0^a exp(-h^2 (1+x^2)/2)/(1+x^2) dx for 0 <= a <= 1, by Owen's series + T = (1/2 pi)[arctan a - sum_j c_j a^(2j+1)], c_j = (-1)^j/(2j+1) [1 - exp(-h^2/2) sum_{i<=j} (h^2/2)^i/i!]. + The bracket is P(Poisson(h^2/2) > j), decreasing in j, so for fixed (h, a) the terms alternate with decreasing size and + the sum lies between consecutive partial sums; interval evaluation of both encloses it for every point of the intervals.""" + if MUT == "no-owen": + return Iv(ZERO) + h2 = h.sq() / 2 + e = (-h2).exp() + pois, term, apow, a2 = Iv(ONE), Iv(ONE), a, a.sq() + S, prev = Iv(ZERO), None + for j in range(N + 1): + if j > 0: + term = term * h2 / j + pois = pois + term + cj = apow / (2 * j + 1) * (1 - e * pois) + prev = S + S = S + cj if j % 2 == 0 else S - cj + apow = apow * a2 + val = hull(prev, S) if bracket else S + return (atan_iv(a) - val) / (2 * PI) + + +def owen_T_eval(h, a): + if MUT == "tail-dropped": + return owen_T(h, a, N=6, bracket=False) + return owen_T(h, a) + + +def SHAPE(): + """Shape parameter of the gap-window incomplete gamma factor (mutant gamma-shape perturbs it).""" + return Fr(4, 3) if MUT == "gamma-shape" else Fr(7, 6) + + +def gamma_lower_point(x, a, coarse=False): + """gamma(a, x) = int_0^x s^(a-1) e^-s ds = x^a e^-x sum_n x^n/(a (a+1) ... (a+n)), positive terms; once the term ratio + x/(a+n) is at most 1/2 the omitted tail is at most twice the first omitted term. x a Decimal point >= 0, a = 7/6 or 4/3.""" + tail = MUT != "tail-dropped" + coarse = coarse or not tail + if x == 0: + return Iv(ZERO) + X = Iv(x) + t, S, n = Iv.frac(1 / a), Iv(ZERO), 0 + while True: + S = S + t + n += 1 + ratio = X / Iv.frac(a + n) + t = t * ratio + if ratio.hi <= HALF and (coarse or t.hi < S.lo * TINY): + break + if n > 200000: + raise RuntimeError("incomplete gamma series did not converge") + rest = Iv(ZERO, CC.multiply(Decimal(2), t.hi)) if tail else Iv(ZERO) + xa = X * root_frac(Fr(x), 6) if a == Fr(7, 6) else X * root_frac(Fr(x), 3) # x^a + return xa * (-X).exp() * (S + rest) + + +def gamma_lower(x, a, coarse=False): + """gamma(a, x) for an interval x >= 0 or x = INF (monotone in x).""" + if isinstance(x, float): + return GAMMA[a] + return Iv(gamma_lower_point(x.lo, a, coarse).lo, gamma_lower_point(x.hi, a, coarse).hi) + + +def gamma_complete(a, X=Decimal(120)): + """Gamma(a) = gamma(a, X) + Gamma(a, X), 1 < a < 2, with X^(a-1) e^-X <= Gamma(a, X) <= X^(a-1) e^-X / (1 - (a-1)/X).""" + low = gamma_lower_point(X, a) + xa1 = root_frac(Fr(X), 6) if a == Fr(7, 6) else root_frac(Fr(X), 3) + up = xa1 * (-Iv(X)).exp() + return low + Iv(up.lo, (up / (1 - Iv.frac(a - 1) / Iv(X))).hi) + + +GAMMA = {Fr(7, 6): gamma_complete(Fr(7, 6)), Fr(4, 3): gamma_complete(Fr(4, 3))} +GAMMA76 = GAMMA[Fr(7, 6)] +CBRT32 = root_frac(Fr(12), 3) / 2 # (3/2)^(1/3) = 12^(1/3)/2 +C72 = 1 / (72 * root_frac(Fr(72), 6)) # 72^(-7/6) +SIGMA_REF = Iv.frac(Fr(2, 3)).sqrt() # sd of f | V=0 for the reference kernel +D2_EXACT = Iv.frac(Fr(29, 6)) - Iv.frac(6).sqrt() # SIDE24 cone moment m = 2 +C3_REF = GAMMA76 * CBRT32 * D2_EXACT / (2 * SQRT3 * PI * PI * SQRTPI) # SIDE24 (1), d = 3 + + +# ---------------- the Gaussian integrals int_{-inf}^x t^n phi(t) Phi(a t) dt, n <= 4 (Math-#197 section 2, unchanged) +def G_finite(x, a): + rho2 = 1 + a.sq() + rho = rho2.sqrt() + Phx, phx, Phax = Phi(x), phi(x), Phi(a * x) + T = owen_T_eval(x, a) + Erho = (-(rho2 * x.sq()) / 2).exp() + Phrx = Phi(rho * x) + x2 = x.sq() + G0 = Phx / 2 - T + G1 = -phx * Phax + a / (rho * SQRT2PI) * Phrx + G2 = G0 - x * phx * Phax - a / (2 * PI * rho2) * Erho + G3 = -x2 * phx * Phax + a / (2 * PI) * (-(x / rho2) * Erho + SQRT2PI / (rho2 * rho) * Phrx) + 2 * G1 + G4 = -x * x2 * phx * Phax - a / (2 * PI) * (x2 / rho2 + 2 / rho2.sq()) * Erho + 3 * G2 + return [G0, G1, G2, G3, G4] + + +def G_limit(a, sign): + if sign < 0: + return [Iv(ZERO)] * 5 + rho2 = 1 + a.sq() + rho = rho2.sqrt() + g1 = a / (rho * SQRT2PI) + return [Iv.frac(Fr(1, 2)), g1, Iv.frac(Fr(1, 2)), a / (rho2 * rho * SQRT2PI) + 2 * g1, Iv.frac(Fr(3, 2))] + + +def G_at(x, a): + """x an interval or +-INF.""" + if isinstance(x, float): + return G_limit(a, 1 if x > 0 else -1) + return G_finite(x, a) + + +def P_reg(s): + """Regularized lower incomplete gamma P(7/6, s) (s an interval >= 0 or INF).""" + a = SHAPE() + return gamma_lower(s, a) / GAMMA76 + + +def G_ref(K): + lo, hi = K + def s(k): + return k if isinstance(k, float) else 12 * Iv.frac(k * k) + return P_reg(s(hi)) - P_reg(s(lo)) + + +def library_exact(): + """exp and sqrt of the decimal module, and the interval negation, against exact rational brackets: e^-q by the + rational series of e^(-q/64) raised to the 64th power (alternating tail below the last term), sqrt by an integer root.""" + ok = True + args = [Fr(48) - Fr(51035039649098175696, 10 ** 29), Fr(3), Fr(120), Fr(1, 2), Fr(288), Fr(5, 7)] + for q in args: + g = -q / 64 + parts = [] + term, ssum = Fr(1), Fr(0) + for k in range(0, 60): + ssum += term + parts.append(ssum) + term = term * g / (k + 1) + lo, hi = min(parts[-1], parts[-2]), max(parts[-1], parts[-2]) # alternating series with decreasing terms + exact = Iv(Iv.frac(lo ** 64).lo, Iv.frac(hi ** 64).hi) # e^-q = (e^(-q/64))^64, both endpoints positive + X = Iv.frac(q) + got = (-X).exp() + ok &= got.intersects(exact) and CC.divide(got.width(), got.lo) < Decimal(10) ** (-PREC + 3) + r = root_frac(q, 2) + ok &= X.sqrt().intersects(r) and CC.divide(X.sqrt().width(), r.lo) < Decimal(10) ** (-PREC + 3) + ok &= (-X).lo == X.hi.copy_negate() and (-X).hi == X.lo.copy_negate() + return ok + + +def simpson(f, lo, hi, n=4000): + h = (hi - lo) / n + s = f(lo) + f(hi) + for i in range(1, n): + s += (4 if i % 2 else 2) * f(lo + i * h) + return s * h / 3 + + +def fPhi(x): + return 0.5 * (1 + math.erf(x / math.sqrt(2))) + + +def fphi(x): + return math.exp(-x * x / 2) / math.sqrt(2 * math.pi) + + +def m3_float(b): # direct double integral: int_0^inf g(v^2) phi(v - b) dv, g from the Rayleigh integral + def g(w): + return w * w - 4 * w + 8 - 8 * math.exp(-w / 2) + return simpson(lambda v: g(v * v) * fphi(v - b), 0.0, 14.0 + abs(b), 1200) + + + +# ---------------- the d = 3 jet of the reference kernel exp(-|z|^2/2), frame (u, w1, w2) +# Cov(d^a f, d^b f) = (-1)^|a| d^(a+b) K(0), and d^al exp(-|z|^2/2) at 0 = prod_i (-1)^(al_i/2) (al_i - 1)!! for even al, else 0. +EVEN = [(0, 0, 0), (2, 0, 0), (1, 1, 0), (1, 0, 1), (0, 2, 0), (0, 1, 1), (0, 0, 2)] # f, f_uu, f_uw1, f_uw2, A11, A12, A22 +ODD = [(1, 0, 0), (0, 1, 0), (0, 0, 1), (3, 0, 0)] # f_u, f_w1, f_w2, t = f_uuu +IDX_X, IDX_V = [0, 4, 5, 6], [1, 2, 3] # (f, A11, A12, A22) and V = (f_uu, f_uw1, f_uw2) + + +def dfact2(n): + r = 1 + while n > 1: + r *= n + n -= 2 + return r + + +def ref_cov(a, b): + al = [x + y for x, y in zip(a, b)] + if any(x % 2 for x in al): + return Fr(0) + v = Fr((-1) ** sum(a)) + for x in al: + v *= (-1) ** (x // 2) * dfact2(x - 1) + if MUT == "tau-cross" and sorted([a, b]) == sorted([(3, 0, 0), (1, 0, 0)]): + return Fr(0) + return v + + +def ref_matrix(idx): + return [[ref_cov(a, b) for b in idx] for a in idx] + + +def det3(M): + return (M[0][0] * (M[1][1] * M[2][2] - M[1][2] * M[2][1]) - M[0][1] * (M[1][0] * M[2][2] - M[1][2] * M[2][0]) + + M[0][2] * (M[1][0] * M[2][1] - M[1][1] * M[2][0])) + + +def inv3(M): + """Inverse by the adjugate; works for Fractions and for intervals.""" + d = det3(M) + cof = [[None] * 3 for _ in range(3)] + for i in range(3): + for j in range(3): + r = [x for x in range(3) if x != i] + c = [y for y in range(3) if y != j] + minor = M[r[0]][c[0]] * M[r[1]][c[1]] - M[r[0]][c[1]] * M[r[1]][c[0]] + cof[i][j] = minor if (i + j) % 2 == 0 else -minor + return [[cof[j][i] / d for j in range(3)] for i in range(3)], d + + +def schur(C, X, V): + """Cov(X | V) = C_XX - C_XV C_VV^-1 C_VX for index lists into C (Fractions or intervals).""" + CVV = [[C[i][j] for j in V] for i in V] + Vinv, detV = inv3(CVV) + out = [] + for i in X: + row = [] + for j in X: + s = None + for p in range(3): + for q in range(3): + t = C[i][V[p]] * Vinv[p][q] * C[V[q]][j] + s = t if s is None else s + t + row.append(C[i][j] + s if MUT == "schur-sign" else C[i][j] - s) + out.append(row) + return out, detV + + +def sylvester_pd(M): + """Exact positive definiteness of a symmetric rational matrix by its leading principal minors (fraction-free elimination).""" + n = len(M) + A = [list(map(Fr, r)) for r in M] + for k in range(n): + if A[k][k] <= 0: + return False + for i in range(k + 1, n): + f = A[i][k] / A[k][k] + for j in range(k, n): + A[i][j] -= f * A[k][j] + return True + + +# exact reference: C'_ref = Cov((f, A11, A12, A22) | V = 0) and its smallest-eigenvalue floor +C_EVEN_REF = ref_matrix(EVEN) +C_ODD_REF = ref_matrix(ODD) +CPRIME_REF, DETV_REF = schur(C_EVEN_REF, IDX_X, IDX_V) +LAMBDA0 = Fr(1) if MUT == "lambda-min" else Fr(1, 3) + + +def lambda_floor_ok(): + """C'_ref - LAMBDA0 I is positive definite (exact), so C'_ref >= LAMBDA0 I; the smallest eigenvalue is 2 - sqrt(8/3).""" + M = [[CPRIME_REF[i][j] - (LAMBDA0 if i == j else 0) for j in range(4)] for i in range(4)] + return sylvester_pd(M) + + +# ---------------- image bound for the torus kernel in d = 3 +def image_bound3(L): + """E^(3)_L = 1404 (76 L^6 + 15) exp(-L^2/2): the shell |n|_inf = j carries (2j+1)^3 - (2j-1)^3 = 24 j^2 + 2 <= 26 j^2 points + with |n|^2 <= 3 j^2, so sum_{n != 0} |n|^6 exp(-L^2 |n|^2/2) <= 702 sum_j j^8 exp(-L^2 j^2/2) <= 1404 exp(-L^2/2) (successive + terms ratio at most 2^8 exp(-3L^2/2) < 1/2 for L >= 10); the contraction bound 76|x|^6 phi(x) and the normalization S >= 1 + are those of Math-#197 section 3.""" + shells = 13 if MUT == "image-shells" else 26 + L = Fr(L) + return Iv.frac(2 * shells * 27 * (76 * L ** 6 + 15)) * (-Iv.frac(L * L / 2)).exp() + + +# ---------------- the d = 3 pipeline over an entry box +class Space3: + """Every covariance entry of the 3-jet (other than Var f = 1, exact by the normalization) in [ref - E, ref + E]. + Odd block (G, t) independent of the even block (f, V, A) for any even kernel ([LP] section 15).""" + + def __init__(self, E): + E = Iv.of(E) + def box(M): + n = len(M) + B = [[None] * n for _ in range(n)] + for i in range(n): + for j in range(i, n): + v = Iv.frac(M[i][j]) + Iv(-E.hi, E.hi) + B[i][j] = B[j][i] = v + return B + CE_ = box(C_EVEN_REF) + CE_[0][0] = Iv(ONE) + CO = box(C_ODD_REF) + G = [[CO[i][j] for j in range(3)] for i in range(3)] + Ginv, detG = inv3(G) + c = [CO[3][j] for j in range(3)] + self.tau2 = CO[3][3] - sum((c[i] * Ginv[i][j] * c[j] for i in range(3) for j in range(3)), Iv(ZERO)) + self.pG = 1 / (2 * PI * SQRT2PI * detG.sqrt()) # (2 pi)^(-3/2) det(Cov G)^(-1/2) + self.Cp, detV = schur(CE_, IDX_X, IDX_V) + self.pV = 1 / (2 * PI * SQRT2PI * detV.sqrt()) + self.tau43 = root_iv(self.tau2.sq(), 3) + # epsilon: ||C_ref'^(-1/2) (C' - C_ref') C_ref'^(-1/2)|| <= ||C' - C_ref'||_F / LAMBDA0, entrywise sup of |C'_ij - ref| + dev2 = Iv(ZERO) + for i in range(4): + for j in range(4): + r = Iv.frac(CPRIME_REF[i][j]) + d = max(abs(CC.subtract(self.Cp[i][j].hi, r.lo)), abs(CF.subtract(self.Cp[i][j].lo, r.hi))) + dev2 = dev2 + Iv(d).sq() + self.eps = (dev2.sqrt() / Iv.frac(LAMBDA0)).hi + + def k_integral(self, K): + lo, hi = K + def s(k): + return k if isinstance(k, float) else 72 * Iv.frac(k * k) / self.tau2 + a = SHAPE() + return self.tau43 * C72 * (gamma_lower(s(hi), a) - gamma_lower(s(lo), a)) / (2 * SQRT2PI) + + def b_integral(self, B): + return sandwich(B, self.eps) + + def coefficient(self, B, K): + sphere = 2 * PI if MUT == "sphere" else 4 * PI + return 144 * sphere * self.pG * self.pV * self.b_integral(B) * self.k_integral(K) + + +# ---------------- the d = 3 reference birth integral with interval endpoints (Math-#197 (4.1) and its three primitives) +def endpoint(b): + return b if isinstance(b, (float, Iv)) else Iv.frac(b) + + +def I3_ref(lo, hi): + """int_lo^hi phi_{2/3}(b) m_{3,b} db, m_{3,b} = (b^3 + b) phi(b) + (b^4 + 2 b^2 + 7) Phi(b) - 4 sqrt2 exp(-b^2/4) Phi(b/sqrt2); + lo, hi are rationals, intervals or +-INF.""" + sig = SIGMA_REF + def term_i(b): + if isinstance(b, float): + return Iv(ZERO) + return -(b.sq() * 2 / 5 + Iv.frac(Fr(18, 25))) * (-(b.sq()) * 5 / 4).exp() / (2 * PI * sig) + def term_ii(b): + G = G_at(b if isinstance(b, float) else b / sig, sig) + return sig.sq().sq() * G[4] + 2 * sig.sq() * G[2] + 7 * G[0] + def term_iii(b): + G = G_at(b if isinstance(b, float) else b * SQRT2, Iv.frac(Fr(1, 2))) + return 4 / sig * G[0] + lo, hi = endpoint(lo), endpoint(hi) + cross = Iv.frac(Fr(1, 2)) if MUT == "d3-cross" else Iv(ONE) + return (term_i(hi) - term_i(lo)) + (term_ii(hi) - term_ii(lo)) - cross * (term_iii(hi) - term_iii(lo)) + + +def scaled(b, s): + if isinstance(b, float): + return b + b = endpoint(b) + return b * s if MUT == "window-scale" else b / s + + +SANDWICH_VIOLATIONS = [] + + +def sandwich(B, eps): + """I'_B for every covariance C' of (f, A) | V=0 with (1-eps) C_ref' <= C' <= (1+eps) C_ref': + (1-eps)^4/(1+eps)^2 I^ref_{B/sqrt(1-eps)} <= I'_B <= (1+eps)^4/(1-eps)^2 I^ref_{B/sqrt(1+eps)} (NOTE section 2).""" + e = Iv(eps) if isinstance(eps, Decimal) else Iv.frac(eps) + if e.hi >= 1: + raise ValueError("eps must be below 1") + up, dn = 1 + e, 1 - e + s_up, s_dn = up.sqrt(), dn.sqrt() + lo, hi = B + su, sd = (s_dn, s_up) if MUT == "sandwich-swap" else (s_up, s_dn) + upper = up.sq().sq() / dn.sq() * I3_ref(scaled(lo, su), scaled(hi, su)) + lower = dn.sq().sq() / up.sq() * I3_ref(scaled(lo, sd), scaled(hi, sd)) + if lower.lo > upper.hi: # impossible for a correct bracket; recorded and reported by rule SANDWICH_ORDERED + SANDWICH_VIOLATIONS.append(str(B)) + return Iv(upper.lo, lower.hi) + return Iv(lower.lo, upper.hi) + + +def scaled_exact(B, eta): + """Exact I'_B for C' = (1 + eta) C_ref': (1 + eta)^2 I^ref_{B/sqrt(1+eta)} (degree-4 homogeneity of det(A)^2).""" + s = (1 + Iv.frac(eta)).sqrt() + lo, hi = B + return (1 + Iv.frac(eta)).sq() * I3_ref(lo if isinstance(lo, float) else endpoint(lo) / s, hi if isinstance(hi, float) else endpoint(hi) / s) + + +# ---------------- float control for a non-scalar perturbation (not part of the certificate) +def gauss_legendre(n): + xs, ws = [], [] + for i in range(1, n + 1): + x = math.cos(math.pi * (i - 0.25) / (n + 0.5)) + for _ in range(100): + p0, p1 = 1.0, x + for k in range(2, n + 1): + p0, p1 = p1, ((2 * k - 1) * x * p1 - (k - 1) * p0) / k + dp = n * (x * p1 - p0) / (x * x - 1) + dx = p1 / dp + x -= dx + if abs(dx) < 1e-15: + break + xs.append(x) + ws.append(2 / ((1 - x * x) * dp * dp)) + return xs, ws + + +def cone_moment_float(mu, Sig, b, nodes): + """E[det(A)^2 1{A < 0}] for A = [[a, c], [c, d]], (a, c, d) ~ N(b mu, Sig): the c-integral over |c| < sqrt(ad) in closed form + (truncated normal moments of orders 0, 2, 4), then Gauss-Legendre over a, d in (-R, 0).""" + xs, ws = nodes + ma, mc, md = (b * m for m in mu) + saa, sac, sad = Sig[0] + scc, scd, sdd = Sig[1][1], Sig[1][2], Sig[2][2] + det2 = saa * sdd - sad * sad + ia, iad, idd = sdd / det2, -sad / det2, saa / det2 + ka, kd = (sac * sdd - scd * sad) / det2, (scd * saa - sac * sad) / det2 # regression of c on (a, d) + vc = scc - (ka * sac + kd * scd) + sv = math.sqrt(vc) + R = 12 * math.sqrt(max(saa, sdd)) + abs(ma) + abs(md) + tot = 0.0 + for xa, wa in zip(xs, ws): + a = -R * (xa + 1) / 2 + for xd, wd in zip(xs, ws): + d = -R * (xd + 1) / 2 + ya, yd = a - ma, d - md + q = ia * ya * ya + 2 * iad * ya * yd + idd * yd * yd + dens = math.exp(-q / 2) / (2 * math.pi * math.sqrt(det2)) + RR = a * d + r = math.sqrt(RR) + m = mc + ka * ya + kd * yd + z1, z2 = (-r - m) / sv, (r - m) / sv + p1, p2 = fphi(z1), fphi(z2) + mom = [fPhi(z2) - fPhi(z1), p1 - p2] + for j in range(2, 5): + mom.append((j - 1) * mom[j - 2] + z1 ** (j - 1) * p1 - z2 ** (j - 1) * p2) + def M(k): + return sum(math.comb(k, j) * m ** (k - j) * sv ** j * mom[j] for j in range(k + 1)) + tot += wa * wd * dens * (RR * RR * M(0) - 2 * RR * M(2) + M(4)) + return tot * (R / 2) ** 2 + + +def I_float(Cp, B, nb=40, na=48): + """int_B p_f(b) E[det(A)^2 1{A<0} | f = b] db for the covariance Cp of (f, A11, A12, A22) (floats).""" + s2 = Cp[0][0] + mu = [Cp[i][0] / s2 for i in (1, 2, 3)] + Sig = [[Cp[i][j] - Cp[i][0] * Cp[0][j] / s2 for j in (1, 2, 3)] for i in (1, 2, 3)] + nodes = gauss_legendre(na) + xs, ws = gauss_legendre(nb) + lo, hi = float(B[0]), float(B[1]) + tot = 0.0 + for x, w in zip(xs, ws): + b = lo + (hi - lo) * (x + 1) / 2 + tot += w * math.exp(-b * b / (2 * s2)) / math.sqrt(2 * math.pi * s2) * cone_moment_float(mu, Sig, b, nodes) + return tot * (hi - lo) / 2 + + +CONTROL_DELTA = {(0, 5): Fr(1, 1000), (4, 4): Fr(2, 1000), (4, 6): Fr(1, 1000), (1, 5): Fr(-1, 1000), (2, 4): Fr(1, 1000)} + + +def control_matrices(): + C = [list(r) for r in C_EVEN_REF] + for (i, j), v in CONTROL_DELTA.items(): + C[i][j] += v + if i != j: + C[j][i] += v + Cp, _ = schur(C, IDX_X, IDX_V) + dev2 = sum((Cp[i][j] - CPRIME_REF[i][j]) ** 2 for i in range(4) for j in range(4)) + eps = (Iv.frac(dev2).sqrt() / Iv.frac(LAMBDA0)).hi + return Cp, eps + +# ---------------- main +def m3_closed(b): + b = Iv.frac(b) + return (b * b.sq() + b) * phi(b) + (b.sq().sq() + 2 * b.sq() + 7) * Phi(b) - 4 * SQRT2 * (-(b.sq()) / 4).exp() * Phi(b / SQRT2) + + +def label(W): + def f(x): + return ("inf" if x > 0 else "-inf") if isinstance(x, float) else str(x) + return "[%s,%s]" % (f(W[0]), f(W[1])) + + +def within(iv, fv, tol): + f, t = Decimal(repr(fv)), Decimal(repr(tol)) + return CE.subtract(iv.lo, f) <= t and CE.subtract(f, iv.hi) <= t + + +def common_prefix(iv): + lo, hi = str(iv.lo), str(iv.hi) + i = 0 + while i < min(len(lo), len(hi)) and lo[i] == hi[i]: + i += 1 + return lo[:i] + + +def main(): + global MUT + ap = argparse.ArgumentParser() + ap.add_argument("--mutant", choices=MUTANTS) + MUT = ap.parse_args().mutant + # module-level objects that depend on the mutant are rebuilt here + global CPRIME_REF, DETV_REF, LAMBDA0, C_EVEN_REF, C_ODD_REF + C_EVEN_REF, C_ODD_REF = ref_matrix(EVEN), ref_matrix(ODD) + CPRIME_REF, DETV_REF = schur(C_EVEN_REF, IDX_X, IDX_V) + LAMBDA0 = Fr(1) if MUT == "lambda-min" else Fr(1, 3) + t0 = time.time() + checks = {} + full, fullK = (-INF, INF), (Fr(0), INF) + band, bandK = (Fr(0), Fr(1)), (Fr(1, 2), Fr(2)) + + # reference: exact conditional laws + stated = [[Fr(2, 3), Fr(-2, 3), 0, Fr(-2, 3)], [Fr(-2, 3), Fr(8, 3), 0, Fr(2, 3)], [0, 0, 1, 0], [Fr(-2, 3), Fr(2, 3), 0, Fr(8, 3)]] + s2 = CPRIME_REF[0][0] + mean = [CPRIME_REF[i][0] / s2 for i in (1, 2, 3)] + condA = [[CPRIME_REF[i][j] - CPRIME_REF[i][0] * CPRIME_REF[0][j] / s2 for j in (1, 2, 3)] for i in (1, 2, 3)] + Gref = [[C_ODD_REF[i][j] for j in range(3)] for i in range(3)] + Ginv, detG = inv3(Gref) + tau2_ref = C_ODD_REF[3][3] - sum(C_ODD_REF[3][i] * Ginv[i][j] * C_ODD_REF[3][j] for i in range(3) for j in range(3)) + checks["REFERENCE_EXACT"] = bool(CPRIME_REF == stated and mean == [-1, 0, -1] and condA == [[2, 0, 0], [0, 1, 0], [0, 0, 2]] + and DETV_REF == 3 and detG == 1 and tau2_ref == 6) + checks["LAMBDA_FLOOR"] = bool(LAMBDA0 == Fr(1, 3) and lambda_floor_ok()) + I_full = I3_ref(*full) + checks["D2_EXACT"] = bool(I_full.intersects(D2_EXACT) and I_full.width() < Decimal("1e-50")) + checks["M3_FLOAT"] = bool(all(within(m3_closed(b), m3_float(float(b)), 1e-8) for b in (Fr(-2), Fr(-1), Fr(0), Fr(1, 2), Fr(1), Fr(2)))) + + # image bound and epsilon + E10, E12, E24 = image_bound3(10), image_bound3(12), image_bound3(24) + checks["IMAGE_BOUND"] = bool(Decimal("2.0e-11") < E10.lo and E10.hi < Decimal("2.1e-11") + and Decimal("1.7e-112") < E24.lo and E24.hi < Decimal("1.8e-112") + and (Iv.frac(256) * (-Iv.frac(150)).exp()).hi < HALF) + S0, S10, S12, S24 = Space3(0), Space3(E10), Space3(E12), Space3(E24) + checks["EPSILON"] = bool(S0.eps < Decimal("1e-55") and S10.eps < Decimal("1e-9") and S24.eps < Decimal("1e-55") + and S12.eps < Decimal("1e-18")) + + # the sandwich against exact scaling perturbations C' = (1 + eta) C_ref' (tight eps = |eta|) + scal_windows = [(Fr(0), Fr(1)), (Fr(3), Fr(7, 2)), (Fr(-7, 2), Fr(-3)), (Fr(-1), Fr(2)), (Fr(0), INF)] + ok = True + for eta in (Fr(1, 50), Fr(-1, 50), Fr(1, 200), Fr(-1, 200)): + for B in scal_windows: + ok &= sandwich(B, abs(eta)).contains(scaled_exact(B, eta)) + checks["SANDWICH_EXACT_SCALING"] = bool(ok) + + # float control: a non-scalar perturbation (the conditional mean of A12 tilts), float quadrature inside the sandwich + Cp, eps_c = control_matrices() + Cpf = [[float(x) for x in r] for r in Cp] + Cref_f = [[float(x) for x in r] for r in CPRIME_REF] + ctrl = {} + ok = True + for B in ((Fr(0), Fr(1)), (Fr(-1, 2), Fr(3, 2)), (Fr(1), Fr(2))): + fr_, fp_ = I_float(Cref_f, B), I_float(Cpf, B) + sw = sandwich(B, eps_c) + ok &= within(I3_ref(*B), fr_, 1e-7 * fr_) and within(sw, fp_, 1e-7 * fp_) + ctrl[label(B)] = {"float_reference": "%.10g" % fr_, "float_perturbed": "%.10g" % fp_, "sandwich": sw.pair()} + checks["FLOAT_CONTROL"] = bool(ok and Decimal("0.005") < eps_c < Decimal("0.01")) + + # the coefficient: reference, every L >= 10, L = 24 + b_windows = [(Fr(0), Fr(1)), (Fr(-1), Fr(1)), (Fr(-2), Fr(2)), (Fr(0), INF), (-INF, Fr(0)), full] + k_windows = [bandK, fullK] + table = {} + for B in b_windows: + F3 = I3_ref(*B) / D2_EXACT + for K in k_windows: + GK = G_ref(K) + table["B=%s K=%s" % (label(B), label(K))] = { + "F3_B": F3.pair(), "G_K": GK.pair(), "c3_ref": (C3_REF * F3 * GK).pair(), + "c3_pipeline_E0": S0.coefficient(B, K).pair(), + "c3_torus_L_ge_10": S10.coefficient(B, K).pair(), "c3_torus_L_24": S24.coefficient(B, K).pair()} + c_band_ref = C3_REF * (I3_ref(*band) / D2_EXACT) * G_ref(bandK) + c_band_0, c_band_10, c_band_24 = S0.coefficient(band, bandK), S10.coefficient(band, bandK), S24.coefficient(band, bandK) + c_full_0, c_full_10, c_full_24 = S0.coefficient(full, fullK), S10.coefficient(full, fullK), S24.coefficient(full, fullK) + checks["FACTORIZATION"] = bool(c_band_0.intersects(c_band_ref) and c_full_0.intersects(C3_REF) + and all(Iv(Decimal(v["c3_pipeline_E0"][0]), Decimal(v["c3_pipeline_E0"][1])).intersects( + Iv(Decimal(v["c3_ref"][0]), Decimal(v["c3_ref"][1]))) for v in table.values())) + side = Iv(Decimal(SIDE24_D3[0]), Decimal(SIDE24_D3[1])) + checks["SIDE24_CONSISTENT"] = bool(c_full_24.intersects(side) and c_full_10.contains(C3_REF) and C3_REF.intersects(side)) + checks["NESTING"] = bool(c_band_10.contains(c_band_ref) and c_band_10.intersects(c_band_24) + and c_band_10.width() > c_band_24.width() * Decimal(10) ** 40) + rel10 = CC.divide(c_band_10.width(), CC.multiply(Decimal(2), c_band_10.lo)) + checks["WIDTHS"] = bool(rel10 < Decimal("1e-8") and c_band_24.width() < Decimal("1e-50") and CC.divide(c_full_10.width(), c_full_10.lo) < Decimal("1e-8")) + checks["SANDWICH_ORDERED"] = bool(not SANDWICH_VIOLATIONS) + checks["LIBRARY_EXACT"] = bool(library_exact()) + pinned = {"c_3_ref": C3_REF, "F3|[0,1]": I3_ref(*band) / D2_EXACT, "c3|[0,1]x[1/2,2] ref": c_band_ref, "pi": PI} + checks["PINNED"] = bool(all(str(pinned[k].lo).startswith(p) and str(pinned[k].hi).startswith(p) for k, p in PINNED.items())) + if len(checks) != 15: + raise ValueError("rule count changed") + passed = all(checks.values()) + + out = { + "object": "CL-C8-WINDOW-COEFFICIENT-D3-TORUS-20260930-v1", + "scientific_effect": "NONE", + "certified": True, + "mutant": MUT, + "passed": passed, + "checks": checks, + "c8_band": {"B": "[0,1]", "K": "[1/2,2]", + "c3_reference": c_band_ref.pair(), "c3_reference_digits": common_prefix(c_band_ref), + "c3_torus_every_L_ge_10_every_frame": c_band_10.pair(), + "c3_torus_L_24": c_band_24.pair(), + "relative_half_width_L_ge_10": str(rel10)}, + "full_window": {"c_3_ref": C3_REF.pair(), "c3_torus_every_L_ge_10": c_full_10.pair(), "c3_torus_L_24": c_full_24.pair(), + "SIDE24_c_3_24": list(SIDE24_D3)}, + "windows": table, + "transfer": {"E3_10": E10.pair(), "E3_12": E12.pair(), "E3_24": E24.pair(), + "eps_L_ge_10": str(S10.eps), "eps_L_ge_12": str(S12.eps), "eps_L_24": str(S24.eps), "eps_E0": str(S0.eps), + "lambda_floor": str(LAMBDA0), "lambda_min_exact": "2 - sqrt(8/3)", + "tau2_L_ge_10": S10.tau2.pair(), "pG_pV_L_ge_10": (S10.pG * S10.pV).pair()}, + "reference": {"C_prime": [[str(x) for x in r] for r in CPRIME_REF], "A_given_f_mean": [str(x) for x in mean], + "A_given_f_cov": [[str(x) for x in r] for r in condA], "tau2": str(tau2_ref), "det_Cov_V": str(DETV_REF), + "D_2": D2_EXACT.pair(), "I_full": I_full.pair()}, + "float_control": {"perturbation_of_even_block": {"%d,%d" % k: str(v) for k, v in CONTROL_DELTA.items()}, + "eps": str(eps_c), "windows": ctrl}, + "constants": {"pi": PI.pair(), "Gamma(7/6)": GAMMA76.pair(), "(3/2)^(1/3)": CBRT32.pair()}, + "exact_relations": { + "window coefficient": "c^(3)_{B,K} = 144 int_{S^2} p_G(0) p_V(0) I_B(u) J_K(u) dsigma(u), I_B = E[1{f in B} det(A)^2 1{A<0} | V=0] ([LP] (11.3), section 15)", + "reference": "(f, A11, A12, A22) | V=0 has covariance C'_ref (above); A | f=b, V=0 = -b I + Q; I^ref_B = int_B phi_{2/3} m_{3,b} db (Math-#197 (4.1))", + "sandwich": "(1-eps) C'_ref <= C' <= (1+eps) C'_ref => (1-eps)^4/(1+eps)^2 I^ref_{B/sqrt(1-eps)} <= I'_B <= (1+eps)^4/(1-eps)^2 I^ref_{B/sqrt(1+eps)}", + "epsilon": "eps = ||C' - C'_ref||_F / lambda0, lambda0 = 1/3 <= lambda_min(C'_ref) = 2 - sqrt(8/3)", + "image bound": "E^(3)_L = 1404 (76 L^6 + 15) exp(-L^2/2)", + }, + } + sys.stdout.write(json.dumps(out, indent=1) + "\n") + sys.stderr.write("seconds %.1f\n" % (time.time() - t0)) + sys.exit(0 if passed else 1) + + +if __name__ == "__main__": + main()