betaFeedback

WorksMathematics

Rigorously Certified Neural-Network Computation of Nonlinear Water Waves at Near-Machine Precision

Abstract

We present a computational framework that combines machine-learning-based discovery with rigorous computer-assisted numerical certification and formal verification for strongly nonlinear partial differential equations. We demonstrate the approach for periodic gravity-capillary traveling water waves. Physics-informed neural networks are used as a search mechanism, with the wave profile, wave speed and, in continuation experiments, surface tension learned directly from the governing equations without training data. Through a staged training and refinement procedure, the neural networks achieve near-machine-precision residuals of the governing equations, even in strongly nonlinear regimes. A single formulation recovers high-amplitude Stokes waves, Crapper waves and Wilton ripples. Continuation from a high-amplitude Wilton ripple in surface tension reveals new high-amplitude candidate solutions. We freeze one candidate as an explicit finite representation and rigorously certify a uniform bound on its governing-equation residual using interval arithmetic, accounting for floating-point roundoff, Fourier truncation, aliasing and grid-to-continuum errors. This independently validates the neural-network accuracy. We formalize the certification argument in Lean, which machine-checks the deductions from certified numerical bounds to the residual theorem. Both the interval certification and formalization were developed with substantial assistance from a large language model, while the validity of the result remains independent of the language model: the numerical bounds are rigorously enclosed by interval arithmetic and the subsequent mathematical deductions are checked by the Lean kernel. Together, these steps provide a pipeline from neural discovery to rigorous numerical certification and machine-checked verification with auditable mathematical guarantees.

Paper repository: computer-assisted accuracy proof and Lean verification

Introduction

Machine learning can produce numerical solutions of nonlinear partial differential equations with remarkably small residuals at finitely many evaluation points [1, 2]. However, a small sampled residual alone does not provide a rigorous bound on the continuous residual or on the error relative to an exact solution [3, 4].

Here we address continuous-residual certification by combining machine-learning-based discovery with rigorous numerical certification and formal verification. We demonstrate the approach for strongly nonlinear, high-amplitude water waves, where physics-informed neural networks discover candidate solutions with residuals approaching the limits of double-precision arithmetic. We then convert a selected candidate into a rigorous uniform residual certificate using interval arithmetic and formally verify the mathematical deductions underlying the certificate in Lean. The resulting pipeline provides a route from machine-learned numerical discovery to certified, machine-checkable scientific computation.

Surface gravity–capillary waves constitute a classical and enduring problem of fluid mechanics. Their governing equations are remarkably rich, describing phenomena ranging from small-amplitude capillary ripples to extreme ocean waves, yet are notoriously difficult to analyze because of their full nonlinearity and nonlocality. The subject has a long history spanning oceanography, mathematical physics and rigorous analysis, from Stokes’ expansions [5] and Zakharov’s Hamiltonian formulation [6] to results on well-posedness and asymptotics [7, 8]; see also the survey of steady water waves in Ref. [9]. Despite this progress, the strongly nonlinear, high-amplitude regime remains substantially more difficult to access. In this regime, perturbative descriptions cease to apply, solution branches can develop intricate structure, and even the systematic construction and accurate numerical representation of nonlinear wave solutions become challenging.

This combination of strong nonlinearity, nonlocality and a rich solution structure makes water waves a stringent setting in which to test whether machine learning can move beyond numerical approximation and become a tool for mathematical discovery with rigorously certified performance. We address this question through three stages: neural discovery, computer-assisted certification by interval arithmetic, and formal verification.

First, we employ physics-informed neural networks (PINNs) [10] as a search mechanism for high-amplitude two-dimensional periodic traveling solutions of the fully nonlinear water-wave equations. The network is optimized directly to satisfy the equations in conformal variables, with the wave profile, wave speed, and, in selected continuation experiments, the surface-tension parameter learned simultaneously. In this way, the network parametrizes and explores nonlinear solution branches. Building on the two-stage training procedure of ref. [1, 2], we obtain neural representations whose residuals approach the limits of double-precision arithmetic. Using the same formulation, we recover three canonical high-amplitude regimes: pure-gravity Stokes waves [11], pure-capillary Crapper waves [12] and mixed gravity–capillary Wilton ripples [13]. Starting from a high-amplitude Wilton ripple and continuing in surface tension, the network further discovers new high-amplitude candidate solutions of the governing equation.

Second, we turn numerical accuracy into a rigorous statement using interval arithmetic. A small residual obtained by floating-point computation does not itself constitute a rigorous certificate, because roundoff, truncation, aliasing and discretization errors enter through the nonlinear and nonlocal operations in the water-wave equations. We therefore freeze a selected machine-learned candidate as an explicit finite representation and propagate rigorous intervals through the governing operators, explicitly accounting for floating-point roundoff, Fourier truncation, aliasing errors arising from grid-based evaluation, and the error incurred in passing from a finite grid to the continuous domain. This yields a certified uniform upper bound on the residual at near-machine precision, rather than a small residual observed only at finitely many numerical evaluation points.

Third, we formally verify the mathematical structure of the certification argument in Lean [14], a proof assistant and functional programming language, and the mathlib library [15]. At this level of accuracy, the numerical certificate is itself necessarily computer assisted: our interval-arithmetic proof is implemented in Julia using the Arb library [16] and consists of hundreds of lines of code that propagate rigorous bounds through nonlinear and nonlocal operations. Although the resulting computation is mathematically rigorous, its implementation is too extensive and delicate to be audited line by line through conventional peer review. We therefore use Lean to provide a machine-checkable logical layer for the certification argument. Lean verifies the mathematical identities and deductions connecting the certified numerical bounds to the final residual theorem, substantially reducing the amount of computational reasoning that must be manually audited. The numerical interval bounds constitute the numerical trust boundary, while the subsequent mathematical deductions are checked by the Lean kernel.

Both the interval-arithmetic certification and its formalization were developed with substantial assistance from a large language model. Crucially, however, the validity of the resulting certificate does not depend on the reliability of the language model: the numerical bounds are rigorously established using interval arithmetic, while the mathematical deductions built upon them are checked by the Lean kernel. This separation allows a large language model to assist substantially in constructing a complex computer-assisted proof without becoming part of the trusted mathematical foundation of the result. The resulting code, analytic estimates, and formal deductions are documented through archived inputs, executable validation scripts, and Lean proofs, making the full certification pipeline available for inspection and reproduction.

Several lines of prior work motivate the individual components of this approach. PINN error analysis relates training residuals to solution errors under suitable stability assumptions [3], while a posteriori estimates have been developed for PDE-defined PINNs [4]. Eiras et al. [17] developed methods for bounding PDE residuals over continuous domains rather than only at collocation points, and Tanaka and Yatabe [18] combined PINN approximations with interval-based verification for nonlinear ordinary differential equations. High-accuracy neural training constitutes another ingredient, with natural-gradient and multistage methods reaching increasingly small residuals [1, 2, 19].

Rigorous numerics and proof assistants likewise have an established history. Computer-assisted analysis is surveyed in [20], while verified numerical computation has also been integrated with formal proof assistants [21]. More recently, TorchLean [22] has developed formal infrastructure for neural-network semantics, differentiation and residual verification.

Together, the developments presented in this work establish a pipeline from machine-learning-based discovery to rigorous numerical certification and machine-checked mathematical verification. Pairs of these ingredients have previously been combined—including neural approximations with interval-based verification [18] and rigorous numerics with formal verification [21, 22]—but, to our knowledge, the complete chain has not previously been closed from a solution discovered by a neural network, through rigorous interval certification, to formal verification of the resulting certificate in a proof assistant. In the present computation, floating-point roundoff, unresolved Fourier modes, aliasing and between-grid errors are enclosed within a single explicit bound for the continuous PDE residual. The framework therefore provides a route for using machine learning not only as a scientific-computing tool, but also as an instrument of mathematical discovery: exploring strongly nonlinear regimes that are difficult to access analytically while retaining explicit, rigorous and auditable mathematical guarantees.

Results

Surface gravity-capillary waves are described in terms of the Euler equation for an incompressible, irrotational fluid of infinite depth with velocity potential ϕ\phi, velocity v=∇ϕ\mathbf{v} = \nabla\phi and a free surface y=η(x,t)y = \eta(x,t), where xx is the horizontal coordinate and yy is the vertical coordinate. Incompressibility gives the Laplace equation Δϕ=0\Delta\phi= 0 inside the fluid domain D={(x,y),−∞<y≤η(x,t)}\mathcal{D} = \{(x,y), -\infty< y \leq\eta(x,t)\} with the boundary conditions at the surface y=η(x,t)y = \eta(x,t):

