vibe-qcDocumentation

Explicit Ewald cutoff bounds

The shared kernel in Paper 1 Eq. GNewald and the image-remainder discussion of Paper 2 is the infinite, zero-mean three-dimensional Ewald kernel. A finite native cutoff is a numerical approximation. The bounds below connect them at an off-source probe. The Lean statements are in VibeQCAICCM/Cutoff.lean; supplement equations (L16) and (C25) summarize the result. Atomic units are used: lengths in bohr, reciprocal lengths and the unit-charge potential in inverse bohr.

One-dimensional tail and the three-dimensional complement

For c > 0 and integer N >= 0 define

T(c,N) = exp(-c(N+1)^2) / [1-exp(-c(2(N+1)+1))]
H(c)   = 1+2T(c,0)
Q(c,N) = 6T(c,N) H(c)^2.

For j >= 0, (N+1+j)^2 >= (N+1)^2+j(2(N+1)+1). The existing coulomb_gaussian_tail theorem therefore bounds the positive tail by T. The map (sign,j) to plus or minus (N+1+j) is a bijection onto the omitted integers. cutoff_gaussian_tail_1d bounds their sum by 2T and proves summability. Splitting off zero gives cutoff_gaussian_mass_1d and H. For a complex coefficient with |f(n)| <= C exp(-c|n|²), C >= 0, on the complement of the integer cube [-N,N]³, each omitted index belongs to at least one coordinate tail. Summing those three nonnegative product majorants gives cutoff_cube_tail: an absolutely convergent omitted series with norm at most C Q. Multiple counting at edges and corners only enlarges the bound. No cancellation, reality or nearest-image assumption is used.

Physical coefficient bounds

Let A be a nonsingular direct-cell matrix with columns in physical Cartesian coordinates, V = |det A| > 0 and B = 2π A⁻ᵀ. Set sigma_A = 1/||A⁻¹||_F and sigma_B = 1/||B⁻¹||_F. For inverse rows u_i and y = A n, n_i = u_i dot y. Cauchy–Schwarz and summation give |n|² <= ||A⁻¹||_F² |y|² (cutoff_inverse_rows). This proves |A n| >= sigma_A |n| and likewise for B; sigma is a safe lower bound, not the smallest singular value. cutoff_outside_square gives |n|² >= (N+1)² outside the cube. cutoff_displaced_square gives |A n+x|² >= sigma_A²|n|²/2-|x|².

For eta > 0 and fixed off-source x, choose a direct cube with delta = sigma_A(N+1)-|x| > 0. Every omitted image then has distance r >= delta. Integrating exp(-t²) <= exp(-zt) on t > z > 0 proves erfc(z) <= 2 exp(-z²)/(sqrt(pi) z) (cutoff_erfc_exp). cutoff_direct_coefficient separates the positive distance gap from the squared-distance lower bound, giving the Gaussian majorant with

c_direct = eta² sigma_A² / 2
C_direct = 2 exp(eta²|x|²) / [sqrt(pi) eta delta²].

The reciprocal coefficient has modulus (4π/V) exp(-|k|²/(4eta²))/|k|². Its plane wave has unit modulus. Zero is excluded; cutoff_recip_coefficient uses both the squared-distance lower bound and the positive denominator gap, giving

c_recip = sigma_B² / (4eta²)
C_recip = 4π / [V sigma_B² (N+1)²].

Multiply each C by Q for the corresponding omitted-box bound. The lattice geometry, positive eta and V, off-source probes and positive delta are necessary inputs. Singular cells and source contact are excluded. These scalar inequalities do not by themselves identify an arbitrary numerical coefficient with an Ewald coefficient; the existing Ewald definitions supply that identification. Derivatives change the coefficient majorants.

From a native sphere to a certified box

For any absolutely summable f and finite selected set S contained in a larger finite set L, cutoff_infinite_bridge proves

|sum_all f - sum_S f| <= sum_(L minus S) |f| + bound_outside_L.

cutoff_finite_bridge is the finite-sum identity and triangle inequality used in that proof. For a spherical direct selection, inverse rows show |n_i| <= (R+|x|)/sigma_A. For a reciprocal sphere, |n_i| <= K/sigma_B. These sufficient containment tests are checked before applying the bridge. They do not assert that fractional component rounding solves a general nearest-image problem. A set must contain exactly the intended unique labels; weights, duplicates and an incomplete search require separate treatment.

The exact predicate is squared distance <= squared cutoff. The checker rejects any interval comparison that cannot decide inclusion; it does not silently resolve ties with a tolerance. Exact equality, tolerance conventions and completeness are distinct. The native direct-cutoff tie fixture uses exactly representable unit distance, cutoff 1 and neighboring cutoffs 1 +/- 2^-20.

Implementation and reproducibility

formal/capture_aiccm_cutoff.py calls the production three-dimensional ewald_point_charge_potential with and without short range in cpp/src/ewald.cpp. The direct path selects displaced distances and the reciprocal path selects angular reciprocal lengths. The native additive constant is -π/(eta²V); it must be retained when comparing to the zero-mean kernel. This is unchanged between finite and infinite sums and is not a tail term.

formal/check_aiccm_cutoff.py independently forms inverse rows and the angular dual, enumerates integer boxes, evaluates erfc and cosine in 112-bit ball arithmetic (optional python-flint 0.8.0), and applies the estimates above. Every captured binary64 operand is interpreted as an exact dyadic. It checks native direct and reciprocal sums separately, two nonsymmetric probes, a skew primitive cell and its doubled supercell, eta = 0.39 and 0.67, and three cutoff pairs (4,1), (7,2), (12,4). Direct and reciprocal reference boxes have N = 8 and 22. A larger native (27,13) calculation is a numerical cross-check, not the infinite reference. The two splitting enclosures overlap. Omitting the background, reversing a nonempty reciprocal sum and using the wrong reciprocal volume are rejected. The direct cutoff tie is checked separately. The native short-range evaluator skips distances below 1e-14 bohr; these fixtures stay far outside that guard. The mathematical off-source statement does not justify that finite near-contact exclusion.

Replay with:

python3 formal/check_aiccm_cutoff.py cutoff-input.json replay.json

The supplementary input and result retain native and script digests. The qualified native version is 0.18.11, source 5c89075026d59eb6b8235554594d9ae4f1831f2a, artifact 45fcbab08e7f24d5f4ddbdfceb7da8cbc7dd00d9d7e3f66660983e4bbe828c49. The maximum finite-sum residual was 3.62e-16 inverse bohr, rounded up, against tolerance 5e-11. The reference omitted-box bound was at most 1.64e-23 inverse bohr, rounded up.

These results prove real/complex mathematical estimates and test the native point-potential implementation. The ball evaluator, Python enumeration, transcendental library and compiled native arithmetic are outside Lean. Native roundoff is tested against the stated tolerance, not formally bounded. The point-potential result is not an unconditional AO integral, optimized RHF or MP2 error estimate. Finite quadrature contractions may use the existing weighted triangle bounds, but continuous orbital tails, differentiated cutoffs, quadrature error and production roundoff remain obligations. No new electronic-structure energy or comparison with ORCA/CRYSTAL is reported.