Documentation

ConvexAnalysis.ComputerAssistedProofs

Computer-assisted existence proofs checked by Lean #

A computer-assisted proof of existence in rigorous numerics has two parts: a theorem that turns numerical bounds into existence and uniqueness of a solution (here the radii polynomial theorem of ConvexAnalysis.RadiiPolynomial), and a rigorous computation of the bounds, usually with interval or ball arithmetic in floating point. In this file Lean checks both parts. The numbers x₀, A, Y, Z were found with ordinary floating-point arithmetic outside Lean and written into the statements as decimal literals; inside Lean they are exact rationals.

Main definitions #

Main statements #

Implementation notes #

References #

Tags #

computer-assisted proof, rigorous numerics, radii polynomial, interval arithmetic, ball arithmetic, dyadic_interval, Krawczyk test, Hansen–Sengupta test, omega constant, complex root, eigenpair, matrix square root, branch and bound, verified global minimum, six-hump camel function, exclusion test

theorem ConvexAnalysis.existsUnique_sub_exp_neg_eq_zero :
∃! x : ℝ, x ∈ Set.Icc (0.5671432904 - 1e-10) (0.5671432904 + 1e-10) ∧ x - Real.exp (-x) = 0

The omega constant to within 10⁻¹⁰: the equation x = exp (-x) has exactly one solution in [x₀ - r, x₀ + r] for x₀ = 0.5671432904 and r = 10⁻¹⁰. The radii polynomial theorem is applied to f x = x - exp (-x) with f' x = 1 + exp (-x), the approximate inverse a = 0.63810374 of f'(x₀), Y = 10⁻¹¹ ≥ |a f(x₀)| and Z = 10⁻⁶ ≥ |1 - a f'(x)| on the interval; Y + Z r ≤ r holds by norm_num, the two bounds by dyadic_interval.

theorem ConvexAnalysis.existsUnique_sq_sub_two_eq_zero :
∃! x : ℝ, x ∈ Set.Icc (1.41421356 - 1e-8) (1.41421356 + 1e-8) ∧ x ^ 2 - 2 = 0

√2 to within 10⁻⁸: x² = 2 has exactly one solution in [x₀ - r, x₀ + r] for x₀ = 1.41421356 and r = 10⁻⁸. The radii polynomial theorem is applied with the approximate inverse a = 0.35355339 of f'(x₀) = 2 x₀, Y = 3 · 10⁻⁹ and Z = 10⁻⁷; all bounds are rational inequalities, checked by norm_num and linarith.

theorem ConvexAnalysis.existsUnique_mem_ball_sq_eq_two :
∃! x : ℝ, x ∈ { center := 1.41421356, radius := Real.toNNReal 1e-8 } ∧ x ^ 2 - 2 = 0

√2 to within 10⁻⁸, with ball arithmetic: x² = 2 has exactly one solution in the ball B = ⟨1.41421356, 10⁻⁸⟩. As in ConvexAnalysis.existsUnique_sq_sub_two_eq_zero, the radii polynomial theorem is applied with a = 0.35355339, Y = 3 · 10⁻⁹ and Z = 10⁻⁷; the bound |1 - a f'(x)| ≤ Z for all x ∈ B comes from ball arithmetic: 1 - a (2 x) lies in the ball 1 - a • (2 * B) (ConvexAnalysis.Ball.sub_mem_sub, ConvexAnalysis.Ball.smul_mem_smul, ConvexAnalysis.Ball.mul_mem_mul), whose center 1 - 2 a x₀ and radius 2 |a| 10⁻⁸ are numbers, and |y| ≤ |c| + r for y in a ball ⟨c, r⟩.

theorem ConvexAnalysis.existsUnique_circle_inter_hyperbola :
∃! p : ℝ × ℝ, p ∈ Metric.closedBall (1.93185165, 0.51763809) 1e-8 ∧ p.1 ^ 2 + p.2 ^ 2 = 4 ∧ p.1 * p.2 = 1