(∂t+v⋅∇)(y−η(x,t))=0,(1)(\partial_t + \mathbf{v} \cdot\nabla)(y - \eta(x,t)) = 0, \tag*{(1)}
ϕt+12∣∇ϕ∣2+gη=κηxx(1+ηx2)3/2,(2)\phi_t + \frac{1}{2}|\nabla\phi|^2 + g\eta= \kappa\frac{\eta_{xx}}{(1+\eta_x^2)^{3/2}}, \tag*{(2)}

and ∇ϕ→0\nabla\phi\to0 as y→−∞y \to-\infty. Here gg is the acceleration of gravity, κ\kappa is the surface tension coefficient and

ηxx(1+ηx2)3/2=∂x(ηx1+ηx2)(3)\frac{\eta_{xx}}{(1+\eta_x^2)^{3/2}} = \partial_x\left(\frac{\eta_x}{\sqrt{1+\eta_x^2}}\right) \tag*{(3)}

is the mean curvature of the free surface. The first boundary condition is the kinematic condition, expressing that the free surface moves with the fluid particles. The second is Bernoulli’s condition, in which the pressure jump across the free surface is proportional to the mean curvature.

For periodic waves traveling in one direction, one can reformulate the equations above in terms of a conformal map z(w,t):=x(w,t)+iy(w,t)z(w,t) := x(w,t) + \mathrm{i}y(w,t) that maps one periodic strip of the lower half-plane {(u,v)∈[−π,π]×(−∞,0]}\{(u,v) \in[-\pi,\pi] \times(-\infty,0]\} to the fluid domain D\mathcal{D} as illustrated in Figure 1.

Figure 1. The conformal mapping from the region in the ww plane (u,v)∈[−π,π]×(−∞,0](u,v)\in[-\pi,\pi]\times(-\infty,0] to the domain occupied by the fluid in the (x,y)(x,y) plane, with (x,y)∈[−π,π]×(−∞,η(x,t)](x,y)\in[-\pi,\pi]\times(-\infty,\eta(x,t)]. The line v=0v=0 (blue line) is mapped onto the free surface η(x,t)\eta(x,t).

Conformal formulations are described in [9, 23, 24]. On v=0v=0, steady traveling waves y=y(u−ct)y=y(u-ct) satisfy a gravity–capillary extension of the Babenko formulation [9, 25]:

B(y)=−μH^yu+(y+yH^yu+H^(yyu))−β∂u(yuyu2+(1+H^yu)2)+βH^∂u(1+H^yuyu2+(1+H^yu)2)=0,(4)\mathcal{B}(y)=-\mu\widehat{H}y_u+\left(y+y\widehat{H}y_u+\widehat{H}(yy_u)\right)-\beta\partial_u\left(\frac{y_u}{\sqrt{y_u^2+(1+\widehat{H}y_u)^2}}\right)+\beta\widehat{H}\partial_u\left(\frac{1+\widehat{H}y_u}{\sqrt{y_u^2+(1+\widehat{H}y_u)^2}}\right)=0, \tag*{(4)}

where μ\mu is the squared (rescaled) wave speed, β=κ/(gλ2)\beta=\kappa/(g\lambda^2) is the Bond number encoding surface tension, gravity, and wavelength λ\lambda. y(u)y(u) is the elevation of the free surface in conformal coordinates and H^\widehat{H} is the periodic Hilbert transform defined on L2[−π,π]L_2[-\pi,\pi] by linearity from the relation

H^einu=−isign⁡(n)einu.(5)\widehat{H}e^{inu}=-i\operatorname{sign}(n)e^{inu}. \tag*{(5)}

The underlying water-wave equations have classical high-amplitude families in the limits of zero capillarity and zero gravity. The latter limit requires a separate scaling, since the positive-gravity normalization in Eq. (4) divides by gg. At β=0\beta=0, the classical one-parameter family of Stokes waves is represented as a curve in the speed and amplitude plane (c,a)(c,a) connecting small amplitude solutions with a limiting Stokes wave of extreme height with a 2π/32\pi/3 crest angle [11]. The amplitude is defined as the difference between the maximal and minimal height divided by the period

a=max⁡y−min⁡y2π.(6)a=\frac{\max y-\min y}{2\pi}. \tag*{(6)}

At zero gravity, g=0g=0, there is a family of pure capillary solutions, found by Crapper [12], which is represented as a curve in the speed and amplitude plane (c,a)(c,a) connecting small amplitude capillary waves with a limiting Crapper wave of extreme height that encloses a bubble.

When both gravity and capillarity are present, resonant families of solutions, known as Wilton ripples, arise at special values of the surface tension. At the linear level, a Wilton ripple contains two harmonics, cos⁡(mu)\cos(mu) and cos⁡(nu)\cos(nu), whose phase speeds coincide. While small-amplitude Wilton ripples are well understood and have been computed numerically, their strongly nonlinear, high-amplitude regime remains much less explored, both analytically and numerically. More broadly, numerical studies have long investigated finite- and large-amplitude gravity–capillary waves [26, 27], and modern work has examined the spectral stability of small-amplitude Wilton ripples [28]. The structure and continuation of high-amplitude Wilton branches remain challenging; even the choice of amplitude constraint can affect access to connected families [29]. More generally, the gravity–capillary problem has a rich bifurcation structure in the wave-speed–surface-tension parameter space. Local and secondary bifurcations, including resonant Wilton branches associated with multiple eigenvalues of the linearized problem, have been studied analytically and numerically [30, 31, 32], with Babenko-type formulations providing a useful framework for such analysis [32, 33]. Yet the global organization of strongly nonlinear, high-amplitude branches remains incompletely characterized. In this setting, a rigorous residual bound is already of independent value as a quantitative diagnostic, even without the additional existence argument required to prove a nearby exact solution.

Neural discovery and recovery of high-amplitude water waves

We use physics-informed neural networks (PINNs) [10] to discover water-wave profiles and their associated physical parameters directly from the Babenko equation (4). Rather than being trained on precomputed or experimental data, the network is optimized against the governing equation together with the physical and normalization constraints defining the solution family under consideration. The same neural architecture and residual-based optimization framework is used throughout, while the physical parameters and auxiliary constraints are adapted to select the relevant branch. The trained profile is denoted by yPy_P. For each run, we minimize a weighted squared residual of the Babenko equation and, when used, its differentiated form, together with auxiliary conditions controlling quantities such as vertical translation, amplitude and symmetry. The wave speed cP=μPc_P = \sqrt{\mu_P} is optimized simultaneously with the profile. Depending on the experiment, gravity and surface tension are fixed to select a particular physical regime, while in the continuation experiments the surface-tension parameter is itself allowed to vary. Details of the network architecture, Hilbert-transform evaluation, loss function, constraints and optimization procedure are given in Methods.

We first use three canonical high-amplitude solution families as benchmarks for the discovery framework (Figure 2). These regimes probe qualitatively different balances in the same nonlinear equation. In the zero-surface-tension limit, β=0\beta= 0, the network reproduces the classical pure-gravity Stokes branch [5]. In the zero-gravity limit, g=0g = 0, it recovers the pure-capillary Crapper family [12]. When both gravity and surface tension are present, the network recovers high-amplitude (1, 2) Wilton ripples [13], for which the first and second Fourier harmonics travel at the same speed at the linear level. The three families have markedly different geometries, dominant physical balances and Fourier structures, and their recovery therefore provides complementary tests of the same computational framework. The physical and normalization constraints differ between these regimes, while the neural representation and equation-based optimization remain common.

Figure 2. Three high-amplitude regimes reproduced by the PINN. a, Pure-gravity Stokes branch with β=0\beta= 0, plotted in the (μ,a)(\sqrt{\mu}, a) plane, where a=(max⁡y−min⁡y)/(2π)a = (\max y-\min y)/(2\pi). The panel shows the selected Stokes files, including the low-amplitude main-branch runs, that satisfy max⁡∣B(yN)∣≤10−7\max|B(y_N)| \le10^{-7}, with the grey curve joining the retained runs. b, Five representative retained Stokes profiles plotted over [−π,π][-\pi,\pi] as x(u)=u+H^y(u)x(u) = u + \hat{H}y(u) versus y(u)y(u). c, Pure-capillary Crapper branch with g=0g = 0. All Crapper files in the plotting folder are included as points on the branch, and the black curve shows the displayed relation μ=(1+A2/16)−1/4\sqrt{\mu} = (1 + A^2/16)^{-1/4} with A=2πaA = 2\pi a. d, Representative Crapper profiles plotted over [−π,π][-\pi,\pi]. e, Reproduced (1,2)(1, 2) Wilton branch at β=0.5\beta= 0.5, again with all available branch files included. f, Four representative Wilton free-surface profiles, including low- and high-amplitude cases, plotted over [−π,π][-\pi,\pi].

