Time-dependent problems¶
Twindex certifies bounded-noise twins for the semilinear heat equation
u_t − u_xx + q(x; θ) f(u) = g(x, t), (x, t) ∈ (0, 1) × (0, 1],
u(0, t) = u(1, t) = 0, u(x, 0) = u₀(x).
The coefficient uses the spatial Bernstein basis with nonnegative parameters.
The source and initial data are polynomials; f is a sum of odd powers with
nonnegative coefficients. Time runs from 0 to 1 with unit diffusion coefficient.
from fractions import Fraction as F
import json
from twindex.checker import check_certificate, Verdict
from twindex.parabolic import HeatModel, HeatProblem, make_certificate_heat
from twindex.solver_heat import candidate_heat
model = HeatModel() # four parameters, cubic reaction, zero source
sensors = ((F(1, 4), F(1, 2)), (F(1, 2), F(1, 2)),
(F(3, 4), F(1, 2)), (F(1, 2), F(1)))
p = candidate_heat([5, 5, 5, 5], model, n=16)
q = candidate_heat([10, 5, 5, 5], model, n=16)
problem = HeatProblem(sensors, tuple(p(x, t) for x, t in sensors),
F(1, 1000), ((0, 100),) * 4, model=model)
certificate = make_certificate_heat(problem, [([5] * 4, p), ([10, 5, 5, 5], q)], gap=F(5))
report = check_certificate(certificate)
assert report.verdict is Verdict.VALID
print(report.verdict) # the compatible target diameter is at least 5
# Save with json.dumps(certificate, indent=2); all measured numbers are rational strings.
encoded = json.dumps(certificate, indent=2)
Install twindex[search] to generate candidates. Replay needs only the standard
library. The checked-in result is examples/study/heat/twins_heat_pair.json:
twindex check examples/study/heat/twins_heat_pair.json
The exact checker verifies the boundary and initial data, then bounds the
residual over the entire space-time square using tensor Bernstein coefficients.
Theorem 10 in Theory gives
|u − p| ≤ ρ min(t, x(1−x)/2). Each barrier is nonnegative on the parabolic
boundary; no terminal condition at t = 1 is needed. Sensor coordinates must
satisfy 0 < x < 1 and 0 < t ≤ 1. A pair proves a lower bound on the compatible
parameter diameter for the declared data and noise level.
Initial data and corners¶
Candidates match the initial polynomial exactly. The default initial data are
u₀ = x − (5/3)x³ + x⁵ − (1/3)x⁶. For zero source and the default cubic reaction,
the second and fourth derivatives vanish at both ends, avoiding two corner
compatibility obstructions. General data can impose a residual floor:
ρ ≥ |u₀″(c) + g(c, 0)| for c = 0 or 1. This can prevent the sufficient sensor
inequalities from closing at small noise levels and produce INCONCLUSIVE.
Higher-order compatibility changes when a linear reaction term is present.
Scope and format¶
Only witness and pair certificates are supported; heat pavings are future work.
Kinds are witness_heat and pair_heat, version 2. The model declares
coefficient_degree, source, initial, and nonlinearity.
source and witness p use grids where entry [i][j] multiplies x^i t^j;
initial is a constant-first coefficient list in x. See Design.