A polynomial system: the circle x² + y² = 4 and the hyperbola x y = 1 meet in exactly one point of the ball of radius 10⁻⁸ around (1.93185165, 0.51763809) in ℝ × ℝ with the sup norm (the exact point is (√(2 + √3), √(2 - √3))). The radii polynomial theorem is applied to F (x, y) = (x² + y² - 4, x y - 1) with the Jacobian F' and the approximate inverse A = [[0.27883877, -0.14942925], [-0.07471462, 0.55767754]] of F'(x₀), Y = 3 · 10⁻⁹ and Z = 10⁻⁶. The defect bound is checked by norm_num; ‖1 - A F'(p)‖ ≤ Z is reduced to the absolute row sums of the matrix 1 - A F'(p), which dyadic_interval bounds for all p in the ball.

Krawczyk tests computed in the kernel #

The following examples need no bound proved by hand: the dyadic Krawczyk test ConvexAnalysis.RatArithExpr.krawczykTest evaluates the system and its symbolic partial derivatives in dyadic interval arithmetic, and decide +kernel checks that it returns true. Only the translation of the expression trees into the usual notation is done by simp.

theorem ConvexAnalysis.existsUnique_eq_exp_neg_krawczyk :
∃! x : ℝ, x ∈ Set.Icc (0.5671432904097838 - 1e-15) (0.5671432904097838 + 1e-15) ∧ x = Real.exp (-x)

The omega constant to within 10⁻¹⁵, by a Krawczyk test computed in the kernel: the equation x = exp (-x) has exactly one solution in [x₀ - 10⁻¹⁵, x₀ + 10⁻¹⁵] for x₀ = 0.5671432904097838. The derivative 1 + exp (-x) is computed symbolically, the slopes are enclosed in dyadic interval arithmetic with precision 2⁻⁶⁰, and the Krawczyk operator with y = 0.63810374 ≈ 1 / (1 + exp (-x₀)) lies inside the interval (ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_of_krawczykTest_real).

theorem ConvexAnalysis.existsUnique_mul_log_eq_one_krawczyk :
∃! x : ℝ, x ∈ Set.Icc (1.763222834351897 - 1e-14) (1.763222834351897 + 1e-14) ∧ x * Real.log x = 1

x log x = 1 by a Krawczyk test computed in the kernel: the equation has exactly one solution in [x₀ - 10⁻¹⁴, x₀ + 10⁻¹⁴] for x₀ = 1.763222834351897 (the solution is 1 / W(1) = e^Ω). The symbolic derivative log x + x x⁻¹ uses the logarithm and the inverse in dyadic interval arithmetic; y = 0.63817 ≈ 1 / (1 + log x₀).

theorem ConvexAnalysis.existsUnique_circle_inter_hyperbola_krawczyk :
∃! x : Fin 2 → ℝ, (x 0 ∈ Set.Icc (1.93185165257814 - 1e-13) (1.93185165257814 + 1e-13) ∧ x 1 ∈ Set.Icc (0.51763809020504 - 1e-13) (0.51763809020504 + 1e-13)) ∧ x 0 ^ 2 + x 1 ^ 2 = 4 ∧ x 0 * x 1 = 1

The circle and the hyperbola, by a Krawczyk test computed in the kernel: the system x² + y² = 4, x y = 1 has exactly one solution in the box of radius 10⁻¹³ around (1.93185165257814, 0.51763809020504) (the exact point is (√(2 + √3), √(2 - √3))). The Jacobian is computed symbolically and enclosed in dyadic interval arithmetic, with the approximate inverse Y = [[0.27883877, -0.14942925], [-0.07471462, 0.55767754]] of the Jacobian at the center (ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_of_krawczykTest). Compare ConvexAnalysis.existsUnique_circle_inter_hyperbola, where the derivative and the bound on ‖1 - A F'(p)‖ are written by hand.