The Wilton regime provides a particularly demanding test. At small amplitude, the (1, 2) Wilton branch originates from a linear resonance between two Fourier modes: cos⁡(u)\cos(u) and cos⁡(2u)\cos(2u), but at finite amplitude, their contributions are coupled by the full nonlinear water-wave equation. The amplitudes of the resonant components therefore cannot in general be varied independently: nonlinear constraints determine how the harmonics combine along the solution branch. Continuing a high-amplitude Wilton ripple is consequently not equivalent to simply varying the amplitude parameter and reoptimizing an unconstrained profile. The continuation must simultaneously preserve the appropriate nonlinear constraints while allowing the profile and wave speed parameter to adjust, making the high-amplitude resonant regime a substantially more restrictive search problem.

Continuation experiments and new solutions

The benchmark and continuation experiments separate two roles of the neural computation. Recovery of the Stokes, Crapper and Wilton families tests whether the framework can represent and optimize solutions across distinct nonlinear regimes when supplied with the appropriate physical constraints. Continuation away from the high-amplitude Wilton state then uses the same machinery in a discovery setting, where the resulting profiles are not prescribed in advance. The low-residual candidates obtained in this stage provide the starting point for the rigorous certification described below.

After reproducing a high-amplitude (1, 2) Wilton ripple, we use it as a seed for neural continuation. We allow the surface-tension parameter to vary together with the wave profile and speed. Starting from the same high-amplitude seed, continuation in different constrained directions produces new gravity–capillary profiles with small Babenko residuals (Figure 4 and Figure 3). Although these solutions are reached by continuation from a Wilton ripple, they are not simply nearby members of the known high-amplitude Wilton family: their Fourier composition and values of β\beta depart substantially from those of the corresponding Wilton branch, and their geometry develops qualitatively different features as the continuation proceeds. Toward one end of the computed branch, the crest develops a pronounced central depression while the trough becomes increasingly sharp, producing profiles distinct from the high-amplitude Wilton ripples used to initialize the search. To our knowledge, gravity–capillary solutions with this combination of Fourier structure, parameter values and free-surface geometry have not previously been computed. For comparison with the established large-amplitude gravity–capillary families, see [26, 27, 29].

Figure 3. Continuation near a high-amplitude Wilton ripple. a, Selected points on the continuation branch, shown in the amplitude–β\beta plane. b, Corresponding free-surface profiles over one period, plotted against the physical horizontal coordinate x(u)=u+H^y(u)x(u)=u+\widehat{H}y(u) and colored by the same β\beta values as in a. The separately displayed degree-150 polynomial in Figure 5 is the candidate used for the final residual certificate.

Figure 5. Certified high-amplitude Wilton-ripple profile. a, Free-surface profile for the certified solution at β=0.4982\beta= 0.4982, plotted over one period against the physical horizontal coordinate u+H^yu+\hat{H}y. b, Pointwise residual ∣B(yN)∣|\mathcal{B}(y_N)| for the same solution. The dashed line marks the certificate level ∥B(yN)∥∞≤1.78×10−13\|\mathcal{B}(y_N)\|_{\infty} \le1.78 \times10^{-13} with N=150N = 150.

Figure 4. Continuation away from the high-amplitude (1, 2) Wilton ripple. a, Amplitude-decreasing continuation at β=0.4982∼0.248004\beta=0.4982\sim0.248004, starting from the shared seed with 0.09<a<0.10.09<a<0.1 and plotted in the (μ,a)(\sqrt{\mu},a) plane. b, Amplitude-increasing continuation from the same seed point. c, Free-surface profiles along the amplitude-decreasing branch. d, Free-surface profiles along the amplitude-increasing branch, with colours in both profile panels matched to the same μ\sqrt{\mu} scale.

We were also unable to continue this family toward the small-amplitude regime. Within the range accessible to our numerical continuation, the branch instead remains intrinsically finite amplitude. This observation suggests that these profiles may not arise through a conventional bifurcation from a linear water-wave mode, although establishing whether the family is genuinely disconnected from the small-amplitude spectrum requires further analysis. In this sense, the high-amplitude Wilton ripple provides an entry point into a region of the nonlinear solution landscape that is not apparent from the linearized problem.

A detailed mathematical characterization of this solution family, including its global bifurcation structure, possible limiting states, stability and connection, or lack thereof, to small-amplitude solutions, is beyond the scope of the present work. Here these solutions primarily demonstrate the exploratory capability of the computational framework: constrained neural continuation can identify previously uncharacterized high-amplitude states, which can subsequently be passed to rigorous numerical certification. Our focus in the remainder of the work is therefore on establishing this discovery-to-certification pipeline and on rigorously validating a representative machine-learned solution.

Second-stage training and a near-machine-precision candidate

We demonstrate that the Babenko residual can be reduced to near the double-precision round-off level. Successive neural corrections, followed by Fourier projection and Newton polishing, reduced the maximum sampled scalar residual by approximately seven orders of magnitude, from O(10−7)O(10^{-7}) to O(10−14)O(10^{-14}), see Figure 6. Independent interval validation then established a rigorous uniform residual bound of O(10−13)O(10^{-13}) for the final polynomial.

Stage 1 and final certified polynomial residual curves

Figure 6. Reduction of the scalar Babenko residual. Absolute residual as a function of the conformal coordinate uu for the first-stage neural profile (blue) and the final trigonometric polynomial (black), obtained after successive neural corrections, Fourier projection, and Newton polishing. Both curves evaluate the scalar Babenko equation with the auxiliary fields eliminated, at the physical parameters of the corresponding profile. The curves show pointwise numerical evaluations; the dashed red line gives the rigorous uniform residual bound for the final polynomial.

Certified residual estimates and formal verification in Lean

We now turn from numerical discovery to rigorous certification. The neural-network approximation is used to construct a candidate profile; the object ultimately certified is an explicit finite trigonometric polynomial, with fixed coefficients and parameters. Let

yN(u)=a02+∑k=1Nakcos⁡(ku),(7)y_N(u) = \frac{a_0}{2} + \sum_{k=1}^{N} a_k \cos(ku), \tag*{(7)}

and let μ,β>0\mu,\beta> 0 be fixed rational parameters. We write

RN(u)=Bμ,β(yN)(u)(8)\mathcal{R}_N(u) = B_{\mu,\beta}(y_N)(u) \tag*{(8)}

for the residual of the gravity–capillary Babenko equation. We establish the rigorous uniform estimate

∥RN∥L∞(R)=sup⁡u∈R∣RN(u)∣≤ε,(9)\|\mathcal{R}_N\|_{L^\infty(\mathbb{R})} = \sup_{u\in\mathbb{R}} |\mathcal{R}_N(u)| \le\varepsilon, \tag*{(9)}

for an explicitly calculated constant ε\varepsilon. For the candidate certified here,

N=150,ε=1781015=1.78×10−13.(10)N = 150,\qquad\varepsilon= \frac{178}{10^{15}} = 1.78 \times10^{-13}. \tag*{(10)}

This is a uniform residual theorem for a supplied finite series. It is not an existence or uniqueness theorem for an exact nearby water wave. Such a result would additionally require a rigorous inverse bound for the appropriately constrained linearized Babenko operator and control of the nonlinear remainder [20]; these ingredients are not part of the present certificate.

The certification has two complementary components: validated numerical computation and formal verification. Julia/Arb performs the substantive interval-arithmetic calculation, rigorously enclosing numerical errors and producing certified bounds. Lean 4 formalizes the analytic framework and verifies the deductions from these certified numerical inputs to the final global theorem.

This certification has both practical numerical and pure-mathematical motivations. From a numerical perspective, the objective is to replace an empirically observed small residual by a rigorous uniform bound at the same scale. Numerically observing a small residual and rigorously certifying such a bound are distinct achievements.

From a pure-mathematical perspective, the objective is to make PINN-based discovery usable as a high-precision tool for studying highly nonlinear and nonlocal equations. The resulting computations can serve as quantitative inputs to further mathematical analysis: the candidate is explicitly defined, its residual is rigorously controlled, and the computational and logical trust boundaries are made explicit. In particular, the residual certificate provides a first rigorous ingredient toward a computer-assisted proof of the existence of a nearby exact solution.

Source code, archived run evidence, build instructions, and the supplementary mathematical account are indexed in the paper repository.

We now describe the two stages in turn.

Rigorous certification by interval arithmetic

The interval calculation is implemented in the Julia package, which produces a computer-assisted proof certificate bounding the residual of Babenko’s equation for steady periodic water waves. Given a candidate profile represented as a truncated even cosine series, the package rigorously evaluates the Babenko residual and generates a Lean 4 certificate encoding the certified numerical bounds as exact rational literals, ready for verification by Lean.

