cert-machine · report · a replication with intervals, re-derived at every build

Their tables, re-decided

A numerical-analysis paper ends with a table: the scheme's error against an exact solution, at four meshes, to two digits. The exact solution is a formula with π and e in it, evaluated in floating point; the error is a float minus a float; the digits are trusted because the authors are. This page takes the two tables of Ashrafyan and Gomes's semi-Lagrangian scheme for the price-formation game and does the other thing: the exact solutions are enclosed in interval arithmetic, the scheme is written again from the paper's own description with its inner minimisation solved exactly, and every printed cell is met by an interval and given a verdict. Most cells survive. Where they do not, the page says which choice the paper left open. And two things the tables could not show are found: the printed tolerance is a large part of the finest printed number, and the printed initial density, read as printed, is not a density.

tl;dr
  • The finding. Of the 24 printed cells, 13 are reproduced to their two digits, 5 fall within 15 %, 6 differ. The price column of test 1 is reproduced at every mesh; test 2 is reproduced in the value function and the density at every mesh. The paper's tolerance ε = 0.004 is 39 % of the finest printed price error of test 1. The initial density as printed has a mass above 3.9e+95 on a sliver of width 0.001.
  • The mechanism. The exact solutions (§8.1.1, §8.2.1 of the paper) evaluated as intervals — a second-order interval jet bounds the remainder of every integral — and the scheme of §4 run on the paper's meshes at the paper's tolerance and at 1e−8; each error is the scheme's float against an enclosure, so it is an interval, and a printed cell is REPRODUCED when its rounding box meets it.
  • Check it. node instruments/agtable/battery.js (24 checks, 5 red controls, about 10 s) re-derives the record, checks the enclosures against float routes, decides the clearing identity, and re-runs the scheme.
cells reproduced
13 of 24
to the two printed digits, by an implementation written from the paper; 5 more within 15 %
the price of test 1
4 of 4
reproduced at every mesh: 1.2e-2, 6.0e-3, 3.3e-3, 2.1e-3 against 1.2e-2, 6.0e-3, 3.3e-3, 2.1e-3
the tolerance inside the number
39 %
the finest printed price error of test 1 at ε = 0.004 exceeds the same run at ε = 1e−8 by this much; test 2 is immune (its implicit update converges to 1e−12 in three steps)
clearing identity
21 of 21
ϖ + a₁ + 2a₂K + Q encloses 0 at every sampled time: the exact price clears the exact market, decided
the density as printed
> 3.9e+95
its mass on 0.910 < x < 0.911 alone, read literally (support |x| < 1); the integrable reading, support |x| < 1/λ, is the one used
where the port differs
u, m of test 1
at the fine meshes the port's errors are 2.4× and 1.6× the printed ones; the paper's inner minimiser and its treatment of feet leaving [−1, 1] are not specified to the digit
§1 · the exact solutions

Two formulas, enclosed

Both tests share a supply that solves Q̇ = 5 sin 3πt − 4Q from Q(0) = −½: a sinusoid with a decaying start, in closed form with π and e. Test 1 is the linear-quadratic game with a set-point potential (x − ¼)²/2, and its price is the paper's semi-explicit formula, which with a symmetric initial density reads ϖ₁ = −Q + (1 − t)/4 − ∫ₜ¹∫₀ˢQ — the same closed form as the clearing-price page with γ = 0, η = 1. Test 2 has the cost 3|α|^{4/3}/4 and a linear potential, and its price is ϖ₂ = −Q^{1/3} − (1 − t). Everything the tables measure against is one of these two prices, the value function at t = 0, or the density at t = 1.