theorem ConvexAnalysis.existsUnique_circle_inter_hyperbola_hansenSengupta :
(∃! x : Fin 2 → ℝ, (x 0 ∈ Set.Icc (1.93185165257814 - 0.5) (1.93185165257814 + 0.5) ∧ x 1 ∈ Set.Icc (0.51763809020504 - 5e-2) (0.51763809020504 + 5e-2)) ∧ x 0 ^ 2 + x 1 ^ 2 = 4 ∧ x 0 * x 1 = 1) ∧ ∀ (x : Fin 2 → ℝ), x 0 ∈ Set.Icc (1.93185165257814 - 0.5) (1.93185165257814 + 0.5) → x 1 ∈ Set.Icc (0.51763809020504 - 5e-2) (0.51763809020504 + 5e-2) → x 0 ^ 2 + x 1 ^ 2 = 4 → x 0 * x 1 = 1 → x 0 ∈ Set.Icc 1.9246 1.9391 ∧ x 1 ∈ Set.Icc 0.5166 0.5187

The circle and the hyperbola on a larger box, by the Hansen–Sengupta test: the system x² + y² = 4, x y = 1 has exactly one solution with |x - 1.93185165257814| ≤ 1/2 and |y - 0.51763809020504| ≤ 1/20, and it lies in [1.9246, 1.9391] × [0.5166, 0.5187]. The dyadic Hansen–Sengupta test ConvexAnalysis.RatArithExpr.hansenSenguptaTest succeeds with the center and the preconditioner Y of ConvexAnalysis.existsUnique_circle_inter_hyperbola_krawczyk, where the Krawczyk test with the same data fails (ConvexAnalysis.krawczykTest_circle_inter_hyperbola_eq_false): the Gauss–Seidel sweep first narrows the side of x to about [1.92466, 1.93904] and then uses it in the row of y, which it narrows to about [0.51660, 0.51868], while the Krawczyk operator keeps the full width 1/2 of x in the row of y (ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_of_hansenSenguptaTest). The enclosure test ConvexAnalysis.RatArithExpr.hansenSenguptaEnclosureTest checks the narrowed box (ConvexAnalysis.RatArithExpr.mem_Icc_of_hansenSenguptaEnclosureTest).

theorem ConvexAnalysis.krawczykTest_circle_inter_hyperbola_eq_false :
RatArithExpr.krawczykTest 60 ![RatArithExpr.var 0 ^ 2 + RatArithExpr.var 1 ^ 2 - 4, RatArithExpr.var 0 * RatArithExpr.var 1 - 1] ![1.93185165257814 - 0.5, 0.51763809020504 - 5e-2] ![1.93185165257814 + 0.5, 0.51763809020504 + 5e-2] ![1.93185165257814, 0.51763809020504] !![0.27883877, -0.14942925; -7471462e-8, 0.55767754] = false

The Krawczyk test fails where the Hansen–Sengupta test succeeds: on the box of ConvexAnalysis.existsUnique_circle_inter_hyperbola_hansenSengupta, with the same center, preconditioner and precision, the dyadic Krawczyk test returns false; its operator in the row of y is about [0.452, 0.583], wider than the side [0.4676, 0.5676] of the box.

Complex zeros, eigenpairs and matrix square roots #

The dyadic Krawczyk test works on Fin n → ℝ. The following theorems carry its result over to problems stated in ℂ and with Mathlib's Matrix: a zero of a function f : ℂ → ℂ in a rectangle, from the system of its real and imaginary parts; an eigenpair (λ, v) of a rational matrix with the normalization v 0 = 1; a square root X * X = A of a rational matrix. Each bridge is proved once, so an example needs only the test, checked by decide +kernel, and a translation of the statement by simp.

def ConvexAnalysis.matrixFinEquiv (α : Type u_1) (m n : ℕ) :
Matrix (Fin m) (Fin n) α ≃ (Fin (m * n) → α)

