Finite-degree errors at every fixed nonvertex codimension ========================================================== Keep the uniform-simplex design, evaluation and noise assumptions of :doc:`skeleton_risk_theory`. This chapter supplies an explicit finite-degree error for **every fixed pair of integers** :math:`s,q\geq2`, where :math:`M=s+q`. It does not require a new proof for each next codimension. The q5 coefficient using c6 is one instance of the theorem. These are coefficients of sample-size-asymptotic risk, not finite-sample risks. Write :math:`L(x)=1+\log x` for :math:`x\geq1`, and retain the positive diagonal :math:`d_j=\delta_q(j)` of :doc:`skeleton_risk_codimension_three_exact`. Its total mass is .. math:: S_q=\sum_{j\geq0}d_j=\frac{c_{q+1}}{q+1}\geq d_0=1,\qquad A_{s,q}=\binom{s+q}s^2\frac{(s)_q}{2^q(s-2)!}S_q>0. The leading order :math:`a_{s-1}(s+q,D)\sim A_{s,q}D^{s-q-2}` is already proved. The result below quantifies its finite-D error. Computable diagonal constants -------------------------------- Let :math:`J_q,K_q` be the explicit constants of :eq:`risk-general-error-constants`, and let :math:`\widetilde K_q` be the explicit rational constant of :eq:`risk-refined-vertex-error-constants`. Define .. math:: :label: risk-nonvertex-general-majorants Q_q&=\begin{cases} 4,&q=2,\\ J_3+4K_3,&q=3,\\ J_q+\widetilde K_q,&q\geq4, \end{cases}\\ \lambda_q(x)&=\begin{cases}L(x),&q=2,\\1,&q\geq3,\end{cases} &\tau_q(x)&=\begin{cases}L(x)+1,&q=2,\\1,&q\geq3.\end{cases} All are explicitly computable from q, using finite rational arithmetic. The resulting constants are deliberately conservative. In particular, the separate sharper q3 and q4 error theorems remain useful. .. prf:theorem:: Explicit general nonvertex finite-degree error :label: thm-risk-nonvertex-general-finite-error For all integers :math:`s,q\geq2` and :math:`D\geq\max(4,2(s-1))`, put :math:`P_{s,q}=q(2s+q-1)/4` and :math:`B_s=(s-1)(s-2)`. Then .. math:: :label: risk-nonvertex-general-finite-error \left|\frac{a_{s-1}(s+q,D)}{A_{s,q}D^{s-q-2}}-1\right| \leq F_{s,q}(D) :=\frac{29Q_q\lambda_q(D)}{2\sqrt D} +\frac{P_{s,q}+Q_q\left(2\tau_q(D) +\lambda_q(D)((s-2)L(D)+B_s)\right)}D. Every term on the right decreases on this domain. Thus this proves :math:`O(D^{-1/2})` at every fixed :math:`s,q\geq3`, also at :math:`s=2,q\geq3`, and :math:`O(\log D/\sqrt D)` for fixed :math:`s\geq2,q=2`. It is not a bound uniform in growing s or q. For every integer :math:`k\geq2` with :math:`2^k\geq2(s-1)`, an exact rational all-tail bound is .. math:: :label: risk-nonvertex-general-dyadic-error \sup_{D\geq2^k} \left|\frac{a_{s-1}(s+q,D)}{A_{s,q}D^{s-q-2}}-1\right| \leq \frac{29Q_q\ell_{q,k}}{2\rho_k} +\frac{P_{s,q}+Q_q(2t_{q,k} +\ell_{q,k}((s-2)(k+1)+B_s))}{2^k}, where :math:`\rho_k=2^{k/2}` for even k and :math:`\rho_k=(4/3)2^{\lfloor k/2\rfloor}` for odd k, :math:`\ell_{2,k}=k+1,t_{2,k}=k+2`, and :math:`\ell_{q,k}=t_{q,k}=1` for :math:`q\geq3`. This bound tends to zero, so exact search terminates for every fixed pair s,q and every positive rational target. An evaluator may reject requests exceeding its disclosed selected-work limit. .. prf:proof:: **Global diagonal majorants, including q2.** At q2 the elementary symmetric formula gives, with :math:`N=j+1`, .. math:: d_j=\frac{2H_j}{N(N+1)}+\frac2{N^2(N+1)} \leq\frac{4L(N)}{N^2}. At q3, :eq:`risk-general-diagonal-explicit-error` and :math:`c_3\leq J_3` apply. The elementary inequality :math:`L(x)^2/x\leq4` follows by setting :math:`u=\log x` and maximizing :math:`(1+u)^2e^{-u}` on :math:`u\geq0`. At :math:`q\geq4`, use :eq:`risk-refined-diagonal-explicit-error`, :math:`c_q\leq J_q`, and :math:`L(x)\leq x`. Hence, for every q in the claimed domain and every j, .. math:: 0=s, every factor lies in [0,1], and the finite-product inequality gives .. math:: \sum_{L=0}^n(1-w_L)d_L \leq\frac{Q_q\lambda_q(D)}D ((s-2)H_{n+1}+B_s). The inverse-square tail is at most :math:`Q_q/(n+1)` for q>=3. At q2, :math:`L(x)/x^2` decreases for x>=1, so comparison with its integral from n+1 to infinity gives :math:`Q_q(2+\log(n+1))/(n+1)`. Both are at most :math:`Q_q\tau_q(D)/(D-s+1)`. Consequently an unsimplified error, valid at every active degree, is .. math:: |U_D-S_q|\leq E_{s,q}(D) :=Q_q\left[\lambda_q(D)\left(\frac{9H}{2D}+\frac{10}{H+1} +\frac{(s-2)H_{D-s+1}+B_s}D\right) +\frac{\tau_q(D)}{D-s+1}\right]. **Exact normalization.** The positive-diagonal coefficient identity, with no asymptotic substitution, is .. math:: \frac{a_{s-1}(s+q,D)}{A_{s,q}D^{s-q-2}} =P_D\frac{U_D}{S_q},\qquad P_D=\prod_{i=0}^{q-1}(1+(s+i)/(2D))^{-1}. Here :math:`0=2(s-1), use :math:`1/(D-s+1)\leq2/D` and :math:`H_{D-s+1}\leq L(D)` to obtain the theorem. The functions :math:`D^{-1/2}`, :math:`L(D)/D`, and D^-1 decrease for D>=1. At q2 the additional functions :math:`L(D)/\sqrt D` and :math:`L(D)^2/D` decrease for D>=4. Hence evaluation at 2^k bounds every later degree. Finally :math:`\log2<1` and :math:`\sqrt2>4/3` prove the rational bound. Its right side decreases with k>=2, including both transitions between even and odd exponents: the q2 root factors are :math:`(2m+1)/2^m` and :math:`3(2m+2)/(4\,2^m)`, and all polynomial-over-dyadic terms decrease on that domain. Certificates, costs and scope ------------------------------- ``tools.risk_research.nonvertex_general_error`` specializes the theorem with exact fractions, ``isqrt`` and integer bit-length logarithm bounds. It takes the smaller of the unsimplified point bound and the applicable all-tail bound. It constructs no array proportional to D. Inactive degrees D