diff --git a/.github/workflows/c2-finite-jet-transfer.yml b/.github/workflows/c2-finite-jet-transfer.yml new file mode 100644 index 000000000..f6d6f18c9 --- /dev/null +++ b/.github/workflows/c2-finite-jet-transfer.yml @@ -0,0 +1,43 @@ +name: c2 finite-jet transfer controls + +'on': + pull_request: + paths: + - 'frontiers/c2_finite_jet_transfer_20261001/**' + - '.github/workflows/c2-finite-jet-transfer.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: Authenticate the historical sources and run exact controls + env: + PYTHONDONTWRITEBYTECODE: '1' + GIT_NO_REPLACE_OBJECTS: '1' + run: | + set -euo pipefail + git fetch --no-tags origin f9ebba17f5cc590232b2fb2cd37b04b996abc143 + git fetch --no-tags origin 0cf048d18eb28a4ba37eba89c238a2910d4ca915 + python -B -S frontiers/c2_finite_jet_transfer_20261001/verify.py + cd frontiers/c2_finite_jet_transfer_20261001 + python -B -S -m unittest -v + python -B -O -S -m unittest -v + python -B -S controls.py > "$RUNNER_TEMP/c2-transfer-normal.json" + python -B -O -S controls.py > "$RUNNER_TEMP/c2-transfer-optimized.json" + cmp "$RUNNER_TEMP/c2-transfer-normal.json" "$RUNNER_TEMP/c2-transfer-optimized.json" + cmp RESULTS.json "$RUNNER_TEMP/c2-transfer-normal.json" + python -B -S verify.py + git diff --exit-code + test -z "$(git status --porcelain)" diff --git a/frontiers/c2_finite_jet_transfer_20261001/MANIFEST.json b/frontiers/c2_finite_jet_transfer_20261001/MANIFEST.json new file mode 100644 index 000000000..f4e8c0462 --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/MANIFEST.json @@ -0,0 +1,60 @@ +{ + "scientific_effect": "NONE", + "status": "AUTHOR_CANDIDATE_REVIEW_REQUIRED", + "files": [ + { + "path": "PROOF.md", + "bytes": 25581, + "sha256": "971101de946fd711207454c2cd4bbc36729ca9b7c07262e122ff1d54bf5dfa16", + "git_blob": "54cc4a1ae274842bc2c01f9c207549e7b07de7bc" + }, + { + "path": "README.md", + "bytes": 2424, + "sha256": "4f1ea352c4ecadab7c31756916fed84f6e8f0e0d5fde1915cb1d3b2a74368bfe", + "git_blob": "ab4b5c7ba4470f82633e15f8cbccc60029f982ed" + }, + { + "path": "RESULTS.json", + "bytes": 2225, + "sha256": "c0f29ff22b6af6b618efe26124f49265f6860fd8ee6dcc5b5df3e22077219f10", + "git_blob": "0de6626ac276ef36c215147be59c9b448850ef90" + }, + { + "path": "SOURCES.json", + "bytes": 2252, + "sha256": "5fb1d18cba3f2b68f380403dae920c685beea1d7b164f53a3c31ecf930403d6a", + "git_blob": "168be38f43a997a69cfa2e2463b271ac82314aee" + }, + { + "path": "VALIDATION.md", + "bytes": 3107, + "sha256": "4a8c93c229a453d0188d82c0880a5e99b1620fb5f1d3f5bd03bff98c5e44aa94", + "git_blob": "8884e509935a685cf99c7f3758ffc20d4c0e1d38" + }, + { + "path": "controls.py", + "bytes": 9552, + "sha256": "63ff219ba60e0a20d3cfbf2931c152dac675b01398c70e0663096f9323e6e8f7", + "git_blob": "d6ee393a4f055d8d6dc554780ddd2cab0506b68f" + }, + { + "path": "test_controls.py", + "bytes": 12056, + "sha256": "5eded18cdc884aa67dd2e684c9386146c46c07339d312ba97adb234a54f6adf4", + "git_blob": "7e04344b48e423716a3e23dca2c1ab3f2379486f" + }, + { + "path": "test_verify.py", + "bytes": 2971, + "sha256": "a396cd4be617a4336442b31e82da781e5360daa0b2c698a1af9fe712caeb8d12", + "git_blob": "077acff8eeaac103720ea473fb909a99efe6acff" + }, + { + "path": "verify.py", + "bytes": 4436, + "sha256": "c7638bbfe976bc3ad850876f739ccfb6b140e2865141bde76375b16efaf12082", + "git_blob": "77028091b97620a506bed496cc775933f5002044" + } + ] +} diff --git a/frontiers/c2_finite_jet_transfer_20261001/PROOF.md b/frontiers/c2_finite_jet_transfer_20261001/PROOF.md new file mode 100644 index 000000000..54cc4a1ae --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/PROOF.md @@ -0,0 +1,534 @@ +# Finite-torus c2: an eighth-order jet formula and an explicit additive transfer + +Object OA-C2-FINITE-JET-20261001-v1. Author: OpenAI / GPT-6 Astra Pro. +Current owner directive: continue justified mathematics, help other models and +close shared gaps. Pickup: Math-#223 comment5934186030; coordination: main#229. +**AUTHOR-SIDE PROOF CANDIDATE. Nonauthor review required. Scientific effect NONE.** +No parent proof, numerical source, scientific register, prize or formal scope is +changed. This is not an independent-human review or a full persistence proof. + +## 0. Object, result and validation boundary + +Let K be a real smooth stationary covariance, and fix an orthonormal frame +R=(u,Theta). Set m=d-1. All matrix coordinates below are the RAW upper-triangular +entries, not entries with an extra sqrt(2) on off-diagonal coordinates. + +The signed fixed-cone surrogate is the kernel with determinant product +`-det(H_M)det(H_S) 1{D_Theta^2 f(0)<0}`. It is this analytic surrogate that the +reference calculation in Math-#223 evaluates; an identification of its r^2 +coefficient with the actual typed kernel is an imported, separately reviewed +comparison. We do not identify the full finite-r signed surrogate with a count. + +Write bar A_2(k,u) for its r^2 coefficient AFTER integrating all birth heights. +Define the same finite-part expression and spatial normalization as #218 (0.1): + + c2[K]=(1/3) integral_S integral_0^infinity + [bar A_2(k,u)-bar A_2(0,u)] k^(-4/3) dk d sigma(u). (J0) + +For d=1 use the empty-matrix convention det A=1 and sphere S^0 of measure2. +This defines an expression; it does not extend #218's d>=2 theorem to d=1. + +**Theorem J (finite-jet representation).** Assuming the contact conditioning +covariance below is positive definite, there are a(u)>0 and real p0,p2,p4 with + + bar A_2(k,u)=exp(-a k^2)(p0+p2 k^2+p4 k^4). (J1) + +The coefficients are explicit Gaussian-cone moments determined by derivatives +of K at0 through order EIGHT only. The finite part is an ordinary convergent +subtracted integral and evaluates to + + c2[K]=(Gamma(5/6)/3) integral_S + [-3 a^(1/6) p0 +(1/2)a^(-5/6)p2 +(5/12)a^(-11/6)p4] d sigma. (J2) + +No inverse transverse Hessian and no derivative of a cone indicator is used. + +**Theorem Q (explicit local stability, d=1,2,3).** Let K_ref(z)=exp(-|z|^2/2), +and let + + delta = sup_(R in O(d), |alpha|<=8) + |D_R^alpha K(0)-D_R^alpha K_ref(0)| <= 10^-4. (J3) + +Then, for the expression (J0), + + |c2[K]-c2[K_ref]| <= 10^50 delta. (J4) + +The constant is deliberately very loose but explicitly derived in Section6. +For a smooth convex covariance path the proof needs no nondegeneracy of the +conditional higher jets, only the displayed low-jet conditioning floor. + +**Corollary Q24 (exact normalized periodization).** For the source field + + K_L(z)=sum_(n in Z^d) exp(-|z+Ln|^2/2) / sum_n exp(-|Ln|^2/2), + +and d=1,2,3, all real L>=10 satisfy + + |c2[K_L]-c2[K_ref]| <= 10^50 E_d(L), + E_d(L)=2(3^d-1)[d^4 L^8+28d^3 L^6+210d^2 L^4+420d L^2+210]exp(-L^2/2). + (J5) + +In particular, uniformly for every L>=24, + + |c2[K_L]-c2[K_ref]| < 10^-60. (J6) + +This is an additive covariance-transfer error for a specified expression, not +an error estimate for nu(ell) at a positive lifetime, not a remainder constant +for the full elder law, and not new acceptance of #207/#218/#220. Conditional +on their exact coefficient-identification interfaces, it transfers their c2. +Reference values from #223 remain separately sourced numerical enclosures. + +## 1. Birth marginalization, parity, and the new pin basis + +Use x along u and y along Theta, with endpoints x=+-r/2. The source [R] ยง2 uses +its four axial rows + + F_av=(f_-+f_+)/2, B_sec=(f_+-f_-)/r, + C_ax=(f_x(+)-f_x(-))/r, + T_r=(6/r^2)[f_x(-)+f_x(+)-2B_sec], + +and transverse average gradients and gradient differences. Its target is +`(b-kr^3/2,-kr^2,0,12k,0,...)` and its Jacobian factor is12. +Replace B_sec by the average axial gradient `B_sec+r^2 T_r/12`; this row operation +has determinant1. Integrating F_av over b has Jacobian1. The remaining vector is + + V_r=( (grad f_-+grad f_+)/2, (grad f_+-grad f_-)/r, T_r ), + target v(k)=(0_d,0_d,12k), + V_0=(G,H u,T3), G=grad f(0), H=D^2f(0), T3=partial_u^3 f(0). (1.1) + +There are2d+1 pins, and no birth-coordinate remains. Disintegration therefore +rewrites the birth-integrated signed surrogate exactly as + + bar A_r(k,u)=12 p_(V_r)(v(k)) + E[-det H_- det H_+/r^2 1{A<0} | V_r=v(k)], A=D_y^2 f(0). (1.2) + +All relevant Gaussian polynomial moments are integrable, so the disintegration +of this signed integrand is justified by absolute integrability, not by treating +it as a nonnegative count. In particular birth marginalization is NOT evaluation +of a birth-conditioned expression at b=0. + +Every component of V_r is even in the parameter r. Under spatial inversion, +average gradients and T_r have odd parity, and gradient differences/r and A have +even parity. Stationarity of a REAL scalar field gives K(-z)=K(z), so odd and +even Gaussian derivative families have zero cross covariance and are independent. +No rotational or transverse-reflection symmetry of K is assumed. + +The expansions in r are + + G_av=G+r^2 partial_u^2 G/8+O(r^4), + H_diff=H u+r^2 partial_u^2(H u)/24+O(r^4), + T_r=T3+r^2 T5/40+O(r^4). (1.3) + +The O symbols may be interpreted in every finite Gaussian Lp on compact mark +sets; smooth analytic reference/periodic kernels have all required derivatives. +The numerical transfer depends only on the resulting coefficients, not on a +uniform finite-r remainder controlled by just eight derivatives. + +## 2. Inverse-free endpoint determinant expansion + +At the center write + + A=D_y^2 f, B=partial_u A, C=partial_u^2 A, + gamma=D_y partial_u^2 f, eta=D_y partial_u^3 f, f4=partial_u^4 f, + f5=partial_u^5 f. + +All quantities are evaluated under the actual pinned law at r, before expanding +that law. The pins and Taylor's formula give, with sigma=-1 for M and+1 for S, + + alpha_sigma=f_xx(sigma r/2)/r + =sigma6k+r f4/12+sigma r^2 f5/120+O(r^3), + beta_sigma=D_y f_x(sigma r/2)/r + =sigma gamma/2+r eta/12+O(r^2), + A_sigma=A+sigma r B/2+r^2 C/8+O(r^3). (2.1) + +For example the axial pins impose `f2=-r^2 f4/24+O(r^4)` and +`f3=12k-r^2 f5/40+O(r^4)`. The latter is essential to the factor1/120. +The transverse gradient-difference pin gives +`D_y f_x(0)=-r^2 eta/24+O(r^4)`, essential to the factor1/12 in beta. + +Put Delta=det A; let Delta_B and Delta_C be the first directional derivatives +of det, Delta_BB its second derivative in B, J=adj A, and J_B=D(adj)(A)[B]. +These are polynomials, defined even when A is singular. Set + + Y=(f4/12)Delta-(1/4)gamma^T J gamma, + U=Y+3k Delta_B, + V=(3k/4)(Delta_C+Delta_BB)+(f4/24)Delta_B+(f5/120)Delta + -(1/12)gamma^T J eta-(1/8)gamma^T J_B gamma. (2.2) + +The determinant identity, valid without invertibility, is + + D_sigma:=det H_sigma/r + =alpha_sigma det A_sigma-r beta_sigma^T adj(A_sigma) beta_sigma + =sigma6k Delta+r U+sigma r^2 V+O(r^3). + +Consequently the second-order polynomial in the signed product is + + -D_-D_+=36k^2 Delta^2+r^2 W2+O(r^3), + W2=12k Delta V-U^2. (2.3) + +The first-order term cancels. The coefficient `3k Delta_B` in U is present at +FIXED k; replacing U by the cusp variable Y would give a wrong fold coefficient. +The f5 term is present, but it occurs only linearly, multiplied by k Delta^2/10. +No variance of f5, hence no order-ten covariance, is needed in its expectation. + +A useful exact polynomial family realizing all data in (2.1) is + + f(x,y)=2k(x-r)(x+r/2)^2 +(f4/24)(x^2-r^2/4)^2 + +(f5/120)x(x^2-r^2/4)^2 + +sum_i y_i[(gamma_i/2)(x^2-r^2/4)+(eta_i/6)x(x^2-r^2/4)] + +(1/2)y^T[A+xB+(x^2/2)C]y. (2.4) + +It has both exact gradient pins and the exact height gap, for arbitrary symmetric +A,B,C, including singular/indefinite A. The tests take full Hessian determinants +of this family independently of the adjugate expansion. + +## 3. Joint-density scores and why the gap polynomial has degree four + +Reorder the conditioning coordinates into + + O_r=(G_av,T_r), dimension n_o=d+1, + E_r=(H_diff, A_upper), dimension n_e=d(d+1)/2. + +At r=0, E_0 consists of ALL raw Hessian entries, reordered. Its target is +x(A)=(0_d,A_upper). O_r has target12k e, where e selects its last coordinate. +Let + + Cov O_r=S+r^2 S2+O(r^4), Cov E_r=T+r^2 T2+O(r^4). + +The two vectors are independent by parity. Define + + p_o=(2pi)^(-n_o/2)(det S)^(-1/2), a=72 e^T S^(-1)e, + q(A)=phi_T(x(A)), + s_o(k)=-(1/2)tr(S^(-1)S2)+72k^2 e^T S^(-1)S2 S^(-1)e, + s_e(A)=-(1/2)tr(T^(-1)T2)+(1/2)x(A)^T T^(-1)T2 T^(-1)x(A). (3.1) + +Differentiating the Gaussian density at r^2=0 and using (2.3) gives exactly + + bar A_2(k,u)=12 p_o exp(-a k^2) integral_(A<0) q(A) H(k,A) dA, + H(k,A)=E[W2 | O_0=12ke,E_0=x(A)] + +36k^2 Delta^2 [s_o(k)+s_e(A)]. (3.2) + +No transverse matrix inverse is used: the inverses in (3.1) are NONDEGENERATE +conditioning covariance matrices. Conditional higher-jet covariances may be +singular; Gaussian polynomial moments still use Wick's formula and require no +inverse of their covariance. + +Conditionally, the even jets f4,C,eta have means linear in A, independent of k. +The odd jets gamma,B,f5 have means linear in k, independent of A. Their residual +covariances do not depend on either target; odd and even residual blocks are +independent. In a non-isotropic covariance gamma and B can have nonzero k-means. +The proof neither drops those means nor asserts reference-only independence. + +Inspecting (2.2)-(2.3), W2 contains at most four odd/free factors and polynomial +k-degree at most4 after taking moments. Replacing k by-k and changing the sign +of all odd jets preserves its expectation. Thus + + H(k,A)=h0(A)+h2(A)k^2+h4(A)k^4, + p_j=12p_o integral_(A<0) q(A) h_j(A) dA, j=0,2,4. (3.3) + +For any fixed d these h_j are finite polynomials in A. One completely explicit +coefficient extraction uses H0=H(0,A), H1=H(1,A), H2=H(2,A): + + h0=H0, h4=(H2-4H1+3H0)/12, h2=(16H1-15H0-H2)/12. (3.4) + +This uses polynomial evaluation, NOT multiplication by exp(4a) or numerical +recovery of tiny Gaussian values. Equation (3.3) proves (J1). + +## 4. The finite part is integrated before covariance comparison + +For a>0, integration by parts, with both boundary terms zero, gives + + integral_0^infinity (exp(-a k^2)-1) k^(-4/3) dk + =-3 a^(1/6) Gamma(5/6). + +The other two integrals are ordinary Gamma integrals: + + integral_0^infinity exp(-a k^2) k^(2-4/3) dk=(1/2)a^(-5/6)Gamma(5/6), + integral_0^infinity exp(-a k^2) k^(4-4/3) dk=(5/12)a^(-11/6)Gamma(5/6). + +For the first identity use the antiderivative -3 k^(-1/3); the derivative of +exp(-a k^2)-1 is -2a k exp(-a k^2). Near zero the subtracted expression is O(k^2), +and at infinity its constant part is integrable against k^(-4/3). These facts +justify the signed integration directly. They give (J2), using Euler's Gamma +integral and Gamma(11/6)=(5/6)Gamma(5/6), not an unregularized divergent integral. +Primary references: NIST DLMF5.2.1 and5.5.1, inspected on1 October2026: +https://dlmf.nist.gov/5.2 and https://dlmf.nist.gov/5.5 . + +**Independent one-dimensional recovery.** For the reference kernel, with no A, + + S=[[1,-3],[-3,15]], S2=[[-3/4,9/4],[9/4,-21/4]], T=[3], T2=[-5/4]. + +The conditional mean of f5 is -120k and Var(f4 | f2=0)=30, NOT24 (the latter also +pins birth). Hence + + E W2=-5/24-12k^2, s_o+s_e=11/24+3k^2, + bar A_2=pi^(-3/2) exp(-12k^2)[-5/24+(9/2)k^2+108k^4]. (4.1) + +The bracket in (J2), after factoring12^(1/6), is9/8. Multiplying the sphere factor +2/3 gives exactly `(3/4)12^(1/6)Gamma(5/6)/pi^(3/2)`, the reference c2 in #223. +The tests also check spatial and amplitude rescaling; a field-amplitude multiplier +t gives c2 scaling t^(-4/3), not the leading coefficient's different scaling. + +**Additional independent planar recovery.** The reference birth-marginal law has +A|Hu=0 distributed as N(0,8/3). Given A and the odd pins, the needed conditional +identities are E f4=3A/4, Var f4=57/2, E C=-3A/4, E f5=-120k, +E B=E gamma=E eta=0, Var B=Var gamma=2, and Cov(B,gamma)=0. Odd/even +families are independent. The score is + + s_o+s_e=23/32+3k^2-A^2/256. + +Substituting in (3.2), the three polynomials before A integration are + + h0=-A^4/256-13A^2/96-3/4, + h2=-9A^4/64+57A^2/8-18, h4=108A^2. + +The negative-half Gaussian moments of degrees0,2,4 are1/2,4/3,32/3. The integral +polynomial is therefore (-43/72,-1,144), with density factor +12 p_o p_(Hu)(0)=(1/2)pi^(-5/2). Its finite-part factor after12^(1/6) is13/6; +multiplication by(1/3)|S^1| and the density factor yields exactly +(13/18)12^(1/6)Gamma(5/6)pi^(-3/2), the independent d=2 crosscheck against #223. +No source polynomial-generation or interval engine is used in these two checks. + +## 5. Exactly which covariance derivatives are needed + +For multi-indices alpha,beta, + + Cov(D^alpha f,D^beta f)=(-1)^|beta| D^(alpha+beta)K(0). + +S,T use orders at most6. By (1.3), S2,T2 use at most8. In W2 every jet except f5 +has order<=4, so their conditional means/covariances and Wick moments use at most8. +f5 appears only as `k Delta^2 f5/10`: its conditional MEAN uses covariance with +G (order6) or T3 (order8), while its covariance with even H is zero by parity. +No f5 square occurs. Requesting its order-ten variance would introduce an +unnecessary datum. Omitting f5 itself, or using only derivatives through6, is wrong. + +The conditioning covariance is that of `(G,H,T3)`, dimension(d+1)(d+2)/2. All +polynomial coefficients and Gaussian-cone integrals in (3.3) are smooth functions +of the finite jet tensor on any compact positive-definite conditioning domain. +This can be proved without differentiating the cone: differentiate the Gaussian +density and polynomial coefficients on the fixed set A<0; a uniform positive +covariance floor gives a dominating polynomial times a Gaussian. Wick moments +remain polynomial when residual covariances are degenerate. Consequently there +is a finite local Lipschitz constant for each fixed d. This general observation +is consistent with the covariance smoothness discussed by F. Voigtlaender, +*A general version of Price's theorem*, arXiv:1710.03576v2; only the abstract was +consulted, and no result from that paper is needed instead of this direct argument. +The explicit d<=3 constant follows next. + +## 6. Complete explicit Lipschitz budget for d<=3 + +Let K_t=(1-t)K_ref+tK, 0<=t<=1, and put delta as in (J3). A dot in this section +means derivative in t, NOT in r or k. Fix a frame; every covariance-entry +derivative used below is bounded by delta, and all covariance entries through +order8 are bounded in modulus by106. The coefficients in (1.3) have sums at most1, +so the same bounds apply to entries of S2,T2 and their t-derivatives. + +### 6.1 Uniform conditioning, scores and regressions + +The reference odd block is `[[1,-3],[-3,15]]` plus independent variance-one +transverse gradients. Its minimum is8-sqrt58>3/8. The raw full-Hessian covariance +is a diagonal-Hessian block2I+11^T plus variance-one off-diagonal entries, and has +minimum at least1. Since the full conditioning dimension is at most10, + + lambda_min >=3/8-10delta >1/3, ||inverse||_2<=3. (6.1) + +Every conditioning covariance derivative has norm<=10delta, so its inverse +derivative has norm<=90delta. Also ||S2||,||T2||<1000 and +||dot S2||,||dot T2||<=10delta. + +For a higher-jet covariance row c, ||c||<400 and ||dot c||<4delta. Thus + + ||dot(c Sigma^-1)|| <=12delta+36000delta <40000delta. + +The even conditioning size is<=6, the odd size<=4. Their mean bounds can be +sharpened separately to1000|A_upper| for even jets and10000|k| for odd jets. +For |k|<=2, set R=|A_upper| and M=1+R. For each higher-jet coordinate USED in W2, + + |mu|<=20000 M, |dot mu|<=2*10^6 delta M. (6.2) + +This includes the conditional mean of f5. All other higher-jet conditional +covariance entries have modulus<=106, by covariance contraction and Cauchy-Schwarz. +Differentiating their Schur complement gives + + |dot C_cond,ij| <=[1+2*4*3*400+400^2*9*10]delta <10^8 delta. (6.3) + +The variance of f5 is neither estimated nor used. + +From (3.1), directly differentiating inverses and traces yields + + |s_o(k)+s_e(A)| <=10^6(1+k^2+R^2), + |dot s_o(k)+dot s_e(A)| <=10^8 delta(1+k^2+R^2). (6.4) + +For example each quadratic-form derivative has norm at most +`2*90*1000*3+9*10=540090` times delta; its largest multiplier is72. +The two constant-score derivatives sum to at most450150delta. These are below +the coefficients in (6.4), not an omitted dimension factor. + +Finally + + p_o<=9, |dot p_o|<1000delta, + q(A)>=0, |dot q(A)|<=100delta(1+R^2)q(A), + 1/2=1/S_ee >=1/106`, so a>=72/106>1/2. +For the density-score bound use n_e<=6, ||T^-1||<=3 and ||dot T||<=6delta. + +### 6.2 Polynomial and Wick bounds + +The coefficient l1 norms of det A, Delta_B, Delta_C, Delta_BB are at most2,4,4,4 +for m<=2. Each adjugate entry has norm<=1, and each quadratic/bilinear contraction +in (2.2) has coefficient norm<=4. These bounds include m=0 and m=1. At |k|<=2, + + ||U||_coeff<=151/6, ||V||_coeff<=781/60, + ||W2||_coeff <=(151/6)^2+48*(781/60)<2000. (6.6) + +Here coefficient norm concerns the polynomial in the raw A and free-jet entries, +with k already fixed. Every monomial in W2 has total degree<=6 in those entries +and has at most4 free-jet factors; the sole f5 term is linear in f5. + +A Gaussian moment of n<=4 variables has at most10 partial-matching terms. +Writing U0=20000M, (6.2)-(6.3) bound each term by U0^n and its derivative by +400delta U0^n: mean derivatives are at most100delta U0, covariance derivatives +at most delta U0^2, and there are at most4 factors to differentiate. Thus + + |moment|<=10 U0^n, |dot moment|<=4000delta U0^n. (6.7) + +This remains valid for a linear f5 term without ever creating its variance. +Multiplying the remaining A monomial by R^j costs only M^j, with j+n<=6. +The score term in H has modulus at most +`36*4*4*10^6*5 M^6`, and derivative at most the same expression with10^8delta. +Equations (6.6)-(6.7) therefore give + + |H(k,A)| <10^22 M^6, |dot H(k,A)| <10^25 delta M^6, + |h_j(A)| <10^23 M^6, |dot h_j(A)| <10^26 delta M^6, j=0,2,4. (6.8) + +The second line uses (3.4), whose largest coefficient l1 norm is8/3<3. +The exact arithmetic before rounding up is retained in controls.bound_budget. + +### 6.3 The cone integral is uniformly bounded without a boundary derivative + +The marginal density of H u at0 is at most3^(d/2)<6. Conditionally on H u=0, +A_upper is centered Gaussian with at most3 coordinates and trace covariance +at most318. For any positive semidefinite covariance, Jensen on its eigenvalues +and E Z^8=105 give E|A_upper|^8<=105*(trace Cov)^4. Consequently + + integral_all_A q(A)(1+R)^8 dA + <=6*128*(1+105*318^4)=824629750641408 <10^15. (6.9) + +The cone integral is smaller. The power128 comes from +`(1+R)^8<=2^7(1+R^8)`. Means are zero because the conditioned even target H u is0; +there is no hidden birth or k mean in this estimate. + +Using (3.3) and (6.5)-(6.9), uniformly in the frame and t, + + |p_j|<12*9*10^23*10^15 <10^41, + |dot p_j|<12[10^3*10^23+9*10^26+9*100*10^23]*10^15 delta <10^44 delta. (6.10) + +The last term is the derivative of the Gaussian density, not of the cone. +These integrable bounds also justify the differentiation and Fubini steps. + +### 6.4 Finish the numerical constant + +For 1/2=1, by + + P8(|z|) exp(-|z|^2/2), + P8(R)=R^8+28R^6+210R^4+420R^2+105. + +Differentiate the Gaussian into all singleton/pair contractions; each unit-vector +contraction has modulus<=1. The counts are1,28,210,420,105. Lower orders are +bounded by this polynomial for R>=1. At the origin every required derivative +has modulus<=105. The normalization denominator is at least1, so the change in +the normalized derivative is at most the image sum with P8+105. + +In the shell ||n||_infinity=j, for d<=3, + + number of n <=(3^d-1)j^(d-1), j<=|n|<=sqrt(d)j. + +Every shell-polynomial power is at most j^10. For L>=10, the ratio of successive +terms j^10 exp(-L^2 j^2/2) is at most2^10 exp(-150)<1/2; the last inequality +already follows from exp150>1+150+150^2/2>2048. Thus the shell sum is less than +twice its first term, and (J5)'s E_d(L) bounds delta in EVERY frame. + +Each L^j exp(-L^2/2), j<=8, decreases for L>=10. Exact positive Taylor sums prove + + exp(-50)<2*10^-22, exp(-288)<10^-125. + +At d=3,L=10, the first bound gives E_3(10)<9.231*10^-11<10^-4. The polynomial +factors increase with d, so all three dimensions stay within Theorem Q's box. +At L=24 the respective exact polynomial factors in E_d are + + d=1: 461984450376, + d=2: 28868660309280, + d=3:471182508197544. + +Multiplication by10^50*10^-125 gives additive errors less than respectively +`4.62e-64`, `2.887e-62`, `4.712e-61`, all below10^-60. Monotonicity makes the +bound valid for every larger real L. No numerical exp or transcendental +floating-point approximation enters this endpoint certification. + +The already-reviewed reference enclosures in #223's RESULTS.json then yield, +by widening each endpoint by10^-16 (much more than the transfer error): + +| d | c2[K_L], every L>=24, expression scope | +|---|---| +|1|[0.2300445802661502, 0.2300445802661999]| +|2|[0.2215244106266631, 0.2215244106267111]| +|3|[0.1612340491269446, 0.1612340491269811]| + +No input table was rerun or tightened here. In d=2,3, interpreting these as the +actual elder-density coefficient remains conditional on the corrected parent +identification. Tiny coefficient error does not estimate an asymptotic remainder +at a selected positive lifetime. At L near10 the explicit error bound is very +loose and is not advertised as an accurate coefficient approximation. + +## 8. Scope of the executable controls and the source chain + +The 34 mathematical tests run in normal and optimized standard-library Python. They include +64 complete polynomial-Hessian comparisons for m=0,1,2,3, including singular and +indefinite matrices; adjugate identities; the missing3k Delta_B and f5 falsifiers; +raw-coordinate covariance scores; non-isotropic gap-dependent odd means; the +30-versus24 birth-marginal variance; parity and degree via exact Gaussian-moment +cubature; d=1 and d=2 closed-form recovery, spatial/amplitude scaling; and every coarse +arithmetic budget and endpoint tail used above. They are finite controls of +these statements, not a formal proof of the continuum analysis. + +Initial test-first interfaces produced21 expected NotImplemented errors. The +first implementation passed20 tests and exposed one wrong hand-entered singular +fixture in the tests: at Delta=0 the common coefficient is75/4, so W2=-5625/16, +not-4041/16. The full-Hessian check independently confirmed it; only that fixture +was corrected. The separate explicit-bound tests first had six missing-interface +errors among eight tests, then passed after implementation. Failures are retained +in the local execution receipt, not attributed to the peer's source. + +Frozen source inputs are in SOURCES.json: [R]'s observation convention; [P]'s +normalized field; #223's signed-surrogate definition and reference interval data; +and #218's c2 integral definition, whose actual-typed identification is consumed +conditionally. Original sources are neither edited nor promoted. Historical Git +source authentication is required of the added workflow; local network DNS was +unavailable, so no full-project local Git authentication is claimed. + +Requested review slices: +A: (1.1)-(3.4), the pin Jacobian, endpoint expansion, gap parity and derivative + order; especially retaining the fixed-k3k Delta_B term and linear f5 term. +B: Section6, every constant and Gaussian derivative bound, with raw-coordinate + dimensions and the absence of an f5 variance assumption. +C: (J2), Section7, normalization, exact lattice tails and source-interval transport; + distinguish the coefficient expression from actual elder/finite-lifetime claims. + +No scientific register, prize, Boolean, original proof or stopped scheduler is +changed. This new proof is exposed author work awaiting nonauthor assessment, +not a review of itself and not a claim that every project obligation is closed. diff --git a/frontiers/c2_finite_jet_transfer_20261001/README.md b/frontiers/c2_finite_jet_transfer_20261001/README.md new file mode 100644 index 000000000..ab4b5c7ba --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/README.md @@ -0,0 +1,47 @@ +# Eighth-order finite-jet c2 representation and finite-torus transfer + +Read PROOF.md. This author-side candidate solves a specific expression-transfer +gap: for the exact normalized periodic Gaussian covariance, d=1,2,3 and every +L>=24, the supplied c2 expression differs from its reference value by <1e-60. +The proof first integrates birth height, derives a quartic gap polynomial with +Gaussian damping, evaluates its finite part exactly, and bounds the signed +coefficient along a nondegenerate covariance path using derivatives through8. +It does not import the positive c1 sandwich into a signed finite-part problem. + +Scientific effect NONE. No parent theorem, typed replacement, actual elder +identification, finite-lifetime remainder, scientific register or formal scope +is changed or independently accepted here. New nonauthor analytic review is +requested. Author OpenAI / GPT-6 Astra Pro; task Math-#223/5934186030, main#229. + +## Reproduce + +From this directory, standard-library Python only: + + python -B -S -m unittest -v + python -B -O -S -m unittest -v + python -B -S controls.py + python -B -S verify.py --local-only + +The 34 mathematical controls plus6 real-Git/identity fixtures are finite tests, +not a continuum proof checker. The written Section6 supplies the analytic +Lipschitz constant. Local-only does not authenticate historical project sources. +In a checkout containing the two pinned source commits, use: + + python -B -S frontiers/c2_finite_jet_transfer_20261001/verify.py + +The workflow performs that actual five-source authentication and compares the +three copied reference intervals literally with #223's historical RESULTS.json. +It tests both modes and checks identical arithmetic output. A green workflow +is execution evidence, not the requested nonauthor analytic review. + +## Review slices + +A: birth marginalization, parity, all endpoint determinant terms and order8. +B: the complete Section6 constant budget, Gaussian scores and cone moments. +C: finite-part integration, image tails, normalization and interval transport. + +The bound is deliberately loose near L=10 and not advertised as a useful numeric +approximation there. At SIDE24 its covariance error is small enough to make the +explicit large constant useful. Numerical precision in a coefficient is not +precision of a finite-lifetime density prediction. The d=1 expression convention +does not broaden #218's d>=2 persistence theorem. diff --git a/frontiers/c2_finite_jet_transfer_20261001/RESULTS.json b/frontiers/c2_finite_jet_transfer_20261001/RESULTS.json new file mode 100644 index 000000000..0de6626ac --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/RESULTS.json @@ -0,0 +1,66 @@ +{ + "Lipschitz_constant_upper": "1e50", + "SIDE24_uniform_additive_error_upper": "1e-60", + "actual_elder_identification_proved_here": false, + "budget": { + "H_bound": "3200000000002880000000", + "H_derivative_bound": "1280000000000288000000000", + "final_bound": "195200000000000000000000000000000000000000000000", + "moment8_integral": "824629750641408", + "p_bound": "10800000000000000000000000000000000000000", + "p_derivative_bound": "13080000000000000000000000000000000000000000", + "weight_l1": "226469/180" + }, + "finite_lifetime_remainder_bound_proved_here": false, + "jet_box_radius": "1e-4", + "maximum_covariance_derivative_order": 8, + "reference_d1": { + "Mellin_factor": "9/8", + "a": "12", + "c2_over_12pow1over6_Gamma5over6_pi_minus3over2": "3/4", + "pin_determinant_product": "18", + "polynomial": [ + "-5/24", + "9/2", + "108" + ] + }, + "scientific_effect": "NONE", + "scope": "signed fixed-cone c2 functional; actual persistence identification is an imported premise", + "status": "author-side proof candidate; nonauthor review required", + "torus_expression_enclosures": { + "1": { + "additive_error_upper_rational": "57748056297/125000000000000000000000000000000000000000000000000000000000000000000000000", + "reference_interval": [ + "0.2300445802661503", + "0.2300445802661998" + ], + "torus_L_at_least_24_outward_interval": [ + "0.2300445802661502", + "0.2300445802661999" + ] + }, + "2": { + "additive_error_upper_rational": "180429126933/6250000000000000000000000000000000000000000000000000000000000000000000000", + "reference_interval": [ + "0.2215244106266632", + "0.2215244106267110" + ], + "torus_L_at_least_24_outward_interval": [ + "0.2215244106266631", + "0.2215244106267111" + ] + }, + "3": { + "additive_error_upper_rational": "58897813524693/125000000000000000000000000000000000000000000000000000000000000000000000000", + "reference_interval": [ + "0.1612340491269447", + "0.1612340491269810" + ], + "torus_L_at_least_24_outward_interval": [ + "0.1612340491269446", + "0.1612340491269811" + ] + } + } +} diff --git a/frontiers/c2_finite_jet_transfer_20261001/SOURCES.json b/frontiers/c2_finite_jet_transfer_20261001/SOURCES.json new file mode 100644 index 000000000..168be38f4 --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/SOURCES.json @@ -0,0 +1,51 @@ +{ + "repository": "d6g8k5htny-coder/Math-", + "sources": [ + { + "id": "P", + "path": "imports/lifetime_parent_20260925/UNIFORM_MATRIX_CAP_AND_LIFETIME.md", + "commit": "f9ebba17f5cc590232b2fb2cd37b04b996abc143", + "git_blob": "dfed3b8d318a3ab1950957f393307733a4bef3f2", + "bytes": 40261, + "sha256": "9350ad6eaba6626b93c3dedeef9e2ff816e5cdf1c8318e85fb27499141c84bc7", + "use": "Exact normalized covariance definition only; no new audit of P." + }, + { + "id": "R", + "path": "frontiers/three_fronts_20260924/LIFETIME_REMAINDER.md", + "commit": "f9ebba17f5cc590232b2fb2cd37b04b996abc143", + "git_blob": "247b3ecf80bfbe896948d5d489b2d5842a81c481", + "bytes": 17734, + "sha256": "380b7d0abdb0fe2de5a6564565af9560d3f1b1ce22fd5538927db0c52f4f3a4a", + "use": "Observation conventions, factor12 and signed-kernel normalization." + }, + { + "id": "NUM_NOTE", + "path": "frontiers/c2_exact_20261001/NOTE.md", + "commit": "f9ebba17f5cc590232b2fb2cd37b04b996abc143", + "git_blob": "a2798b87674ed5fc0d2144697e77ccb9b185b4ab", + "bytes": 14480, + "sha256": "598fc86a7c6b21bad438ef087e5aa7521f0fae08e25fa4f40f9b2ba635846dbb", + "use": "Corrected signed fixed-cone convention and reference closed forms; no original pipeline rerun." + }, + { + "id": "NUM_INTERVAL", + "path": "frontiers/c2_exact_20261001/RESULTS.json", + "commit": "f9ebba17f5cc590232b2fb2cd37b04b996abc143", + "git_blob": "3077d9b29bc2393fbae1dd2c8420ca1bcc3707dd", + "bytes": 1891, + "sha256": "94aa67f11211881d60e93ee1782e9b9d829d246d8f75d73eb05b2212278cb831", + "use": "Three reference c2 interval pairs, transported conditionally on their existing numerical certificate." + }, + { + "id": "T", + "path": "frontiers/candidate_third_order_20261001/PROOF.md", + "commit": "0cf048d18eb28a4ba37eba89c238a2910d4ca915", + "git_blob": "70ca57ef05199e75417d7d57928c1e1c93bf944e", + "bytes": 37220, + "sha256": "6c1279164499d4fe2fbeee244b40dafa2159758d20f04826cd67d7602ea97fe4", + "use": "Definition(0.1); actual typed-kernel and persistence identification retained as conditional imported interfaces." + } + ], + "scientific_effect": "NONE" +} diff --git a/frontiers/c2_finite_jet_transfer_20261001/VALIDATION.md b/frontiers/c2_finite_jet_transfer_20261001/VALIDATION.md new file mode 100644 index 000000000..8884e5099 --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/VALIDATION.md @@ -0,0 +1,47 @@ +# Actual author-side execution, not an analytic review + +Performer OpenAI / GPT-6 Astra Pro. New candidate code and proof; scientific +effect NONE. The controls use standard-library integer/Fraction arithmetic only. + +The initial21 mathematical tests encountered21 explicit NotImplemented errors +on the unfinished interfaces. The first implementation passed20 and exposed a +wrong hand-entered test fixture at a singular transverse matrix: the independently +computed common coefficient is75/4, so the correct answer is-5625/16, not-4041/16. +Only the expected fixture was corrected, after checking the full Hessian. Three +further controls passed, giving24. The8 explicit-budget tests initially had6 +missing-interface errors and2 passing elementary checks. They passed after the +budget functions were implemented. Two independent planar regression/cone checks +were then added; the mathematical suite has34 methods. + +The6 real-Git/source-verifier tests initially produced9 assertion failures on +placeholder implementations. After implementation all6 passed. Final combined +suite:40 methods PASS in both ordinary and optimized Python, with identical +serialized controls output matching RESULTS.json. The exact continuous proof is +PROOF.md, not an inference from those40 methods. + +Controls cover64 polynomial endpoint-Hessian comparisons including singular +matrices, fixed-k versus cusp coefficient falsifiers, the linear fifth derivative, +order8 covariances and scores, anisotropic conditional means, birth marginalization, +independent d1/d2 reference recovery, scaling, exact Gaussian moment cubature, +coarse Lipschitz arithmetic, lattice counts, exponential tail inequalities and +outward transport of the three supplied reference intervals. The6 Git fixtures +check literal identities, inventory drift, duplicate JSON, symlinks, historical +versus worktree reads, real replacement refs and unsafe path/object rejections. + +The original #223 symbolic/interval pipeline and a Gaussian-field simulation were +NOT rerun. Its three reference c2 intervals are consumed as source data, not +newly certified here. Higher-dimensional field laws and the continuum constant +are not formally verified by this test suite. Tests in dimensions beyond3 check +algebra only; no explicit numerical bound in those dimensions is asserted. + +Local network retrieval failed DNS. Local-only verification deliberately reports +historical_sources_checked=false. The added workflow must fetch the two pinned +commits, authenticate all five source path/blob/size/SHA256 bindings, and compare +the copied reference intervals with historical RESULTS.json. No hosted success +is anticipated in this author-time file. Any actual hosted result is a later +PR receipt bound to its actual tested commit, not a modification of this record. + +The proof and budget require new nonauthor review, particularly every estimate +in Section6. An execution success does not establish their continuum validity or +promote the imported actual-persistence coefficient identification. No source +proof, numerical table, scientific flag, prize or existing formal scope changed. diff --git a/frontiers/c2_finite_jet_transfer_20261001/controls.py b/frontiers/c2_finite_jet_transfer_20261001/controls.py new file mode 100644 index 000000000..d6ee393a4 --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/controls.py @@ -0,0 +1,256 @@ +"""Exact finite controls for the birth-marginalized c2 representation. + +This is not a continuum proof checker or a finite-L numerical enclosure. Only +integers/Fractions are used. A polynomial is a list of coefficients in increasing +order; matrices in det/adj have polynomial entries. No external package is used. +""" +from fractions import Fraction as F +from itertools import permutations +from functools import lru_cache +import json + + +def exact(x): + if type(x) not in (int,F):raise TypeError('exact int or Fraction required') + return F(x) + + +def trim(p): + p=list(map(exact,p)) + while len(p)>1 and p[-1]==0:p.pop() + return p or [F(0)] + + +def coef(p,n):return p[n] if nperm[j] for i in range(n) for j in range(i+1,n)) + term=[F((-1)**parity)] + for i,j in enumerate(perm):term=mul(term,a[i][j]) + ans=add(ans,term) + return ans + + +def adj(a): + n=len(a) + return [[scale(det([[a[ii][jj] for jj in range(n) if jj!=i] + for ii in range(n) if ii!=j]),(-1)**(i+j)) + for j in range(n)] for i in range(n)] + + +def det_data(a,b,cc): + m=len(a) + for matrix in (a,b,cc): + if len(matrix)!=m or any(len(row)!=m for row in matrix):raise ValueError('matrix size mismatch') + ab=[[[exact(a[i][j]),exact(b[i][j])] for j in range(m)] for i in range(m)] + ac=[[[exact(a[i][j]),exact(cc[i][j])] for j in range(m)] for i in range(m)] + db=det(ab);dc=det(ac) + return coef(db,0),coef(db,1),coef(dc,1),2*coef(db,2),[[coef(v,1) for v in row] for row in adj(ab)] + + +def bilinear(x,a,y): + return sum((exact(x[i])*exact(a[i][j])*exact(y[j]) + for i in range(len(x)) for j in range(len(y))),F(0)) + + +def weight2(a,b,cc,g,h,f4,f5,k): + f4,f5,k=map(exact,(f4,f5,k)) + D,DB,DC,DBB,JB=det_data(a,b,cc) + J=[[coef(v,0) for v in row] for row in adj([[[exact(x)] for x in row] for row in a])] + y=f4*D/12-bilinear(g,J,g)/4 + common=y+3*k*DB + second=3*k*(DC+DBB)/4+f4*DB/24+f5*D/120-bilinear(g,J,h)/12-bilinear(g,JB,g)/8 + return 12*k*D*second-common*common + + +def endpoint_product(a,b,cc,g,h,f4,f5,k): + """Independent full-Hessian determinant of an exactly pinned polynomial.""" + m=len(a);ds=[] + f4,f5,k=map(exact,(f4,f5,k)) + for sign in (-1,1): + H=[[[F(0)] for _ in range(m+1)] for _ in range(m+1)] + H[0][0]=[F(0),sign*6*k,f4/12,sign*f5/120] + for i in range(m): + H[0][i+1]=H[i+1][0]=[F(0),sign*exact(g[i])/2,exact(h[i])/12] + for j in range(m): + H[i+1][j+1]=[exact(a[i][j]),sign*exact(b[i][j])/2,exact(cc[i][j])/8] + p=det(H) + if coef(p,0)!=0:raise ArithmeticError('pin division not exact') + ds.append(p[1:] or [F(0)]) + return scale(mul(ds[0],ds[1]),-1) + + +def inverse(a): + n=len(a) + if any(len(row)!=n for row in a):raise ValueError('square matrix required') + b=[[exact(x) for x in row]+[F(i==j) for j in range(n)] for i,row in enumerate(a)] + for j in range(n): + p=next((i for i in range(j,n) if b[i][j]),None) + if p is None:raise ValueError('singular matrix') + b[j],b[p]=b[p],b[j];v=b[j][j];b[j]=[x/v for x in b[j]] + for i in range(n): + if i!=j: + v=b[i][j];b[i]=[x-v*y for x,y in zip(b[i],b[j])] + return [row[n:] for row in b] + + +def jet_cov(a,b,q): + """Derivative covariance for exp(-x^T q x/2), rejecting unused order ten.""" + if len(a)!=len(q) or len(b)!=len(q):raise ValueError('dimension mismatch') + n=sum(a)+sum(b) + if n>8:raise ValueError('order above eight is not part of the coefficient') + if n%2:return F(0) + indices=tuple(i for i in range(len(a)) for _ in range(a[i]+b[i])) + @lru_cache(None) + def moment(ix): + if not ix:return F(1) + first=ix[0] + return sum((exact(q[first][ix[j]])*moment(ix[1:j]+ix[j+1:]) + for j in range(1,len(ix))),F(0)) + return (-1)**(sum(b)+n//2)*moment(indices) + + +def blocks(d,q): + def mi(*axes): + out=[0]*d + for axis in axes:out[axis]+=1 + return tuple(out) + odd=[mi(i) for i in range(d)]+[mi(0,0,0)] + odd2=[(mi(i,0,0),F(1,8)) for i in range(d)]+[(mi(0,0,0,0,0),F(1,40))] + even=[mi(0,i) for i in range(d)]+[mi(i,j) for i in range(1,d) for j in range(i,d)] + even2=[(mi(0,i,0,0),F(1,24)) for i in range(d)]+[(x,F(0)) for x in even[d:]] + seen=[] + def cov(a,b): + seen.append(sum(a)+sum(b));return jet_cov(a,b,q) + def pair(z,z2): + c0=[[cov(a,b) for b in z] for a in z] + c2=[] + for i,a in enumerate(z): + row=[] + for j,b in enumerate(z): + ai,wa=z2[i];bj,wb=z2[j] + row.append((wa*cov(ai,b) if wa else F(0))+(wb*cov(a,bj) if wb else F(0))) + c2.append(row) + return c0,c2 + so,so2=pair(odd,odd2);ce,ce2=pair(even,even2) + parity=all(cov(a,b)==0 for a in odd for b in even) + return {'odd0':so,'odd2':so2,'even0':ce,'even2':ce2, + 'parity_zero':parity,'maximum_order':max(seen)} + + +def d1(moments): + """Unnormalized polynomial and pin normalization in the one-dimensional case.""" + if len(moments)!=4:raise ValueError('moments m2,m4,m6,m8 required') + m2,m4,m6,m8=map(exact,moments) + detso=m2*m6-m4*m4 + if m2<=0 or m4<=0 or detso<=0 or m8-m6*m6/m4<0:raise ValueError('invalid covariance data') + so=[[m2,-m4],[-m4,m6]] + so2=[[-m4/4,3*m6/20],[3*m6/20,-m8/20]] + si=inverse(so) + score0=-sum((si[i][j]*so2[j][i] for i,j in product2(2)),F(0))/2+m6/(24*m4) + score2=72*sum((si[1][i]*so2[i][j]*si[j][1] for i,j in product2(2)),F(0)) + mean5=12*(m6*si[0][1]-m8*si[1][1]) + p=[-(m8-m6*m6/m4)/144,mean5/10+36*score0,36*score2] + return {'a':72*si[1][1],'p':p,'den2':detso*m4} + + +def product2(n):return ((i,j) for i in range(n) for j in range(n)) + + +def mellin_factor(a,p): + a=exact(a) + if a<=0 or len(p)!=3:raise ValueError('positive rate and three polynomial coefficients required') + p0,p2,p4=map(exact,p) + return -3*p0+p2/(2*a)+5*p4/(12*a*a) + + +def cubature():return [(F(-3),F(1,72)),(F(-1),F(3,8)),(F(0),F(2,9)),(F(1),F(3,8)),(F(3),F(1,72))] + + +REFERENCE_C2={ + '1':('0.2300445802661503','0.2300445802661998'), + '2':('0.2215244106266632','0.2215244106267110'), + '3':('0.1612340491269447','0.1612340491269810'), +} + + +def exp_partial(t,n): + t=exact(t) + if t<0 or type(n) is not int or n<0:raise ValueError('nonnegative argument and integer order required') + term=out=F(1) + for j in range(1,n+1): + term*=t/j;out+=term + return out + + +def image_polynomial(d,L): + L=exact(L) + if type(d) is not int or d not in (1,2,3) or L<10:raise ValueError('d=1,2,3 and L>=10 required') + return 2*(3**d-1)*(d**4*L**8+28*d**3*L**6+210*d*d*L**4+420*d*L**2+210) + + +def bound_budget(): + return { + 'weight_l1':F(151,6)**2+48*F(781,60), + 'moment8_integral':6*128*(1+105*318**4), + 'H_bound':2000*10*20000**4+36*4*4*10**6*5, + 'H_derivative_bound':2000*4000*20000**4+36*4*4*10**8*5, + 'p_bound':12*9*10**23*10**15, + 'p_derivative_bound':12*(10**3*10**23+9*10**26+9*100*10**23)*10**15, + 'final_bound':16*(12*10**44+11*10**4*10**41), + } + + +def decimal_exact(x,places): + x=exact(x);z=x*10**places + if z.denominator!=1:raise ValueError('requested exact decimal is not terminating at this precision') + v=z.numerator;return ('-' if v<0 else '')+str(abs(v)//10**places)+'.'+str(abs(v)%10**places).zfill(places) + + +def results(): + out=d1((1,3,15,105)) + enclosures={} + for d in ('1','2','3'): + lo,hi=map(F,REFERENCE_C2[d]);bound=F(10**50)*image_polynomial(int(d),F(24))/10**125 + if bound>=F(1,10**60):raise ArithmeticError('SIDE24 error bound failed') + enclosures[d]={'additive_error_upper_rational':str(bound), + 'reference_interval':list(REFERENCE_C2[d]), + 'torus_L_at_least_24_outward_interval':[ + decimal_exact(lo-F(1,10**16),16),decimal_exact(hi+F(1,10**16),16)]} + return {'scientific_effect':'NONE','status':'author-side proof candidate; nonauthor review required', + 'scope':'signed fixed-cone c2 functional; actual persistence identification is an imported premise', + 'reference_d1':{'a':str(out['a']),'polynomial':[str(x) for x in out['p']], + 'pin_determinant_product':str(out['den2']), + 'Mellin_factor':str(mellin_factor(out['a'],out['p'])), + 'c2_over_12pow1over6_Gamma5over6_pi_minus3over2':'3/4'}, + 'maximum_covariance_derivative_order':8, + 'Lipschitz_constant_upper':'1e50','jet_box_radius':'1e-4', + 'SIDE24_uniform_additive_error_upper':'1e-60', + 'budget':{k:str(v) for k,v in bound_budget().items()}, + 'torus_expression_enclosures':enclosures, + 'actual_elder_identification_proved_here':False, + 'finite_lifetime_remainder_bound_proved_here':False} + +if __name__=='__main__':print(json.dumps(results(),indent=2,sort_keys=True)) diff --git a/frontiers/c2_finite_jet_transfer_20261001/test_controls.py b/frontiers/c2_finite_jet_transfer_20261001/test_controls.py new file mode 100644 index 000000000..7e04344b4 --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/test_controls.py @@ -0,0 +1,233 @@ +"""Finite exact controls only; the continuum argument is in PROOF.md.""" +from fractions import Fraction as F +from itertools import product +import random +import unittest +import controls as c + +class PolynomialTests(unittest.TestCase): + def test_ring(self): + self.assertEqual(c.mul([1,2],[3,-1]),[F(3),F(5),F(-2)]) + self.assertEqual(c.add([1,2],[2,-2]),[F(3)]) + def test_empty_and_singular(self): + self.assertEqual(c.det([]),[F(1)]) + self.assertEqual(c.det([[[1],[2]],[[2],[4]]]),[F(0)]) + def test_adjugate_identity(self): + a=[[[1,1],[2]],[[3],[4,-1]]] + adj=c.adj(a);d=c.det(a) + for i,j in product(range(2),repeat=2): + got=c.add(*(c.mul(a[i][k],adj[k][j]) for k in range(2))) + self.assertEqual(got,d if i==j else [F(0)]) + def test_two_by_two_directional_derivatives(self): + a=[[1,2],[2,5]];b=[[3,1],[1,-2]];cc=[[0,1],[1,4]] + Delta,db,dc,dbb,jb=c.det_data(a,b,cc) + self.assertEqual((Delta,db,dc,dbb),(F(1),F(9),F(0),F(-14))) + self.assertEqual(jb,[[F(-2),F(-1)],[F(-1),F(3)]]) + def test_endpoint_identity_all_matrix_types(self): + rng=random.Random(20261001) + count=0 + for m in range(4): + for sample in range(16): + def mat(): + a=[[F(rng.randrange(-4,5),3) for _ in range(m)] for _ in range(m)] + return [[a[min(i,j)][max(i,j)] for j in range(m)] for i in range(m)] + a,b,cc=mat(),mat(),mat() + if sample%4==0:a=[[F(0) for _ in range(m)] for _ in range(m)] + g=[F(rng.randrange(-3,4),2) for _ in range(m)] + h=[F(rng.randrange(-3,4),2) for _ in range(m)] + k=F(sample+1,7);f4=F(sample-4,3);f5=F(7-sample,2) + direct=c.endpoint_product(a,b,cc,g,h,f4,f5,k) + pred=c.weight2(a,b,cc,g,h,f4,f5,k) + Delta=c.det_data(a,b,cc)[0] + self.assertEqual(c.coef(direct,0),36*k*k*Delta*Delta) + self.assertEqual(c.coef(direct,1),0) + self.assertEqual(c.coef(direct,2),pred) + self.assertTrue(all(c.coef(direct,j)==0 for j in range(1,len(direct),2))) + count+=1 + self.assertEqual(count,64) + def test_common_first_coefficient_is_not_cusp_Y_at_fixed_k(self): + # The fixed-k expansion retains 3k Ddet(A)[B]. + a=[[2]];b=[[1]];cc=[[0]];g=[0];h=[0] + w=c.weight2(a,b,cc,g,h,0,0,F(1)) + self.assertEqual(w,-9) + self.assertNotEqual(w,0) + def test_fifth_derivative_is_load_bearing(self): + self.assertEqual(c.weight2([],[],[],[],[],0,120,1),12) + self.assertNotEqual(c.weight2([],[],[],[],[],0,120,1),0) + def test_inverse_free_at_singular_A(self): + # Here Delta=0 and common=-9/4+21=75/4, hence -common^2. + self.assertEqual(c.weight2([[0]],[[1]],[[2]],[3],[4],5,6,7),-F(5625,16)) + +class CovarianceTests(unittest.TestCase): + def test_reference_covariances(self): + q=[[F(1)]] + self.assertEqual(c.jet_cov((1,),(3,),q),-3) + self.assertEqual(c.jet_cov((2,),(4,),q),-15) + self.assertEqual(c.jet_cov((4,),(4,),q),105) + self.assertEqual(c.jet_cov((3,),(4,),q),0) + def test_odd_even_blocks(self): + for d in (1,2,3): + q=[[F(2) if i==j else F(1,3) for j in range(d)] for i in range(d)] + out=c.blocks(d,q) + self.assertTrue(out['parity_zero']) + self.assertLessEqual(out['maximum_order'],8) + self.assertGreater(c.det([[ [x] for x in row] for row in out['odd0']])[0],0) + self.assertGreater(c.det([[ [x] for x in row] for row in out['even0']])[0],0) + def test_order_ten_not_requested(self): + with self.assertRaises(ValueError):c.jet_cov((5,),(5,),[[1]]) + self.assertEqual(c.jet_cov((5,),(3,),[[1]]),-105) + def test_d1_pin_covariance_coefficients(self): + out=c.blocks(1,[[1]]) + self.assertEqual(out['odd0'],[[F(1),F(-3)],[F(-3),F(15)]]) + self.assertEqual(out['odd2'],[[-F(3,4),F(9,4)],[F(9,4),-F(21,4)]]) + self.assertEqual(out['even0'],[[F(3)]]) + self.assertEqual(out['even2'],[[-F(5,4)]]) + def test_positive_definite_basis_dimension(self): + for d in (1,2,3,4): + out=c.blocks(d,[[int(i==j) for j in range(d)] for i in range(d)]) + self.assertEqual(len(out['odd0'])+len(out['even0']),(d+1)*(d+2)//2) + def test_anisotropic_odd_jet_means_depend_on_gap(self): + q=[[F(1),F(1,3)],[F(1,3),F(2)]] + out=c.blocks(2,q);inv=c.inverse(out['odd0']);pins=[(1,0),(0,1),(3,0)] + def mean(jet): + return 12*sum(c.jet_cov(jet,pins[j],q)*inv[j][-1] for j in range(3)) + self.assertEqual(mean((2,1)),4) + self.assertEqual(mean((1,2)),F(4,3)) + def test_birth_marginal_is_not_birth_zero(self): + var=F(105)-F(15)**2/3 + inv=c.inverse([[1,-1],[-1,3]]) + cross=[F(3),F(-15)] + fixed=105-sum(cross[i]*inv[i][j]*cross[j] for i,j in product(range(2),repeat=2)) + self.assertEqual(var,30);self.assertEqual(fixed,24) + def test_matrix_inverse(self): + a=[[F(3),F(-2)],[F(-2),F(5)]];inv=c.inverse(a) + for i,j in product(range(2),repeat=2): + self.assertEqual(sum(a[i][k]*inv[k][j] for k in range(2)),int(i==j)) + with self.assertRaises(ValueError):c.inverse([[0]]) + +class MellinAndRegressionTests(unittest.TestCase): + def test_reference_d1(self): + out=c.d1((1,3,15,105)) + self.assertEqual(out['a'],12) + self.assertEqual(out['p'],[-F(5,24),F(9,2),F(108)]) + self.assertEqual(out['den2'],18) + self.assertEqual(c.mellin_factor(out['a'],out['p']),F(9,8)) + # Sphere factor 2/3, and density normalization is pi^-3/2. + self.assertEqual(F(2,3)*c.mellin_factor(out['a'],out['p']),F(3,4)) + def test_d2_independent_reference_regression(self): + q=[[1,0],[0,1]];out=c.blocks(2,q) + odd=[(1,0),(0,1),(3,0)];ev=[(2,0),(1,1),(0,2)] + oi=c.inverse(out['odd0']);ei=c.inverse(out['even0']) + def reg(jet,pins,inv,target): + return sum(c.jet_cov(jet,pins[i],q)*inv[i][j]*target[j] + for i,j in product(range(len(pins)),repeat=2)) + def var(jet,pins,inv): + x=[c.jet_cov(jet,p,q) for p in pins] + return c.jet_cov(jet,jet,q)-sum(x[i]*inv[i][j]*x[j] + for i,j in product(range(len(pins)),repeat=2)) + self.assertEqual(reg((4,0),ev,ei,[0,0,1]),F(3,4)) + self.assertEqual(reg((2,2),ev,ei,[0,0,1]),-F(3,4)) + self.assertEqual(var((4,0),ev,ei),F(57,2)) + self.assertEqual(var((2,1),odd,oi),2) + self.assertEqual(var((1,2),odd,oi),2) + self.assertEqual(reg((1,2),odd,oi,[0,0,12]),0) + self.assertEqual(reg((5,0),odd,oi,[0,0,12]),-120) + tr=lambda a,b:sum(a[i][j]*b[j][i] for i,j in product(range(len(a)),repeat=2)) + self.assertEqual(-tr(oi,out['odd2'])/2-tr(ei,out['even2'])/2,F(23,32)) + z=[ei[i][-1] for i in range(3)] + self.assertEqual(sum(z[i]*out['even2'][i][j]*z[j] for i,j in product(range(3),repeat=2))/2,-F(1,256)) + def test_d2_independent_cone_integral(self): + # A|H*u=0 is N(0,8/3). These are its negative-half moments. + moments={0:F(1,2),2:F(4,3),4:F(32,3)} + H0={4:-F(1,256),2:-F(13,96),0:-F(3,4)} + H2={4:-F(9,64),2:F(57,8),0:F(-18)} + H4={2:F(108)} + p=[sum(v*moments[j] for j,v in poly.items()) for poly in (H0,H2,H4)] + self.assertEqual(p,[-F(43,72),-F(1),F(144)]) + # 12*p_O*p_(H*u) = (1/2)*pi^(-5/2), sphere=2*pi. + self.assertEqual(c.mellin_factor(12,p)/3,F(13,18)) + def test_d1_spatial_scaling(self): + base=c.d1((1,3,15,105));bf=c.mellin_factor(base['a'],base['p']) + for lam in (F(1,4),F(4),F(9)): + out=c.d1(tuple(v*lam**j for j,v in enumerate((1,3,15,105),1))) + f=c.mellin_factor(out['a'],out['p']) + sixth=(base['den2']/out['den2'])**3*(out['a']/base['a'])*(f/bf)**6 + self.assertEqual(sixth,lam**3) + def test_amplitude_scaling(self): + base=c.d1((1,3,15,105));bf=c.mellin_factor(base['a'],base['p']) + for amp in (F(1,8),F(8),F(27)): + out=c.d1(tuple(v*amp**2 for v in (1,3,15,105))) + f=c.mellin_factor(out['a'],out['p']) + sixth=(base['den2']/out['den2'])**3*(out['a']/base['a'])*(f/bf)**6 + self.assertEqual(sixth,amp**(-8)) + def test_eighth_moment_is_required(self): + a=c.d1((1,3,15,105));b=c.d1((1,3,15,106)) + self.assertNotEqual(a['p'],b['p']) + self.assertNotEqual(c.mellin_factor(a['a'],a['p']),c.mellin_factor(b['a'],b['p'])) + def test_wrong_subtraction_changes_coefficient(self): + self.assertEqual(c.mellin_factor(F(12),[1,0,0]),-3) + self.assertNotEqual(c.mellin_factor(F(12),[-F(5,24),F(9,2),108]),F(1,2)*F(9,2)/12+F(5,12)*108/144) + def test_cubature_moments(self): + for j,expected in enumerate((1,0,1,0,3)): + self.assertEqual(sum(w*x**j for x,w in c.cubature()),expected) + def test_anisotropic_conditional_parity_and_degree(self): + # Synthetic Gaussian affine conditional law: one odd and one even + # Gaussian coordinate. Exact cubature matches every needed moment. + def expectation(k): + total=F(0) + for (z,wz),(v,wv) in product(c.cubature(),repeat=2): + a=[[-2,1],[1,-3]] + b=[[k+z,2*k-z],[2*k-z,-k+2*z]] + cc=[[1+v,2-v],[2-v,3+2*v]] + g=[2*k+z,-k+3*z];h=[v+1,2-v] + total+=wz*wv*c.weight2(a,b,cc,g,h,3+2*v,5*k+z,k) + return total + y0,y1,y2=map(expectation,(F(0),F(1),F(2))) + p4=(y2-4*y1+3*y0)/12;p2=y1-y0-p4 + self.assertNotEqual(p4,0) + for k in (F(-3),F(-1,2),F(3),F(5)): + self.assertEqual(expectation(k),y0+p2*k*k+p4*k**4) + def test_input_rejections(self): + with self.assertRaises(TypeError):c.exact(0.5) + with self.assertRaises(TypeError):c.exact(True) + with self.assertRaises(ValueError):c.mellin_factor(0,[1,2,3]) + with self.assertRaises(ValueError):c.d1((1,1,1,1)) + +class ExplicitBoundTests(unittest.TestCase): + def test_coefficient_majorant_budget(self): + out=c.bound_budget() + self.assertLess(out['weight_l1'],2000) + self.assertLess(out['moment8_integral'],10**15) + self.assertLess(out['H_bound'],10**22) + self.assertLess(out['H_derivative_bound'],10**25) + self.assertLess(out['p_bound'],10**41) + self.assertLess(out['p_derivative_bound'],10**44) + self.assertLess(out['final_bound'],10**50) + def test_uniform_conditioning_floor(self): + self.assertGreater(F(3,8)-10*F(1,10**4),F(1,3)) + self.assertLess(F(105)+F(1,10**4),106) + def test_exponential_certificates(self): + self.assertGreater(c.exp_partial(F(50),120),F(10**22,2)) + self.assertGreater(c.exp_partial(F(288),400),10**125) + def test_lattice_geometric_ratio(self): + self.assertLess(F(2**10,1+150+150**2//2),F(1,2)) + for d in (1,2,3): + for j in range(1,20): + self.assertLessEqual((2*j+1)**d-(2*j-1)**d,(3**d-1)*j**(d-1)) + def test_L10_is_inside_covariance_box(self): + self.assertLess(2*c.image_polynomial(3,F(10))/10**22,F(1,10**4)) + def test_SIDE24_budgets(self): + expected=(461984450376,28868660309280,471182508197544) + for d,val in enumerate(expected,1): + self.assertEqual(c.image_polynomial(d,F(24)),val) + self.assertLess(F(10**50)*val/10**125,F(1,10**60)) + def test_reference_intervals_transport_outward(self): + for lo,hi in c.REFERENCE_C2.values(): + lo,hi=F(lo),F(hi) + self.assertLess(lo-F(1,10**16),lo-F(1,10**60)) + self.assertGreater(hi+F(1,10**16),hi+F(1,10**60)) + def test_no_unrestricted_dimension_numerical_claim(self): + with self.assertRaises(ValueError):c.image_polynomial(4,F(24)) + with self.assertRaises(ValueError):c.image_polynomial(3,F(9)) + +if __name__=='__main__':unittest.main() diff --git a/frontiers/c2_finite_jet_transfer_20261001/test_verify.py b/frontiers/c2_finite_jet_transfer_20261001/test_verify.py new file mode 100644 index 000000000..077acff8e --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/test_verify.py @@ -0,0 +1,48 @@ +"""Small real-Git custody fixtures, separate from all mathematical claims.""" +import hashlib,json,os,subprocess,tempfile,unittest +from pathlib import Path +import verify + +class VerifyTests(unittest.TestCase): + def setUp(self): + t=tempfile.TemporaryDirectory();self.addCleanup(t.cleanup);self.root=Path(t.name) + self.data=b'fixture only\n';(self.root/'x.md').write_bytes(self.data) + self.entry={'path':'x.md','bytes':len(self.data),'sha256':hashlib.sha256(self.data).hexdigest(), + 'git_blob':hashlib.sha1(b'blob '+str(len(self.data)).encode()+b'\0'+self.data).hexdigest()} + def git(self,*args): + env=dict(os.environ);env.pop('GIT_NO_REPLACE_OBJECTS',None) + return subprocess.run(['git','-c','user.name=Fixture','-c','user.email=f@example.invalid',*args], + cwd=self.root,env=env,check=True,capture_output=True,timeout=15).stdout + def source(self): + self.git('init','-q');self.git('add','x.md');self.git('commit','-qm','fixture') + return dict(self.entry,commit=self.git('rev-parse','HEAD').decode().strip()) + def test_valid_identity(self): + self.assertEqual(verify.identity(self.data,self.entry),True) + def test_wrong_identity_rejects(self): + for key,bad in [('bytes',0),('bytes',True),('sha256','0'*64),('git_blob','0'*40)]: + with self.subTest(key=key),self.assertRaises(ValueError): + verify.identity(self.data,dict(self.entry,**{key:bad})) + def test_inventory_drift(self): + (self.root/'MANIFEST.json').write_text(json.dumps({'files':[self.entry]})) + self.assertEqual(verify.inventory(self.root),1) + (self.root/'extra').write_text('unlisted') + with self.assertRaises(ValueError):verify.inventory(self.root) + def test_json_and_symlink(self): + p=self.root/'j.json';p.write_text('{"a":1,"a":2}') + with self.assertRaises(ValueError):verify.load(p) + p.unlink();p.symlink_to('x.md') + with self.assertRaises(ValueError):verify.load(p) + def test_real_historical_read(self): + entry=self.source();(self.root/'x.md').write_text('changed worktree') + self.assertEqual(verify.historical(self.root,entry),self.data) + def test_replacement_and_invalid_paths(self): + entry=self.source();(self.root/'x.md').write_text('forged') + self.git('add','x.md');self.git('commit','-qm','replacement') + new=self.git('rev-parse','HEAD').decode().strip();self.git('replace',entry['commit'],new) + self.assertEqual(self.git('show',entry['commit']+':x.md'),b'forged') + self.assertEqual(verify.historical(self.root,entry),self.data) + for path in ('../x.md','/x.md','a//x.md'): + with self.subTest(path=path),self.assertRaises(ValueError):verify.historical(self.root,dict(entry,path=path)) + with self.assertRaises(ValueError):verify.historical(self.root,dict(entry,commit=self.entry['git_blob'])) + +if __name__=='__main__':unittest.main() diff --git a/frontiers/c2_finite_jet_transfer_20261001/verify.py b/frontiers/c2_finite_jet_transfer_20261001/verify.py new file mode 100644 index 000000000..77028091b --- /dev/null +++ b/frontiers/c2_finite_jet_transfer_20261001/verify.py @@ -0,0 +1,94 @@ +"""Check exact packet/source bytes and arithmetic outputs, never theorem acceptance.""" +import argparse,hashlib,json,os,re,subprocess +from pathlib import Path,PurePosixPath + + +def unique(items): + d={} + for k,v in items: + if k in d:raise ValueError('duplicate JSON key') + d[k]=v + return d + + +def load(p): + if p.is_symlink() or not p.is_file():raise ValueError('regular JSON required') + x=json.loads(p.read_text(encoding='utf-8'),object_pairs_hook=unique) + if not isinstance(x,dict):raise ValueError('JSON object required') + return x + + +def safe(path): + if not isinstance(path,str) or not path:raise ValueError('path required') + p=PurePosixPath(path) + if p.is_absolute() or str(p)!=path or any(x in ('.','..') or not re.fullmatch('[A-Za-z0-9_.-]+',x) for x in p.parts): + raise ValueError('unsafe path') + return p.parts + + +def identity(data,e): + if type(e['bytes']) is not int or len(data)!=e['bytes']:raise ValueError('byte count mismatch') + if hashlib.sha256(data).hexdigest()!=e['sha256']:raise ValueError('SHA256 mismatch') + if hashlib.sha1(b'blob '+str(len(data)).encode()+b'\0'+data).hexdigest()!=e['git_blob']: + raise ValueError('Git blob mismatch') + return True + + +def inventory(root): + if any(p.is_symlink() for p in (root,*root.parents)):raise ValueError('symlink packet root') + es=load(root/'MANIFEST.json')['files'];names=[e['path'] for e in es] + if not names or len(names)!=len(set(names)) or 'MANIFEST.json' in names:raise ValueError('invalid inventory') + if sorted(p.name for p in root.iterdir())!=sorted(names+['MANIFEST.json']):raise ValueError('membership drift') + for e in es: + if len(safe(e['path']))!=1:raise ValueError('flat packet required') + p=root/e['path'] + if p.is_symlink() or not p.is_file():raise ValueError('regular payload required') + identity(p.read_bytes(),e) + return len(es) + + +def git(root,*args): + out=subprocess.run(['git','--no-replace-objects',*args],cwd=root, + env=dict(os.environ,GIT_NO_REPLACE_OBJECTS='1'),capture_output=True,timeout=30) + if out.returncode:raise ValueError('historical Git object unavailable') + return out.stdout + + +def historical(root,e): + commit=e['commit'] + if not isinstance(commit,str) or not re.fullmatch('[0-9a-f]{40}',commit):raise ValueError('full commit required') + ps=safe(e['path']) + if git(root,'cat-file','-t',commit).strip()!=b'commit':raise ValueError('not a commit') + for n in range(1,len(ps)+1): + prefix='/'.join(ps[:n]) + rows=[r for r in git(root,'ls-tree','--full-tree','-z',commit,'--',prefix).split(b'\0') if r] + if len(rows)!=1:raise ValueError('missing or ambiguous source') + meta,name=rows[0].split(b'\t',1);mode,kind,blob=meta.decode().split() + if name.decode()!=prefix:raise ValueError('path mismatch') + if n