The interval calculation rigorously accounts for floating-point roundoff, Fourier truncation and aliasing in nonlinear terms, and the passage from grid-based estimates to bounds valid throughout the continuous domain. For the finite trigonometric profile yNy_N and its derivatives, the periodic Hilbert transform is evaluated exactly mode by mode. For nonlinear quantities in the capillary term, which are not finite trigonometric polynomials, unresolved Fourier modes and aliasing errors are bounded explicitly.

The computation also establishes a strictly positive lower bound for

D(u)=(∂uyN(u))2+(1+H^∂uyN(u))2,D(u) = \sqrt{\left(\partial_u y_N(u)\right)^2 + \left(1 + \widehat{H}\partial_u y_N(u)\right)^2},

ensuring that the capillary denominator remains nonzero. Rigorous Taylor bounds on each grid cell then promote the discrete interval estimates to the full period and, by periodicity, to all u∈Ru \in\mathbb{R}. Thus,

∥Bμ,β(yN)∥L∞(R)≤ε,D(u)≥dmin⁡>0.(11)\lVert B_{\mu,\beta}(y_N)\rVert_{L^\infty(\mathbb{R})} \le\varepsilon,\qquad D(u) \ge d_{\min} > 0. \tag*{(11)}

The implementation, input coefficients, run logs and reproduction commands are available in the Julia directory.

Formal verification in Lean

The mathematical verification layer of the computer-assisted proof is implemented in Lean 4. Julia/Arblib validates the fixed cosine-series profile, rigorously controlling rounding, Fourier truncation, aliasing and between-grid errors, and exports the resulting certified bounds together with the profile and computation parameters as exact rational data. A reusable Lean library formalizes the mathematical structure underlying the certification, including the periodic Hilbert transform, the finite trigonometric profile, the capillary terms and the Babenko residual. It proves the mode-by-mode action of the Hilbert transform on finite trigonometric polynomials, the Fourier-tail and aliasing estimates required for the nonlinear capillary terms, and the derivative, Taylor-remainder and grid-to-continuum estimates used in the certification.

For the candidate considered here, Lean takes the certified denominator bound and one-period residual bound produced by Julia/Arblib as explicit inputs, verifies the analytic deductions and periodic extension to the full real line, and checks the exact rational comparisons yielding the reported constants. Thus, validated numerics establishes the numerical inequalities, while Lean verifies the mathematical deductions from them. The resulting formal library is independent of the particular numerical profile and can be reused for future certified solutions.

The Lean directory contains the formal definitions, theorem modules, certificate deductions, axiom audit and pinned build instructions.

Discussion

The results presented here demonstrate a route from machine-learning-based exploration of a nonlinear PDE to a rigorously certified and machine-checkable computational statement. The role of the neural network is primarily one of discovery: it provides a flexible representation with which to search nonlinear solution spaces and identify high-accuracy candidate solutions. The subsequent certification is deliberately separated from the training procedure. Once a candidate is selected, it is frozen as an explicit finite representation, and the mathematical claim concerns this representation rather than the neural network, optimizer or training history. This separation allows the exploratory flexibility of machine learning to be combined with the reproducibility and explicit error control of validated numerical computation.

The water-wave problem illustrates both the potential and the limitations of this approach. The same computational framework accesses qualitatively different high-amplitude regimes, including pure-gravity, pure-capillary and resonant gravity–capillary waves, but the search is not free of problem-specific mathematical information. Different solution families require appropriate physical, normalization and symmetry constraints, and continuation of high-amplitude Wilton ripples requires additional control of the relative amplitudes of the resonant Fourier modes. The neural network therefore does not replace mathematical structure; rather, it provides a flexible computational representation within which such structure can be imposed while leaving the detailed nonlinear profile to be determined by the governing equation. Developing methods that can infer useful continuation coordinates and constraints directly from the learned solution landscape would reduce this dependence on prior analytical knowledge.

A second distinction concerns numerical accuracy and mathematical existence. The certificate established here is a rigorous uniform bound on the residual of an explicit approximate solution. It shows that the reported near-machine-precision residual is not an artifact of floating-point roundoff, Fourier truncation, aliasing or finite sampling. It does not, by itself, prove the existence of an exact water-wave solution nearby. Such a result would require quantitative control of the linearized Babenko operator and of the nonlinear remainder, for example through a Newton–Kantorovich or related contraction argument. The certified residual obtained here provides one of the quantitative inputs required for such an existence proof and establishes a natural interface between machine-learning-based discovery and computer-assisted analysis.

Formal verification addresses a different source of uncertainty. At the accuracy considered here, the interval-arithmetic certification is itself a substantial computation involving hundreds of lines of validated numerical code and a sequence of analytic estimates that would be difficult to audit completely by conventional inspection. Lean makes the mathematical identities and deductions connecting the numerical certificate to the final theorem machine-checkable. The present implementation nevertheless retains an explicit numerical trust boundary: Lean does not independently reproduce the Arb computation, and the validated numerical bounds supplied by the interval-arithmetic calculation remain trusted inputs to the formal layer.

An important feature of the workflow is that substantial parts of both the rigorous numerical implementation and the formalization were developed with assistance from a large language model. This illustrates a potentially broader role for generative AI in scientific computing: not only in producing numerical candidates, but also in helping construct the machinery required to validate them. The reliability of the final mathematical statement need not inherit the reliability of the generative model, provided that model-generated computations and arguments terminate in independently checkable certificates. In the present framework, interval arithmetic provides rigorous numerical enclosures and Lean checks the subsequent logical deductions.

More broadly, the approach is not specific to water waves or to PINNs. Its essential ingredients are a computational method capable of discovering accurate candidate solutions, an explicit representation to which validated numerics can be applied, rigorous control of discretization and continuum errors, and a formal layer capable of checking the deductions made from the resulting numerical bounds. These ingredients suggest a general architecture for trustworthy machine-learning-assisted scientific computing, particularly for nonlinear problems in which analytical descriptions are incomplete and numerical exploration plays an important role.

Methods

PINN architecture

Neural representation

The unknown free surface is represented in conformal coordinates by a neural function of the periodic variable u∈[−π,π]u \in[-\pi, \pi]. For the symmetric runs, periodicity and evenness are imposed by feeding the network the transformed coordinate cos⁡u\cos u. The implementation used for the plotted runs consists of three scalar fully connected multilayer perceptrons with tanh activations, initialized with Xavier-scaled truncated normal weights [34]. Each scalar network has three hidden layers of width 30. The networks are combined as

yP(u)=sN0(cos⁡u),T1,P(u)=N1(cos⁡u)sin⁡u,T2,P(u)=N2(cos⁡u),(12)y_{P}(u)=sN_{0}(\cos u), \qquad T_{1,P}(u)=N_{1}(\cos u)\sin u, \qquad T_{2,P}(u)=N_{2}(\cos u), \tag*{(12)}

where ss is the amplitude scale used in a given continuation step. This construction makes yPy_{P} and T2,PT_{2,P} even and T1,PT_{1,P} odd, matching the crest-symmetric geometry. The auxiliary variables T1,PT_{1,P} and T2,PT_{2,P} represent the two components of the normalized tangent/curvature expression,

T1=yuyu2+(1+H^yu)2,T2=1+H^yuyu2+(1+H^yu)2,(13)T_{1}=\frac{y_{u}}{\sqrt{y_{u}^{2}+(1+\widehat{H}y_{u})^{2}}}, \qquad T_{2}=\frac{1+\widehat{H}y_{u}}{\sqrt{y_{u}^{2}+(1+\widehat{H}y_{u})^{2}}}, \tag*{(13)}

so that the surface-tension term can be evaluated stably through first derivatives of the auxiliary outputs.

The wave speed is optimized together with the network weights through a bounded scalar parameterization

cP=c0+ηctanh⁡ρc,(14)c_{P}=c_{0}+\eta_{c}\tanh\rho_{c}, \tag*{(14)}

where c0c_{0} is the continuation seed and ηc\eta_{c} is the allowed local search radius. In the Wilton continuation runs in which surface tension is trained, the same bounded parametrization is used for βP\beta_{P}. Fixed-regime benchmark runs set the corresponding physical parameter to its prescribed value.

Residual, Hilbert transform and loss

All derivatives of the neural outputs are obtained by automatic differentiation in JAX [35], with double-precision arithmetic enabled. The periodic Hilbert transform is evaluated numerically on a dense nonuniform grid of 15,000 sample points. The singular integral is split into a local contribution around the evaluation point, a close-field correction and an outer contribution evaluated by Gaussian quadrature. The same Hilbert-transform routine is used for yPy_{P}, yP,uy_{P,u}, derivatives of yP2y_{P}^{2} and derivatives of the auxiliary variables entering the surface-tension term.

Training minimizes a weighted loss

