Richardson’s theorem (1968). For expressions built from rational numbers, $\pi$, $\ln 2$, the variable $x$, the operations $+,\,-,\,\cdot$, composition, and the functions $\sin$, $\exp$ and $|\cdot|$, there is no algorithm that decides, for every expression, whether it is identically zero. The applet shows three ideas of the proof: weights in the penalty make a small value force an integer solution (tab 4); one variable is enough, because the curve $(t\sin t,\ t\sin t^3)$ is dense and its iterates “lift” arbitrarily many coordinates (tabs 1–3); the absolute value turns a question about the sign into a question about an identity (tab 5).

Click on the plot to choose a target point — the applet will find the nearest point of the curve for $t \le T$.

The curve $\Gamma_2(t) = (t\sin t,\ t\sin t^3)$

points
—
time
—
No target point selected.
start: small $t$end: $t$ close to $T$

What is going on here?

The curve $\Gamma_2(t) = (h(t), g(t))$, where $h(t) = t\sin t$ and $g(t) = t\sin t^3$, is the image of one real variable. The first coordinate changes slowly: $|h'(t)| \le 1 + t$. The second oscillates faster and faster, because the phase $t^3$ has derivative $3t^2$: while $t$ runs through an interval of length $2\pi/(3t^2)$, the coordinate $h$ changes by at most $2\pi(1+t)/(3t^2) \to 0$, whereas $g$ sweeps the whole interval $[-t, t]$.

Hence density: the image $\Gamma_2((M, \infty))$ meets every open subset of the plane (rigorous proof — tab 2). At the same time, the image of a smooth curve has measure zero: the curve does not pass through every point. In the proof, density is enough, because the set $\{F < 1\}$ is open — the curve does not have to hit a zero of the function $F$; it suffices that it enters a neighborhood of it.

The plane: a piece of the curve for $t \in [u, v]$

$\Gamma_2(t)$, $t\in[u,v]$strip $|x-a|<\delta/2$target $(a,b)$

The same moments in time: $g(t)$ and $h(t) - a$ on the interval $[u, v]$

Target and tolerance

Examples

Ranges: $|a|, |b| \le 100$, $0.01 \le \delta \le 1$.

The steps of the proof, with numbers

Precision of the computation

What is going on here?

Lifting lemma. For any $a, b \in \mathbb{R}$, $\delta > 0$ and $M \ge 0$ there exists $w > M$ such that $|h(w) - a| < \delta$ and $g(w) = b$ — exactly.

Proof (this is exactly what the applet computes): choose $R > \max\{1, |b|, 4\pi/\delta, M\}$ and $v > \sqrt{R^2 + \delta/2}$ with $h(v) = a$ — such a $v$ exists by the Darboux property, because $h(2\pi k + \tfrac{\pi}{2}) = 2\pi k + \tfrac{\pi}{2}$ and $h(2\pi k + \tfrac{3\pi}{2}) = -(2\pi k + \tfrac{3\pi}{2})$. Set $u = \sqrt{v^2 - \delta/2}$, so that $(v-u)(v+u) = \delta/2$. Then:

  • the interval is short: $(v-u)(v+1) < (v-u)(v+u) = \delta/2$, so by the mean value theorem $|h(t) - a| = |h(t) - h(v)| \le (v-u)(1+v) < \delta/2$ for $t \in [u, v]$;
  • the phase makes a full turn: $v^3 - u^3 = v(v^2 - u^2) + u^2(v - u) > v\delta/2 > R\delta/2 > 2\pi$, so $(u^3, v^3)$ contains phases $\theta_\pm$ with $\sin\theta_\pm = \pm 1$;
  • an exact hit: at the points $t_\pm = \sqrt[3]{\theta_\pm}$ we have $g(t_+) = t_+ > |b|$ and $g(t_-) = -t_- < -|b|$, so by the Darboux property there is a $w$ between them with $g(w) = b$.

Step 1: the tail $(a_2, a_3)$ — the lifting lemma gives $w^*$

Step 2: the target $(a_1, w^*)$ — the lifting lemma gives $w$ with $g(w) = w^*$

Result: $\Gamma_3(w) = \big(h(w),\ h(g(w)),\ g(g(w))\big)$

Values computed in double-double arithmetic (about 32 digits). The last two columns: the same point $w$ rounded to an ordinary double, with everything computed in float64.

Target in $\mathbb{R}^3$

Examples

Ranges: $|a_i| \le 20$, $0.05 \le \delta \le 1$.

What is going on here?

Higher-dimensional curves are defined recursively: $\Gamma_{n+1}(t) = \big(h(t),\ \Gamma_n(g(t))\big)$, e.g. $\Gamma_3(t) = \big(h(t),\ h(g(t)),\ g(g(t))\big)$. Induction: for the “tail” $(a_2, a_3)$ we find $w^*$ with $|h(w^*) - a_2| < \delta$ and $g(w^*) = a_3$; then the lifting lemma for the target $(a_1, w^*)$ gives $w$ with $|h(w) - a_1| < \delta$ and $g(w) = w^*$ exactly. Then $\Gamma_3(w) = \big(h(w),\ \Gamma_2(w^*)\big)$ — the errors of the tail do not grow, because the last coordinate is hit exactly, not approximately.

Numerically this is delicate: $g'(t) = \sin t^3 + 3t^3\cos t^3$ is of order $3t^3$, so even a rounding error in $g(w)$ gets amplified enormously in $g(g(w))$. That is why the applet computes in double-double arithmetic; the float64 columns show what would happen without it. In mathematics (exact computation) there is no problem — this is precisely the advantage of an exact last coordinate.