Every one of them is evaluated as an interval. The prices need π, e, sines, cosines and a cube root (verified by cubing). The value function of test 1 is a₀ + a₁x + a₂x² with a₂ = ½ tanh(1 − t) and a₁ read off the clearing identity, but a₀(0) is an integral of a squared combination of Q, K and tanh, and the density of test 2 needs ∫|Q|^{4/3}, which has a cusp at every zero of Q. Those integrals are done by the midpoint rule with its remainder w³/24 · sup|f″| — and sup|f″| comes from a second-order interval jet, a value with its first two derivatives carried through every operation, so nobody differentiates by hand and the bound is rigorous on each cell. At the cusps a plain Riemann bound takes over. The densities are the initial bump carried by an affine flow (test 1: contracted by cosh(1)⁻¹ and shifted by the day's energy; test 2: shifted only), with the bump's mass enclosed the same way.

quantityenclosurewidthhow
Q(1)[0.448617853670, 0.448617853670]5.8e-15closed form with π, e enclosed
K(1) = ∫₀¹Q, the day's energy[0.028103775069, 0.028103775069]1.4e-15closed form
a₀(0), test 1[-0.029123124, -0.029123055]6.9e-8midpoint rule, 4096 cells, the remainder from an interval f″
a₁(0), a₂(0), test 1-0.2494, 0.38086.7e-15closed: a₂ = ½ tanh(1 − t), a₁ = Π − 2a₂K
∫m̂, the bump's mass (λ = 1.1; 1.2)0.4036; 0.37002.4e-7midpoint rule with f″ on the core, a sliver bound at the edges
∫₀¹|Q|^{4/3}/4, test 2[0.055882988, 0.055883364]3.8e-7midpoint with f″ off the zeros of Q, a Riemann bound on the cells through them
ϖ₁ on the finest grid201 values1.5e-14closed form
ϖ₂ on the finest grid201 values1.2e-13a cube root near a zero of Q is where the width lives
-1.5 -1 -0.5 0 0.5 0 0.25 0.5 0.75 1 t supply and price Q(t), the supply of both tests: Q̇ = 5 sin 3πt − 4Q, Q(0) = −½ (closed form, enclosed) ϖ₁(t), test 1: −Q + (1 − t)/4 − ∫ₜ¹∫₀ˢQ (enclosed to 1e−13) ϖ₂(t), test 2: −Q^{1/3} − (1 − t) (enclosed; a verified cube root) the scheme's ϖ₁ at the coarsest mesh, ρ = 0.02, h = 0.04 (computed)
Figure 1 · The supply and the two exact prices over the day, enclosed (the widths are below the stroke). Dashed: the scheme's price of test 1 at the paper's coarsest mesh, a staircase of 25 steps that already follows the exact price to about a percent.

One identity is decided outright: the exact price of test 1 must clear the exact market, ϖ + a₁ + 2a₂K = −Q. Evaluated as intervals at 21 times, the residual encloses zero every time, to a half-width of 2.5e-14. Shift the price by 0.1 — the size the paper's ∫x m̄ term would have if the bump were not symmetric — and the identity fails at every time. That is the red control on the formula.

0 0.2 0.4 0.6 -1 -0.5 0 0.5 1 x u(x, 0), test 1 exact: a₀ + a₁x + a₂x², a₀ enclosed to 6.9e-8 (decided) the scheme at ρ = 0.02, h = 0.04 (computed)
Figure 2 · Test 1, the value function at t = 0: the exact parabola and the scheme at the coarsest mesh. The scheme sits above the exact function everywhere by about the size of its time step; a semi-Lagrangian value is an upper bound on a convex problem's infimum.
0 0.5 1 1.5 -1 -0.5 0 0.5 1 x m(x, T), test 1 exact: the initial bump carried by the affine flow, scale cosh(1)⁻¹ = 0.6481, mean K(1) = 0.0281 (decided) the scheme at ρ = 0.02, h = 0.04 (computed): the disagreement sits at the edge of the support, as the paper says
Figure 3 · Test 1, the density at t = T: the bump contracted by cosh(1)⁻¹ and carried to the day's energy, against the scheme at the coarsest mesh. The scheme's P1 transport diffuses the feet; the paper's own remark that the disagreement is at the boundary of the support is what one sees.
§2 · the tables

Twenty-four cells, each met by an interval

The scheme is the paper's: P1 interpolation of the value function, the backward step u_{i,k} = inf_α { I[u_{k+1}](x_i + hα) + h(l₀(α) + ϖ_k α + V_i) }, the forward push of the density by the minimising feet, the price corrected by the imbalance (explicitly for test 1, through an implicit cubic for test 2), stop when the price moves by less than ε. Two things the paper leaves to the reader are fixed here and said: the infimum is taken exactly — on each interpolation cell the objective is a convex function of α with a closed-form stationary point, so the least of the cell minima and the node values is the infimum, with no inner tolerance — and a foot that would leave [−1, 1] is held at the wall rather than given a shorter time step. The relative errors are sup norms on the grid: the price over the time grid, u at t = 0 and m at t = T over the space grid, each divided by the sup norm of the exact quantity. Because the exact quantity is an interval, so is each error; the tables print the interval, and a cell is REPRODUCED when the printed number's two-digit rounding box meets it.

Table 1 of the paper (test 1, ε = 0.004).

meshquantityprinted (ε = 0.004)this port at that ε, as an intervalat ε = 1e−8verdict
ρ = 0.02, h = 0.04ϖ, the price1.2e-2[1.23e-2, 1.23e-2]1.23e-2REPRODUCED
ρ = 0.02, h = 0.04u at t = 02.5e-2[2.67e-2, 2.67e-2]2.72e-2NEAR ×1.07
ρ = 0.02, h = 0.04m at t = T8.8e-2[9.31e-2, 9.31e-2]9.49e-2NEAR ×1.06
ρ = 0.01, h = 0.02ϖ, the price6.0e-3[6.04e-3, 6.04e-3]6.04e-3REPRODUCED
ρ = 0.01, h = 0.02u at t = 01.1e-2[1.32e-2, 1.32e-2]1.38e-2DIFFERS ×1.20
ρ = 0.01, h = 0.02m at t = T4.2e-2[4.69e-2, 4.69e-2]4.88e-2NEAR ×1.12
ρ = 0.005, h = 0.01ϖ, the price3.3e-3[3.27e-3, 3.27e-3]2.99e-3REPRODUCED
ρ = 0.005, h = 0.01u at t = 04.7e-3[6.31e-3, 6.31e-3]6.96e-3DIFFERS ×1.34
ρ = 0.005, h = 0.01m at t = T1.8e-2[2.28e-2, 2.28e-2]2.48e-2DIFFERS ×1.27
ρ = 0.0025, h = 0.005ϖ, the price2.1e-3[2.07e-3, 2.07e-3]1.49e-3REPRODUCED
ρ = 0.0025, h = 0.005u at t = 01.2e-3[2.83e-3, 2.83e-3]3.49e-3DIFFERS ×2.36
ρ = 0.0025, h = 0.005m at t = T6.7e-3[1.06e-2, 1.06e-2]1.25e-2DIFFERS ×1.58

Table 2 of the paper (test 2, ε = 0.0002).

meshquantityprinted (ε = 0.0002)this port at that ε, as an intervalat ε = 1e−8verdict
ρ = 0.02, h = 0.04ϖ, the price2.6e-2[2.66e-2, 2.66e-2]2.66e-2NEAR ×1.02
ρ = 0.02, h = 0.04u at t = 08.5e-3[8.53e-3, 8.53e-3]8.53e-3REPRODUCED
ρ = 0.02, h = 0.04m at t = T5.3e-2[5.27e-2, 5.27e-2]5.27e-2REPRODUCED
ρ = 0.01, h = 0.02ϖ, the price1.3e-2[1.33e-2, 1.33e-2]1.33e-2REPRODUCED
ρ = 0.01, h = 0.02u at t = 07.4e-3[7.38e-3, 7.38e-3]7.38e-3REPRODUCED
ρ = 0.01, h = 0.02m at t = T2.6e-2[2.64e-2, 2.64e-2]2.64e-2REPRODUCED
ρ = 0.005, h = 0.01ϖ, the price6.7e-3[6.63e-3, 6.63e-3]6.63e-3NEAR ×0.99
ρ = 0.005, h = 0.01u at t = 06.8e-3[6.78e-3, 6.78e-3]6.78e-3REPRODUCED
ρ = 0.005, h = 0.01m at t = T1.3e-2[1.32e-2, 1.32e-2]1.32e-2REPRODUCED
ρ = 0.0025, h = 0.005ϖ, the price3.9e-3[3.32e-3, 3.32e-3]3.32e-3DIFFERS ×0.85
ρ = 0.0025, h = 0.005u at t = 06.5e-3[6.45e-3, 6.45e-3]6.45e-3REPRODUCED
ρ = 0.0025, h = 0.005m at t = T6.6e-3[6.62e-3, 6.62e-3]6.62e-3REPRODUCED
0.001 0.01 0.0025 0.005 0.01 0.02 ρ (h = 2ρ), logarithmic — the relative error of ϖ, the price error, log test 1, this port at the paper's ε (computed) test 2, this port at the paper's ε (computed) printed in Tables 1 and 2 (hollow)
Figure 4 · The price error against the mesh. The port's dashed lines halve as ρ halves (ratios 2.04, 2.02, 2.01 for test 1, 2.00, 2.00, 2.00 for test 2, at ε = 1e−8); the printed circles sit on the test-1 line at every mesh and on the test-2 line at three of four.
0.001 0.01 0.0025 0.005 0.01 0.02 ρ (h = 2ρ), logarithmic — the relative error of u at t = 0 error, log test 1, this port at the paper's ε (computed) test 2, this port at the paper's ε (computed) printed in Tables 1 and 2 (hollow)
Figure 5 · The value-function error. Test 2 is reproduced throughout; test 1 parts from the printed values at the finer meshes, the port's errors larger by a growing factor — the fingerprint of the two open choices, not of the analytic solution, which both sides share.
0.01 0.1 0.0025 0.005 0.01 0.02 ρ (h = 2ρ), logarithmic — the relative error of m at t = T error, log test 1, this port at the paper's ε (computed) test 2, this port at the paper's ε (computed) printed in Tables 1 and 2 (hollow)
Figure 6 · The density error. The same pattern: test 2 reproduced, test 1 within 15 % at the coarse meshes and larger at the fine ones.
§3 · what the tables could not show

The tolerance, and the density as printed

The tolerance is inside the finest number. The paper stops when the price moves by less than ε = 0.004 and reports that every case converges in four iterations. Run the same four meshes to ε = 1e−8 (fourteen or fifteen iterations) and the coarse errors do not move, but at the finest mesh the price error of test 1 falls from 2.07e-3 to 1.49e-3: the printed 2.1e−3 is 39 % tolerance and the rest mesh. The convergence order the table suggests for the price (ratios 2.00, 1.82, 1.57 between printed rows) is therefore blunted at the end by ε, and is 2.04, 2.02, 2.01 — clean first order — once ε is out of the way. Test 2 is immune: its implicit price update reaches 1e−12 in three iterations at every mesh, and its errors at ε = 0.0002 and 1e−8 coincide.

The density as printed is not one. Both tests start from m̂(x) = exp(−1/(1 − (λx)²)) "for |x| < 1, 0 otherwise", λ = 1.1 and 1.2. For 1/λ < |x| < 1 the exponent −1/(1 − (λx)²) is positive and unbounded as |x| ↓ 1/λ, so the printed function has no finite integral: on the sliver 1/λ + 0.001 ≤ x ≤ 1/λ + 0.002 alone its mass is at least 3.9e+95 (λ = 1.1) and 2.3e+87 (λ = 1.2), decided by a one-cell Riemann bound. The only integrable reading is the standard bump with support |x| < 1/λ, which is what the paper's figures show and what this page encloses. A typo, almost certainly; but a table of digits rests on it, and the digits survived, which says the authors' code used the bump and not the sentence.

§4 · the honest boundary

What is claimed, and what is not

  • Decided. The enclosures of the two exact solutions and their widths; the clearing identity at 21 times; the bump's masses; the divergence of the density as printed. All interval statements, re-derived at every build.
  • Measured. Every error of the port at every mesh and tolerance, as an interval around a float scheme; the verdicts on the printed cells; the convergence ratios; the tolerance's share. A REPRODUCED cell means an independent implementation of the described scheme lands in the printed rounding box; a DIFFERS cell means it does not, and for the fine-mesh u and m of test 1 the port's two fixed choices are the likeliest reason. Nothing here says a printed number is wrong.
  • Assumed. The analytic solutions are the paper's (§8.1.1, §8.2.1); their derivation is not re-proved beyond the clearing identity. The relative error is the sup-norm ratio on the grid, which the paper's wording supports but does not spell out. The initial density is the integrable reading of the printed formula.
  • Not done. The paper's comparisons with the variational and the recurrent-network methods; the authors' own code, which is not published; the meshes between the four printed rows.
§5 · check it

Ten seconds on your machine

node instruments/agtable/battery.js       # 24 checks, 5 red controls: enclosures vs float routes, the clearing identity, the scheme, the verdicts
node instruments/agtable/run.js --check   # the record, re-derived and compared byte for byte

The instrument is instruments/agtable/exact.js (the enclosures) with sl.js (the scheme) and derive.js; the interval jet is instruments/interval/taylor2.js; the printed numbers are pinned in corpus/ashrafyan-gomes-2403.02785/tables.json; the record is certs/agtable-redecided.json.

references

Sources

  • Y. Ashrafyan, D. A. Gomes, A fully-discrete semi-Lagrangian scheme for a price formation MFG model, arXiv:2403.02785v2 (30 Jan 2025) — §4 (the scheme), §8 (the tests, the analytic solutions, Tables 1 and 2 on pp. 24 and 27).
  • D. A. Gomes, J. Saúde, A mean-field game approach to price formation in electricity markets, arXiv:1807.07088; Dyn. Games Appl. 11 (2021) — the model and the linear-quadratic solutions the tests rest on.
  • The clearing price, as a proved band — the same closed form, exact in rationals, on the source lab's scenario.