L=weq∑ui∈Cωi∥RP(ui)∥2+wder∑vj∈Dνj∣∂uB(yP)(vj)∣2+Laux.(15)\mathcal{L}=w_{\mathrm{eq}}\sum_{u_i\in\mathcal{C}}\omega_i\lVert\mathcal{R}_{P}(u_i)\rVert^{2}+w_{\mathrm{der}}\sum_{v_j\in\mathcal{D}}\nu_j\left\lvert\partial_u\mathcal{B}(y_{P})(v_j)\right\rvert^{2}+\mathcal{L}_{\mathrm{aux}}. \tag*{(15)}

Here RP=(e1,e2,e3)\mathcal{R}_{P}=(e_{1},e_{2},e_{3}), where e1e_{1} is the main Babenko residual and e2e_{2} and e3e_{3} enforce the definitions of T2,PT_{2,P} and T1,PT_{1,P}, respectively. The auxiliary loss Laux\mathcal{L}_{\mathrm{aux}} fixes the amplitude and, when needed, removes vertical translation through a mean-zero condition or enforces or breaks prescribed symmetry conditions. The active runs use weq=0.1w_{\mathrm{eq}}=0.1 with residual-component weight one; the normalization and mean constraints, when used, are kept on throughout training.

Collocation and optimization

The collocation sets are resampled during optimization. In the runs used here, each optimization step combines fixed and moving collocation points: 251 fixed equation points, 201 fixed derivative points, two groups of 71 points concentrated near the endpoints and 121 moving points for each of the equation and derivative residuals. The sampling density is biased toward regions where high-amplitude waves develop sharp features, especially near crests and troughs. After a training pass, the point distribution can be updated from the residual itself so that later passes concentrate effort where the current approximation is least accurate.

We use the Kronecker-factored approximate curvature (K-FAC) optimizer [36], implemented in JAX, with adaptive learning rate, momentum and damping, a minimum damping of 10−1410^{-14}, and a typical training horizon of 20,000 iterations per continuation step. New branches are followed by warm starting from a previously trained profile and allowing the speed, and when appropriate the surface tension, to move within a prescribed local window.

Second-stage training

Following the multistage refinement approach of Refs. [1, 2], we refine the first-stage candidate through successive additive neural corrections targeting its remaining residual. Let Yp=(yp,T1,p,T2,p)Y_p=(y_p,T_{1,p},T_{2,p}) denote the previously trained fields, frozen at the start of a refinement pass. The corrected approximation is

YP(u)=Yp(u)+εpΦθ(u),(16)Y_P(u)=Y_p(u)+\varepsilon_p\Phi_\theta(u), \tag*{(16)}

where YP=(yP,T1,P,T2,P)Y_P=(y_P,T_{1,P},T_{2,P}), Φθ\Phi_\theta is a three-component correction network, and εp\varepsilon_p sets its amplitude scale. Write R(Y)\mathcal{R}(Y) for the three-field Babenko residual operator and RP=R(YP)=(e1,e2,e3)\mathcal{R}_P=\mathcal{R}(Y_P)=(e_1,e_2,e_3). When those definitions hold, e1=B(yP)e_1=\mathcal{B}(y_P), where B\mathcal{B} is the scalar Babenko operator in Eq. (4).

The correction ansatz is motivated by linearization about the frozen fields [1, 2]:

R(Yp+εpΦθ)≃R(Yp)+εpDR(Yp)Φθ.(17)\mathcal{R}(Y_p+\varepsilon_p\Phi_\theta)\simeq\mathcal{R}(Y_p)+\varepsilon_pD\mathcal{R}(Y_p)\Phi_\theta. \tag*{(17)}

To cancel the existing residual to first order, the correction should therefore approximately satisfy

εpDR(Yp)Φθ≃−R(Yp).(18)\varepsilon_pD\mathcal{R}(Y_p)\Phi_\theta\simeq-\mathcal{R}(Y_p). \tag*{(18)}

The linearized equation explains the correction strategy; optimization evaluates the full nonlinear residual RP\mathcal{R}_P.

The correction networks used sinusoidal activations and a tunable first-layer frequency scale. We chose the frequency scale of the correction to yPy_P from the prominent frequencies in the remaining residual, and chose εp\varepsilon_p according to its magnitude. These choices guide the scales represented by the network; they do not constrain its output to a single Fourier mode or make εp\varepsilon_p equal to a residual norm. The input cos⁡u\cos u makes the outputs periodic and even, while a factor of sin⁡u\sin u imposes odd parity on the T1,PT_{1,P} correction. After one correction was trained, its contribution was incorporated into the frozen base and a further, smaller-scale correction was trained. The capillary parameter remained fixed, while the wave speed was allowed a small adjustment.

The refinement stage evaluated the periodic Hilbert transform by FFT on full uniform grids rather than by the nonuniform quadrature used during discovery. Neural-field derivatives were computed by automatic differentiation. Shifting the uniform grid by fractions of a grid spacing sampled the residual between earlier collocation points while preserving the periodic grid required by the FFT. Later refinement passes used finer grids.

Gradient-normalized residual weighting

The second-stage refinement also employs gradient-normalized residual weighting [2], adapted here to the three-field Babenko system. A standard mean-square residual,

∑j∣R(YP)(uj)∣2,\sum_j \left|\mathcal{R}(Y_P)(u_j)\right|^2,

weights the residual in absolute terms. When the solution contains steep or rapidly varying regions, however, the natural scale of the equation can vary strongly across the domain, causing such regions to dominate the optimization. We therefore normalize the residual by a local scale determined from spatial derivatives of the frozen base fields, leading schematically to

∑j∣R(YP)(uj)local derivative scale at uj∣2.\sum_j \left\lvert\frac{\mathcal{R}(Y_P)(u_j)}{\text{local derivative scale at }u_j} \right\rvert^2.

In this sense, the loss measures a locally scaled residual rather than a purely absolute one.

For the Babenko system, the second-stage loss retained the component-wise weighted residual structure used during training. Let CC denote the collocation points for RP\mathcal{R}_P and DD those used for the derivative of the main equation. To balance regions with different levels of spatial variation, the residuals were divided by scales SeqS_{\mathrm{eq}} and SderS_{\mathrm{der}} constructed from spatial derivatives of the frozen fields YPY_P. These scales combine derivatives of ypy_p, their Hilbert transforms, and capillary contributions involving T1,pT_{1,p} and T2,pT_{2,p}. Each scale is normalized by its grid average and clipped to prevent extreme reweighting, while SderS_{\mathrm{der}} places greater emphasis on the curvature of the base fields. The scales are recomputed whenever the grid is changed and are held fixed during parameter differentiation, preventing the correction network from reducing the loss merely by altering its normalization.

With component-specific collocation weights ωiℓ\omega_{i\ell} and derivative weights νj\nu_j, the refinement loss is

L=weq∑ui∈C∑ℓ=13ωiℓ∣eℓ(ui)Seq(ui)∣2+wder∑vj∈Dνj∣∂ue1(vj)Sder(vj)∣2+Laux.(19)\mathcal{L} = w_{\mathrm{eq}} \sum_{u_i \in C} \sum_{\ell=1}^{3} \omega_{i\ell} \left\lvert\frac{e_\ell(u_i)}{S_{\mathrm{eq}}(u_i)} \right\rvert^2 + w_{\mathrm{der}} \sum_{v_j \in D} \nu_j \left\lvert\frac{\partial_u e_1(v_j)}{S_{\mathrm{der}}(v_j)} \right\rvert^2 + \mathcal{L}_{\mathrm{aux}}. \tag*{(19)}

The derivative term was strengthened for the final correction in order to suppress rapidly varying residual errors. The weights ωiℓ\omega_{i\ell} emphasize the periodic endpoints and, in intermediate passes, selected residual peaks; they are normalized so that the total weight assigned to each residual component remains fixed. The derivative weights νj\nu_j are uniform. The term Laux\mathcal{L}_{\mathrm{aux}} contains the retained amplitude and crest–trough separation penalties. The derivative term acts on e1e_1, the main equation evaluated with the current auxiliary fields, and agrees with ∂uB(yP)\partial_u\mathcal{B}(y_P) when their defining residuals vanish.

After the final refinement pass, the corrected fields were evaluated on shifted grids before Fourier projection and Newton polishing. Rigorous certification was then carried out separately on the resulting frozen trigonometric polynomial.

Figure 6 compares the scalar Babenko residual of the first-stage profile with that of the final trigonometric polynomial, illustrating the reduction achieved through successive neural corrections, Fourier projection, and Newton polishing. The rigorous uniform bound for the final polynomial is shown separately.

Computer-assisted accuracy proof

We certify a uniform bound on the Babenko residual of a fixed finite profile, as follows:

Let

yN(u)=a02+∑k=1Nakcos⁡(ku),(20)y_N(u) = \frac{a_0}{2} + \sum_{k=1}^{N} a_k \cos(ku), \tag*{(20)}