$r(x) = P_N(x)^2 + \sin^2(\pi x)$$f(x) = 16\,[P_N^2 + \sin^2(\pi x)\,k(x)^4]$threshold $1$

The family $P_N(x) = Nx - 1$

For $N \ge 2$ the polynomial $P_N$ has no nonnegative integer root (because $Nm - 1 = 0$ gives $m = 1/N$).

Minima on a grid of 150,000 points in the interval $[0,\ 1.5]$

What is going on here?

The unweighted penalty $r(x) = P_N(x)^2 + \sin^2(\pi x)$ vanishes exactly at the integer roots of $P_N$ — of which there are none. Even so, its minimum is of order $\sin^2(\pi/N) \to 0$: no fixed threshold separates “there are solutions” from “there are no solutions”, because $P_N$ becomes more and more sensitive to shifts.

Richardson multiplies the term $\sin^2(\pi x)$ by $k(x)^4$, where $k$ is a local majorant of the derivative $Q' = (P^2)'$: $|Q'(z)| < k(x)$ for $|z - x| \le 1$. The majorant is built recursively, directly from the expression: $c \mapsto c^2 + 2$, $x \mapsto x^2 + 2$, sum and difference $\mapsto$ sum of the majorants, product $\mapsto$ product, $\exp A \mapsto \exp M_A$, $\sin A \mapsto 2$. For $Q'(x) = 2N\cdot(N\cdot x - 1)$ this gives $k(x) = (4N^2 + 2)\big((N^2 + 2)(x^2 + 2) + 3\big)$.

Rounding theorem: if $f(x) = (n+1)^4\,[P^2 + \sin^2(\pi x)\,k(x)^4] \le 1$ (here $n = 1$), then for the nearest integer $m$ and $d = |x - m|$ we have $d \le |\sin \pi x|^{1/2}$, so $d\,k(x) \le \tfrac12$, and by the mean value theorem $P(m)^2 \le \tfrac1{16} + \tfrac12 < 1$. An integer value smaller than $1$ must be zero: $P(m) = 0$. For $P_N$ this is impossible — hence $f > 1$ everywhere, as the plot shows.

$A(t)$$B(t) = |A(t)| - A(t)$$A(t) < 0$

The expression $A(t)$

A(t) =
Examples

Allowed: $t$, numbers, $+\,-\,*\,/$, powers (^ or **), sin, cos, exp, sqrt, pi. Interval: $t \in [-5, 5]$.

What is going on here?

For a real number $u$ we have $|u| - u = 0$ when $u \ge 0$, and $|u| - u = -2u > 0$ when $u < 0$. Hence $B = |A| - A$ is identically zero exactly when $A$ takes no negative values anywhere. An algorithm deciding “is $B \equiv 0$?” would therefore decide “does $\exists t\ A(t) < 0$ hold?” — and that is undecidable (the first part of Richardson’s theorem, for $A = G_a - 1$). Hence the identity problem is undecidable when the language contains $|\cdot|$.

The plot and the sampling are only an experiment, not a proof: the “trap” example is negative only on an interval of length $0.002$, which the 1,001-point grid does not notice. For expressions without $|\cdot|$ (analytic functions) this proof does not settle the identity problem.

Proof map

Let $U \subseteq \mathbb{N}$ be an undecidable set of the form $\{a : \exists \mathbf{m} \in \mathbb{N}^n\ P(a, \mathbf{m}) = 0\}$ (Davis–Putnam–Robinson; in modern form, Matiyasevich), where $P$ takes integer values at integer points. The construction is effective, and for every $a \in \mathbb{N}$:

$$\begin{aligned} a \in U &\iff \exists \mathbf{m} \in \mathbb{N}^n\ \ P(a, \mathbf{m}) = 0 &&\text{(arithmetic)}\\ &\iff \exists \mathbf{u} \in \mathbb{R}^n\ \ F(a, \mathbf{u}) = 0 &&\text{(weights and squares — tab 4)}\\ &\iff \exists t \in \mathbb{R}\ \ G_a(t) = F(a, \Gamma_n(t)) < 1 &&\text{(dense curve — tabs 1–3)}\\ &\iff A_a = G_a - 1 \ \text{takes a negative value}\\ &\iff B_a = |A_a| - A_a \not\equiv 0 &&\text{(absolute value — tab 5).} \end{aligned}$$

If there were an algorithm deciding the identity $B \equiv 0$, it would decide membership in $U$ — a contradiction. The applet illustrates the steps with computations (this is an experiment, not a proof); the full proof with all the details is in the course book.

Explore on your own

  1. In tab 1, turn on the fixed window $[-20, 20]^2$ and increase $T$. Click a point and watch the distance from the curve to it decrease. For which $t$ does the curve enter the disk of radius $0.1$ around the chosen point?
  2. In tab 2, decrease $\delta$. How does the $w$ found grow? (Hint: $w > 4\pi/\delta$.) Can the lemma be proved with a smaller $w$ — what in the proof forces this size?
  3. Why is the last coordinate hit exactly in the induction, and not just up to $\delta$? What would break if $g(w)$ were only close to $w^*$? Compare the double-double and float64 columns in tab 3.
  4. In tab 4: for which $N$ does the minimum of $r$ drop below $10^{-3}$? Would it be enough to multiply $r$ by a large constant instead of by $k(x)^4$? Why not?
  5. In tab 5, design an expression $A$ whose negativity is invisible on the 1,001-point grid but nevertheless exists. What does this tell you about “numerical” identity testing?