diff --git a/coefficients/d3_l4_anisotropic_20261005/CROSSCHECKS.json b/coefficients/d3_l4_anisotropic_20261005/CROSSCHECKS.json new file mode 100644 index 000000000..54d7462a7 --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/CROSSCHECKS.json @@ -0,0 +1,127 @@ +{ + "reference_checks": { + "gamma_diagnostic_is_certificate": false, + "half_untruncated_moment_rejected": "4.83333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333", + "inside_imported_side24_interval": true, + "nonperiodic_coefficient_diagnostic": "0.0417759318405983433429366654285755564666815196610447378849769957687473028166013952369641554236766594500861637306078734200583608511175973307342703860655957161623861221467836729945247157913350061355104069730589409860676903215798167022873220683403140779647686790825103840007", + "nonperiodic_cone_closed_form": "2.38384359055015523513604925862744194136738585267666320490064076608237295587601830679347390022869309851473873210671914420847446787349557599170754938209605478050442058580565676208570322806242156310985202265434664247970088998078772929952452439395874776548675860897202918906" + }, + "rows": [ + { + "D_interval": [ + "2.60318951334374387754615703037155214055696332447143863520200", + "2.60318951334374387754725307089048205933649594282611199154988" + ], + "direction": [ + 1, + 0, + 0 + ], + "disk_diagnostic_is_certificate": false, + "frame_rotation_overlap": true, + "independent_disk_midpoint_diagnostic": 2.603251955827458, + "ratio_direction_interval": [ + "0.931463760598878596831199881886352906118552267853620670985673", + "0.931463760598878596831592063100320634114594993062931046661216" + ], + "tau2_interval": [ + "4.58575144463384761894408791872688249029522943456858527047554", + "4.58575144463384761894408791872688249029522943456858527051340" + ], + "upstream_Schur_contained": true + }, + { + "D_interval": [ + "2.40535693510616727985087730486575695706402334962920390111032", + "2.40535693510616727985088456298724604143960114851104567005304" + ], + "direction": [ + 1, + 1, + 0 + ], + "disk_diagnostic_is_certificate": false, + "frame_rotation_overlap": true, + "independent_disk_midpoint_diagnostic": 2.4054137374902043, + "ratio_direction_interval": [ + "0.988298291265214432047420034444197118037200862775706439182849", + "0.988298291265214432047423016616597714713292505594535706001436" + ], + "tau2_interval": [ + "5.88444565400490633816764495697120803644428594890029540570151", + "5.88444565400490633816764495697120803644428594890029540571487" + ], + "upstream_Schur_contained": true + }, + { + "D_interval": [ + "2.34153335933363135102566936358967850612956806720154065813506", + "2.34153335933363135102566936358967850612956806720154065864056" + ], + "direction": [ + 1, + 1, + 1 + ], + "disk_diagnostic_is_certificate": false, + "frame_rotation_overlap": true, + "independent_disk_midpoint_diagnostic": 2.3415884866737313, + "ratio_direction_interval": [ + "0.966204119053033299034241102983571957278837719123176768517774", + "0.966204119053033299034241102983571957278837719123176768730081" + ], + "tau2_interval": [ + "6.01197200758074704338898254025709617646375277604647110774134", + "6.01197200758074704338898254025709617646375277604647110774945" + ], + "upstream_Schur_contained": true + }, + { + "D_interval": [ + "2.40399116305018477477931304902847283329479980739192090706797", + "2.40399116305018477477931346927395479845538578787952308590172" + ], + "direction": [ + 1, + 2, + 3 + ], + "disk_diagnostic_is_certificate": false, + "frame_rotation_overlap": true, + "independent_disk_midpoint_diagnostic": 2.4040479864285884, + "ratio_direction_interval": [ + "0.975234630183968928690868727831353780970921893537641122689844", + "0.975234630183968928690868898313655667128708963388328848601864" + ], + "tau2_interval": [ + "5.77627462333416805115842762845908041076885863306305367777516", + "5.77627462333416805115842762845908041076885863306305367778918" + ], + "upstream_Schur_contained": true + }, + { + "D_interval": [ + "2.40428187997455711208517830872863368045674854385743224506362", + "2.40428187997455711208517914776776932297773883091942291697744" + ], + "direction": [ + 2, + 5, + 7 + ], + "disk_diagnostic_is_certificate": false, + "frame_rotation_overlap": true, + "independent_disk_midpoint_diagnostic": 2.404338698882555, + "ratio_direction_interval": [ + "0.978021008793680938972647355710316435653415573561160887813113", + "0.978021008793680938972647697017177620815409893028705617398086" + ], + "tau2_interval": [ + "5.79931129980309080643039402742533791965919615673718288782464", + "5.79931129980309080643039402742533791965919615673718288783847" + ], + "upstream_Schur_contained": true + } + ], + "source_sha256": "59b53e5c2e8fdcacc9983f705b9d301fcfcf9242ac6c4d8b7bfbcf0ada7caf9f" +} diff --git a/coefficients/d3_l4_anisotropic_20261005/PROOF.md b/coefficients/d3_l4_anisotropic_20261005/PROOF.md new file mode 100644 index 000000000..f21996b2a --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/PROOF.md @@ -0,0 +1,461 @@ +# An outward anisotropic coefficient enclosure: dimension 3, period 4 + +Object: **D3-L4-ANISOTROPIC-20261005-v1** +Author/executor: **OpenAI / GPT-6 Astra Pro; Dylan Roy — delegated AI work** +Disposition: **author-side mathematical and numerical certificate; nonauthor review pending**. +Scientific effect: **NONE**. This evaluates the specified coefficient expression, not an independent acceptance of its parent lifetime theorem. No scientific register, proof body, lemma flag or audit verdict is changed. + +## 1. Result, scope and dependencies + +For the variance-one product-periodic covariance + +\[ +K_L(z)=\prod_{i=1}^3q_L(z_i),\quad +q_L(t)=\frac{\sum_{n\in\mathbb Z}e^{-(t+Ln)^2/2}} + {\sum_{n\in\mathbb Z}e^{-(Ln)^2/2}},\quad L=4, +\] + +the coefficient of parent equation (15.2), with ordinary sphere area and the parent's ordered maximum/saddle convention, satisfies the outward rational-decimal enclosure + +\[ +\boxed{0.0404150419920.5764580152,\quad \beta_s=c_1-2\kappa>\beta_0. + \tag{10} +\] + +This proves uniform positive definiteness over the whole sphere. It does not infer uniform positivity from #297's finitely sampled Cholesky pivots. + +Let \(\Delta_H\) be the determinant of the Hessian covariance in its six raw independent entries. In a coordinate frame, + +\[ +\Delta_H=b^3(2b+k)^2(5b+k). \tag{11} +\] + +Rotating a symmetric matrix preserves this covariance determinant. The raw-coordinate transformation \((t,x,y)\mapsto(A_{11},A_{12},A_{22})\) has absolute determinant 2. The Schur determinant identity thus gives + +\[ +\det\Sigma_{A\mid V}=4/\det B_u,\qquad +\det\Sigma_V=\Delta_H\det B_u/4. \tag{12} +\] + +The frame-invariant Frobenius trace is \(2\operatorname{tr}C_u\), not the unweighted trace of the three raw independent entries. The source crosschecks test this as well as all covariance entries, \(T\), and \(\det\Sigma_V\). + +## 4. The anisotropic negative-definite cone moment + +Let \(J=\operatorname{diag}(1,-1,-1)\). By Sylvester inertia, the eigenvalues of the symmetric matrix \(C_u^{1/2}JC_u^{1/2}\) are \(\lambda,-\mu,-\nu\) with \(\lambda,\mu,\nu>0\). + +Positive determinant splits into the positive- and negative-definite cones. The centered Gaussian symmetry \(A\mapsto-A\) assigns the same determinant-squared moment to each. Hence, for independent standard normals \(Z_i\), + +\[ +D_u=\frac12\mathbb E\big(\lambda Z_0^2-\mu Z_1^2-\nu Z_2^2\big)_+^2. \tag{13} +\] + +Write \(Z=Rn\), with \(n\) uniform on \(S^2\), \(R\) independent, and \(\mathbb E R^4=15\). For fixed azimuth \(\psi\), set +\(\beta=\mu\cos^2\psi+\nu\sin^2\psi\). The remaining spherical coordinate \(z=n_0\) is uniform on \([-1,1]\), and the positive quadratic form occurs for \(|z|>\sqrt{\beta/(\lambda+\beta)}\). Integrating its square explicitly gives + +\[ +\boxed{ +D_u=\frac1{4\pi}\int_0^{2\pi} +\left[3\lambda^2-4\lambda\beta+8\beta^2 +-\frac{8\beta^{5/2}}{\sqrt{\lambda+\beta}}\right]\,d\psi.} \tag{14} +\] + +There is no isotropy assumption in (14). In particular \(\mu\) and \(\nu\) need not coincide. In the nonperiodic reference, \((\lambda,\mu,\nu)=(5/3,1,1)\), and (14) gives exactly \(D_0=29/6-\sqrt6\). Half the untruncated determinant-square moment would give \(29/6\), which is wrong. + +### Certified evaluation of the one-angle integral + +Set + +\[ +m=(\mu+\nu)/2,\quad d=(\mu-\nu)/2,\quad +\delta=d/m,\quad t=m/(\lambda+m). +\] + +Writing \(\mathbb E_\psi\) for the uniform angular average, (14) becomes + +\[ +D_u=\tfrac32\lambda^2-2\lambda m+4m^2+2d^2 +-4m^2\sqrt t\,\mathbb E_\psi + [(1+\delta\cos2\psi)^{5/2}(1+t\delta\cos2\psi)^{-1/2}]. \tag{15} +\] + +Expand the product in powers of \(z=\delta\cos2\psi\). At degree \(n\) its coefficient is + +\[ +p_n(t)=\sum_{i=0}^{n}\binom{5/2}{i}\binom{-1/2}{n-i}t^{n-i}. +\] + +Every retained angular monomial is integrated exactly: odd powers vanish, and +\(\mathbb E\cos^{2j}(2\psi)=\binom{2j}{j}/4^j\). The checker retains degrees through 16. For \(00\) and \(0\le r<1\), integrates the Gaussian radial variable analytically and gives + +\[ +D_u=\frac{15\sqrt{\det B_u}}{4\pi} +\int_0^1\int_0^{2\pi}r(1-r^2)^2 + [(-1,r\cos\psi,r\sin\psi)^\top B_u(-1,r\cos\psi,r\sin\psi)]^{-7/2} +\,d\psi\,dr. \tag{17} +\] + +The separate floating disk-midpoint calculations in `CROSSCHECKS.json` test (14) against (17). They are diagnostics, not the enclosure in (1). The infinite radial integral is exact: no radial cutoff or Gaussian-tail truncation remains. + +## 5. Directional integrand and symmetry reduction + +Dividing (3) by its nonperiodic reference yields + +\[ +R(u)=\frac{2\sqrt3}{a^{3/2}\sqrt{\Delta_H}\,6^{2/3}D_0} +\frac{T(u)^{2/3}D_u}{\sqrt{\det B_u}},\qquad +\frac{c_{3,4}}{c_{3,\infty}}=\frac1{4\pi}\int_{S^2}R(u)\,d\sigma(u). + \tag{18} +\] + +Only the actual coordinate-reflection symmetry of the cubic periodic law is used. On the octant set + +\[ +u=(\sin\theta\cos\phi,\sin\theta\sin\phi,\cos\theta),\quad +w=(\cos\theta\cos\phi,\cos\theta\sin\phi,-\sin\theta),\quad +v=(-\sin\phi,\cos\phi,0), +\] + +for \(0\le\theta,\phi\le\pi/2\). This smooth frame is used even at the polar parameter boundary; the physical moment is frame-invariant there. + +Let \(N=128\), \(s=\pi/(2N)\), \(\theta_i=\phi_i=(i+1/2)s\), and +\(w_i=\cos(is)-\cos((i+1)s)\). The outward quadrature is + +\[ +Q_N=\frac1N\sum_{i=0}^{N-1}w_i\sum_{j=0}^{N-1}R(\theta_i,\phi_j). \tag{19} +\] + +The polar weights are exact integrals of \(\sin\theta\), evaluated outward. Consequently constant functions integrate exactly; this avoids an unnecessary sphere-area bias. + +Representative conditional moments (rounded, with the full node enclosures in `CROSSCHECKS.json`) are + +| Direction | \(T(u)\) | \(D_u\) | \(R(u)\) | +|---|---:|---:|---:| +| Coordinate axis | 4.5857514446 | 2.6031895133 | 0.9314637606 | +| Face diagonal | 5.8844456540 | 2.4053569351 | 0.9882982913 | +| Body diagonal | 6.0119720076 | 2.3415333593 | 0.9662041191 | + +The calculation does not hold any of these values fixed while integrating the sphere. + +## 6. Proved all-direction quadrature error + +Equation (17) cancels the factor \(\sqrt{\det B_u}\) in (18), so the remaining covariance dependence is a positive integral of \(q^{-7/2}\), where \(q=X^\top B_uX\). This is useful both for derivative bounds and for an integrand envelope. + +For either angular coordinate, the full frame rotates with generator norm at most one. Thus \(\|H'\|_F\le2\|H\|_F\) and \(\|H''\|_F\le4\|H\|_F\). Since only the diagonal-square term of (8) varies, + +\[ +|q'|/q\le q_1:=8\kappa/\beta_0,\qquad +|q''|/q\le q_2:=32\kappa/\beta_0. \tag{20} +\] + +For the sphere power sums, tangent projection gives + +\[ +|S_4'|\le2,\quad |S_6'|\le3,\quad +|S_4''|\le16,\quad |S_6''|\le36. \tag{21} +\] + +For example, \(\|\nabla_{S^2}S_4\|^2=16(S_6-S_4^2)\le4\), by the variance bound for a random variable in \([0,1]\) with weights \(u_i^2\). The analogous calculation uses \(u_i^4\) for \(S_6\). The second-derivative bounds follow from \(\|u'\|,\|u''\|\le1\) and the ordinary second derivative of \(u_i^p\). + +Define + +\[ +t_1=\frac{2A_*+3|h|}{T_{\min}},\qquad +t_2=\frac{16A_*+36|h|}{T_{\min}}. \tag{22} +\] + +Since \(B_u\succeq B_-\), the positive integral in (17) implies + +\[ +R(u)\le R_*:=\frac{2\sqrt3\,T_{\max}^{2/3}} + {a^{3/2}\sqrt{\Delta_H}\,6^{2/3}D_0} +\frac{D(B_-^{-1})}{\sqrt{\det B_-}} +<1.143532183656. \tag{23} +\] + +The comparison covariance \(B_-^{-1}\) is diagonal with equal last two entries, so its moment is given directly by (14). It is used **only as an upper bound**; it is not the covariance used at the quadrature nodes. + +Differentiating the positive integrand establishes the following uniform bounds for either coordinate: + +\[ +\begin{split} +|R'|&\le M_1=R_*\left(\tfrac23t_1+\tfrac72q_1\right),\\ +|R''|&\le M_2=R_*\left( +\tfrac23t_2+\tfrac29t_1^2+\tfrac{14}3t_1q_1+ +\tfrac{63}4q_1^2+\tfrac72q_2\right). +\end{split} \tag{24} +\] + +The checker obtains \(M_1<4.161419802375\) and \(M_2<44.544592614265\). Differentiation under (17) is legitimate because the compact disk has the uniform positive quadratic-form lower bound (10); the derivatives have the displayed integrable majorants. + +For a polar cell centered at \(m\), +\(\left|\int(\theta-m)\sin\theta\,d\theta\right|\le s^3/12\). +The second-order Taylor remainder contributes at most \(M_2s^3/24\) per cell. The ordinary midpoint average in \(\phi\) contributes at most \(s^2M_2/24\). Summing the polar cells gives the fully explicit ratio-error bound + +\[ +\boxed{ +E_{\rm angular}\le\frac\pi2s^2\left(\frac{M_1}{12}+\frac{M_2}{24}\right) ++\frac{s^2M_2}{24} +<0.000800608712954.} \tag{25} +\] + +Thus its contribution to the coefficient error is less than +\(0.000033446175023320\). Neither the agreement of successive meshes nor the sampled maximum anisotropy is used to assert (25). + +## 7. Image sum and transfer to the exact periodic law + +As in #297, retain images \(|n|\le10\). The first omitted point is \(x=44\). For the probabilists' Hermite polynomials of even degrees through 6, \(|\mathrm{He}_j(x)|\le2x^j\) for \(x\ge10\). The consecutive majorant ratio for \(x^6e^{-x^2/2}\) is less than 1/2, verified outward. The two-sided omitted sum in each unnormalized derivative is bounded by + +\[ +T_{\rm img}=8\,44^6e^{-968} +<2.326738433\times10^{-410}. \tag{26} +\] + +Since both finite and full normalizing sums are at least 1, and the finite normalized moments have absolute value below 15, each coordinate-moment error is at most \(16T_{\rm img}\). Bounds \(a<1\), \(m_4<4\), \(m_6<15\), including the image allowances, are verified in the checker. Coordinate products of total degree at most 6 then have error at most \(80T_{\rm img}\): the largest case is \(m_4a\), with bound \((4+1)16T_{\rm img}\). + +The sum of absolute contraction coefficients for at most six unit directions in dimension 3 is at most \((\sqrt3)^6=27\). Therefore any such derivative contraction differs by at most \(2160T_{\rm img}\). The svec factors cost at most 2, and the joint vector \((G,t_u,\operatorname{svec}H)\) has dimension 10. Its covariance operator difference is at most + +\[ +43200T_{\rm img}. \tag{27} +\] + +The finite-image Hessian covariance has minimum eigenvalue at least \(2b>1/5\). In the odd derivative block, the nontrivial two-dimensional block has determinant \(aT\) and trace \(a+\operatorname{Var}(t_u)\). Since \(k_6<0\), +\(\operatorname{Var}(t_u)\le15a^3+15ak\). The checker verifies + +\[ +\frac{aT_{\min}}{a+15a^3+15ak}>1/5. +\] + +This is a uniform lower bound for the whole joint covariance. Hence its exact/finite relative Loewner error is bounded by +\(\epsilon=216000T_{\rm img}\). + +Loewner comparisons pass to marginals and Schur complements by the variational characterization of a Schur complement. Comparing centered Gaussian densities and integrating the nonnegative homogeneous cone function gives the same comparison used in the pinned SIDE24 proof: the full coefficient integrand ratio lies between + +\[ +(1-\epsilon)^{25/6}/(1+\epsilon)^{9/2} +\quad\hbox{and}\quad +(1+\epsilon)^{25/6}/(1-\epsilon)^{9/2}. +\] + +For \(\epsilon<10^{-3}\), these are within \(32\epsilon\) of 1 (elementary logarithm/exponential bounds suffice). The checker also verifies \(R_*c_{3,\infty}<1\). Therefore the **absolute coefficient** image error is below \(6912000T_{\rm img}\), and the deliberately looser amount actually added to the final interval is + +\[ +E_{\rm image}=10^8T_{\rm img} +<2.326738433\times10^{-402}. \tag{28} +\] + +For the point checks, the implementation additionally verifies uniform envelopes below 10 for T, R, and the cone moment (the latter follows from B <= diag(c0,c1,c1), B >= B_minus and the positive density integral). The same covariance comparison makes 10^9 T_img a conservative image allowance for each displayed point interval. + +This comparison also avoids assuming that a finite spatial-image truncation is globally positive definite as a periodic kernel: only the explicitly positive finite jet covariance is used as the comparison Gaussian law. + +## 8. Arithmetic, error ledger and replay + +`certificate.py` uses only the Python standard library. Its interval endpoints are 60-significant-digit Decimals, with explicit FLOOR/CEILING contexts for arithmetic. Integer powers use repeated directed multiplication. Square root, exponential and logarithm are bracketed by adjacent representable values around correctly rounded nearest results. The fractional power \(x^{2/3}\) is evaluated via outward \(\exp((2/3)\log x)\), not a noninteger `Decimal.power` call. + +Pi is enclosed by Machin's identity and alternating-series tails. Sine and cosine use 60 Taylor terms with explicit uniform remainders on \([0,2]\). Floats and booleans are rejected as certificate inputs. Matrix positivity, eigenvalue brackets, series-domain constraints and uniform estimate hypotheses are executable guards, not assertions disabled by `-O`. + +The standard-library arithmetic contract is documented in the Python `decimal` reference, specifically directed rounding, `exp`, `ln`, `sqrt`, `next_minus`, and `next_plus`: `https://docs.python.org/3/library/decimal.html`. This is a trusted numerical-library dependency, not a claim that the Python interpreter has itself been formally verified. + +At \(N_\theta=N_\phi=128\), the distinct contributions are: + +| Contribution | Absolute coefficient bound | +|---|---:| +| Omitted periodic images | < 2.326738433e-402 | +| Cone-angle series remainder | < 7.215919417e-25 | +| Directional quadrature | < 3.3446175023320e-5 | +| Outward arithmetic plus imported reference scale | quadrature-interval **width** < 9.682246784e-21 | +| Gaussian radial cutoff | 0: the radial integral is exact | + +The last nonzero row is a width, not an independently centered error radius. The implementation first encloses the entire node sum times its reference interval, then widens by the three explicit error allowances. It does not add an unexplained floating tolerance. + +Normal `python -B -S certificate.py --n 128` and optimized `python -B -O -S certificate.py --n 128` runs produced byte-identical `RESULTS.json`. The seven unit tests pass in both modes. The tests cover the reference cone, rejection of half the untruncated moment, interval guards, long-exact-input outward powers, moment/positivity bounds, exact reference angular normalization and cubic reflection symmetry. + +`source_crosscheck.py` verifies the SHA-256 of the upstream code before importing it. At five directions it checks that all entries of the original Schur complement (transformed to \((t,x,y)\)), its third-derivative conditional variance, determinant of V and Frobenius trace lie in the new intervals. It also tests a rational transverse-frame rotation and the separate disk integral. A separate 270-digit evaluation of the known nonperiodic closed form gives + +\[ +c_{3,\infty}\approx0.04177593184059834334293666542857555646668, +\] + +inside the imported SIDE24 interval. That gamma evaluation is a diagnostic crosscheck; it is not used as the reference enclosure. The complete unmodified #297 replay was also executed, and its output SHA-256 matches the published `RESULTS.json` exactly. + +The L=4 enclosure is disjoint from the reference and SIDE24 intervals. It establishes a reduction of between approximately 3.097% and 3.258% from the reference. The approximately 3.18% point estimate is not a separately certified many-digit result. + +## 9. What is and is not closed + +For the expression (3), this packet supplies the previously missing anisotropic 2-by-2 cone integral, an actual directional evaluation, a proved all-direction quadrature error, a uniform image-tail transfer and outward numerical arithmetic. No missing estimate is concealed behind a mesh-convergence heuristic. + +The remaining scientific process is nonauthor review of this new derivation and implementation. In particular the determinant-coordinate factors in (12), the cone factor one-half in (13), the image transfer in Section 7, and the weighted quadrature bound (25) merit source-bound review. The work is not Lean-verified, no hosted CI result is claimed, and no repository-wide test suite or parent-theorem audit is claimed. It does not evaluate dimension 4, certify a finite-radius remainder, or alter a lifetime-theorem acceptance state. diff --git a/coefficients/d3_l4_anisotropic_20261005/README.md b/coefficients/d3_l4_anisotropic_20261005/README.md new file mode 100644 index 000000000..f8fec39eb --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/README.md @@ -0,0 +1,47 @@ +# d=3, L=4 anisotropic coefficient certificate + +**Result:** `0.040415041992 < c_3,4 < 0.040481934343` for the coefficient expression in the pinned parent's equation (15.2). + +**Disposition:** author-side rigorous numerical enclosure and proof; independent mathematical review pending. Scientific effect NONE. No parent lifetime theorem is promoted. + +Read `PROOF.md` for the derivation, normalization dependency, explicit image/cone/angular error ledger and limitations. `RESULTS.json` contains full outward endpoints. `CROSSCHECKS.json` separates interval computations from floating diagnostics. + +## Replay + +Python standard library only; tested with CPython 3.13.5 and libmpdec 2.5.1. In the packet directory: + +```sh +set -eu +python -B -S -m unittest test_certificate -v +python -B -O -S -m unittest test_certificate -v +python -B -S certificate.py --n 128 > replay.json +cmp replay.json RESULTS.json +python -B -O -S certificate.py --n 128 > replay_optimized.json +cmp replay.json replay_optimized.json +python -B -S certificate.py --reference --n 4 > reference_replay.json +cmp reference_replay.json REFERENCE.json +``` + +For crosschecks against the exact #297 source, supply its path: + +```sh +python -B -S source_crosscheck.py --source ../sources/periodic_jet_check.py > crosschecks_replay.json +cmp crosschecks_replay.json CROSSCHECKS.json +``` + +In a Math- checkout, use instead: + +```sh +python -B -S source_crosscheck.py \ + --source ../../reviews/iba1_periodic_jet_claude_20261005/periodic_jet_check.py +``` + +The source must have SHA-256 `59b53e5c2e8fdcacc9983f705b9d301fcfcf9242ac6c4d8b7bfbcf0ada7caf9f`; otherwise the crosscheck exits with an error before executing it. The downloadable bundle includes this exact unmodified source under `sources/` and its exact full replay output in `UPSTREAM_REPLAY.json`. It comes from Math- commit `2f8d721e300850e36ab17464dc541c977b3ffcbf`. + +The main checker does not need the upstream Python module to run: it implements the same moment law with new outward arithmetic. Its reference normalization consumes the existing certified SIDE24 endpoints and uniform periodization bound, explicitly pinned in `PROOF.md` and the delivery manifest. + +## Contents and trust boundaries + +`certificate.py` is the certificate calculation; `test_certificate.py` is its focused test suite. `source_crosscheck.py` is a separate falsification harness whose floating disk integral and 270-digit gamma evaluation are **not** certificate error bounds. `RESULTS.json`, `REFERENCE.json`, and `CROSSCHECKS.json` are frozen replay outputs. `PROOF.md` supplies all estimates used to widen the numerical quadrature. + +`VALIDATION.json` records the local execution scope and hashes. Nonauthor review, full-repository tests, hosted CI, Lean verification, merge and scientific acceptance are not represented as completed by this delivery. diff --git a/coefficients/d3_l4_anisotropic_20261005/REFERENCE.json b/coefficients/d3_l4_anisotropic_20261005/REFERENCE.json new file mode 100644 index 000000000..bb0e9d61b --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/REFERENCE.json @@ -0,0 +1,107 @@ +{ + "L": "infinity", + "N_phi": 4, + "N_theta": 4, + "arithmetic_precision": 60, + "coefficient_interval": [ + "0.0417759318405983433399999999999999999999999999999999999998756", + "0.0417759318405983433500000000000000000000000000000000000001242" + ], + "cone_series_degree": 16, + "dimension": 3, + "error_bounds": { + "angular_coefficient": "0E-182", + "angular_ratio": "0E-121", + "arithmetic_and_reference_interval_width": "1.00000000000000000000000000000000000002482E-20", + "cone_integration_coefficient": "8.60860598102452649053298953784645709520236938052847673509375E-494", + "image_sum_coefficient": "0" + }, + "independent_review": false, + "method": "outward Decimal intervals + analytic cone series + proved angular midpoint error", + "node_diagnostics": { + "max_negative_eigenvalue_relative_split": "9.43398113205660381132066037762264071698362263341512132066328E-30", + "sampled_D_max": "2.38384359055015523513604925862744194136738585267666320490158", + "sampled_D_min": "2.38384359055015523513604925862744194136738585267666320489967" + }, + "object": "D3-L4-ANISOTROPIC-20261005-v1", + "quadrature_only_interval": [ + "0.0417759318405983433399999999999999999999999999999999999998756", + "0.0417759318405983433500000000000000000000000000000000000001238" + ], + "ratio_interval": [ + "0.999999999999999999999999999999999999999999999999999999997035", + "1.00000000000000000000000000000000000000000000000000000000297" + ], + "ratio_quadrature_only": [ + "0.999999999999999999999999999999999999999999999999999999997036", + "1.00000000000000000000000000000000000000000000000000000000296" + ], + "reference_interval": [ + "0.0417759318405983433399999999999999999999999999999999999999995", + "0.0417759318405983433500000000000000000000000000000000000000001" + ], + "scientific_acceptance": false, + "side24_interval": [ + "0.04177593184059834334", + "0.04177593184059834335" + ], + "source_commit": "2f8d721e300850e36ab17464dc541c977b3ffcbf", + "uniform_bounds": { + "Bmin": [ + "0.60", + "0.60" + ], + "Bsmin": [ + "1.00", + "1.00" + ], + "M1": [ + "0", + "0" + ], + "M2": [ + "0", + "0" + ], + "Rmax": [ + "0.999999999999999999999999999999999999999999999999999999999907", + "1.00000000000000000000000000000000000000000000000000000000010" + ], + "Tmax": [ + "6", + "6" + ], + "Tmin": [ + "6", + "6" + ], + "a": [ + "1", + "1" + ], + "h": [ + "0", + "0" + ], + "k": [ + "0", + "0" + ], + "k6": [ + "0", + "0" + ], + "m4": [ + "3", + "3" + ], + "m6": [ + "15", + "15" + ], + "tail": [ + "0", + "0" + ] + } +} diff --git a/coefficients/d3_l4_anisotropic_20261005/RESULTS.json b/coefficients/d3_l4_anisotropic_20261005/RESULTS.json new file mode 100644 index 000000000..4a58bb1a3 --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/RESULTS.json @@ -0,0 +1,107 @@ +{ + "L": 4, + "N_phi": 128, + "N_theta": 128, + "arithmetic_precision": 60, + "coefficient_interval": [ + "0.0404150419925377070255472220341911930853395863844049876852494", + "0.0404819343425843457950697038731959963580543767609554289482136" + ], + "cone_series_degree": 16, + "dimension": 3, + "error_bounds": { + "angular_coefficient": "0.0000334461750233193799233989795638878690636461118241958788948929", + "angular_ratio": "0.000800608712953136152571131054520418984750893630466446832572815", + "arithmetic_and_reference_interval_width": "9.6822467831232691942202080312538904527899E-21", + "cone_integration_coefficient": "7.21591941644850946587080650367482814130940229960376608726654E-25", + "image_sum_coefficient": "2.32673843297376211380489860133540328528701521641187871745096E-402" + }, + "independent_review": false, + "method": "outward Decimal intervals + analytic cone series + proved angular midpoint error", + "node_diagnostics": { + "max_negative_eigenvalue_relative_split": "0.0419217887103905606594712447864566095466654242391519014565666", + "sampled_D_max": "2.60315758565510089000661842838715777683854587004527082382825", + "sampled_D_min": "2.34155443553183786310077966236183369648508559868351707502762" + }, + "object": "D3-L4-ANISOTROPIC-20261005-v1", + "quadrature_only_interval": [ + "0.0404484881675610264054633365185671944438239355372269751337145", + "0.0404484881675610264151455833016904636380441435684808655865044" + ], + "ratio_interval": [ + "0.967424069599373783269432399160131451988741566670054065605536", + "0.969025287025280055574609207090646634637531893769007597058636" + ], + "ratio_quadrature_only": [ + "0.968224678312326919422020803125389043313136730219530831096809", + "0.968224678312326919422020803125389043313136730219530831567363" + ], + "reference_interval": [ + "0.0417759318405983433399999999999999999999999999999999999999995", + "0.0417759318405983433500000000000000000000000000000000000000001" + ], + "scientific_acceptance": false, + "side24_interval": [ + "0.04177593184059834334", + "0.04177593184059834335" + ], + "source_commit": "2f8d721e300850e36ab17464dc541c977b3ffcbf", + "uniform_bounds": { + "Bmin": [ + "0.576458015213280499133952185972780264258240921112830350653879", + "0.576458015213280499133952185972780264258240921112830350655217" + ], + "Bsmin": [ + "0.939577553396217202201892337244496033571007261309961322785506", + "0.939577553396217202201892337244496033571007261309961322786344" + ], + "M1": [ + "4.16141980237441621213798339763131286610049340952433655190567", + "4.16141980237441621213798339763131286610049340952433655205794" + ], + "M2": [ + "44.5445926142637851126278689327264764070861588031736748524695", + "44.5445926142637851126278689327264764070861588031736748543174" + ], + "Rmax": [ + "1.14353218365533386097715689005377763744325852521651475187315", + "1.14353218365533386097715689005377763744325852521651475190068" + ], + "Tmax": [ + "6.01197200758074704338898254025709617646375277604647110774143", + "6.01197200758074704338898254025709617646375277604647110774937" + ], + "Tmin": [ + "4.58575144463384761894408791872688249029522943456858527047665", + "4.58575144463384761894408791872688249029522943456858527051268" + ], + "a": [ + "0.989272393327749634934786001347419718336644970774879578334420", + "0.989272393327749634934786001347419718336644970774879578334530" + ], + "h": [ + "-2.74834544593060981067863286515998337827196809867954908731788", + "-2.74834544593060981067863286515998337827196809867954908729360" + ], + "k": [ + "0.17129646219901877374690047267939919596572705454643475768600", + "0.17129646219901877374690047267939919596572705454643475768708" + ], + "k6": [ + "-2.7186847800110882949888609423916116998729655846543023478887", + "-2.7186847800110882949888609423916116998729655846543023478648" + ], + "m4": [ + "3.10727606680026011501003282125423446025251607564632127231429", + "3.10727606680026011501003282125423446025251607564632127231471" + ], + "m6": [ + "14.3456159879385575477589116662827829922868289823361140795133", + "14.3456159879385575477589116662827829922868289823361140795159" + ], + "tail": [ + "2.32673843297376211380489860133540328528701521641187871745094E-410", + "2.32673843297376211380489860133540328528701521641187871745096E-410" + ] + } +} diff --git a/coefficients/d3_l4_anisotropic_20261005/SOURCE_FILES.json b/coefficients/d3_l4_anisotropic_20261005/SOURCE_FILES.json new file mode 100644 index 000000000..c8beb9fa7 --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/SOURCE_FILES.json @@ -0,0 +1,82 @@ +{ + "files": [ + { + "bytes": 2838, + "git_blob": "f8fec39ebf07abf140c0ee5e4fbdd4abf625bbf1", + "path": "README.md", + "sha256": "85cd39c5e84fe6599a30a8566fd445ab7e468cd4949a08d3ec359b0a8839130d" + }, + { + "bytes": 24083, + "git_blob": "f21996b2a98ade7195e51971c156f2fe472cb85e", + "path": "PROOF.md", + "sha256": "60f1dc71b16b2de241780ca57ebd60daba569c2c38cf132fada61bb62222603d" + }, + { + "bytes": 14562, + "git_blob": "b1ac024beec3415edcc00c677f3a9e5b011d3732", + "path": "certificate.py", + "sha256": "7707c68fe5b9f487745008106c18e5fc1c6370f7e2d8a0babd818324d07b3f80" + }, + { + "bytes": 2871, + "git_blob": "f02b83e6789e754b21aca011e583adf20d9ac889", + "path": "test_certificate.py", + "sha256": "399a2ef8631cfc816efe4e5c5e7894c00d98da72e5e328b59914d1f3159c6a0c" + }, + { + "bytes": 5722, + "git_blob": "336196cf08c465ffe1e0ff2714eb33cd25a06d51", + "path": "source_crosscheck.py", + "sha256": "98b62895e3364419164d4614e8d9152d3b12c02a6cdc43a410244b7257489efc" + }, + { + "bytes": 4461, + "git_blob": "4a58bb1a303fde8fd37089d7a305e9f7825bd215", + "path": "RESULTS.json", + "sha256": "e2d8a78ce4f075a75fc4d53b998f5329f6ecc319d3a7badc473f80bbfe83acfd" + }, + { + "bytes": 2721, + "git_blob": "bb0e9d61b2dd4026d0a1ad598097094960e5bc92", + "path": "REFERENCE.json", + "sha256": "a396d62776db7e0b111015d9bca56d7a411009a85a96d4a3aa4990ba6b3f045c" + }, + { + "bytes": 5228, + "git_blob": "54d7462a7e327a4b8905ce8edc30aedfe57a9c02", + "path": "CROSSCHECKS.json", + "sha256": "6babe455029a1b4caa22e3e5f552213d8251e24d74f064e0e2078605abb847a3" + }, + { + "bytes": 2252, + "git_blob": "cd2e89d8907815af1c6bc6fbee892a45fb091d09", + "path": "VALIDATION.json", + "sha256": "962dc8d1c0eb946f2553c58214385fade6c7f380f5b8bb8601846e7c8b74273e" + } + ], + "independent_review": false, + "object": "D3-L4-ANISOTROPIC-20261005-v1", + "scientific_effect": "NONE", + "source_commit": "2f8d721e300850e36ab17464dc541c977b3ffcbf", + "source_repository": "d6g8k5htny-coder/Math-", + "upstream_pins": [ + { + "git_blob": "a2beeeee90abfc2988cf8f491d54ea835b23a1c5", + "path": "reviews/iba1_periodic_jet_claude_20261005/periodic_jet_check.py", + "sha256": "59b53e5c2e8fdcacc9983f705b9d301fcfcf9242ac6c4d8b7bfbcf0ada7caf9f" + }, + { + "git_blob": "44b66f04f89fcd87383b3603fa69f1feb64cdddd", + "path": "coefficients/side24_v1/PROOF.md" + }, + { + "git_blob": "57af39a05e14ed0ba8ebc00a9b4aca4dffb067c7", + "path": "coefficients/side24_v1/ENCLOSURE.json" + }, + { + "git_blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md" + } + ] +} diff --git a/coefficients/d3_l4_anisotropic_20261005/VALIDATION.json b/coefficients/d3_l4_anisotropic_20261005/VALIDATION.json new file mode 100644 index 000000000..cd2e89d89 --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/VALIDATION.json @@ -0,0 +1,60 @@ +{ + "certificate_normal_optimized_byte_identical": true, + "crosschecks_normal_optimized_byte_identical": true, + "hosted_checks_claimed": false, + "lean_verification": false, + "libmpdec": "2.5.1", + "new_independent_review": false, + "normal_command": "python -B -S certificate.py --n 128", + "object": "D3-L4-ANISOTROPIC-20261005-v1", + "optimized_command": "python -B -O -S certificate.py --n 128", + "performer": "OpenAI / GPT-6 Astra Pro; Dylan Roy \u2014 delegated AI work", + "python": "3.13.5", + "records": [ + { + "bytes": 14562, + "git_blob": "b1ac024beec3415edcc00c677f3a9e5b011d3732", + "path": "certificate.py", + "sha256": "7707c68fe5b9f487745008106c18e5fc1c6370f7e2d8a0babd818324d07b3f80" + }, + { + "bytes": 4461, + "git_blob": "4a58bb1a303fde8fd37089d7a305e9f7825bd215", + "path": "RESULTS.json", + "sha256": "e2d8a78ce4f075a75fc4d53b998f5329f6ecc319d3a7badc473f80bbfe83acfd" + }, + { + "bytes": 2721, + "git_blob": "bb0e9d61b2dd4026d0a1ad598097094960e5bc92", + "path": "REFERENCE.json", + "sha256": "a396d62776db7e0b111015d9bca56d7a411009a85a96d4a3aa4990ba6b3f045c" + }, + { + "bytes": 5228, + "git_blob": "54d7462a7e327a4b8905ce8edc30aedfe57a9c02", + "path": "CROSSCHECKS.json", + "sha256": "6babe455029a1b4caa22e3e5f552213d8251e24d74f064e0e2078605abb847a3" + }, + { + "bytes": 2871, + "git_blob": "f02b83e6789e754b21aca011e583adf20d9ac889", + "path": "test_certificate.py", + "sha256": "399a2ef8631cfc816efe4e5c5e7894c00d98da72e5e328b59914d1f3159c6a0c" + }, + { + "bytes": 5722, + "git_blob": "336196cf08c465ffe1e0ff2714eb33cd25a06d51", + "path": "source_crosscheck.py", + "sha256": "98b62895e3364419164d4614e8d9152d3b12c02a6cdc43a410244b7257489efc" + } + ], + "reference_ratio_contains_one": true, + "repository_wide_tests_run": false, + "scientific_acceptance": false, + "source_crosscheck_command": "python -B -S source_crosscheck.py --source ", + "unit_tests_failures": 0, + "unit_tests_normal": 7, + "unit_tests_optimized": 7, + "upstream_replay_matches_pinned_manifest": true, + "upstream_replay_sha256": "4dbf00f768486dbd3079463699b62ca461d4bf94ead398ce19671769467124f5" +} diff --git a/coefficients/d3_l4_anisotropic_20261005/certificate.py b/coefficients/d3_l4_anisotropic_20261005/certificate.py new file mode 100644 index 000000000..b1ac024be --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/certificate.py @@ -0,0 +1,339 @@ +#!/usr/bin/env python3 +"""Outward d=3,L=4 evaluation of the pinned Eq.(15.2) coefficient. +Standard library only. This is an author-side arithmetic/proof candidate, +not independent review, Lean verification, or acceptance of the parent theorem. +See PROOF.md for the cone reduction and all-direction error estimates. +""" +import argparse +import decimal +import json +import math +import sys +from fractions import Fraction + +D=decimal.Decimal +PREC=60 +decimal.getcontext().prec=PREC +DOWN=decimal.Context(prec=PREC,rounding=decimal.ROUND_FLOOR) +UP=decimal.Context(prec=PREC,rounding=decimal.ROUND_CEILING) +NEAR=decimal.Context(prec=PREC,rounding=decimal.ROUND_HALF_EVEN) + + +def dec(x): + if isinstance(x,(float,bool)): + raise TypeError('floating/bool inputs are not certificate inputs') + z=x if isinstance(x,D) else D(x) + if not z.is_finite(): raise ValueError('finite input required') + return z + + +def positive_integer_power(x,n,ctx): + result=D(1) + while n: + if n&1: result=ctx.multiply(result,x) + n//=2 + if n: x=ctx.multiply(x,x) + return result + + +class I: + __slots__=('lo','hi') + def __init__(self,lo,hi=None): + if isinstance(lo,I): + self.lo,self.hi=lo.lo,lo.hi; return + self.lo=dec(lo); self.hi=dec(lo if hi is None else hi) + if self.lo>self.hi: raise ValueError('reversed interval') + def __add__(self,y): + y=I(y); return I(DOWN.add(self.lo,y.lo),UP.add(self.hi,y.hi)) + __radd__=__add__ + def __neg__(self): return I(self.hi.copy_negate(),self.lo.copy_negate()) + def __sub__(self,y): return self+-I(y) + def __rsub__(self,y): return I(y)+-self + def __mul__(self,y): + y=I(y) + p=[(self.lo,y.lo),(self.lo,y.hi),(self.hi,y.lo),(self.hi,y.hi)] + return I(min(DOWN.multiply(a,b) for a,b in p),max(UP.multiply(a,b) for a,b in p)) + __rmul__=__mul__ + def reciprocal(self): + if self.lo<=0<=self.hi: raise ZeroDivisionError('interval includes zero') + return I(DOWN.divide(D(1),self.hi),UP.divide(D(1),self.lo)) + def __truediv__(self,y): return self*I(y).reciprocal() + def __rtruediv__(self,y): return I(y)*self.reciprocal() + def __pow__(self,n): + if not isinstance(n,int) or isinstance(n,bool): raise TypeError('integer power required') + if n<0: return (self**(-n)).reciprocal() + if n==0: return I(1) + if n%2==0: + lo=D(0) if self.lo<=0<=self.hi else min(self.lo.copy_abs(),self.hi.copy_abs()) + hi=max(self.lo.copy_abs(),self.hi.copy_abs()) + return I(positive_integer_power(lo,n,DOWN),positive_integer_power(hi,n,UP)) + lo=(positive_integer_power(self.lo,n,DOWN) if self.lo>=0 else + positive_integer_power(self.lo.copy_abs(),n,UP).copy_negate()) + hi=(positive_integer_power(self.hi,n,UP) if self.hi>=0 else + positive_integer_power(self.hi.copy_abs(),n,DOWN).copy_negate()) + return I(lo,hi) + def sqrt(self): + if self.lo<0: raise ValueError('negative sqrt interval') + lo=NEAR.sqrt(self.lo); hi=NEAR.sqrt(self.hi) + return I(D(0) if self.lo==0 else NEAR.next_minus(lo),NEAR.next_plus(hi)) + def exp(self): + return I(NEAR.next_minus(NEAR.exp(self.lo)),NEAR.next_plus(NEAR.exp(self.hi))) + def ln(self): + if self.lo<=0: raise ValueError('positive log input required') + return I(NEAR.next_minus(NEAR.ln(self.lo)),NEAR.next_plus(NEAR.ln(self.hi))) + def power23(self): + if self.lo<=0: raise ValueError('positive power input required') + return (self.ln()*I(2)/3).exp() + def widen(self,e): + e=I(e).hi + if e<0: raise ValueError('negative error') + return self+I(e.copy_negate(),e) + def abs_upper(self): return max(self.lo.copy_abs(),self.hi.copy_abs()) + def mid(self): return NEAR.divide(NEAR.add(self.lo,self.hi),D(2)) + def pair(self): return [str(self.lo),str(self.hi)] + + +def need(condition,message): + if not condition: raise ValueError(message) + + +def pi_interval(): + def arctan(q): + x=I(1)/q; s=I(0) + for k in range(100): s+=((-1)**k)*(x**(2*k+1))/(2*k+1) + return s.widen((x**201)/201) + return 16*arctan(5)-4*arctan(239) + +PI=pi_interval() + + +def sincos(x): + x=I(x); need(x.lo>=0 and x.hi<2,'trig range must be [0,2)') + xx=x*x; ts=x; tc=I(1); s=ts; c=tc + for k in range(1,60): + ts=-ts*xx/((2*k)*(2*k+1)); tc=-tc*xx/((2*k-1)*(2*k)) + s+=ts; c+=tc + # Uniform Taylor remainder on [0,2]; first omitted terms. + return s.widen(I(2)**121/math.factorial(121)),c.widen(I(2)**120/math.factorial(120)) + + +def moments(L=4,N=10): + th={0:I(1),2:I(-1),4:I(3),6:I(-15)} + for n in range(1,N+1): + z=I(L*n)**2; e=2*(-z/2).exp() + for j,p in {0:I(1),2:z-1,4:z*z-6*z+3,6:z**3-15*z*z+45*z-15}.items(): + th[j]+=p*e + x=I(L*(N+1)) + need(x.lo>=10,'image-tail Hermite range') + tail=8*x**6*(-x*x/2).exp() + ratio=(I(N+2)/(N+1))**6*(-I(L)**2*(2*N+3)/2).exp() + need(ratio.hi0 and h.hi<0 and (A+h).hi<0 and (A+2*h/3).hi<0, + 'uniform tau extremum hypotheses failed') + Tmin=base+A+h; Tmax=base+A/3+h/9 + need(bt.lo>0 and bs.lo>0,'uniform precision positivity failed') + if not reference: + need((a+16*tail).hi<1 and (m4+16*tail).hi<4 and (m6+16*tail).hi<15, + 'coordinate-moment image comparison hypotheses failed') + varmax=15*a**3+15*a*k + need(k6.hi<0 and (a*Tmin/(a+varmax)).lo>D('0.2') and (2*b).lo>D('0.2'), + 'joint covariance lower bound failed') + need((216000*tail).hi0 and cof[2][2].lo>0 and det.lo>0,'matrix positivity not certified') + return [[x/det for x in row] for row in cof],det + + +def positive_eigenvalue(C,detB): + s1=C[0][0]-C[1][1]-C[2][2] + s2=-(C[0][0]*C[1][1]-C[0][1]**2)-(C[0][0]*C[2][2]-C[0][2]**2)+(C[1][1]*C[2][2]-C[1][2]**2) + s3=1/detB + def p(x): return ((x-s1)*x+s2)*x-s3 + def dp(x): return 3*x*x-2*s1*x+s2 + need(p(I(1)).hi<0 and p(I(2)).lo>0,'positive eigenvalue bracket failed') + need((6*I(1)-2*s1).lo>0 and dp(I(1)).lo>0,'positive derivative proof failed') + # A nearest-rounded predictor is not evidence: the residual enclosure below is. + a,b,c=s1.mid(),s2.mid(),s3.mid(); x=D('1.5') + with decimal.localcontext(NEAR): + for _ in range(9): x-=(((x-a)*x+b)*x-c)/(3*x*x-2*a*x+b) + need(10,'interval Newton derivative failed') + updated=I(x)-p(I(x))/derivative + bracket=I(max(bracket.lo,updated.lo),min(bracket.hi,updated.hi)) + need(bracket.hi-bracket.lo=0,'negative squared eigenvalue separation') + # This intersection uses the proved real spectrum / positive inertia of C^(1/2)JC^(1/2). + d2=I(max(D(0),d2.lo),d2.hi) + delta2=d2/(m*m); rho=delta2.sqrt() + need(rho.hi0,'cone series domain failed') + t=m/(lam+m) + need(t.lo>0 and t.hi<1,"cone scale outside (0,1)") + Eh=I(0); power=I(1) + for j,cs in enumerate(COEFF): + poly=I(0) + for c in cs: poly=poly*t+c + Eh+=power*CIRCLE[j]*poly + power*=delta2 + # |binom(5/2,i)|<=3, |binom(-1/2,j)|<=1. + # Bound the entire omitted series, including the odd terms that actually integrate to zero. + n=2*K + rr=I(rho.hi) + tail=3*rr**(n+1)*((n+2)-(n+1)*rr)/(1-rr)**2 + fac=4*m*m*t.sqrt() + out=I(3)*lam*lam/2-2*lam*m+4*m*m+2*d2-fac*Eh + error=fac*tail + need(out.lo-error.hi>0,'cone lower bound failed') + return out,error,dict(detB=detB,rho=rho,lambda_positive=lam,negative_mean=m, + negative_split_squared=d2,C=C) + + +def direction(theta,phi,p): + st,ct=sincos(theta); sp,cp=sincos(phi) + return direction_trig(st,ct,sp,cp,p) + + +def direction_trig(st,ct,sp,cp,p): + u=[st*cp,st*sp,ct]; w=[ct*cp,ct*sp,-st]; v=[-sp,cp,I(0)] + columns=[[1-z*z for z in u], [w[i]*w[i]-v[i]*v[i] for i in range(3)], + [2*w[i]*v[i] for i in range(3)]] + B=[[I(0) for _ in range(3)] for _ in range(3)] + for i in range(3): + for j in range(3): + B[i][j]=(p['c0'] if i==j==0 else p['c1'] if i==j else I(0))-p['kap']*sum(columns[i][k]*columns[j][k] for k in range(3)) + T=p['base']+p['A']*sum(z**4 for z in u)+p['h']*sum(z**6 for z in u) + d,e,meta=cone(B) + scale=p['const']*T.power23()/meta['detB'].sqrt() + meta.update(D=d,cone_error_D=e,tau2=T,precision=B) + return scale*d,scale*e,meta + + +def integrate(N=64,reference=False,progress=False): + need(isinstance(N,int) and N>=2,'at least two cells required') + p=parameters(reference=reference) + trig=[sincos(PI*(2*i+1)/(4*N)) for i in range(N)] + edges=[sincos(PI*i/(2*N))[1] for i in range(N+1)] + weights=[edges[i]-edges[i+1] for i in range(N)] + total=I(0); errcone=I(0); maxrho=D(0); minD=None; maxD=None + for i,(st,ct) in enumerate(trig): + row=I(0); re=I(0) + for sp,cp in trig: + value,err,meta=direction_trig(st,ct,sp,cp,p) + row+=value; re+=err + maxrho=max(maxrho,meta['rho'].hi) + low=DOWN.subtract(meta['D'].lo,meta['cone_error_D'].hi) + high=UP.add(meta['D'].hi,meta['cone_error_D'].hi) + minD=low if minD is None else min(minD,low) + maxD=high if maxD is None else max(maxD,high) + total+=weights[i]*row/N; errcone+=weights[i]*re/N + if progress and (i+1)%8==0: print('angular rows %d/%d'%(i+1,N),file=sys.stderr,flush=True) + step=PI/(2*N) + # Weighted theta midpoint and ordinary phi midpoint, each with a global proof bound. + angular=(PI/2)*step**2*(p['M1']/12+p['M2']/24)+step**2*p['M2']/24 + ratio=total.widen(UP.add(errcone.hi,angular.hi)) + # Recover the nonperiodic reference from the pinned SIDE24 interval and relative image bound. + c24=I('0.04177593184059834334','0.04177593184059834335') + cref=I(DOWN.divide(c24.lo,UP.add(D(1),D('1e-106'))), + UP.divide(c24.hi,DOWN.subtract(D(1),D('1e-106')))) + image=I(0) if reference else I(10**8)*p['tail'] + need((p['Rmax']*cref).hi<1,'image-error absolute scale bound failed') + central=total*cref + cone_abs=errcone*cref + angle_abs=angular*cref + enclosure=(ratio*cref).widen(image) + return dict(object='D3-L4-ANISOTROPIC-20261005-v1',method='outward Decimal intervals + analytic cone series + proved angular midpoint error', + source_commit='2f8d721e300850e36ab17464dc541c977b3ffcbf', + L='infinity' if reference else 4,dimension=3,N_theta=N,N_phi=N,cone_series_degree=2*K, + arithmetic_precision=PREC,scientific_acceptance=False,independent_review=False, + quadrature_only_interval=central.pair(),ratio_quadrature_only=total.pair(), + coefficient_interval=enclosure.pair(),ratio_interval=ratio.widen(image/cref).pair(), + error_bounds=dict(image_sum_coefficient=str(image.hi),cone_integration_coefficient=str(cone_abs.hi), + angular_coefficient=str(angle_abs.hi),angular_ratio=str(angular.hi), + arithmetic_and_reference_interval_width=str(UP.subtract(central.hi,central.lo))), + uniform_bounds={k:p[k].pair() for k in ['a','m4','m6','k','k6','h','Tmin','Tmax','Bmin','Bsmin','Rmax','M1','M2','tail']}, + node_diagnostics=dict(max_negative_eigenvalue_relative_split=str(maxrho), + sampled_D_min=str(minD),sampled_D_max=str(maxD)), + reference_interval=cref.pair(),side24_interval=c24.pair()) + + +def main(): + ap=argparse.ArgumentParser(description=__doc__) + ap.add_argument('--n',type=int,default=64) + ap.add_argument('--reference',action='store_true') + ap.add_argument('--progress',action='store_true') + args=ap.parse_args() + print(json.dumps(integrate(args.n,args.reference,args.progress),indent=2,sort_keys=True)) + +if __name__=='__main__': main() diff --git a/coefficients/d3_l4_anisotropic_20261005/source_crosscheck.py b/coefficients/d3_l4_anisotropic_20261005/source_crosscheck.py new file mode 100644 index 000000000..336196cf0 --- /dev/null +++ b/coefficients/d3_l4_anisotropic_20261005/source_crosscheck.py @@ -0,0 +1,100 @@ +"""Falsification checks against the hash-pinned, unmodified #297 implementation. +The source replay is high-precision diagnostic arithmetic, not interval evidence. +The certificate's error bounds do not come from these comparisons. +""" +import argparse +import decimal +import hashlib +import importlib.util +import json +import math +import pathlib +import certificate as c + +EXPECTED='59b53e5c2e8fdcacc9983f705b9d301fcfcf9242ac6c4d8b7bfbcf0ada7caf9f' + + +def disk_diagnostic(B,n=160): + """Independent 2D disk integral with floating midpoint arithmetic; NOT a bound.""" + b=[[float(x.mid()) for x in row] for row in B] + _,det=c.inverse3(B) + total=0.0 + trig=[(math.cos(2*math.pi*(j+.5)/n),math.sin(2*math.pi*(j+.5)/n)) for j in range(n)] + for i in range(n): + r=(i+.5)/n + for co,si in trig: + v=[-1.0,r*co,r*si] + q=sum(v[a]*b[a][d]*v[d] for a in range(3) for d in range(3)) + total+=r*(1-r*r)**2*q**(-3.5) + return 15/(4*math.pi)*math.sqrt(float(det.mid()))*total*(2*math.pi/n)/n + + +def main(): + ap=argparse.ArgumentParser(description=__doc__); ap.add_argument('--source',required=True) + args=ap.parse_args(); path=pathlib.Path(args.source) + c.need(hashlib.sha256(path.read_bytes()).hexdigest()==EXPECTED,'upstream source SHA256 mismatch') + spec=importlib.util.spec_from_file_location('pinned_297',path) + s=importlib.util.module_from_spec(spec); spec.loader.exec_module(s) + D=decimal.Decimal; I=c.I; p=c.parameters() + # Uniform envelopes make 1e9*tail a conservative image allowance for these point quantities. + Dmax=(p['c0']*p['c1']**2/(p['Bmin']*p['Bsmin']**2)).sqrt()*c.diagonal_cone(1/p['Bmin'],1/p['Bsmin']) + c.need(Dmax.hi<10 and p['Tmax'].hi<10 and p['Rmax'].hi<10,'point image envelope failed') + with decimal.localcontext() as ctx: + ctx.prec=270 + q2,q4,q6,tail=s.q_derivatives(D(4)); a=-q2 + kk={2:a,4:q4-3*a*a,6:-q6-15*q4*a+30*a**3} + for tag,x in [('a',a),('m4',q4),('m6',-q6)]: + c.need(p[tag].lo<=x<=p[tag].hi,'moment does not contain upstream '+tag) + rows=[] + for label,raw in [('axis',(1,0,0)),('face',(1,1,0)),('body',(1,1,1)), + ('generic123',(1,2,3)),('generic257',(2,5,7))]: + X,Y,Z=map(D,raw); rn=(X*X+Y*Y+Z*Z).sqrt(); xy=(X*X+Y*Y).sqrt() + st,ct,sp,cp=xy/rn,Z/rn,Y/xy,X/xy + u=[st*cp,st*sp,ct]; w=[ct*cp,ct*sp,-st]; v=[-sp,cp,D(0)] + jd=s.jet_data(u,kk,[w,v]); S=jd['S_AgV'] + conv=[[D(1)/2,0,D(1)/2],[D(1)/2,0,-D(1)/2],[0,1,0]] + sourceC=[[sum(conv[i][a]*S[a][b]*conv[j][b] for a in range(3) for b in range(3)) for j in range(3)] for i in range(3)] + # Enclose the exact algebraic trig components, not rounded binary input. + rnI=(I(int(X))**2+I(int(Y))**2+I(int(Z))**2).sqrt() + xyI=(I(int(X))**2+I(int(Y))**2).sqrt() + value,err,meta=c.direction_trig(xyI/rnI,I(int(Z))/rnI,I(int(Y))/xyI,I(int(X))/xyI,p) + for i in range(3): + for j in range(3): + z=meta['C'][i][j] + c.need(z.lo<=sourceC[i][j]<=z.hi,'Schur/precision mismatch '+label) + c.need(meta['tau2'].lo<=jd['tau2']<=meta['tau2'].hi,'tau mismatch '+label) + detV=p['detH']*meta['detB']/4 + c.need(detV.lo<=jd['det_V']<=detV.hi,'density determinant mismatch '+label) + C=meta['C']; trA=2*(C[0][0]+C[1][1]+C[2][2]) + c.need(trA.lo<=jd['tr_AgV']<=trA.hi,'Frobenius trace mismatch '+label) + # Exact rational transverse-frame rotation by cos=3/5,sin=4/5. + R=[[I(1),I(0),I(0)],[I(0),-I(7)/25,I(24)/25],[I(0),-I(24)/25,-I(7)/25]] + B=meta['precision'] + turned=[[sum(R[i][a]*B[a][b]*R[j][b] for a in range(3) for b in range(3)) for j in range(3)] for i in range(3)] + td,te,_=c.cone(turned); d=meta['D'].widen(meta['cone_error_D']); td=td.widen(te) + c.need(d.lo<=td.hi and td.lo<=d.hi,'cone transverse rotation mismatch') + direct=disk_diagnostic(B) + c.need(abs(direct-float(d.mid()))<2e-4,'independent disk falsification failed') + rows.append(dict(direction=raw,D_interval=d.widen(10**9*p['tail']).pair(), + tau2_interval=meta['tau2'].widen(10**9*p['tail']).pair(), + ratio_direction_interval=value.widen(err).widen(10**9*p['tail']).pair(), + upstream_Schur_contained=True,frame_rotation_overlap=True, + independent_disk_midpoint_diagnostic=direct, + disk_diagnostic_is_certificate=False)) + # Independent high-precision evaluation of the already-known nonperiodic closed form. + # This is a falsification check on normalization, not a replacement for the imported enclosure. + with decimal.localcontext() as ctx: + ctx.prec=270 + D0=D(29)/6-D(6).sqrt() + cref=s.stirling_gamma(D(7)/6)*(D(3)/2)**(D(1)/3)*D0/(2*D(3).sqrt()*s.PI**2*s.PI.sqrt()) + inside=D('0.04177593184059834334')