be a fixed finite even cosine series and let μ\mu, β>0\beta> 0 be given rational parameters. Define the residual of the Babenko equation with surface tension by

R(y)=−B(y)=μH^[yu]−y−yH^[yu]−H^[yyu]+β∂u(yuD)−βH^[∂u(1+H^[yu]D)],(21)\mathcal{R}(y) = -\mathcal{B}(y) = \mu\widehat{H}[y_u] - y - y\widehat{H}[y_u] - \widehat{H}[yy_u] + \beta\partial_u\left(\frac{y_u}{D}\right) - \beta\widehat{H}\left[\partial_u\left(\frac{1+\widehat{H}[y_u]}{D}\right)\right], \tag*{(21)}

where

D(u)=yu2+(1+H^[yu])2,(22)D(u) = \sqrt{y_u^2 + \left(1+\widehat{H}[y_u]\right)^2}, \tag*{(22)}

and H^\widehat{H} denotes the 2π2\pi-periodic Hilbert transform, with convention

H^[cos⁡(ku)]=sin⁡(ku),H^[sin⁡(ku)]=−cos⁡(ku),k≥1.(23)\widehat{H}[\cos(ku)] = \sin(ku), \qquad\widehat{H}[\sin(ku)] = -\cos(ku), \qquad k \ge1. \tag*{(23)}

The goal is to establish D(u)≥d∗>0D(u) \ge d_* > 0 for every u∈Ru \in\mathbb{R} and ∥R(yN)∥L∞(R)≤ϵ\lVert R(y_N)\rVert_{L^\infty(\mathbb{R})} \le\epsilon for explicit certified constants d∗d_* and ϵ\epsilon.

The rigorous proof is split between Julia and Lean 4. A Julia verifier performs the substantive computation using rigorous interval ball arithmetic: it treats the final computed wave as a fixed trigonometric polynomial and establishes a uniform bound on its Babenko residual together with a positive lower bound on the capillary denominator, all with certified error enclosures. A Lean development provides the logical scaffolding: it formalizes the relevant operators and reusable estimates, imports the two final numerical conclusions as explicit assumptions, and checks the deduction of the paper’s residual theorem. The Lean kernel checks this conditional deduction without recomputing the numerical enclosures. Once the polynomial has been frozen, the network weights and training trajectory play no role in the proof. Source code, archived run evidence, build instructions, and the supplementary mathematical account are indexed in the paper repository.

Computer-assisted interval certification of the numerical residual

After neural training and continuation, we project the profile onto an even cosine series and polish its coefficients with a finite-dimensional Newton iteration. The resulting polynomial has the convention in Eq. (20). Its stored binary coefficients and parameters are interpreted as exact dyadic rationals and fixed before validation. The certified statement concerns this explicit polynomial and these exact parameter values. From this point onward, the certification is independent of the neural network. The normalization and computational settings for the reported profile are collected in § 4.3.3.

Julia and Arb compute outward-rounded interval enclosures for the nonlinear residual, add analytic corrections for unresolved Fourier modes, and use Taylor’s theorem to pass from a grid to the whole torus.

The Julia package BabenkoRigorous.jl encloses every numerical operation with outward-rounded Arb balls. It first constructs finite Fourier representations of yNy_N, yN,uy_{N,u}, H^[yN,u]\widehat{H}[y_{N,u}] and their polynomial products. Differentiation and the periodic Hilbert transform act mode by mode, while multiplication uses finite coefficient convolution, with no projection of newly generated modes back to degree NN.

Nonlinear capillary quantities require a second representation. With DD as defined in Eq. (22), the verifier forms

G(u)=1+H^[yN,u](u)D(u).(24)G(u) = \frac{1+\widehat{H}[y_{N,u}](u)}{D(u)}. \tag*{(24)}

At each node of a periodic grid, a Taylor record contains interval enclosures of a quantity and its derivatives, together with global derivative suprema. Product, reciprocal and square-root rules propagate these records. A grid lower scan combined with off-grid derivative control first proves D(u)≥d∗>0D(u) \ge d_* > 0 over the entire period; only then are D−1D^{-1} and the capillary fractions evaluated.

The Hilbert-transform work is divided into two pathways.

Path A: finite trigonometric algebra. The input has a finite Fourier representation, so H^\widehat{H} acts mode by mode using Eq. (23). No sampling or aliasing correction is needed for this operation.

Path B: certified sampled transform. The input is represented by interval-enclosed values and derivatives on a uniform grid, rather than by a finite coefficient vector. A discrete Hilbert transform is evaluated by certified convolution, and a rigorous Fourier-tail correction is added to enclose the continuous transform.

Path B is essential for H^[∂uG]\widehat{H}[\partial_u G], because the square root and reciprocal in Eqs. (22) and (24) generally give GG an infinite Fourier series. The current Julia implementation also routes H^[yNyN,u]\widehat{H}[y_N y_{N,u}] through Path B for uniformity, although yNyN,uy_N y_{N,u} is itself a finite trigonometric polynomial of degree at most 2N2N.

If ∥F(p)∥∞≤Cp\lVert F^{(p)}\rVert_\infty\le C_p for p≥2p \ge2, the correction at each grid node is bounded by

εalias(F)=4Cp(p−1)(Ngrid/2−1)p−1.(25)\varepsilon_{\mathrm{alias}}(F) = \frac{4C_p}{(p-1)(N_{\mathrm{grid}}/2-1)^{p-1}}. \tag*{(25)}

Arb encloses arithmetic roundoff; the aliasing correction is a separate analytic estimate supplied by the verifier.

The full residual is assembled from these interval records using the same terms as Eq. (21). Global derivative bounds are obtained from the finite Fourier coefficients for trigonometric polynomials and propagated through products, reciprocals and square roots using differentiation rules and interval arithmetic. The positive lower bound on DD controls the denominators arising in these estimates. For sampled Hilbert-transform terms, Fourier-decay estimates provide the additional derivative bounds required by the Taylor remainder.

For grid nodes uju_j separated by h=2π/Ngridh = 2\pi/N_{\mathrm{grid}}, let Ij,mI_{j,m} enclose the mm-th derivative of the residual at uju_j, and set Uj,m=sup⁡x∈Ij,m∣x∣U_{j,m} = \sup_{x\in I_{j,m}} \lvert x\rvert. A global bound CM+1≥∥∂uM+1B(yN)∥∞C_{M+1} \ge\lVert\partial_u^{M+1}\mathcal{B}(y_N)\rVert_\infty gives, for uj≤u≤uj+hu_j \le u \le u_j+h,

∣B(yN)(u)∣≤∑m=0MUj,mhmm!+CM+1hM+1(M+1)!.(26)\lvert\mathcal{B}(y_N)(u)\rvert\le\sum_{m=0}^{M}\frac{U_{j,m}h^m}{m!}+\frac{C_{M+1}h^{M+1}}{(M+1)!}. \tag*{(26)}

The Taylor order MM is chosen together with the grid size NgridN_{\mathrm{grid}} so that the remainder bound is sufficiently small to achieve the desired certification accuracy. Taking the outward-rounded maximum over all cells then proves a uniform bound over the entire period. The denominator scan uses the corresponding lower-bound argument.

The production computation uses a sharded implementation: local Taylor data are streamed to disk, Hilbert-transform derivative columns are processed separately, and the final residual is scanned shard by shard.

The implementation, input coefficients, run logs and reproduction commands are in the [Julia directory](Julia directory). The detailed interval estimates are in the [Supplementary Methods](Supplementary Methods).

Formal verification in Lean

The Lean formalization provides the mathematical verification layer of a larger computer-assisted proof. Julia/Arblib acts as the certificate generator: it validates a fixed finite cosine-series profile yNy_N, evaluates its Babenko residual R(yN)R(y_N) on a fine grid, and uses interval arithmetic and analytic estimates to control rounding, Fourier aliasing and truncation, and between-grid errors. It exports exact rational coefficients, equation parameters and certified endpoints, together with the grid size and Taylor order. The residual endpoint ε0\varepsilon_0 bounds the continuous residual, including the Taylor remainder.

For the reported candidate, Lean takes two explicit numerical hypotheses from the validated computation: D(u)≥d∗>0D(u) \ge d_* > 0 for every real uu, and ∣R(u)∣≤ε0\lvert R(u)\rvert\le\varepsilon_0 on [−π,π][-\pi,\pi]. From these inputs, Lean proves ∥R∥L∞(R)≤ε0\lVert R\rVert_{L^\infty(\mathbb{R})} \le\varepsilon_0 by periodic extension and checks the exact rational comparisons yielding the reported constants. These two hypotheses form the numerical trust boundary: the validated computation supplies the numerical enclosures, while Lean verifies the mathematical deductions. In the Lean implementation, the one-period numerical hypothesis is stated on [0,2π][0,2\pi]; by 2π2\pi-periodicity, this is equivalent to the formulation on [−π,π][-\pi,\pi] used here.

