Reusing formal Vlasov-Maxwell proofs to certify plasma solver outputs
Organizations: State Key Laboratory of Electrical Insulation and Power Equipment, Xi’an Jiaotong University, Xi’an, 710049, China.
Abstract
AI now produces machine-checked mathematics faster than researchers can read it. Can such theorems do practical computational work? We reuse one from \mbox{OpenAI's} Lean~4 relativistic Vlasov--Maxwell library: initial fields determine the field at an outside point until plasma signals reach it, and the energy leaving a surrounding box before they reach its faces. New Lean proofs and numerical bounds give particle-free references for particle-in-cell simulations across three tasks. Domain size follows analytically from observation time, exposing boundary and initialization errors in WarpX and Smilei that global energy checks missed. Grid choice can be tested directly: combining two coarse grids recovers unknown plasma inputs within tolerance at a median 14.9-fold speedup over a fine grid, where the medium grid alone fails. For reduced models, the bounds establish the minimum number of time curves needed to predict energy loss.
Figures & tables
| Observable and family | Uniform allowance | Exact minimum | Lower and upper evidence |
|---|---|---|---|
| Charged benchmark | J | modes | J 3-window bound; exact 3-term flux |
| Charged benchmark | – J | modes | J 4-reading bound; J exact; J table |
| Charged benchmark | J | mode | J nonzero transfer; J 1-term table |
| -mode packet flux ( ) | Perturbed identity bound; -slot planar packet design | ||
| -mode charged-plasma history | Perturbed identity bound; spherical-charge packet design | ||
| neutral-pair kinetic energy | queries | Adaptive linear-kernel witness; -coordinate readout |
| Layer and status | Verification mechanism and scope |
|---|---|
| Analytic continuum premise | Assumes a classical relativistic Vlasov–Maxwell solution with fields on , initial Maxwell constraints and initial particle support within mm so that . Geometric separation of support components from box faces and probes is checked in exact rational squared distances. |
| Formal Lean 4 proof | Under the analytic premise, kernel-checked theorems across the 39 original downstream modules, 8 benchmark modules and 3 generalized-optimality modules establish exterior field equality, six-face Poynting balance, exact-lattice Yee zero- invariance, signed opposite-probe symmetry, rational time-bin summation, and matching mode-rank and query bounds. |
| Outward interval and rational bounds | Six-face primitive flux bins on the dyadic integer scale /J, initial box energies, exterior probe bands, and dual-norm hyperplane and Bernstein bounds are evaluated with analytic remainder bounds and outward-rounded or exact rational arithmetic, independent of any target particle-in-cell (PIC) trajectory. |
| Double-precision solver readout | Released Smilei v5.1 and the archived WarpX research build advance particles and fields in IEEE-754 binary64 double-precision arithmetic. Trilinear probe interpolation, staggered inner-cube quadrature and discrete Fourier pulse projection test continuum discretization accuracy against the stated tolerances, audited by vacuum, cancellation, round-trip and cross-host rebuild controls. |
| Component or cohort | Specification and role |
|---|---|
| Geometry and window | Observation cube mm with mm; opposite probes mm at mm; main horizon mm, or ps, sampled at 49 integer steps; nested energy check at mm, or ps. |
| Source, bumps and | Spatial bump half-widths mm inside mm; toroidal pulse width mm; cold and hot momentum bumps centred at and with half-widths and , 16,384 Sobol markers per population; fixed ; , mT, . |
| WarpX audit: C01–C08, P02, P03, P06, P08 | Twelve 80 mm half-width semi-implicit runs passing the 0.5% box-energy check while reversing sign at ; C01, C07 and P06 retested under 160 mm domain expansion and 160-to-80 mm field transplantation. |
| Blinded WarpX recovery: U01–U08 | Eight initial blinded WarpX parameter-recovery inputs on a mm mesh at mm (Fig. S3 ), evaluated after calibrating tolerances on the eight corners. |
| Smilei transfer: S01–S08 | Eight inputs run unprojected at and mm on and mm domains, then reused with projected pulses as the first eight confirmation and single-CPU timing inputs. |
| Matched recovery: V01–V08 | Eight blinded WarpX parameter-recovery inputs on and mm meshes at mm, reused as the second eight Smilei confirmation and timing inputs; S01–S08 and V01–V08 form the 16 timed inputs across 32 paired runs. |
| Rebuilt component | Build environment | Verified agreement |
|---|---|---|
| Smilei v5.1 and inputs | Clean directory on originating host (single thread) | Matched every input digest and all 90 pass/fail checks. |
| Smilei v5.1 cross-host | Intel Xeon Platinum 8352V (2.10 GHz), Open MPI 4.1.6 C++ build | Matched 122 decks, 113 particle files, all 110 scored decisions and every causal crossing ( J in energy, T at probes). |
| Archived WarpX build | Conda-forge GCC 13.4.0, binary64, contraction and fast-math off | Reproduced all 576 between-sample energy intervals, all baseline opposite-probe sign reversals and all 294 exported field arrays (Note 3). |
| Continuum enclosures | Single-core C/Python outward interval and rational binaries | Reproduced all 13 derived tables and 5,551 intervals byte for byte (single-core builds: 23.6–51.4 s spectral, 45.73 s flux). |
| Lean 4.34.1 and Mathlib | 54 upstream objects and 50 proof modules (Table S1 ) | Matched every archived object digest; Lean kernel verified all 274 declarations. |
| Quantity | Outward enclosure | Independent cross-check |
|---|---|---|
| Whole-space self energy | – J | Nested inside J ( integer quadrature). |
| Exterior self energy | – J | Agreed with 468 direct sample quadratures. |
| Whole-space cross term | – mJ | Matched mJ Fourier quadrature; inside mJ heat-kernel bound. |
| Exterior cross term | – J | Combined with alternating Taylor bounds for box pulse energy. |
| Free-pulse transfer ( mm) | – mJ | Volume and six-face vacuum integrals agreed to 14 digits ( J). |
| Total outward transfer ( mm) | – mJ | Direct quadrature mJ ( J self, J mixed, J pulse); self and mixed checked against 3D Gauss quadrature. |
| Half-width | Boundary distance | Max error, | Max error, | Wrong signs, |
| (mm) | (mm) | (%) | (%) | (of 49) |
| 80 | 25 | 35.5 | 210.3 | 14 |
| 120 | 65 | 2.45 | 5.66 | 0 |
| 160 | 105 | 1.35 | 2.53 | 0 |
| Domain half-width | Cell width | Terminal | Peak-normalized | Peak-normalized |
|---|---|---|---|---|
| (mm) | (mm) | (kV/m) | error (%) | error (%) |
| 160 | 5.0 | 4.82 | 2.43 | 0.65 |
| 160 | 4.0 | 4.87 | 1.42 | 0.44 |
| 160 | 2.5 | 4.90 | 0.82 | 0.21 |
| 80 | 2.5 | 5.08 | 3.26 | 6.65 |
| Opposed momenta at mm | ||||
|---|---|---|---|---|
| (mm) | (mm) | Before cutoff | After cutoff | First V/m |
| Maximum (kV/m) | (mm) | |||
| 5.00 | 1.00 | 9.138 | 133.35 | 32 |
| 2.50 | 0.50 | 2.955 | 130.11 | 39 |
| 1.25 | 0.25 | 0.601 | 128.54 | 43 |
| Cell width | Covered | Particle number | Pulse amplitude | Hot fraction |
|---|---|---|---|---|
| ( ) | (mT) | (percentage points) | ||
| 5 mm | 8/8 | 4.27–6.99 | 0.184–0.301 | 2.74–4.07 |
| 4 mm | 8/8 | 4.61–7.56 | 0.185–0.303 | 3.19–4.27 |
| Worst energy error ( J) | Cases out of eight | |||
| Readout | Initial | Decline | Eligible | Covered |
| Coarse | 1.50 | 73.81 | 0 | 0 |
| Medium | 1.28 | 19.39 | 0 | 1 |
| Fine | 1.17 | 3.88 | 8 | 8 |
| Two levels | 1.43 | 1.42 | 8 | 8 |
| Method | Setup (s) | Query | Speedup vs. PIC | Error bound |
| Originating host (32 randomized single-core corner blocks, 96 histories) | ||||
| Newton–Krylov PIC | – | 3.330 s | (node) | |
| Three-channel flux table | 45.73 | 2.20 ms | (1,375–1,575) | J ( ) |
| Pulse-only table | – | 2.06 ms | – | J ( ) |
| Follow-up workstation (6,272 qualified energy values) | ||||
| Archived WarpX binary | – | 10.65 s | ||
| Loading | Stock (s) | Prototype (s) | Saved (%) | Ratio | 95% interval |
|---|---|---|---|---|---|
| A | 837.89 | 541.05 | 35.24 | 1.544 | 1.534–1.555 |
| B | 831.25 | 540.48 | 35.10 | 1.541 | 1.526–1.551 |
Formal Verification
Formal verification uses mathematical models and machine-checked proofs to establish whether software and systems satisfy precise specifications.
See all 397 papers