From dd8fce67fad0cb21713f8654c1010914f769c271 Mon Sep 17 00:00:00 2001 From: Dylan Roy <249851642+d6g8k5htny-coder@users.noreply.github.com> Date: Sat, 3 Oct 2026 08:57:23 -0700 Subject: [PATCH] Prove conditional strict unique-replacement coefficient bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Construct positive multiplicity-two mass in every fixed admissible planar band; retain the exact C50 analytic hypotheses. Add finite exact controls and source-bound CI. Scientific/register acceptance unchanged. Dylan Roy — delegated AI work. Actual authors: OpenAI/Codex root and next_math_triage; human review NONE. --- .../strict-unique-replacement-coefficient.yml | 48 ++++ .../AUTHOR_CORRECTIONS.md | 24 ++ .../PROOF.md | 268 ++++++++++++++++++ .../README.md | 31 ++ .../SOURCE_FILES.json | 107 +++++++ .../check.py | 187 ++++++++++++ 6 files changed, 665 insertions(+) create mode 100644 .github/workflows/strict-unique-replacement-coefficient.yml create mode 100644 frontiers/strict_unique_replacement_coefficient_20261003/AUTHOR_CORRECTIONS.md create mode 100644 frontiers/strict_unique_replacement_coefficient_20261003/PROOF.md create mode 100644 frontiers/strict_unique_replacement_coefficient_20261003/README.md create mode 100644 frontiers/strict_unique_replacement_coefficient_20261003/SOURCE_FILES.json create mode 100644 frontiers/strict_unique_replacement_coefficient_20261003/check.py diff --git a/.github/workflows/strict-unique-replacement-coefficient.yml b/.github/workflows/strict-unique-replacement-coefficient.yml new file mode 100644 index 000000000..107abd31c --- /dev/null +++ b/.github/workflows/strict-unique-replacement-coefficient.yml @@ -0,0 +1,48 @@ +name: Strict unique replacement coefficient controls +'on': + pull_request: + paths: + - 'frontiers/strict_unique_replacement_coefficient_20261003/**' + - '.github/workflows/strict-unique-replacement-coefficient.yml' + push: + branches: [main] + paths: + - 'frontiers/strict_unique_replacement_coefficient_20261003/**' + - '.github/workflows/strict-unique-replacement-coefficient.yml' + workflow_dispatch: +permissions: + contents: read +concurrency: + group: strict-unique-replacement-${{ github.ref }} + cancel-in-progress: true +jobs: + verify: + name: strict-unique-replacement-controls + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 + with: + python-version: '3.11' + - name: Exact finite controls in both Python modes + shell: bash + env: + PYTHONDONTWRITEBYTECODE: '1' + run: | + set -euo pipefail + mkdir -p "$RUNNER_TEMP/strict-replacement" + python -B -S frontiers/strict_unique_replacement_coefficient_20261003/check.py > "$RUNNER_TEMP/strict-replacement/normal.json" + python -B -O -S frontiers/strict_unique_replacement_coefficient_20261003/check.py > "$RUNNER_TEMP/strict-replacement/optimized.json" + cmp "$RUNNER_TEMP/strict-replacement/normal.json" "$RUNNER_TEMP/strict-replacement/optimized.json" + git rev-parse HEAD > "$RUNNER_TEMP/strict-replacement/tested-commit.txt" + - name: Retain finite-control outputs + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a + with: + name: strict-replacement-${{ github.run_id }} + path: ${{ runner.temp }}/strict-replacement + if-no-files-found: error + retention-days: 30 diff --git a/frontiers/strict_unique_replacement_coefficient_20261003/AUTHOR_CORRECTIONS.md b/frontiers/strict_unique_replacement_coefficient_20261003/AUTHOR_CORRECTIONS.md new file mode 100644 index 000000000..c2b2c56d7 --- /dev/null +++ b/frontiers/strict_unique_replacement_coefficient_20261003/AUTHOR_CORRECTIONS.md @@ -0,0 +1,24 @@ +# Preserved author-draft correction + +Before any C113 proof file was written, the author sent an internal +coordination message proposing the family +`a=q=0, beta=-12k, s=-12kv`, with extra roots +`(-v, +/-sqrt(v^2-1/4))`. That message incorrectly stated the extra-root +Hessian determinant as `-432 k^2(v^2-1/4)`. + +The author immediately corrected it in a second coordination message. +The direct Hessian is + +```text +[[-12kv, -12kZ], [-12kZ, 0]], +``` + +so the correct determinant is +`-144 k^2 Z^2 = -144 k^2(v^2-1/4)`. +The sign, parameter family and intended argument did not change. The +original `-432` statement was an author-draft arithmetic error, not a +source error or a reviewer finding. The new proof uses the corrected +identity, and its finite controls explicitly reject the `-432` alternative. + +No historical source bytes, review report or public scientific status +were changed to conceal this correction. diff --git a/frontiers/strict_unique_replacement_coefficient_20261003/PROOF.md b/frontiers/strict_unique_replacement_coefficient_20261003/PROOF.md new file mode 100644 index 000000000..eff422d19 --- /dev/null +++ b/frontiers/strict_unique_replacement_coefficient_20261003/PROOF.md @@ -0,0 +1,268 @@ +# The reciprocal correction is strict in every fixed admissible band + +Object: C113-STRICT-UNIQUE-REPLACEMENT-COEFFICIENT-20261003-v1. +Author: actual OpenAI/Codex agent `/root/next_math_triage`, coordinated by +OpenAI/Codex root under Dylan Roy's delegation. Claim +`3cb5f1d5-6f91-4ccf-8697-751a754275b4`, Work Events row 700. +Disposition: AUTHOR-SIDE CONDITIONAL PROOF CANDIDATE; fresh nonauthor review +is required. Organizational-independence credit 0; human review NONE; +scientific effect NONE. + +## 1. Exact population, retained inputs, and new conclusion + +Use [U] exactly: the centered unit-variance periodized Gaussian field on the +fixed planar torus of admissible side `L>0` under [U]'s retained interfaces; +a compact birth interval (B) of positive +length; a compact gap interval (K=[k_-,k_+]) with (00), and its +endpoint values are zero and one. Also (d(v)>0), with + + z(v) -> 1, d(v) -> 1, rho(v) -> 1 + as v increases to 1. (S10) + +Because (t_0) and (k_0) are interior to fixed positive-width intervals, +continuity now permits one fixed (v<1), sufficiently close to one, such +that + + c0 < t0 d(v) < C0, + k_- < k0 rho(v) < k_+. (S11) + +Both extra saddles then lie strictly in the window ((-k_0,0)) and +strictly satisfy the candidate distance/gap filters. The pinned saddle +also strictly satisfies them, since its distance is one and its gap is +(k_0). This choice uses no lower bound on the widths other than strict +positivity. The threshold for (v) may depend on both fixed intervals. + +## 4. Move off the tie and obtain an open generic set + +The anchor in (S5) has equal extra saddle heights, so it is only a +construction point; no positive mass or unique partner is asserted on +that lower-dimensional slice. The retained ROOTS R1 polynomials there are + + Sigma = 12k D_s^2 + (s-B_s)^2(B_s+2s) + = -1728k^3(1-v)^2(1+2v) < 0, + Delta = 12k D_s^2 + B_s^3 = -1728k^3 < 0, + H = 12k D_s^2 + B_s^3 - 4B_s s^2 + = 1728k^3(4v^2-1) > 0. (S12) + +Only (D_s=0) remains among those exclusions. Keep (k,s,a,beta) fixed +and perturb (q) to a sufficiently small positive value. The implicit +function theorem continues both nondegenerate saddles smoothly. Their +inertia, strict window membership and the strict filters in (S11) persist. +The two pins remain exact. ROOTS R1 allows at most two extra roots, so +these continuations exhaust the extra roots. The signs in (S12) persist, +and now (D_s=q/2>0). + +For completeness the tie actually splits. Along either continued critical +branch, criticality eliminates its location derivative, giving at (q=0) + + d/dq P_q(Y_+(q)) = +(v^2-1/4)^(3/2)/6, + d/dq P_q(Y_-(q)) = -(v^2-1/4)^(3/2)/6. (S13) + +The derivative of their height difference is positive. For a sufficiently +small positive (q), (Y_+(q)) is therefore the unique higher extra +window saddle. This also agrees with [ELDER] §7's unique-height statement +when `D_s != 0`. Under the retained actual-elder input it is (Y_*). + +Exactly two saddles are rejected candidates: (S_0) and the lower +continued extra saddle. Both satisfy the strict filters; only the higher +extra saddle is excluded as (Y_*). Thus (D_{(t_0,k_0)}=2) at this +perturbed point. + +All these properties are open. In particular, the four roots are +nondegenerate; their types, window margins, height ordering and candidate +filter margins persist in a sufficiently small open neighborhood + + O subset (c0,C0) x (k_-,k_+) x R^4 + +of the full variables ((t,k,s,a,beta,q)). The nonzero values of +(Sigma,Delta,H,D_s) persist there. ROOTS R1 still exhausts the roots, +and [ELDER] still selects the unique higher extra saddle, so + + D_(t,k)(theta)=2 throughout O. (S14) + +The distance functions in this neighborhood use the continued roots in +the original ((X,Z)) coordinates. We have not replaced them by sheared +distances when (a) varies. + +## 5. Positive mass in birth and angle as well as in the cubic variables + +The geometry defining (O) is independent of the outer birth (b) and +orientation (u). Choose any `b_0` in the interior of (B) and any +`u_0 in S^1`, then small intervals/arcs `B_0` inside the interior of B +and `U_0` inside S^1 of positive length about them. The same open +geometry works for every `b in B_0, u in U_0`. This uses no isotropy: +only the density, not the cubic geometry, depends on (b,u,L). + +In the coefficient measure the single normalizer cancels exactly as in +[U] (6): + + dnu = 12 t^4 pi_0(b,k,u) w(theta) + h_0^(b,k,u)(0,a,beta,q) + dt db dk d sigma(u) ds da d beta dq (S15) + +on the failure sector, with (w=9k^2(4s^2-B_s^2)>0). The retained +nonsingular contact and ten-jet Gaussian laws give strictly positive, +continuous densities (pi_0) and (h_0) at these finite parameters. +Their correlations remain inside this density; no independence is used. + +Take a smaller open box with compact closure inside (O), and if +necessary smaller birth and angular neighborhoods. On the resulting +compact product the factors in (S15) are continuous and strictly positive, +so they have a positive common lower bound. That product has positive +Lebesgue/arc measure. It follows that + + nu{D_(t,k)=2} >= nu(O x B_0 x U_0) > 0, (S16) + +where (O,B_0,U_0) may denote the smaller neighborhoods. Finiteness is +already supplied by [U]. Equations (S4) and (S16) prove (S1); [O]'s +definition of (lambda_U) gives (S2). + +## 6. Limits and falsification targets + +This proves a strict comparison of two existing coefficient integrals +under their unchanged hypotheses. It does not prove or reaccept [U], [O] +or the seven analytic sources. It adds no unrestricted persistence law, +factorial bound, quantitative rate, all-mark exhaustion, changing-volume +limit, regional witness uniqueness, higher-dimensional result or scientific +status change. It does not evaluate the mass in (S16). + +The proof would fail if the definition of (D) discarded the lower +window saddle, if the actual partner were not the higher extra saddle, +if the original correlated density vanished on the constructed open set, +or if either interval were allowed to have zero width. These are explicit +interfaces, not consequences of finite tests. + +`check.py` checks rational algebra, finite band examples, and +deliberately incorrect finite alternatives. It does not prove the implicit +function theorem, open-neighborhood continuity, Gaussian source inputs or +the actual-elder identification. `AUTHOR_CORRECTIONS.md` preserves an +arithmetic typo corrected during author drafting before this proof was +written. The checker must not be substituted for a fresh source-bound +nonauthor reconstruction of the proof. diff --git a/frontiers/strict_unique_replacement_coefficient_20261003/README.md b/frontiers/strict_unique_replacement_coefficient_20261003/README.md new file mode 100644 index 000000000..759233668 --- /dev/null +++ b/frontiers/strict_unique_replacement_coefficient_20261003/README.md @@ -0,0 +1,31 @@ +# A strict replacement-bar coefficient correction + +For every fixed positive-width gap interval and distance band allowed by +[Math-#233](https://github.com/d6g8k5htny-coder/Math-/pull/233), the reciprocal candidate multiplicity strictly lowers the +once-counted coefficient: `C_U(1) < C_R`. The proof constructs two eligible +rejected saddles on an open set of positive original weighted Gaussian +mass. The actual elder saddle is excluded exactly as in the source. + +Read [PROOF.md](PROOF.md) and [SOURCE_FILES.json](SOURCE_FILES.json). +The optional occurrence-coefficient corollary additionally consumes +[Math-#234](https://github.com/d6g8k5htny-coder/Math-/pull/234). The exact parent +definitions are in the pinned [C50 proof](https://github.com/d6g8k5htny-coder/Math-/blob/b5bf02879a5645da9a69d9944dee610e6bb14bf6/frontiers/unique_replacement_bar_intensity_20261001/PROOF.md) +and [all-root analysis](https://github.com/d6g8k5htny-coder/Math-/blob/b5bf02879a5645da9a69d9944dee610e6bb14bf6/frontiers/unique_replacement_bar_intensity_20261001/ROOTS.md); +the optional occurrence interface is in the pinned [C51 proof](https://github.com/d6g8k5htny-coder/Math-/blob/a38449c30c44733dfb5cd128d11071fac2e0ea98/frontiers/replacement_bar_occurrence_20261001/PROOF.md). +All seven analytic source hypotheses remain in force. This is +an author-side conditional candidate; independent instance review is +required. Organizational independence 0; human review NONE; scientific +effect NONE. + +Run the finite exact controls from any directory: + +```text +python3 -B -S check.py +python3 -B -O -S check.py +``` + +Use the script's full path when outside this directory. It uses only the +standard library, explicit exception guards and rational arithmetic. +These controls support finite identities only; they are not analytic +acceptance. [AUTHOR_CORRECTIONS.md](AUTHOR_CORRECTIONS.md) records the +corrected draft determinant coefficient. diff --git a/frontiers/strict_unique_replacement_coefficient_20261003/SOURCE_FILES.json b/frontiers/strict_unique_replacement_coefficient_20261003/SOURCE_FILES.json new file mode 100644 index 000000000..76284a395 --- /dev/null +++ b/frontiers/strict_unique_replacement_coefficient_20261003/SOURCE_FILES.json @@ -0,0 +1,107 @@ +{ + "object": "C113-STRICT-UNIQUE-REPLACEMENT-COEFFICIENT-20261003-v1", + "scientific_effect": "NONE", + "status": "Exact source identities; analytic interfaces retained, not newly accepted", + "sources": [ + { + "key": "P", + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "bytes": 40261, + "sha256": "9350ad6eaba6626b93c3dedeef9e2ff816e5cdf1c8318e85fb27499141c84bc7", + "consumed_slices": "Sections 1-5, (7.8), Sections 8-10 as retained by U; positive Gaussian density and one full normalizer", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "CAP", + "path": "imports/lifetime_parent_20260925/MARKED_CYLINDER_CAP_PROOF.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "0633aca3c2a2882b0de4399da0a75d64c2e6b2e1", + "bytes": 15160, + "sha256": "0bf922b9203c29088b12388807aa0e2ecd020485eb0f6e919679841b5b2636fc", + "consumed_slices": "Marked cylinder-cap interface retained by U; not reaccepted", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "E1", + "path": "imports/lifetime_parent_20260925/ERRATUM_CONGRUENCE.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "213594d6ca6a86fb938110f4d166d9ce275a02d0", + "bytes": 1782, + "sha256": "bad7ef609c4ad8c41ad6af562c1b6807921e19a9d556ed793ad1a0db6e202028", + "consumed_slices": "Congruence correction retained by U; not reaccepted", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "E2", + "path": "reviews/d1_section9_borel_repair_20260925/REPAIR.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "fe9b9ce4999908bb3814b500ee2d0ceb0c6f704a", + "bytes": 9062, + "sha256": "845abf9f9c99d672c2a10a887b5a2e7206a3d2de3d876f35f75ff6e2dc13e62f", + "consumed_slices": "Full-field Borel marked identity retained by U; not reaccepted", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "REC", + "path": "reviews/d1_chain_reconciliation_20260928/RECONCILIATION.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "75da2597971510f843f8d90c743950cb8c177342", + "bytes": 23312, + "sha256": "451b9d7ffee072a73fc904cab891b6693e3f233808b89df10cce1b57036b65da", + "consumed_slices": "W1/embedded-chart and source-reading rules retained by U", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "CUB", + "path": "frontiers/planar_cubic_cluster_20260929/PROOF.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "bb446d08db8a944537a743ad550b88c1c2ad5758", + "bytes": 19889, + "sha256": "117e9299a71e6139270266889eb772ed97518e402d9af029bbdb67caf9d4a0f0", + "consumed_slices": "C1-C8: cubic, root types, source polynomial notation; G6-G13: original joint Gaussian law and positive finite failure measure", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "ELDER", + "path": "frontiers/local_elder_geometry_20260930/PROOF.md", + "commit": "044d42d5bd7f31df6f7e6b9034d6711e8fb7ee43", + "blob": "ef2aa57959ea9f721bbf2316ce94cf616c1c9113", + "bytes": 39722, + "sha256": "f68038be79b46124b0f9b31205aa6e3682b34b6f5ef81f4a5697ae81f07cc46b", + "consumed_slices": "Theorem E and Section 7: actual elder partner is the unique highest continued window saddle; U retained tail and coefficient interfaces", + "status": "Retained analytic hypothesis; no new acceptance" + }, + { + "key": "U", + "commit": "b5bf02879a5645da9a69d9944dee610e6bb14bf6", + "path": "frontiers/unique_replacement_bar_intensity_20261001/PROOF.md", + "blob": "9c79a672f5d81e04972032b2f1faf185f4664fa5", + "bytes": 17545, + "sha256": "ba1901cbb4bac037befb21d648172ac3ba04aa370f5377a2919c0da988572552", + "consumed_slices": "Sections 1-3, (3)-(6): exact fixed population, coefficient measure, reciprocal count and D in {1,2}", + "status": "Explicit conditional candidate input; disposition unchanged" + }, + { + "key": "U_ROOTS", + "commit": "b5bf02879a5645da9a69d9944dee610e6bb14bf6", + "path": "frontiers/unique_replacement_bar_intensity_20261001/ROOTS.md", + "blob": "b27d9ac8111c83f4967d837eee22057583c41eae", + "bytes": 11969, + "sha256": "29e79b60a382b95cc0fa2375b82845a5558942cf81a2a836262e7479f9d570e6", + "consumed_slices": "R1-R3: all roots, retained exclusions, boundary nullity and exact rejected count", + "status": "Explicit conditional candidate input; disposition unchanged" + }, + { + "key": "O", + "commit": "a38449c30c44733dfb5cd128d11071fac2e0ea98", + "path": "frontiers/replacement_bar_occurrence_20261001/PROOF.md", + "blob": "724258d33408f754ffc21848196e1fdd80c8bf6a", + "bytes": 12965, + "sha256": "b49f2ea5975dc05270f51fea4a3574093f726258cdab94888742507c2caa275f", + "consumed_slices": "O1-O4 only for optional lambda_U=L^2 C_U(1) occurrence corollary", + "status": "Explicit conditional candidate input; disposition unchanged" + } + ] +} diff --git a/frontiers/strict_unique_replacement_coefficient_20261003/check.py b/frontiers/strict_unique_replacement_coefficient_20261003/check.py new file mode 100644 index 000000000..b8471d404 --- /dev/null +++ b/frontiers/strict_unique_replacement_coefficient_20261003/check.py @@ -0,0 +1,187 @@ +"""C113 finite exact author controls, not analytic acceptance. + +No network, external packages, random sampling, asserts or source mutations. +The proof of every fixed positive-width band uses continuity, not the finite +list of examples here. The q perturbation, positive open Gaussian mass and +actual elder interpretation remain analytic/source-bound proof obligations. +""" + +from fractions import Fraction as F +import json + + +CHECKS = 0 +REJECTIONS = [] + + +def require(condition, message): + global CHECKS + CHECKS += 1 + if not condition: + raise RuntimeError(message) + + +def rational(value): + if type(value) not in (int, F): + raise ValueError("an int or Fraction, excluding bool, is required") + return F(value) + + +def anchor(v, k): + v, k = rational(v), rational(k) + if not F(1, 2) < v < 1 or not k > 0: + raise ValueError("require 1/2 < v < 1 and k > 0") + c = v * v - F(1, 4) # Z^2 at either extra root + x, beta, s = -v, -12 * k, -12 * k * v + z = 2 * v**3 - F(3, 2) * v + F(1, 2) + distance_squared = (x + F(1, 2))**2 + c + # All expressions are evaluated directly at X=-v and Z^2=c. + gradient_x = 6 * k * (x * x - F(1, 4)) + beta * c / 2 + gradient_z_coefficient = s + beta * x + height = (2 * k * x**3 - 3 * k * x / 2 - k / 2 + + s * c / 2 + beta * x * c / 2) + hxx, hzz, hxz_squared = 12 * k * x, s + beta * x, beta**2 * c + determinant = hxx * hzz - hxz_squared + pin_m_det = (-6 * k) * (s - beta / 2) + pin_s_det = (6 * k) * (s + beta / 2) + sigma = (s - beta)**2 * (beta + 2 * s) + delta = beta**3 + h_poly = beta**3 - 4 * beta * s**2 + weight = 9 * k**2 * (4 * s**2 - beta**2) + return { + "v": v, "k": k, "c": c, "z": z, + "distance_squared": distance_squared, + "gap_ratio_squared": z**2 / distance_squared**3, + "gradient_x": gradient_x, + "gradient_z_coefficient": gradient_z_coefficient, + "height": height, "determinant": determinant, + "pin_m_det": pin_m_det, "pin_s_det": pin_s_det, + "sigma": sigma, "delta": delta, "h_poly": h_poly, + "weight": weight, + } + + +def verify_anchor(v, k): + a = anchor(v, k) + c, z, d2 = a["c"], a["z"], a["distance_squared"] + require(a["gradient_x"] == 0, "extra-root axial criticality") + require(a["gradient_z_coefficient"] == 0, "extra-root transverse criticality") + require(a["height"] == -k * z, "exact extra-root height") + require(z == 2 * (v - F(1, 2))**2 * (v + 1), "height factorization") + require(0 < z < 1, "both extra roots lie strictly in the window") + require(d2 == v * (2 * v - 1), "original-coordinate distance") + require(0 < d2 < 1, "positive distance approaching the pin distance") + require(a["determinant"] == -144 * k**2 * c, "correct Hessian determinant") + require(a["determinant"] < 0, "both extra roots are saddles") + require(a["pin_m_det"] == 72 * k**2 * (v - F(1, 2)), "maximum pin determinant") + require(a["pin_m_det"] > 0 and -6 * k < 0, "maximum pin negative definite") + require(a["pin_s_det"] == -72 * k**2 * (v + F(1, 2)), "saddle pin determinant") + require(a["pin_s_det"] < 0, "saddle pin has mixed inertia") + require(a["sigma"] == -1728 * k**3 * (1-v)**2 * (1+2*v), "Sigma identity") + require(a["delta"] == -1728 * k**3, "Delta identity") + require(a["h_poly"] == 1728 * k**3 * (4*v*v-1), "H identity") + require(a["sigma"] < 0 and a["delta"] < 0 < a["h_poly"], "strict source exclusions") + require(a["weight"] == -a["pin_m_det"] * a["pin_s_det"], "original typed weight") + require(a["weight"] == 5184 * k**4 * c > 0, "positive determinant product") + require(a["gap_ratio_squared"] == (2*v-1)*(v+1)**2/(4*v**3), "gap ratio identity") + require(4*v**3-(2*v-1)*(v+1)**2 == (v-1)**2*(2*v+1), "gap ratio endpoint factorization") + require(0 < a["gap_ratio_squared"] < 1, "gap ratio below one at the symmetric anchor") + # The squared derivative of the two height values' difference is c^3/9. + # This checks its algebraic positivity, not the implicit function theorem. + require(c**3 / 9 > 0, "nonzero height-splitting derivative squared") + return a + + +def band_witness(klo, khi, clo, chi): + klo, khi, clo, chi = map(rational, (klo, khi, clo, chi)) + if not 0 < klo < khi or not 0 < clo < chi: + raise ValueError("positive strictly ordered interval endpoints required") + k, t = (klo + khi) / 2, (clo + chi) / 2 + for n in range(2, 257): + v = 1 - F(1, 2**n) + a = anchor(v, k) + distance2 = t**2 * a["distance_squared"] + gap2 = k**2 * a["gap_ratio_squared"] + if clo**2 < distance2 < chi**2 and klo**2 < gap2 < khi**2: + require(clo < t < chi and klo < k < khi, "pinned saddle strictly eligible") + require(clo**2 < distance2 < chi**2, "both extra saddles' strict radius filters") + require(klo**2 < gap2 < khi**2, "both extra saddles' strict gap filters") + require(-k < a["height"] < 0, "both extra saddles' strict window filters") + return {"K": [str(klo), str(khi)], "band": [str(clo), str(chi)], + "n": n, "v": str(v)} + raise RuntimeError("finite example did not produce a witness within the search cap") + + +def reject_false(name, false_statement): + require(not false_statement, "incorrect alternative survived: " + name) + REJECTIONS.append(name) + + +def reject_input(name, function): + try: + function() + except ValueError: + require(True, name) + REJECTIONS.append(name) + return + raise RuntimeError("invalid input was accepted: " + name) + + +def main(): + for v in [F(3, 4), F(9, 10), F(99, 100), F(999, 1000)] + [1-F(1, 2**n) for n in range(3, 17)]: + for k in [F(1, 1000), F(1, 2), F(1), F(7, 3), F(1000)]: + verify_anchor(v, k) + + examples = [ + (F(1, 2), F(2), F(1, 2), F(2)), + (F(1), F(1001, 1000), F(1), F(1001, 1000)), + (F(1, 10**6), F(1, 10**6)+F(1, 10**12), F(7), F(7)+F(1, 10**9)), + (F(10), F(10)+F(1, 10**12), F(1, 100), F(1, 100)+F(1, 10**12)), + (F(1, 10**9), F(2, 10**9), F(10**6), F(10**6)+F(1, 10**6)), + ] + witnesses = [band_witness(*bounds) for bounds in examples] + + for mass1 in [F(0), F(1, 7), F(1), F(13, 2)]: + for mass2 in [F(0), F(1, 17), F(1), F(17)]: + cr, cu = mass1 + mass2, mass1 + mass2 / 2 + require(cr-cu == mass2/2, "exact reciprocal coefficient difference") + require((cu < cr) == (mass2 > 0), "strictness is equivalent to positive D=2 mass") + + a = anchor(F(3, 4), F(1)) + reject_false("draft determinant -432", a["determinant"] == -432*a["k"]**2*a["c"]) + reject_false("extra-root height sign reversed", a["height"] == a["k"]*a["z"]) + reject_false("omit axial displacement from distance", a["distance_squared"] == a["c"]) + reject_false("omit cubic distance power in gap", a["gap_ratio_squared"] == a["z"]**2/a["distance_squared"]) + eligible = {"pin", "higher_extra", "lower_extra"} + rejected = eligible - {"higher_extra"} + d = len(rejected) + require(d == 2, "source excludes only the actual partner") + require(sum(F(1, d) for _ in rejected) == 1, "one bar from two rejected candidates") + reject_false("count actual partner as a third rejected saddle", F(1, d) == F(1, len(eligible))) + reject_false("drop lower extra saddle from reciprocal", F(1, d) == F(1, len(rejected-{"lower_extra"}))) + mass1, mass2 = F(7, 3), F(0) + reject_false("strict gap from zero D=2 mass", mass1+mass2/2 < mass1+mass2) + reject_input("zero-width gap interval", lambda: band_witness(F(1), F(1), F(1), F(2))) + reject_input("zero-width radius interval", lambda: band_witness(F(1), F(2), F(1), F(1))) + reject_input("nonpositive gap interval", lambda: band_witness(F(0), F(1), F(1), F(2))) + reject_input("nonpositive radius interval", lambda: band_witness(F(1), F(2), F(0), F(1))) + reject_input("v at height-zero boundary", lambda: anchor(F(1, 2), F(1))) + reject_input("v at pinned-height boundary", lambda: anchor(F(1), F(1))) + reject_input("nonpositive k", lambda: anchor(F(3, 4), F(0))) + reject_input("floating input", lambda: anchor(0.75, F(1))) + reject_input("boolean input", lambda: anchor(F(3, 4), True)) + + print(json.dumps({ + "status": "PASS_FINITE_CONTROLS", "passed": True, "checks": CHECKS, + "control_kinds": ["rational root/height/Hessian identities", "retained polynomial signs", + "positive squared height-splitting derivative", "finite strict band witnesses", + "finite reciprocal coefficient identity", "false alternatives and invalid inputs"], + "finite_band_witnesses": witnesses, + "negative_controls_rejected": REJECTIONS, + "scientific_effect": "NONE", + "scope": "Finite author controls only; no Gaussian, continuity, IFT, elder-selection or theorem acceptance.", + }, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main()