Independently of this numerical instance, a reusable Lean library formalizes the Fourier definition of the Hilbert transform HH, its action on trigonometric modes and commutation with differentiation, aliasing estimates, product and composition derivative bounds, Taylor-record semantics, and the Taylor grid-to-continuum argument. The publication proof contains no sorry placeholders or sorryAx dependency.

The Lean source code, certificate data and build instructions are available in the Lean directory of the Paper repository. Table 1 summarizes the Lean modules and their roles. Their mathematical content is described in the Supplementary Methods.

File(s)ContentsRole
Definitions and reusable mathematical library
Definitions.leanDefines the Fourier-multiplier Hilbert transform, finite profile, derivative, denominator DD, capillary expression GG, and residual RR.Definitions
HilbertOnTrigPoly.leanProves the Hilbert-transform identities for finite trigonometric profiles, identifying H[yu]H[y_u] with the explicit cosine sum Hyu.Analysis
FourierTailHilbert.leanFourier-mode and tail estimates, including the π/3\pi/3 Hilbert-transform bound.Analysis
HilbertSmoothness.lean; HilbertSharper.lean; HilbertCommutesDeriv.leanRegularity and derivative commutation for the Hilbert transform under the stated smoothness and periodicity hypotheses.Analysis
AliasingErrorBound.leanSampled DFT aliasing estimate and equivalence with the cotangent-kernel convolution.Analysis
LeibnizBound.lean; FaaDiBrunoBound.leanDerivative bounds for products and compositions.Analysis

Table 1. Lean modules and their roles in the certification framework.

File(s)ContentsRole
TaylorRemainder.leanTaylor-polynomial and remainder estimates on an interval.Analysis
GridToSupNormTaylor.leanConverts cellwise Taylor bounds into a uniform bound on the full grid interval.Analysis
TaylorSeries Correctness.leanDefines Taylor records and their semantic invariant; proves arithmetic and grid-to-continuum contracts.Definitions and proofs
SeriesCorrectness.leanCorrectness results for square-root and reciprocal derivative records under explicit hypotheses.Conditional correctness theorems.
TightenSupBoundsLemma.leanJustifies downward tightening of derivative bounds.Proved analysis
FFTHilbertCorrectness.leanCorrectness contract for Hilbert-transform Taylor records, conditional on the required enclosures and analytic bounds.Conditional correctness theorem
DLowerBound.leanDeduces positivity from a positive lower bound and records the quotient identity for GG.Proved implications
PipelineSmoothness.lean; RSmoothness.leanSmoothness and periodicity of profile and residual components, with denominator positivity where required.Analysis
DminBoundCorrectness.lean; TightDGSupBounds.leanDenominator-bound correctness conditions and derivative bounds for the denominator/-capillary chain.Conditional correctness theorem
ResidualAssembly Correctness.leanGeneric residual assembly; periodicity of RR and extension of a one-period bound to all real arguments.Conditional correctness theorem and analysis
Common.lean; Foundations.leanShared foundational imports and support for the library.Infrastructure
Concrete publication certificate
PaperCertificate.leanExact rational profile coefficients, parameters, grid/Taylor metadata, and numerical certificate endpoints.Data definitions
PaperCertificateAxioms.leanDeclares two numerical assumptions: global positive denominator lower bound and residual bound on one period. Proves consequences including periodic extension.Numerical assumptions and deductions
PaperTheorems.leanPublication residual and denominator bounds; exact comparisons with the reported decimal constants.Proved from certificate assumptions

Table 23.

File(s)ContentsRole
PaperAudit.leanChecks the publication declarations and axiom dependencies; proves the sign-convention bridge to the manuscript residual.Audit and proofs

Table 4.

Certified profile, computational settings and bounds

For the candidate reported in the main text, the certified input is the polynomial in Eq. (20), with stored binary coefficients interpreted as exact dyadic rationals. In the normalization g=1g=1, the certified parameters are the stored binary64 values:

μ0=15380488952842451125899906842624,β0=22338214439727859007199254740992.(27)\mu_0=\frac{1538048895284245}{1125899906842624},\qquad\beta_0=\frac{2233821443972785}{9007199254740992}. \tag*{(27)}

The coefficient and parameter values are supplied with the archived input in the paper repository. The polynomial has degree N=150N=150. The validated calculation uses

Ngrid=2,000,000,M=6,(28)N_{\mathrm{grid}}=2{,}000{,}000,\qquad M=6, \tag*{(28)}

at 128-bit Arb precision.

For these fixed inputs, the computation yields

∥Bμ0,β0(y150)∥L∞(R)≤1.78×10−13(29)\lVert\mathcal{B}_{\mu_0,\beta_0}(y_{150})\rVert_{L^\infty(\mathbb{R})}\le1.78\times10^{-13} \tag*{(29)}

and

D(u)≥0.3446588>0for every u∈R.(30)D(u)\ge0.3446588>0\qquad\text{for every }u\in\mathbb{R}. \tag*{(30)}

The exact rational certificate endpoints underlying these displayed bounds are recorded in Lean/WaveCAP/PaperCertificate.lean in the paper repository.

The bound (29) accounts for propagated Arb rounding errors, discrete-Hilbert aliasing errors, nonlinear derivative bounds, and the Taylor remainder controlling the intervals between grid points. It is therefore a rigorous uniform residual certificate for the explicit polynomial y150y_{150} at the stated exact parameter values.

Reproducibility and file map

The inputs, logs and certificate artifacts for the certified run are archived in

Julia/results/phase4_scalar_n150_20260827_2m_20260829/

within the paper repository. These include the fixed input coefficients and parameters, reproduction scripts, Arb endpoint dumps, and the generated Lean certificate, together with checksums. The certificate-specific theorems and assumption audit were checked with the pinned Lean and Mathlib versions recorded in the repository.

The certified interval calculation was performed on an NYU CIMS compute server. Table 2 summarizes the execution times and memory use recorded in the archived logs. The eight workers ran concurrently, so their wall times are not summed. The slowest worker followed by the three serial stages gives an estimated production wall time of approximately 2 hours 50 minutes after warmup. The sum of the individual worker memory peaks was 61.5 GB; this does not represent a measured simultaneous peak for the full run.

StageThreadsWall timePeak RSS (GB)
Worker 141 h 57 min 25 s5.019
Worker 242 h 14 min 58 s9.242
Worker 341 h 56 min 25 s4.972
Worker 442 h 07 min 07 s9.287
Worker 542 h 13 min 04 s9.324
Worker 641 h 58 min 34 s5.088
Worker 742 h 09 min 00 s9.267
Worker 842 h 13 min 52 s9.283
Merge81 min 22.08 s0.481
Hilbert-transform stage821 min 33.92 s5.149
Final residual scan (s3)811 min 49.78 s0.477

Table 2. Execution time and memory use. Wall times are taken from the system timing logs. Peak RSS denotes peak resident memory per process.

Table 3 reproduces the numerical summary printed by the final s3 stage. The displayed digits summarize the archived Arb enclosures; the Lean certificate uses exact rational endpoints. The top-level run log records ALL_STAGES_COMPLETE.

Log entryReported value
Bound midpoint+1.9928311263803702×10−14+1.9928311263803702 \times10^{-14}
Bound radius1.5799937398052128×10−131.5799937398052128 \times10^{-13}
Bound interval: lower endpoint−1.3807106271671758×10−13-1.3807106271671758 \times10^{-13}
Bound interval: upper endpoint+1.7792768524432498×10−13+1.7792768524432498 \times10^{-13}
Residual upper bound1.7792768524432498×10−131.7792768524432498 \times10^{-13}
Denominator lower bound3.4465883518530394×10−13.4465883518530394 \times10^{-1}

Table 3. Final-stage numerical summary. Values transcribed from the archived s3 log.

Data and code availability

The Julia interval-arithmetic code, numerical certificate data, archived certification run records and Lean formalization are available in the paper repository, together with pinned software environments and reproduction instructions: https://github.com/michalshavitNYU/Rigorously-certified-water-waves.

Declarations

Declaration of generative AI use. The authors wrote and ran the physics-informed neural-network (PINN) code and wrote the main manuscript. Large language models provided substantial assistance in developing the Julia interval-arithmetic implementation and Lean formalization, and assisted with language editing and proofreading of the manuscript. The numerical certificate relies on Julia/Arb interval arithmetic, while Lean checks the formal deductions conditional on the explicitly stated numerical assumptions.

Competing interests The authors declare no competing interests.

