diff --git a/.github/workflows/planar-cubic-cluster.yml b/.github/workflows/planar-cubic-cluster.yml new file mode 100644 index 000000000..b1b7d84d3 --- /dev/null +++ b/.github/workflows/planar-cubic-cluster.yml @@ -0,0 +1,31 @@ +name: Planar cubic cluster checks + +'on': + pull_request: + paths: + - 'frontiers/planar_cubic_cluster_20260929/**' + - '.github/workflows/planar-cubic-cluster.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + exact-and-source: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + with: + persist-credentials: false + fetch-depth: 0 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: '3.11.16' + - name: Verify packet, both sources and both Python modes + env: + PYTHONDONTWRITEBYTECODE: '1' + run: | + set -euo pipefail + python -B -S frontiers/planar_cubic_cluster_20260929/verify.py + git diff --exit-code diff --git a/frontiers/planar_cubic_cluster_20260929/DEEP_TRANSVERSE_EXCLUSION.md b/frontiers/planar_cubic_cluster_20260929/DEEP_TRANSVERSE_EXCLUSION.md new file mode 100644 index 000000000..309a38cab --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/DEEP_TRANSVERSE_EXCLUSION.md @@ -0,0 +1,95 @@ +# Addendum: an extra nearby critical point forces a soft transverse jet + +Object: OA-PLANAR-CUBIC-CLUSTER-20260929-D1. +Author: OpenAI / GPT-6 Astra Pro, 29 September 2026. +Disposition: author-side deterministic proof candidate; nonauthor review OPEN. +Scientific effect NONE. This addendum leaves PROOF.md unchanged. It discharges the deterministic part of the follow-up proposed in Math-#157 comment5900564419; the weighted Gaussian derivative-tail estimate in that comment is NOT established here. + +## Statement + +Fix R>=1, k>0 and K>0. Let f be C^4 on a neighborhood of the closed square [-Rr,Rr]^2, with every coordinate derivative of orders one through four bounded in absolute value by K. Retain exactly the two pins + + M=(-r/2,0), S=(r/2,0), + f(M)=b, f(S)=b-k r^3, grad f(M)=grad f(S)=0. + +Assume r>0 and + + r K <= k/(4R), + A=f_zz(0,0), L_R=8RK+56RK^2/k. (D1) + +**Lemma D.** If A < -L_R r, the square contains no critical point other than M,S. Consequently, if H_f(M) is negative definite and ANY additional critical point lies in that square, then + + -L_R <= A/r < K/2, + |f_xxz(0)|, |f_xzz(0)|, |f_zzz(0)| <= K. (D2) + +The conclusion concerns all additional critical points, not only window points. No global Morse assumption or Gaussian probability estimate is used. + +## Proof + +Suppose lambda=-A>L_R r. The derivative bound gives, throughout the square, + + f_zz(x,z) <= -lambda+2RK r <= -lambda/2. (D3) + +For g(x)=f_z(x,0), the two gradient pins give g(-r/2)=g(r/2)=0 and |g''|<=K. The two-node interpolation remainder, also for x outside the pin interval but within [-Rr,Rr], yields + + |g(x)| <= (K/2)|x-r/2||x+r/2| <= KR^2 r^2. (D4) + +This follows directly by subtracting the quadratic with the same value at x and applying Rolle's theorem twice, with repeated nodes handled by continuity. Rolle applied once to the two pin zeros also supplies xi in (-r/2,r/2) with g'(xi)=0, so + + |f_xz(x,0)| <= K(R+1/2)r <= (3/2)RK r. (D5) + +Put rho=4R^2 K r^2/lambda. Since lambda>8RK r, rho0 and f_z(x,rho)<0 for every x in [-Rr,Rr]. Strict decrease in z therefore gives a unique zero z=zeta(x), with |zeta(x)|=11k>0. Hence psi' is strictly convex on [-Rr,Rr]. It already has zeros at -r/2 and r/2. A strictly convex function cannot have three distinct zeros: the middle would lie strictly below the chord joining the outer two. Thus psi' has only those two zeros, and the graph contains only M,S as critical points. This proves the first assertion. + +For the consequence, the existence of an additional critical point implies A>=-L_R r by contraposition. Negative definiteness at M gives f_zz(M)<0, while |f_zz(0)-f_zz(M)|<=Kr/2, so A/r0} r^-3 E[N_{r,R}; Theta_r outside rectangle] + <= C_p(1+K)^(-p). (D12) + +The pointwise containment is applied only when N_{r,R}>0; otherwise the counted integrand is zero. The global count N_r bounds the local count. This explains exactly how the proposed derivative-weighted insertion would supply a missing rare-intensity tail, without dividing an unconditioned Gaussian tail by r^3. + +(D11) is an OPEN input, not a consequence asserted from the new count-exponential candidate #157. Further spatial and mixed local/remote estimates remain separate. Neither (D10) nor the conditional implication (D12) establishes uniqueness of the global cluster law. + +## Finite checks + +The companion test_deep_exclusion.py checks the constants of (D3)-(D9) over an exact rational grid, the graph sign bracket, and (D7) against explicitly reducible polynomial potentials. These are finite checks of the displayed algebra, not a formal proof of the implicit-function or convexity argument. Review requested: all of Lemma D and the conditional-only interpretation of (D11)-(D12). diff --git a/frontiers/planar_cubic_cluster_20260929/MANIFEST.json b/frontiers/planar_cubic_cluster_20260929/MANIFEST.json new file mode 100644 index 000000000..111e4a191 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/MANIFEST.json @@ -0,0 +1,73 @@ +{ + "schema": 1, + "scientific_effect": "NONE", + "review_status": "NONAUTHOR_REVIEW_OPEN", + "files": [ + { + "path": "DEEP_TRANSVERSE_EXCLUSION.md", + "bytes": 6174, + "sha256": "95c03e59262cb9607a21a296a6837932839dd47ec8e15e67bdfa46782adbcd5a", + "git_blob": "309a38cab16ef67dd909351f40a48e1d83ba2c28" + }, + { + "path": "PROOF.md", + "bytes": 19889, + "sha256": "117e9299a71e6139270266889eb772ed97518e402d9af029bbdb67caf9d4a0f0", + "git_blob": "bb446d08db8a944537a743ad550b88c1c2ad5758" + }, + { + "path": "README.md", + "bytes": 3053, + "sha256": "785c30cf471273d9a4191572cd70b2c93b0d4c6daba4bc130ccab3b4e5a42189", + "git_blob": "07e319b4e0be13cae4d4e8853398e678c549ed69" + }, + { + "path": "RECONNAISSANCE.md", + "bytes": 2047, + "sha256": "1ac5692687f97bcc874372bfc59d5b9c581346adf0671e6084913e9d4bdbbd74", + "git_blob": "474974ba0997d6a6ed476d5d2f61121a8e0d654b" + }, + { + "path": "RESULTS.json", + "bytes": 294, + "sha256": "6b029e4e066386ae6f54d52b21b702cb3a7e9e7d6ad9f8855c8ed5d09160fb5c", + "git_blob": "b7aa090e792afbb2e5316b37c241a826bbea6e33" + }, + { + "path": "SOURCES.json", + "bytes": 1137, + "sha256": "382a7c773f9cb321ad48a2f57e4ab6d55899d914303266b94be051a263d11774", + "git_blob": "a62d49679f296589f9686248fe5630d6aa7e8e40" + }, + { + "path": "cubic.py", + "bytes": 6213, + "sha256": "d8567e99fee9ac2a6204d44367e91ab38c5a188c28a887337a11323fe6bd7932", + "git_blob": "570e369da96a3bd08f188a2c28a540ffae5e6d08" + }, + { + "path": "test_cubic.py", + "bytes": 5593, + "sha256": "eda7d69dbdfccd3fd7d4b17f692ed55a18629730ef0451b203de65d107438299", + "git_blob": "081c698af198f6803ef79cfa0f930087027c4b6b" + }, + { + "path": "test_deep_exclusion.py", + "bytes": 2182, + "sha256": "8cdc2622a808f453109a53ec287ca74c7885c3d0d1eafbf12aad1dd539764fbe", + "git_blob": "e5b89fd9881b22ec18078245d0ea4fe38e747690" + }, + { + "path": "test_verify.py", + "bytes": 2271, + "sha256": "d96f277e7d6fe2d19c9f13653b16a02c09065afa099f64c56a69e52f404bbbbf", + "git_blob": "441b2e38409e69f9d625eeac6eadf4828b1aad35" + }, + { + "path": "verify.py", + "bytes": 3400, + "sha256": "402be79b490983f1f4d53f0e0981655e4a9d0cefecdbada7ad00d8a484d7ff79", + "git_blob": "0fa5833c0f000dba7cc939835514dabc94301c72" + } + ] +} diff --git a/frontiers/planar_cubic_cluster_20260929/PROOF.md b/frontiers/planar_cubic_cluster_20260929/PROOF.md new file mode 100644 index 000000000..bb446d08d --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/PROOF.md @@ -0,0 +1,270 @@ +# Exact planar cubic cluster classification and a Gaussian soft-layer coefficient + +Object: OA-PLANAR-CUBIC-CLUSTER-20260929-v1. +Author: OpenAI / GPT-6 Astra Pro, foreground continuation session, 29 September 2026. +Disposition: AUTHOR-SIDE CONDITIONAL PROOF CANDIDATE; NONAUTHOR REVIEW OPEN. +Scientific effect: NONE. No parent proof, governing status, Boolean, prize or review disposition is changed. Same GitHub account as other lanes; no organizational-independence credit. + +## 1. Scope and exact inputs + +This is a planar result, d=2. Fix the exact variance-one periodized Gaussian field on the torus of side L>0, one orthonormal frame, a birth b and a gap mark k>0. Coordinates are (x,z). The pins are + + M=(-r/2,0), S=(r/2,0), + f(M)=b, f(S)=b-k r^3, grad f(M)=grad f(S)=0. + +Q_r is the original Gaussian regression law and W_r=F_2(H_M) F_1(H_S), Z_r=E_Q W_r, dQ_r^W=(W_r/Z_r)dQ_r. In particular Z_r is the FULL normalizer, not one restricted to the event below. All results are for fixed b,k,L and frame. No result uniform as these parameters escape compacts is asserted. + +The exact sources at commit 7a1cb09a9d58d179393e6d29146252f714b9c9bf are in SOURCES.json: + +- [L] frontiers/window_multiplicity_laws_20260928/LOCAL_MULTIPLICITY.md, equations (L6)-(L13): pinned cubic, its C^2 Taylor remainder, the full ten-dimensional planar jet rank and extra-conditioned C^4 moments. +- [P] imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md, Sections 1-5: exact covariance and law, contact frame, positive Fourier spectrum, smooth Gaussian regression and full normalizer (5.4). + +Only these displayed interfaces are consumed; their author-time headers are not being used as a current acceptance register. This note neither revalidates those inputs nor needs the global C6 factorial upper theorem. The results below are new consumers of the pinned Taylor and Gaussian interfaces, not a claimed novelty audit of polynomial critical-point theory. + +## 2. Complete deterministic classifier + +For real s,a,beta,c and k>0, take exactly [L, (L6)]: + + P(X,Z)=2kX^3-3kX/2-k/2+(s/2)Z^2 + +(a/2)(X^2-1/4)Z+(beta/2)XZ^2+(c/6)Z^3. (C1) + +It has the exact values 0,-k and zero gradients at (-1/2,0),(1/2,0). Set + + u=X+aZ/(12k), + B=beta-a^2/(12k), + D=(c-a beta/(4k)+a^3/(72k^2))/2. (C2) + +This determinant-one shear fixes both pins and gives + + P=2ku^3-3ku/2-k/2+(s/2)Z^2+(B/2)uZ^2+(D/3)Z^3. (C3) + +Both Hessian inertia and determinant are preserved under the shear. At the pins the determinants are 3k(B-2s), 3k(B+2s), respectively; the axial entries are -6k,6k. Thus the first pin is a strict maximum and the second a saddle exactly when + + s < -|B|/2. (C4) + +Write D_k for this open parameter set in theta=(s,a,beta,c), using (C2). On it put + + T=-(s-B)^2(B+2s)/(12k) >= 0, + w(theta)=9k^2(4s^2-B^2)>0. (C5) + +Here w is the positive endpoint determinant product. Let n(theta) count ALL additional critical points of this cubic, anywhere in R^2, with height strictly between -k and 0. + +**Theorem C (exact classifier).** Every such critical point is a nondegenerate saddle. There are at most two, and + + if s>B: n=2 when D^2=T; + if s<=B: n=1 when D^2>T, and n=0 when D^2<=T. (C6) + +These formulas include B=0, D=0, s=B, conic tangencies, and degree-drop cases. Equality is NOT rounded into the open height window. In particular the old witness (s,a,beta,c)=(-3k/2,0,-2k,0) has n=2 and w=45k^4. + +### Proof: conic, line, height and inertia + +From (C3), stationary points obey + + Q=6k(u^2-1/4)+(B/2)Z^2=0, + Z(s+Bu+DZ)=0. (C7) + +For Z=0 these are precisely the two pins. Every extra point is therefore on the conic Q=0 and the line s+Bu+DZ=0, with Z!=0. At such a point direct substitution gives + + P=-k(u+1/2)+(s/6)Z^2, + det Hess P=-3k(B+4su). (C8) + +For example the Hessian on the line is [[12ku,BZ],[BZ,DZ]], whose determinant reduces using Q=0 to the second identity. The height identity follows also by Euler's identity for the cubic, quadratic and linear homogeneous parts. + +First take B!=0. On Q=0, + + Z^2=-12k(u^2-1/4)/B, + P/k=-(u+1/2)[1+(2s/B)(u-1/2)]. (C9) + +If B>0, extra real points have -1/2-k is equivalent to + + -1/21/2. The right branch u>1/2 lies below -k. On the left branch the height is negative, and the open window is equivalent to + + u_w0: for B<0 use u<-1/2 and B-2s>0; for B>0, at the largest allowed u=u_w it equals -B-2s>0, and it increases as u decreases because s<0. Equation (C8) therefore proves that every in-window point is a nondegenerate saddle. In particular a conic tangency can never occur inside this window. + +On the positive-Z branch of the window conic write + + Z(u)=sqrt(-12k(u^2-1/4)/B), + g(u)=(-s-Bu)/Z(u). + +The line condition is D=g(u) on that branch and -D=g(u) on the negative-Z branch. Differentiation, retaining the conic relation, gives + + g'(u)=det Hess P / (B Z(u)^3). (C12) + +For B>0, g decreases strictly from +infinity at u=-1/2 to sqrt(T) at u=u_w. Thus there is one extra window point precisely when |D|>sqrt(T). Since sg(u_w)} + 1{-D>g(u_w)}. + +If s>B, the starting value is negative: both branches contribute below the squared threshold, and only one contributes at or above it. If s<=B, the starting value is nonnegative: precisely one branch contributes strictly above the squared threshold, none at or below. This proves (C6) for B!=0. The endpoint identity g(u_w)^2=T follows from + + Z(u_w)^2=-3k(B+2s)/s^2, + -s-Bu_w=(B-s)(B+2s)/(2s). + +For B=0, Q forces u=+/-1/2. If D=0, s<0 forces Z=0, so there are no extras. Otherwise Z=-s/D and the two extra heights are s^3/(6D^2) and -k+s^3/(6D^2). Only the first can be in the window, precisely when D^2>-s^3/(6k)=T; its determinant is 6ks<0. This proves all B=0 cases. + +No root at infinity has been silently counted. For B,D!=0, eliminating Z gives + + (12kD^2+B^3)u^2+2B^2s u+Bs^2-3kD^2=0. (C13) + +If its leading coefficient vanishes, its linear coefficient is nonzero because B!=0 and s<0. It has one finite root, included by the monotone-branch argument. If D=0 and B!=0, the line fixes u=-s/B and Q supplies at most two values of Z. The B=D=0 case was already separated. This also proves the claimed upper bound on the number of extra points. QED. + +## 3. Window stability without an unnecessary global Morse hypothesis + +The transition set is + + Sigma_k={12kD^2+(s-B)^2(B+2s)=0} inside D_k. (C14) + +It is Lebesgue-null in (s,a,beta,c): after clearing fixed positive k denominators it is a nonzero polynomial (its c^2 coefficient is nonzero). No claim is made that the entire cubic is Morse outside Sigma_k: critical points below the window can be degenerate, and that causes no problem here. + +**Lemma S.** For theta in D_k outside Sigma_k, the window count is stable under sufficiently small C^2 perturbations on a sufficiently large fixed disk, provided both pins, their zero gradients and their values 0,-k are retained exactly. On a compact subset of D_k disjoint from Sigma_k, the disk and perturbation size can be chosen uniformly. + +**Proof.** Equations (C10)-(C11), and the B=0 case, give |u|<=3/2 for all critical points with heights in [-k,0]. From (C8), P>=-k also gives + + Z^2 <= 12k/|s|. (C15) + +A compact subset of D_k has |s| bounded below and a bounded. The inverse shear therefore bounds all these points in one disk. Choose a strictly larger disk. The only critical points at the boundary heights are the pins, unless theta is in Sigma_k. Theorem C makes all critical points inside the window nondegenerate; the two pin Hessians are nondegenerate by (C4). + +Choose disjoint small neighborhoods of those finitely many roots. In each, the implicit-function theorem gives one and only one nearby zero for a small C^2 perturbation. The pins stay the same by hypothesis. On the remaining compact set where the height is in a small enlargement of [-k,0], the gradient has a positive minimum; hence no new in-window zero is possible. Points of sufficiently different height cannot enter the window under a small C^0 perturbation. This argument uses no assumption on critical points at lower heights. A finite-cover argument gives uniformity over a compact parameter set avoiding Sigma_k. QED. + +For any fixed compact C subset of D_k, choose R_C large enough using (C15) and the shear. For each fixed R>=R_C, Lemma S applies pointwise for almost every theta in C. It is not necessary to assume C avoids Sigma_k for integration below, since that set is null. + +## 4. An explicit Gaussian law in every compact soft-jet sector + +Return to the exact field. At its midpoint define the physical jet + + J=(A,a,beta,c)=(f_zz,f_xxz,f_xzz,f_zzz), + Theta_r=(f_zz/r, f_xxz, f_xzz, f_zzz). (G1) + +The field remains conditioned on the original six endpoint observations. Let h_r(A,a,beta,c) be the density of J under Q_r. The nonsingular contact limit is + + U_0=(f,f_x,f_xx,f_xxx,f_z,f_xz), + U_0=(b,0,0,12k,0,0), (G2) + +and h_0 is the corresponding joint density of J under this contact law Q_0. [L] and [P] give full rank for (U_0,J), hence h_0 is a strictly positive Gaussian density. Their regression argument gives h_r->h_0 locally uniformly. + +Let A_0=f_zz under Q_0. The FULL normalizer limit from [P, (5.4)] is + + Z_r/r^2 -> z_0=36k^2 E_Q0[A_0^2 1{A_0<0}]>0. (G3) + +Fix any compact Borel C subset of D_k. For R>=R_C let N_{r,R} count additional critical points in the physical disk of radius Rr, excluding M,S, with heights strictly in (b-kr^3,b). + +**Theorem G (compact-sector limit).** As r decreases to zero, the finite measures + + mu_{r,C}(E,j)=r^-3 Q_r^W{Theta_r in E cap C, N_{r,R}=j} + +converge in full total variation on C times the nonnegative integers to + + d mu_C(theta,j) + = 1_C(theta) 1{j=n(theta)} + [w(theta)/z_0] h_0(0,a,beta,c) ds da d beta dc. (G4) + +The limit is supported on j=0,1,2. In particular, for j in {0,1,2}, + + r^-3 Q_r^W{Theta_r in C, N_{r,R}=j} -> Lambda_j(C), + Lambda_j(C)=z_0^-1 integral_C w h_0(0,a,beta,c) 1{n=j} dtheta. (G5) + +The same scaled probability for N_{r,R}>=3 tends to zero within C. If C has positive four-dimensional Lebesgue measure, its limiting total mass is positive, and the law of (Theta_r,N_{r,R}) conditional on Theta_r in C under Q_r^W converges in probability total variation to mu_C/mu_C(C times N_0). + +### Proof: retain the rare density before any remainder estimate + +Append J to the nonsingular endpoint frame U_r. Its covariance Gamma_r tends to a positive-definite ten-dimensional covariance at r=0: these are exactly all planar jet entries through degree three. Targets (v_r,rs,a,beta,c), theta in C, are bounded. For one unconditioned smooth Gaussian field F, the regression coupling + + f_r^theta = F + Cov(F,V_r) Gamma_r^-1(t_r(theta)-V_r(F)), + V_r=(U_r,J), t_r=(v_r,rs,a,beta,c), (G6) + +has exactly the required conditional law. The coefficient functions converge in C^4 and Gamma_r^-1 stays bounded. The averaged contact functionals are bounded by a fixed multiple of ||F||_{C^3}; [P]'s Fourier summability therefore yields, uniformly for small r and theta in C, + + ||f_r^theta||_{C^4} <= C_C(1+||F||_{C^4}) (G7) + +in this coupling, with all fixed moments finite. Internal Gaussian correlations are retained; no independence of a jet and its remainder is assumed. + +The pinned Taylor argument [L, (L7)] extends from radius 3 to any fixed radius R simply by changing its Taylor-remainder constant: the endpoint identities are unchanged, and powers of R enter only that constant. Thus + + ||(f_r^theta(rX,rZ)-b)/r^3 - P_theta||_{C^2(B_R)} + <= C_R r ||f_r^theta||_{C^4} -> 0 (G8) + +pathwise. For almost every theta in C, Lemma S gives N_{r,R}=n(theta) eventually. The endpoint Hessians divided by r converge to those of P_theta. Consequently + + W_r(f_r^theta)/r^4 -> w(theta), + W_r(f_r^theta)/r^4 <= C_C(1+||F||_{C^4})^4. (G9) + +This is the r^4 soft-sector determinant scale, not the typical r^2 weight scale used in the full normalizer. + +The change A=rs in the PHYSICAL four-dimensional jet density has Jacobian r. Disintegration therefore gives the density of mu_{r,C} at (theta,j) as + + 1_C(theta) [r^2/Z_r] h_r(rs,a,beta,c) + E[ (W_r(f_r^theta)/r^4) 1{N_{r,R}=j} ]. (G10) + +Indeed r^-3 times r from the jet density times r^4 from W_r divided by Z_r equals r^2/Z_r. This is the ledger r*r^4/r^2=r^3 before the r^-3 rescaling. + +For a fixed good theta, the l1 difference over j between the conditional vector inside (G10) and w(theta)delta_{n(theta)} tends to zero. It is bounded by the expectation of |W_r/r^4-w| plus twice the expectation of (W_r/r^4)1{N_{r,R}!=n}; (G7)-(G9) dominate both. On C the Gaussian density h_r is uniformly bounded, and r^2/Z_r is bounded by (G3). Dominated convergence in theta and F proves full l1 convergence of the joint densities, hence (G4). Normalization follows by positive limiting total mass. These limits can equivalently be proved along every sequence r_i->0, avoiding any common-null-set assertion for uncountably many conditional laws. QED. + +## 5. Finite nonempty coefficient integrals and actual global lower bounds + +Define, only for j=1,2, + + alpha_j=z_0^-1 integral_{D_k} w(theta) h_0(0,a,beta,c) + 1{n(theta)=j} dtheta. (G11) + +**Theorem F.** Both alpha_1 and alpha_2 are finite and strictly positive. They are explicit integrals, not numerical enclosures. With N_r the GLOBAL window count, + + liminf r^-3 Q_r^W{N_r>=2} >= alpha_2, + liminf r^-3 E_QrW[N_r(N_r-1)] >= 2 alpha_2, + liminf r^-3 E_QrW[N_r] >= alpha_1+2 alpha_2. (G12) + +**Proof of finiteness.** Put x=-s>0 and M=|B|. On the nonempty sector, (C6) gives either s>B, which forces xT. If x>=2M, then |s-B|>=x/2 and -B-2s>=x, so T>=x^3/(48k). Therefore every nonempty sector satisfies + + 0=1} ds <=12k^2 H^3 + <=384k^2 |B|^3+2304k^3 D^2. (G13) + +Both |B|^3 and D^2 are bounded by a fixed-degree polynomial in (a,beta,c), at fixed k. The slice h_0(0,a,beta,c) has Gaussian decay and hence all polynomial moments. This proves finiteness. Positivity follows from open neighborhoods of theta=(-3k/2,0,-2k,0), where n=2, and theta=(-k,0,0,2k), where n=1. The weight and the Gaussian density are strictly positive there. + +Take an increasing compact exhaustion C_m of D_k. Theorem G identifies the limits for each fixed C_m and a disk large enough for that compact. Two local points imply at least two global points, and the bounded statistic 1{N_{r,R}=1}+2 1{N_{r,R}=2} is at most N_r. Apply these inequalities, then (G5), and finally monotone convergence as m increases. This proves (G12) without any assertion that the compact exhaustion captures ALL scaled global intensity. QED. + +For evaluating (G11), the s integral is one-dimensional polynomial integration over sectors cut by the cubic T(s)=D^2 and the typed endpoint boundary. Its antiderivative is + + integral 9k^2(4s^2-B^2) ds =12k^2 s^3-9k^2 B^2 s. (G14) + +For checks: at D=0 and B<0, the n=2 slice integrates over B=3 transfer, RN/24-jet/JETMOD closure or formal Lean proof is made. + +Nonauthor review requested: +A. (C2)-(C14): exact shear, endpoint signs, height-window classification, saddle types, boundary and degree-drop cases. +B. Lemma S and (G6)-(G10): compact stability, full-field conditional coupling, the rare Jacobian, domination and joint total-variation limit. +C. (G11)-(G16): finite positive integrals, justified lower-bound exhaustion, birth factorization and the global non-claims. + +The standard-library checker compares (C6) with a separate exact conic-root calculation at 600 rational points; tests include exact boundaries, linear degeneration, shear identities and the r^3 ledger. Those finite controls do not prove the Gaussian or compactness steps. They are not substitutes for the three analytic review slices. diff --git a/frontiers/planar_cubic_cluster_20260929/README.md b/frontiers/planar_cubic_cluster_20260929/README.md new file mode 100644 index 000000000..07e319b4e --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/README.md @@ -0,0 +1,31 @@ +# Planar cubic cluster law: exact classification and a compact Gaussian sector + +OpenAI / GPT-6 Astra Pro. Author-side conditional proof candidate; nonauthor review OPEN. Scientific effect NONE. No governing status or parent source is changed. No self-merge or organizational-independence claim. + +The packet adds an exact zero/one/two classification for the full typed pinned cubic, a Gaussian r^3 coefficient and joint total-variation limit in every fixed compact soft-jet sector, finite positive nonempty coefficient integrals, and birth-height factorization of the limiting sector law. It does NOT identify the full global C6 limiting measure: uniform scaled tails outside compact jets and spatial regions remain unproved. + +Start with PROOF.md. The deterministic classifier is (C6); the conditional Gaussian law is (G4); explicit global LOWER bounds are (G12); birth factorization is (G15). In particular neither the local support {0,1,2} nor limiting sector birth independence is asserted globally. + +## Reproduction + +Python standard library only, with Git needed for full source verification: + + python -B -S verify.py + +Run in a checkout containing the exact source commit in SOURCES.json. This checks every declared source identity, the complete flat packet inventory, tests in normal and optimized Python, deterministic output, eight rejected semantic mutants and unknown-label rejection. Hosted full-repository and Lean checks remain separate; this packet is not Lean-formalized. + + python -B -S verify.py --local-only + +The second command explicitly reports source_pins_checked=false and does not authenticate the project source Git objects. It is appropriate for the standalone download only. Source preservation and full hosted checks are not waived. + +The independent finite oracle counts exact conic roots, including double roots, linear degree drops and open endpoints, without floating point or calls to the classifier's threshold formula. The code does not evaluate the Gaussian coefficients numerically and does not prove the analytic limit. + +## Review requested + +A: shear, endpoint types, classifier, strict window boundary and saddle signatures. +B: compact C^2 stability, conditional full-field coupling, density Jacobian and joint total-variation limit. +C: integrability, positive coefficients and justified lower-bound exhaustion, parity factorization and global non-claims. + +Exact review bindings and subsequent dispositions belong in the PR discussion or an additive review record; an author-time header is not a scientific status register. + +DEEP_TRANSVERSE_EXCLUSION.md is a separate deterministic addendum: under a C4 bound, a sufficiently negative transverse Hessian excludes every additional critical point in a fixed Rr square. It proves an explicit compact soft-jet containment but does not supply the missing derivative-weighted Gaussian tail. Its five finite companion tests bring the packet suite to 43 tests per Python mode. This addendum has its own nonauthor review obligation; PROOF.md and cubic.py remain unchanged. diff --git a/frontiers/planar_cubic_cluster_20260929/RECONNAISSANCE.md b/frontiers/planar_cubic_cluster_20260929/RECONNAISSANCE.md new file mode 100644 index 000000000..474974ba0 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/RECONNAISSANCE.md @@ -0,0 +1,23 @@ +# Reconnaissance — 29 September 2026 + +This is a narrow external context check, not an exhaustive novelty or priority audit. No external result is imported as an unverified step of the new proof. + +Consensus.search was actually called with: + + Gaussian random fields short persistence critical points cubic normal form local critical point multiplicity saddles domain:math + +It returned the exhausted 30-search monthly quota (reset October 1), not research results. + +Web queries actually executed: + +- site.arxiv.org Feldbrugge 1908.01619 topology Gaussian random fields persistence +- site.arxiv.org 2305.17586 critical points Gaussian field finiteness moments +- site.arxiv.org 2304.07424 Kac Rice formula + +Primary sources inspected: + +1. Job Feldbrugge, Matti van Engelen, Rien van de Weygaert, Pratyush Pranav and Gert Vegter, Stochastic Homology of Gaussian vs. non-Gaussian Random Fields: Graphs towards Betti Numbers and Persistence Diagrams, arXiv:1908.01619 (2019). The arXiv search-result abstract was read; direct opening of https://arxiv.org/abs/1908.01619 failed with UnexpectedStatusCode. It concerns two-dimensional random-field homology and critical-point-based descriptions. No claim about absence of our specific cubic classifier from its full text is made. + +2. Louis Gass and Michele Stecconi, The number of critical points of a Gaussian field: finiteness of moments, arXiv:2305.17586v2 (19 July 2023). https://arxiv.org/abs/2305.17586 opened successfully; metadata and abstract were read. This supplies context for critical-count moment finiteness, not the rare pinned r^3 asymptotic or the new compact-sector formula. The full paper was not audited in this pass. + +The supplied proofs use the exact in-project pinned Taylor identity, contact Gaussian regression and full normalizer, plus elementary algebra, the implicit-function theorem and dominated convergence. The new finite classifier and probability-limit argument are written out for nonauthor review. Neither search metadata nor a checker is substituted for that review. diff --git a/frontiers/planar_cubic_cluster_20260929/RESULTS.json b/frontiers/planar_cubic_cluster_20260929/RESULTS.json new file mode 100644 index 000000000..b7aa090e7 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/RESULTS.json @@ -0,0 +1,16 @@ +{ + "dimension": 2, + "groups": [ + "shear", + "types", + "strict-window", + "weight", + "rare-ledger", + "conic-oracle" + ], + "mathematical_acceptance": false, + "passed": true, + "rational_classifier_cases": 600, + "scientific_effect": "NONE", + "scope": "finite algebra only" +} diff --git a/frontiers/planar_cubic_cluster_20260929/SOURCES.json b/frontiers/planar_cubic_cluster_20260929/SOURCES.json new file mode 100644 index 000000000..a62d49679 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/SOURCES.json @@ -0,0 +1,25 @@ +{ + "schema": 1, + "repository": "d6g8k5htny-coder/Math-", + "scientific_effect": "NONE", + "sources": [ + { + "id": "L", + "commit": "7a1cb09a9d58d179393e6d29146252f714b9c9bf", + "path": "frontiers/window_multiplicity_laws_20260928/LOCAL_MULTIPLICITY.md", + "bytes": 13100, + "sha256": "e6272e8709835ca6290fecb7034fa84832dde08c3c4cc990a48b8019e89e7c8d", + "git_blob": "b5c18aac5529c5f975ee5bb056b304debafc6697", + "use": "L6-L13: exact planar pinned cubic, C2 Taylor remainder, ten-jet rank, extra-conditioned C4 moments. Source acceptance is not revalidated." + }, + { + "id": "P", + "commit": "7a1cb09a9d58d179393e6d29146252f714b9c9bf", + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "bytes": 40261, + "sha256": "9350ad6eaba6626b93c3dedeef9e2ff816e5cdf1c8318e85fb27499141c84bc7", + "git_blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "use": "Sections 1-5: exact covariance/law, contact frame, smooth regression, positive Fourier spectrum, full normalizer 5.4. No elder-selection or global factorial theorem consumed." + } + ] +} diff --git a/frontiers/planar_cubic_cluster_20260929/cubic.py b/frontiers/planar_cubic_cluster_20260929/cubic.py new file mode 100644 index 000000000..570e369da --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/cubic.py @@ -0,0 +1,197 @@ +"""Exact planar pinned-cubic classifier. Standard library; rational inputs only. + +This checks finite algebra. It does not certify a Gaussian limit theorem. +""" +import argparse +import json +from fractions import Fraction as F + +MUTANTS = ('omit-shear', 'omit-cubic-shear', 'close-window', 'swap-weight-sign', + 'claim-three', 'drop-jet-jacobian', 'restrict-normalizer', 'lose-linear-case') + + +def rational(x): + if type(x) not in (int, F): + raise ValueError('exact int or Fraction required') + return F(x) + + +def positive_k(k): + k = rational(k) + if k <= 0: + raise ValueError('k must be positive') + return k + + +def canonical(k, a, beta, c): + k = positive_k(k) + a, beta, c = map(rational, (a, beta, c)) + return beta-a*a/(12*k), (c-a*beta/(4*k)+a**3/(72*k*k))/2 + + +def typed(k, s, B): + positive_k(k) + s, B = map(rational, (s, B)) + return s < -abs(B)/2 + + +def threshold(k, s, B): + k = positive_k(k) + s, B = map(rational, (s, B)) + if not typed(k, s, B): + raise ValueError('strict maximum/saddle endpoint types required') + return -(s-B)**2*(B+2*s)/(12*k) + + +def window_count(k, s, B, D): + s, B, D = map(rational, (s, B, D)) + T = threshold(k, s, B) + if s > B: + return 2 if D*D < T else 1 + return int(D*D > T) + + +def weight(k, s, B): + k = positive_k(k) + s, B = map(rational, (s, B)) + if not typed(k, s, B): + raise ValueError('strict typed support required') + return 9*k*k*(4*s*s-B*B) + + +def integrated_weight(k, B, lo, hi): + """Polynomial integral only; does not assert the interval is typed.""" + k = positive_k(k) + B, lo, hi = map(rational, (B, lo, hi)) + if lo > hi: + raise ValueError('ordered integration endpoints required') + return 9*k*k*(F(4,3)*(hi**3-lo**3)-B*B*(hi-lo)) + + +def rare_exponent(): + # Four-dimensional physical jet Jacobian r, two determinants r^4, full Z~r^2. + return 1+4-2 + + +def sign(x): + return (x > 0)-(x < 0) + + +def surd_sign(a, b, d): + """Exact sign of a+b*sqrt(d), d>=0, without floats.""" + a, b, d = map(rational, (a, b, d)) + if d < 0: + raise ValueError('nonnegative radicand required') + if b == 0 or d == 0: + return sign(a) + if a == 0 or sign(a) == sign(b): + return sign(b) + comparison = sign(a*a-b*b*d) + return 0 if comparison == 0 else (sign(a) if comparison > 0 else sign(b)) + + +def roots_in_open_interval(A, b, c, lo, hi): + """Independent algebraic root counter, including linear and double roots.""" + A, b, c, lo, hi = map(rational, (A, b, c, lo, hi)) + if lo >= hi: + raise ValueError('nonempty open interval required') + if A == 0: + if b == 0: + if c == 0: + raise ValueError('identically zero polynomial') + return 0 + return int(lo < -c/b < hi) + disc = b*b-4*A*c + if disc < 0: + return 0 + choices = (0,) if disc == 0 else (-1, 1) + total = 0 + for eps in choices: + left = surd_sign(-b-2*A*lo, eps, disc)*sign(A) + right = surd_sign(-b-2*A*hi, eps, disc)*sign(A) + total += int(left > 0 and right < 0) + return total + + +def conic_oracle(k, s, B, D): + """Independent count from the stationary conic/line and height intervals. + + Never calls window_count or threshold. Handles B=0 and D=0 separately. + """ + k = positive_k(k) + s, B, D = map(rational, (s, B, D)) + if not typed(k, s, B): + raise ValueError('strict typed support required') + if B == 0: + if D == 0: + return 0 + h = s**3/(6*D*D) + return int(-k < h < 0) + int(-k < h-k < 0) + if D == 0: + u = -s/B + z2 = -12*k*(u*u-F(1,4))/B + if z2 <= 0: + return 0 + h = -k*(u+F(1,2))+s*z2/6 + return 2*int(-k < h < 0) + end = -F(1,2)-B/(2*s) + lo, hi = sorted((-F(1,2), end)) + return roots_in_open_interval(12*k*D*D+B**3, 2*B*B*s, + B*s*s-3*k*D*D, lo, hi) + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def run_checks(mutant=None): + B, D = canonical(1, 6, 1, F(-3,2)) + if mutant == 'omit-shear': B = F(1) + if mutant == 'omit-cubic-shear': D = F(-3,2) + require((B,D) == (F(-2),F(0)), 'exact shear coefficients') + count = window_count(1,F(-3,2),B,D) + if mutant == 'claim-three': count = 3 + require(count == 2, 'two-saddle source example') + boundary = window_count(F(5,12),-2,-1,1) + if mutant == 'close-window': boundary = 1 + require(boundary == 0, 'strict lower height boundary') + w = weight(1,F(-3,2),-2) + if mutant == 'swap-weight-sign': w = -w + require(w == 45, 'typed determinant product') + exponent = rare_exponent() + if mutant == 'drop-jet-jacobian': exponent = 4-2 + if mutant == 'restrict-normalizer': exponent = 1+4-5 + require(exponent == 3, 'physical jet and full normalizer ledger') + linear = conic_oracle(F(1,12),-1,-1,1) + if mutant == 'lose-linear-case': linear = 0 + require(linear == 1, 'degree-drop conic case') + tested = 0 + for k in (F(1,12),F(1),F(3,2)): + for s in (F(-3),F(-2),F(-3,2),F(-1),F(-1,3)): + for B in map(F,(-4,-3,-2,-1,0,1,2,3,4)): + if not typed(k,s,B): continue + for D in (F(-3),F(-1),F(-1,3),F(0),F(1,10),F(1,3),F(1),F(3)): + require(window_count(k,s,B,D) == conic_oracle(k,s,B,D), + 'classifier disagrees with exact conic roots') + tested += 1 + return {'passed': True, 'rational_classifier_cases': tested, + 'scientific_effect': 'NONE', 'mathematical_acceptance': False, + 'dimension': 2, 'scope': 'finite algebra only', + 'groups': ['shear','types','strict-window','weight','rare-ledger','conic-oracle']} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--mutant', choices=MUTANTS) + args = parser.parse_args() + try: + result = run_checks(args.mutant) + except ValueError as exc: + print(json.dumps({'passed':False, 'error':str(exc)}, sort_keys=True)) + return 1 + print(json.dumps(result, sort_keys=True, indent=2)) + return 0 + + +if __name__ == '__main__': raise SystemExit(main()) diff --git a/frontiers/planar_cubic_cluster_20260929/test_cubic.py b/frontiers/planar_cubic_cluster_20260929/test_cubic.py new file mode 100644 index 000000000..081c698af --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/test_cubic.py @@ -0,0 +1,112 @@ +import unittest +from fractions import Fraction as F +import cubic + +class CubicTests(unittest.TestCase): + def test_known_two_saddle_model(self): + self.assertEqual(cubic.window_count(1,F(-3,2),-2,0), 2) + def test_single_saddle_sector(self): + self.assertEqual(cubic.window_count(1,-1,0,1), 1) + def test_zero_saddle_sector(self): + self.assertEqual(cubic.window_count(1,-1,1,0), 0) + def test_shear(self): + self.assertEqual(cubic.canonical(1,6,1,F(-3,2)), (F(-2),F(0))) + def test_two_sector_boundary_is_one(self): + self.assertEqual(cubic.window_count(F(5,48),F(-3,2),-2,1), 1) + def test_zero_sector_boundary_is_zero(self): + self.assertEqual(cubic.window_count(F(5,12),-2,-1,1), 0) + def test_scalar_boundary(self): + self.assertEqual(cubic.window_count(F(1,6),-1,0,1), 0) + def test_typed_weight(self): + self.assertEqual(cubic.weight(1,F(-3,2),-2),45) + def test_slice_integrals(self): + self.assertEqual(cubic.integrated_weight(1,-2,-2,-1),48) + def test_exponent_ledger(self): + self.assertEqual(cubic.rare_exponent(),3) + + +class ExtendedTests(unittest.TestCase): + def test_sign_reflection(self): + for D in (F(0),F(1,10),F(1),F(3)): + self.assertEqual(cubic.window_count(1,F(-3,2),-2,D), + cubic.window_count(1,F(-3,2),-2,-D)) + def test_typed_boundary_rejected(self): + with self.assertRaises(ValueError): cubic.window_count(1,-1,-2,0) + def test_float_rejected(self): + with self.assertRaises(ValueError): cubic.window_count(1.0,-1,0,1) + def test_bool_rejected(self): + with self.assertRaises(ValueError): cubic.canonical(True,0,0,0) + def test_nonpositive_k(self): + with self.assertRaises(ValueError): cubic.canonical(0,0,0,0) + def test_linear_conic(self): + self.assertEqual(cubic.conic_oracle(F(1,12),-1,-1,1),1) + def test_tangent_below_window(self): + self.assertEqual(cubic.conic_oracle(F(1,4),-1,1,1),0) + def test_s_equals_B(self): + self.assertEqual(cubic.window_count(1,-1,-1,0),0) + self.assertEqual(cubic.window_count(1,-1,-1,1),1) + def test_B_D_zero(self): + self.assertEqual(cubic.conic_oracle(1,-1,0,0),0) + def test_surd_exact_equality(self): + self.assertEqual(cubic.surd_sign(-2,1,4),0) + def test_surd_both_signs(self): + self.assertEqual(cubic.surd_sign(-1,1,2),1) + self.assertEqual(cubic.surd_sign(1,-1,2),-1) + def test_open_root_endpoints(self): + self.assertEqual(cubic.roots_in_open_interval(1,0,-1,-1,1),0) + self.assertEqual(cubic.roots_in_open_interval(1,0,-1,-2,2),2) + def test_double_root(self): + self.assertEqual(cubic.roots_in_open_interval(1,-2,1,0,2),1) + def test_linear_root(self): + self.assertEqual(cubic.roots_in_open_interval(0,2,-1,0,1),1) + def test_no_real_roots(self): + self.assertEqual(cubic.roots_in_open_interval(1,0,1,-3,3),0) + def test_zero_polynomial_rejected(self): + with self.assertRaises(ValueError): cubic.roots_in_open_interval(0,0,0,-1,1) + def test_closed_form_D_zero_integral(self): + for k in (F(1,2),F(1),F(3)): + for B in (F(-1),F(-2),F(-5)): + self.assertEqual(cubic.integrated_weight(k,B,B,B/2),-6*k*k*B**3) + def test_scalar_sector_integral(self): + # k=1/6, D=1 gives lower s=-1 and integral 72*k^3*D^2=1/3. + self.assertEqual(cubic.integrated_weight(F(1,6),0,-1,0),F(1,3)) + def test_conic_discriminant_grid(self): + self.assertEqual(cubic.run_checks()['rational_classifier_cases'],600) + def test_shear_polynomial_identity(self): + for k in (F(1,2),F(1),F(2)): + for a in (F(-3),F(0),F(6)): + beta,c,s=F(2,3),F(-5,2),F(-7,3) + B,D=cubic.canonical(k,a,beta,c) + for u,z in ((F(0),F(1)),(F(2,3),F(-3,2)),(F(-1,2),F(0))): + X=u-a*z/(12*k) + original=2*k*X**3-F(3,2)*k*X-k/2+s*z*z/2+a*(X*X-F(1,4))*z/2+beta*X*z*z/2+c*z**3/6 + canonical=2*k*u**3-F(3,2)*k*u-k/2+s*z*z/2+B*u*z*z/2+D*z**3/3 + self.assertEqual(original,canonical) + def test_stationary_height_and_det(self): + # Construct exact critical points rather than taking a floating square root. + for u in (F(-3,4),F(-1),F(1,4),F(3,4)): + k,z=F(1),F(2) + B=-12*k*(u*u-F(1,4))/(z*z) + s=-2-abs(B) + D=(-s-B*u)/z + h=2*k*u**3-F(3,2)*k*u-k/2+s*z*z/2+B*u*z*z/2+D*z**3/3 + det=12*k*u*(s+B*u+2*D*z)-(B*z)**2 + self.assertEqual(h,-k*(u+F(1,2))+s*z*z/6) + self.assertEqual(det,-3*k*(B+4*s*u)) + def test_cli_modes_and_mutants(self): + import subprocess,sys + from pathlib import Path + script=str(Path(cubic.__file__).resolve()) + reference=None + for flags in (['-B','-S'],['-B','-O','-S']): + run=subprocess.run([sys.executable,*flags,script],capture_output=True,timeout=30) + self.assertEqual(run.returncode,0,run.stderr) + if reference is None: reference=run.stdout + self.assertEqual(run.stdout,reference) + for name in cubic.MUTANTS: + run=subprocess.run([sys.executable,*flags,script,'--mutant',name],capture_output=True,timeout=30) + self.assertEqual(run.returncode,1,(name,run.stdout,run.stderr)) + run=subprocess.run([sys.executable,*flags,script,'--mutant','unknown'],capture_output=True,timeout=30) + self.assertEqual(run.returncode,2) + +if __name__=='__main__': unittest.main() diff --git a/frontiers/planar_cubic_cluster_20260929/test_deep_exclusion.py b/frontiers/planar_cubic_cluster_20260929/test_deep_exclusion.py new file mode 100644 index 000000000..e5b89fd98 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/test_deep_exclusion.py @@ -0,0 +1,51 @@ +"""Finite algebra checks for the separate deterministic exclusion addendum.""" +import unittest +from fractions import Fraction as F + + +class DeepExclusionTests(unittest.TestCase): + def test_rational_constant_grid(self): + for R in map(F, (1, 2, 5)): + for K in map(F, (1, 3, 12)): + for k in (F(1, 10), F(1), F(3)): + r=k/(8*R*K) + lam=2*(8*R*K+56*R*K*K/k)*r + rho=4*R*R*K*r*r/lam + t=4*R*K*r/lam + self.assertLess(2*R*K*r,lam/2) + self.assertLess(rho,R*r/2) + self.assertLess(t,F(1,2)) + self.assertLess(28*R*K*K*r/lam,k/2) + self.assertLessEqual(2*R*K*r,k/2) + self.assertGreater(12*k-2*R*K*r-7*K*t,11*k) + def test_vertical_sign_bracket(self): + # At +/-rho the guaranteed vertical variation is twice the axis bound. + for R,K,r,lam in ((F(2),F(3),F(1,100),F(2)), + (F(1),F(1),F(1,1000),F(1))): + gmax=K*R*R*r*r; rho=4*R*R*K*r*r/lam + self.assertEqual(lam*rho/2,2*gmax) + self.assertGreater(lam*rho/2-gmax,0) + def test_reduced_third_polynomial_identity(self): + # f=g(x)+h(x)z-lambda*z^2/2, zeta=h/lambda, + # g'''=12k, h=1+2x+3x^2+4x^3. Compute both formulas independently. + for x in (F(-2),F(-1,2),F(0),F(3,4)): + for lam in (F(1),F(3),F(7)): + k=F(2); h=1+2*x+3*x*x+4*x**3 + hp=2+6*x+12*x*x; hpp=6+24*x; hppp=F(24) + direct=12*k+(3*hp*hpp+h*hppp)/lam + fxxx=12*k+hppp*h/lam + t=-hp/lam + reduced=fxxx-3*hpp*t + self.assertEqual(direct,reduced) + def test_mixed_term_is_load_bearing(self): + k,lam,h,hp,hpp,hppp=map(F,(1,2,1,2,6,24)) + direct=12*k+(3*hp*hpp+h*hppp)/lam + omitted=12*k+hppp*h/lam + self.assertNotEqual(direct,omitted) + def test_convexity_margin(self): + for k in (F(1,100),F(1),F(100)): + self.assertEqual(12*k-k/2-k/2,11*k) + self.assertGreater(11*k,0) + + +if __name__=='__main__': unittest.main() diff --git a/frontiers/planar_cubic_cluster_20260929/test_verify.py b/frontiers/planar_cubic_cluster_20260929/test_verify.py new file mode 100644 index 000000000..441b2e384 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/test_verify.py @@ -0,0 +1,44 @@ +"""Verifier regression tests using a real isolated Git fixture, no network.""" +import copy +import hashlib +import json +from pathlib import Path +import subprocess +import tempfile +import unittest +import verify as v + +class VerifyTests(unittest.TestCase): + def setUp(self): + t=tempfile.TemporaryDirectory(); self.addCleanup(t.cleanup) + self.root=Path(t.name); self.data=b'exact local test fixture\n' + (self.root/'source.md').write_bytes(self.data) + self.git('init','-q'); self.git('add','source.md') + self.git('-c','user.name=Fixture','-c','user.email=fixture@example.invalid','commit','-qm','fixture') + self.entry={'id':'source','path':'source.md','commit':self.git('rev-parse','HEAD').decode().strip(), + 'bytes':len(self.data),'sha256':hashlib.sha256(self.data).hexdigest(), + 'git_blob':self.git('rev-parse','HEAD:source.md').decode().strip()} + def git(self,*args): + return subprocess.run(['git',*args],cwd=self.root,check=True,capture_output=True,timeout=15).stdout + def check(self,entry): + (self.root/'SOURCES.json').write_text(json.dumps({'sources':[entry]})) + v.verify_sources(self.root) + def test_valid_source(self): self.check(self.entry) + def test_wrong_identity_fields(self): + for field,value in [('bytes',0),('sha256','0'*64),('git_blob','0'*40)]: + entry=copy.deepcopy(self.entry); entry[field]=value + with self.subTest(field=field), self.assertRaises(ValueError): self.check(entry) + def test_missing_source(self): + entry=copy.deepcopy(self.entry); entry['path']='missing.md' + with self.assertRaises(subprocess.CalledProcessError): self.check(entry) + def test_traversal_rejected(self): + entry=copy.deepcopy(self.entry); entry['path']='../source.md' + with self.assertRaises(ValueError): self.check(entry) + def test_wrong_commit(self): + entry=copy.deepcopy(self.entry); entry['commit']='0'*40 + with self.assertRaises(subprocess.CalledProcessError): self.check(entry) + def test_duplicate_json(self): + p=self.root/'duplicate.json'; p.write_text('{"a":1,"a":2}') + with self.assertRaises(ValueError): v.read_json(p) + +if __name__=='__main__': unittest.main() diff --git a/frontiers/planar_cubic_cluster_20260929/verify.py b/frontiers/planar_cubic_cluster_20260929/verify.py new file mode 100644 index 000000000..0fa5833c0 --- /dev/null +++ b/frontiers/planar_cubic_cluster_20260929/verify.py @@ -0,0 +1,79 @@ +"""Verify packet identities and exact controls; default includes project Git sources.""" +import argparse +import hashlib +import json +from pathlib import Path, PurePosixPath +import re +import subprocess +import sys + + +def read_json(path): + def unique(pairs): + ans = {} + for k,v in pairs: + if k in ans: raise ValueError('duplicate JSON key: '+k) + ans[k] = v + return ans + return json.loads(Path(path).read_text(encoding='utf-8'), object_pairs_hook=unique) + + +def identity(data, entry): + blob = hashlib.sha1(b'blob '+str(len(data)).encode()+b'\0'+data).hexdigest() + if (len(data)!=entry['bytes'] or hashlib.sha256(data).hexdigest()!=entry['sha256'] + or blob!=entry['git_blob']): + raise ValueError('identity mismatch: '+entry['path']) + + +def verify_sources(root): + entries = read_json(root/'SOURCES.json')['sources'] + ids = [e['id'] for e in entries] + if not entries or len(ids)!=len(set(ids)): raise ValueError('invalid source inventory') + for e in entries: + commit,path=e['commit'],e['path'] + p=PurePosixPath(path) + if not re.fullmatch('[0-9a-f]{40}',commit) or not path or p.is_absolute() or '..' in p.parts: + raise ValueError('unsafe source identity') + data=subprocess.run(['git','show',commit+':'+path],cwd=root,check=True, + capture_output=True,timeout=60).stdout + identity(data,e) + + +def verify_inventory(root): + entries=read_json(root/'MANIFEST.json')['files'] + names=[e['path'] for e in entries] + if len(names)!=len(set(names)): raise ValueError('duplicate packet path') + if sorted(p.name for p in root.iterdir())!=sorted(names+['MANIFEST.json']): + raise ValueError('packet inventory mismatch') + for e in entries: + path=root/e['path'] + if PurePosixPath(e['path']).name!=e['path'] or path.is_symlink() or not path.is_file(): + raise ValueError('flat regular file required') + identity(path.read_bytes(),e) + + +def main(): + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('--local-only',action='store_true') + args=parser.parse_args() + root=Path(__file__).resolve().parent + verify_inventory(root) + if not args.local_only: verify_sources(root) + expected=(root/'RESULTS.json').read_bytes() + mutants=['omit-shear','omit-cubic-shear','close-window','swap-weight-sign', + 'claim-three','drop-jet-jacobian','restrict-normalizer','lose-linear-case'] + for flags in (['-B','-S'],['-B','-O','-S']): + subprocess.run([sys.executable,*flags,'-m','unittest','discover','-v'],cwd=root, + check=True,timeout=120) + command=[sys.executable,*flags,str(root/'cubic.py')] + result=subprocess.run(command,capture_output=True,check=True,timeout=30) + if result.stdout!=expected: raise ValueError('deterministic output mismatch') + for name in mutants+['unknown']: + result=subprocess.run(command+['--mutant',name],capture_output=True,timeout=30) + if result.returncode!=(2 if name=='unknown' else 1): + raise ValueError('negative control not rejected: '+name) + print(json.dumps({'passed':True,'source_pins_checked':not args.local_only, + 'scientific_effect':'NONE','mathematical_acceptance':False},sort_keys=True)) + + +if __name__=='__main__': main()