Matrices with rows in Fin m and columns in Fin n as vectors indexed by Fin (m * n), row by row: the entry M i j is the coordinate finProdFinEquiv (i, j) = n i + j.

Equations
Instances For
    @[simp]
    theorem ConvexAnalysis.matrixFinEquiv_apply_finProdFinEquiv {α : Type u_1} {m n : ℕ} (M : Matrix (Fin m) (Fin n) α) (i : Fin m) (j : Fin n) :
    (matrixFinEquiv α m n) M (finProdFinEquiv (i, j)) = M i j

    The coordinate finProdFinEquiv (i, j) of ConvexAnalysis.matrixFinEquiv α m n M is the entry M i j.

    theorem ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_complex_of_hasUniqueZero {f : ℂ → ℂ} {P Q : RatArithExpr (Fin 2)} {lo hi : Fin 2 → ℚ} (hP : ∀ (z : ℂ), ArithExpr.eval ![z.re, z.im] P.toArithExpr = (f z).re) (hQ : ∀ (z : ℂ), ArithExpr.eval ![z.re, z.im] Q.toArithExpr = (f z).im) (h : HasUniqueZero ![P, Q] lo hi) :
    ∃! z : ℂ, z ∈ Set.Icc ↑(lo 0) ↑(hi 0) ×ℂ Set.Icc ↑(lo 1) ↑(hi 1) ∧ f z = 0

    A zero in ℂ from a zero of the real system: let P and Q be expressions in two real variables that give the real and imaginary parts of f : ℂ → ℂ, as functions of the real and imaginary parts of z. If the system (P, Q) has exactly one zero in the box [lo, hi] (ConvexAnalysis.RatArithExpr.HasUniqueZero, for example by the dyadic Krawczyk test ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_of_krawczykTest or the Hansen–Sengupta test ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_of_hansenSenguptaTest), then f has exactly one zero in the rectangle [lo 0, hi 0] ×ℂ [lo 1, hi 1]. For holomorphic f the Jacobian of (P, Q) is the matrix [[a, -b], [b, a]] of multiplication by f'(z) = a + b i, so the preconditioner Y of a test can be taken as the matrix of an approximation of 1 / f'(z₀).

    The coordinate v j of the eigenvector in ConvexAnalysis.RatArithExpr.eigenSystem: the constant 1 for j = 0 (the normalization v 0 = 1), the variable x j otherwise.

    Equations
    Instances For
      def ConvexAnalysis.RatArithExpr.eigenSystem {n : ℕ} (A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℚ) (i : Fin (n + 1)) :

      The eigenpair system of a rational matrix A of size n + 1: the equations (A v)ᵢ - λ vᵢ = 0 for i : Fin (n + 1) in the variables x : Fin (n + 1) → ℝ, where x 0 = λ is the eigenvalue and x j for j ≠ 0 are the coordinates of the eigenvector v, normalized by v 0 = 1 (ConvexAnalysis.RatArithExpr.eval_eigenSystem).

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem ConvexAnalysis.RatArithExpr.eval_eigenSystem {n : ℕ} (A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℚ) (x : Fin (n + 1) → ℝ) (i : Fin (n + 1)) :
        ArithExpr.eval x (eigenSystem A i).toArithExpr = (A.map Rat.cast).mulVec (fun (j : Fin (n + 1)) => if j = 0 then 1 else x j) i - x 0 * if i = 0 then 1 else x i

        The value of the eigenpair system ConvexAnalysis.RatArithExpr.eigenSystem A at x is (A v)ᵢ - λ vᵢ for λ = x 0 and v = (1, x 1, …, x n).

        theorem ConvexAnalysis.RatArithExpr.existsUnique_eigenpair_of_hasUniqueZero {n : ℕ} {A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℚ} {lo hi : Fin (n + 1) → ℚ} (h : HasUniqueZero (eigenSystem A) lo hi) :
        ∃! p : ℝ × (Fin (n + 1) → ℝ), (p.1 ∈ Set.Icc ↑(lo 0) ↑(hi 0) ∧ ∀ (i : Fin (n + 1)), i ≠ 0 → p.2 i ∈ Set.Icc ↑(lo i) ↑(hi i)) ∧ p.2 0 = 1 ∧ (A.map Rat.cast).mulVec p.2 = p.1 • p.2

        An eigenpair from a zero of the eigenpair system: if the eigenpair system ConvexAnalysis.RatArithExpr.eigenSystem A has exactly one zero in the box [lo, hi] (coordinate 0 for the eigenvalue, coordinates i ≠ 0 for the eigenvector; for example by a dyadic Krawczyk or Hansen–Sengupta test), then the matrix A has exactly one eigenpair (λ, v) with λ ∈ [lo 0, hi 0], v i ∈ [lo i, hi i] for i ≠ 0 and v 0 = 1. This is the verification of an eigenpair by a nonlinear system with one frozen component of the eigenvector (Rump, Section 13.4).

        def ConvexAnalysis.RatArithExpr.mulSelfSystem {m : ℕ} (A : Matrix (Fin m) (Fin m) ℚ) (k : Fin (m * m)) :

        The matrix square root system of a rational m × m matrix A: the equations (X * X) i j - A i j = 0 in the variables x : Fin (m * m) → ℝ, the entries of X row by row (ConvexAnalysis.matrixFinEquiv, ConvexAnalysis.RatArithExpr.eval_mulSelfSystem); the equation for the entry (i, j) has the index finProdFinEquiv (i, j).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem ConvexAnalysis.RatArithExpr.eval_mulSelfSystem {m : ℕ} (A : Matrix (Fin m) (Fin m) ℚ) (X : Matrix (Fin m) (Fin m) ℝ) (i j : Fin m) :

          The value of the matrix square root system ConvexAnalysis.RatArithExpr.mulSelfSystem A at the entries of X is (X * X) i j - A i j.

          theorem ConvexAnalysis.RatArithExpr.existsUnique_mul_self_eq_of_hasUniqueZero {m : ℕ} {A lo hi : Matrix (Fin m) (Fin m) ℚ} (h : HasUniqueZero (mulSelfSystem A) ((matrixFinEquiv ℚ m m) lo) ((matrixFinEquiv ℚ m m) hi)) :
          ∃! X : Matrix (Fin m) (Fin m) ℝ, (∀ (i j : Fin m), X i j ∈ Set.Icc ↑(lo i j) ↑(hi i j)) ∧ X * X = A.map Rat.cast

          A matrix square root from a zero of the square root system: if the system ConvexAnalysis.RatArithExpr.mulSelfSystem A has exactly one zero in the box of the matrices lo ≤ X ≤ hi (entrywise, flattened by ConvexAnalysis.matrixFinEquiv; for example by a dyadic Krawczyk test with the center X₀ and an approximate inverse Y of the Jacobian H ↦ X₀ H + H X₀ in the flattened coordinates), then A has exactly one square root X * X = A with lo i j ≤ X i j ≤ hi i j for all i, j.

          theorem ConvexAnalysis.existsUnique_cubic_complex_root :
          ∃! z : ℂ, z ∈ Set.Icc (0.8846461771193157 - 1e-14) (0.8846461771193157 + 1e-14) ×ℂ Set.Icc (0.5897428050222055 - 1e-14) (0.5897428050222055 + 1e-14) ∧ z ^ 3 - 2 * z + 2 = 0

          A complex root of a real cubic, by a Krawczyk test computed in the kernel: the polynomial z³ - 2 z + 2 has exactly one root in the square of side 2 · 10⁻¹⁴ around 0.8846461771193157 + 0.5897428050222055 i. (It has one real root, near -1.7693, since its discriminant -76 is negative, and this root and its conjugate.) The test is applied to the real and imaginary parts x³ - 3 x y² - 2 x + 2 and 3 x² y - y³ - 2 y with the matrix of 1 / f'(z₀) ≈ -0.06764814 - 0.30442763 i as Y (ConvexAnalysis.RatArithExpr.existsUnique_eq_zero_complex_of_hasUniqueZero).

          theorem ConvexAnalysis.existsUnique_eigenpair_three :
          ∃! p : ℝ × (Fin 3 → ℝ), (p.1 ∈ Set.Icc (4.732050807568877 - 1e-14) (4.732050807568877 + 1e-14) ∧ p.2 1 ∈ Set.Icc (2.732050807568877 - 1e-14) (2.732050807568877 + 1e-14) ∧ p.2 2 ∈ Set.Icc (3.732050807568877 - 1e-14) (3.732050807568877 + 1e-14)) ∧ p.2 0 = 1 ∧ !![2, 1, 0; 1, 3, 1; 0, 1, 4].mulVec p.2 = p.1 • p.2

          An eigenpair with an irrational eigenvalue, by a Krawczyk test computed in the kernel: the matrix A = [[2, 1, 0], [1, 3, 1], [0, 1, 4]] has exactly one eigenpair (λ, v), A v = λ v, with v 0 = 1, λ within 10⁻¹⁴ of 4.732050807568877 and v 1, v 2 within 10⁻¹⁴ of 2.732050807568877 and 3.732050807568877. (The exact eigenpair is λ = 3 + √3, v = (1, 1 + √3, 2 + √3); the other eigenvalues are 3 and 3 - √3.) The test is applied to ConvexAnalysis.RatArithExpr.eigenSystem A (ConvexAnalysis.RatArithExpr.existsUnique_eigenpair_of_hasUniqueZero).

          theorem ConvexAnalysis.existsUnique_matrix_sqrt :
          ∃! X : Matrix (Fin 2) (Fin 2) ℝ, (X 0 0 ∈ Set.Icc (1.962116505790891 - 1e-14) (1.962116505790891 + 1e-14) ∧ X 0 1 ∈ Set.Icc (0.2739514717088982 - 1e-14) (0.2739514717088982 + 1e-14) ∧ X 1 0 ∈ Set.Icc (0.5479029434177964 - 1e-14) (0.5479029434177964 + 1e-14) ∧ X 1 1 ∈ Set.Icc (1.688165034081993 - 1e-14) (1.688165034081993 + 1e-14)) ∧ X * X = !![4, 1; 2, 3]

          A matrix square root, by a Krawczyk test computed in the kernel: the matrix A = [[4, 1], [2, 3]] has exactly one square root X * X = A whose entries lie within 10⁻¹⁴ of those of [[1.962116505790891, 0.2739514717088982], [0.5479029434177964, 1.688165034081993]]. (This is the principal square root (√5 (A - 2) - √2 (A - 5)) / 3, with the eigenvalues √5 and √2.) The test is applied to ConvexAnalysis.RatArithExpr.mulSelfSystem A in four variables (ConvexAnalysis.RatArithExpr.existsUnique_mul_self_eq_of_hasUniqueZero).

          Verified bounds, a global minimum and an exclusion by branch and bound #

          The tests of ConvexAnalysis.IntervalBranchAndBound bisect a box until the natural interval extension or the mean value form of an expression proves the bound on every piece. As above, decide +kernel checks the computation and simp and ring translate the expressions.

          noncomputable def ConvexAnalysis.sixHumpCamel (x y : ℝ) :

          The six-hump camel function (4 - 2.1 x² + x⁴ / 3) x² + x y + (-4 + 4 y²) y², a standard test function of global optimization. On [-2, 2] × [-1, 1] it has six local minima, and its global minimum -1.0316284535… is attained at the two points ±(0.0898…, -0.7126…) (ConvexAnalysis.exists_isMinOn_sixHumpCamel).

          Equations
          Instances For
            theorem ConvexAnalysis.exists_isMinOn_sixHumpCamel :
            ∃ p ∈ Set.Icc (-2) 2 ×ˢ Set.Icc (-1) 1, IsMinOn (fun (p : ℝ × ℝ) => sixHumpCamel p.1 p.2) (Set.Icc (-2) 2 ×ˢ Set.Icc (-1) 1) p ∧ sixHumpCamel p.1 p.2 ∈ Set.Icc (-1.035) (-1.03162)

            The global minimum of the six-hump camel function, verified by branch and bound: on [-2, 2] × [-1, 1] the function ConvexAnalysis.sixHumpCamel attains its minimum, and the minimum lies in [-1.035, -1.03162]. The minimum test ConvexAnalysis.RatArithExpr.minimumTest runs on the half [0, 2] × [-1, 1], which suffices since f (-x, -y) = f (x, y): the upper bound -1.03162 bounds the value -1.03162842… at (0.0898, -0.7126), and the lower bound -1.035 is proved on every piece of an adaptive bisection, by the natural interval extension or, on pieces of width at most 1/64, by the mean value form (ConvexAnalysis.RatArithExpr.exists_isMinOn_of_minimumTest). The function is evaluated in the form x² ((x² - 63/20)² / 3 + 277/400) + x y + 4 (y² - 1/2)² - 1, equal to it by ring. The kernel check takes about 3.5 seconds (201 boxes); the lower bound -1.032 would take about 8 seconds and 1.5 GB more memory.

            theorem ConvexAnalysis.mul_exp_neg_lt (x : ℝ) :
            x ∈ Set.Icc 0 10 → x * Real.exp (-x) < 0.3679

            A strict upper bound with the exponential, by branch and bound: x e⁻ˣ < 0.3679 for 0 ≤ x ≤ 10; the maximum is 1/e = 0.36787944… at x = 1, so the margin is about 2 · 10⁻⁵. The strict upper bound test ConvexAnalysis.RatArithExpr.strictUpperBoundTest succeeds mostly by the mean value form (on 26 of the 31 final pieces; the natural extension alone needs 1755 boxes instead of 61; ConvexAnalysis.RatArithExpr.eval_lt_of_strictUpperBoundTest); the kernel check takes about 2.4 seconds, most of it in the dyadic exponential.

            theorem ConvexAnalysis.lt_sub_one_mul_sub_two_mul_sub_three_mul_sub_four (x : ℝ) :
            x ∈ Set.Icc 0 5 → -1.01 < (x - 1) * (x - 2) * (x - 3) * (x - 4)

            A polynomial bounded below, by branch and bound: (x - 1)(x - 2)(x - 3)(x - 4) > -1.01 for 0 ≤ x ≤ 5; the minimum -1 is attained at x = (5 ± √5) / 2. The strict lower bound test ConvexAnalysis.RatArithExpr.strictLowerBoundTest succeeds (ConvexAnalysis.RatArithExpr.lt_eval_of_strictLowerBoundTest); the kernel check takes about 1 second.

            theorem ConvexAnalysis.not_exists_sq_add_sq_eq_one_and_mul_eq :
            ¬∃ (x : ℝ) (y : ℝ), x ^ 2 + y ^ 2 = 1 ∧ x * y = 0.51

            A near miss excluded by branch and bound: the system x² + y² = 1, x y = 0.51 has no real solution. On the unit circle x y ≤ 1/2, with equality at ±(1/√2, 1/√2), where both equations hold up to 0.01. Every solution lies in [-1, 1]², and the exclusion test ConvexAnalysis.RatArithExpr.exclusionTest with the natural interval extension shows that one of the two equations fails on every piece of a bisection of [-1, 1]² (ConvexAnalysis.RatArithExpr.forall_exists_ne_zero_of_exclusionTest); the kernel check takes about 1.2 seconds. (The inequality 2 x y ≤ x² + y² proves the statement by hand.)