References

  1. [1]Wang, Y., Lai, C.-Y.: Multi-stage neural networks: Function approximator of machine precision. Journal of Computational Physics 504, 112865 (2024) https://doi.org/10.1016/j.jcp.2024.112865
  2. [2]Wang, Y., Léger, T., Lai, C.-Y., Buckmaster, T.: Resolving Sharp Gradients of Unstable Single-Precision to Machine Precision via Neural Networks (2025). https://doi.org/10.48550/arXiv.2511.22819 . https://arxiv.org/abs/2511.22819
  3. [3]Mishra, S., Molinaro, R.: Estimates on the generalization error of physics-informed neural networks for approximating PDEs. IMA Journal of Numerical Analysis 43(1), 1–43 (2023) https://doi.org/10.1093/imanum/drab093
  4. [4]Hillebrecht, B., Unger, B.: Rigorous a posteriori error bounds for PDE-defined PINNs. IEEE Transactions on Neural Networks and Learning Systems 36(1), 1583–1593 (2025) https://doi.org/10.1109/TNNLS.2023.3335837 arXiv:2210.03426
  5. [5]Stokes, G.G.: On the theory of oscillatory waves. Transactions of the Cambridge Philosophical Society 8, 441–455 (1847)
  6. [6]Zakharov, V.E.: Stability of periodic waves of finite amplitude on the surface of a deep fluid. Journal of Applied Mechanics and Technical Physics 9(2), 190–194 (1968) https://doi.org/10.1007/BF00913182
  7. [7]Nalimov, V.I.: The cauchy-poisson problem. Dinamika Sploshn. Sredy 18, 104–210 (1974)
  8. [8]Lannes, D.: The Water Waves Problem: Mathematical Analysis and Asymptotics vol. 188. American Mathematical Society, Providence, RI (2013)
  9. [9]Haziot, S.V., Hur, V.M., Strauss, W.A., Toland, J.F., Wahlén, E., Walsh, S., Wheeler, M.H.: Traveling water waves—the ebb and flow of two centuries. Quarterly of Applied Mathematics 80(2), 317–401 (2022) https://doi.org/10.1090/qam/1614
  10. [10]Raissi, M., Perdikaris, P., Karniadakis, G.E.: Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. Journal of Computational Physics 378, 686–707 (2019) https://doi.org/10.1016/j.jcp.2018.10.045
  11. [11]Toland, J.F.: Stokes waves. Topological Methods in Nonlinear Analysis 7, 1–48 (1996)DOI
  12. [12]Crapper, G.D.: An exact solution for progressive capillary waves of arbitrary amplitude. Journal of Fluid Mechanics 2(6), 532–540 (1957) https://doi.org/10.1017/S0022112057000348
  13. [13]Wilton, J.R.: On ripples. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science 29(173), 688–700 (1915) https://doi.org/10.1080/14786440508635350
  14. [14]de Moura, L., Ullrich, S.: The Lean 4 theorem prover and programming language. In: Platzer, A., Sutcliffe, G. (eds.) Automated Deduction—CADE 28. Lecture Notes in Computer Science, vol. 12699, pp. 625–635. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-79876-5_37
  15. [15]The mathlib Community: The Lean mathematical library. In: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs. CPP 2020. ACM, ??? (2020). https://doi.org/10.1145/3372885.3373824
  16. [16]Johansson, F.: Arb: Efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Transactions on Computers 66(8), 1281–1292 (2017) https://doi.org/10.1109/TC.2017.2690633
  17. [17]Eiras, F., Bibi, A., Bunel, R.R., Dvijotham, K.D., Torr, P., Kumar, M.P.: Efficient error certification for physics-informed neural networks. In: Proceedings of the 41st International Conference on Machine Learning. Proceedings of Machine Learning Research, vol. 235, pp. 12318–12347. PMLR, ??? (2024). https://proceedings.mlr.press/v235/eiras24a.htmlarxiv.org/abs/2305.10157
  18. [18]Tanaka, K., Yatabe, K.: Learn and Verify: A Framework for Rigorous Verification of Physics-Informed Neural Networks (2026). https://doi.org/10.48550/arXiv.2601.19818 . https://arxiv.org/abs/2601.19818
  19. [19]Müller, J., Zeinhofer, M.: Achieving high accuracy with PINNs via energy natural gradient descent. In: Proceedings of the 40th International Conference on Machine Learning. Proceedings of Machine Learning Research, vol. 202, pp. 25471–25485. PMLR, ??? (2023). https://proceedings.mlr.press/v202/muller23b.html
  20. [20]Gómez-Serrano, J.: Computer-assisted proofs in PDE: a survey. SeMA Journal 76(3), 459–484 (2019) https://doi.org/10.1007/s40324-019-00186-x
  21. [21]Immler, F.: A verified ODE solver and the Lorenz attractor. Journal of Automated Reasoning 61, 73–111 (2018) https://doi.org/10.1007/s10817-017-9448-y
  22. [22]George, R.J., Cruden, J., Adkisson, W., Zhong, X., Zhang, H., Anandkumar, A.: TorchLean: Formalizing Neural Networks in Lean. Version 2 (2026). https://doi.org/10.48550/arXiv.2602.22631 . https://arxiv.org/abs/2602.22631v2
  23. [23]Tanveer, S.: Singularities in water waves and rayleigh-taylor instability. Proceedings of the Royal Society of London. Series A 435 (1893), 137–158 (1991)DOI
  24. [24]Dyachenko, A.I., Zakharov, V.E., Kuznetsov, E.A.: Nonlinear dynamics of the free surface of an ideal fluid. Plasma Physics Reports 22(10), 829–840 (1996)DOI
  25. [25]Babenko, K.I.: Some remarks on the theory of surface waves of finite amplitude. Soviet Mathematics Doklady 35, 599–603 (1987)
  26. [26]Schwartz, L.W., Vanden-Broeck, J.-M.: Numerical solution of the exact equations for capillary–gravity waves. Journal of Fluid Mechanics 95(1), 119–139 (1979) https://doi.org/10.1017/S0022112079001373
  27. [27]Chen, B., Saffman, P.G.: Steady gravity-capillary waves on deep water—II. numerical results for finite amplitude. Studies in Applied Mathematics 62(2), 95–111 (1980) https://doi.org/10.1002/sapm198062295
  28. [28]Trichtchenko, O., Deconinck, B., Wilkening, J.: The instability of Wilton ripples. Wave Motion 66, 147–155 (2016) https://doi.org/10.1016/j.wavemoti.2016.06.004
  29. [29]Shelton, J., Milewski, P., Trinh, P.H.: On the structure of steady parasitic gravity-capillary waves in the small surface tension limit. Journal of Fluid Mechanics 922, 16 (2021) https://doi.org/10.1017/jfm.2021.514
  30. [30]Toland, J.F., Jones, M.C.W.: The bifurcation and secondary bifurcation of capillary-gravity waves. Proceedings of the Royal Society of London. Series A, Mathematical and Physical Sciences 399(1817), 391–417 (1985) https://doi.org/10.1098/rspa.1985.0063
  31. [31]Jones, M.C.W., Toland, J.F.: Symmetry and the bifurcation of capillary-gravity waves. Archive for Rational Mechanics and Analysis 96(1), 29–53 (1986) https://doi.org/10.1007/BF00251412
  32. [32]Buffoni, B., Dancer, E.N., Toland, J.F.: The regularity and local bifurcation of steady periodic water waves. Archive for Rational Mechanics and Analysis 152(3), 207–240 (2000) https://doi.org/10.1007/s002050000086
  33. [33]Wahlén, E., Weber, J.: Global bifurcation of capillary-gravity water waves with overhanging profiles and arbitrary vorticity. International Mathematics Research Notices 2023(20), 17377–17410 (2023) https://doi.org/10.1093/imrn/rnac280
  34. [34]Glorot, X., Bengio, Y.: Understanding the difficulty of training deep feedforward neural networks. In: Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics. Proceedings of Machine Learning Research, vol. 9, pp. 249–256. PMLR, ??? (2010). https://proceedings.mlr.press/v9/glorot10a.html
  35. [35]Bradbury, J., Frostig, R., Hawkins, P., Johnson, M.J., Katariya, Y., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., Zhang, Q.: JAX: Composable Transformations of Python+NumPy Programs (2018). https://github.com/jax-ml/jax
  36. [36]Martens, J., Grosse, R.: Optimizing neural networks with kronecker-factored approximate curvature. In: Proceedings of the 32nd International Conference on Machine Learning. Proceedings of Machine Learning Research, vol. 37, pp. 2408–2417. PMLR, ??? (2015). https://proceedings.mlr.press/v37/martens15.htmlarxiv.org/abs/1503.05671

Paper details

vlnc:W_3a8jgeyy
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

large language model

View statement
Looking for related papers…
Contents