Mode of #cas

eigenvalueBounds

Decimal bounds on the smallest and the largest eigenvalue of a symmetric matrix, with a theorem that they hold and are sharp.

#cas [eigenvalueBounds] A
gives the smallest and the largest eigenvalue of the symmetric matrix A with rational entries, rounded outward to 6 decimal places, and proves the bounds and that they are sharp.
#cas (digits := d) [eigenvalueBounds] A
gives the same bounds to d decimal places.

For a symmetric matrix, the extreme eigenvalues are the extreme values of xTAx on the unit sphere, and in a proof that is usually the form you need: c|x|2≤xTAx≤μ|x|2 for every x. eigenvalueBounds proves exactly this, with decimals c and μ. It also proves that neither bound improves by 10−d, so the bounds are as tight as the digits allow. I find this most useful when the exact eigenvalues are roots of a high-degree polynomial and the argument only needs a bound on the quadratic form.

Details and Options

  • A is a symmetric square matrix literal !![a, b; c, d] or a list of rows [[a, b], [c, d]]. The entries are closed rational expressions such as -3/2, 0.25 or 1/10^15.
  • With Q(x)=∑i∑jAijxixj for the real matrix A and the printed decimals c and μ, the theorem says three things over ℝ:
    • c * ∑ i, x i ^ 2 ≤ Q x ∧ Q x ≤ μ * ∑ i, x i ^ 2 for every x : Fin n → ℝ;
    • Q x < (c + 10 ^ (-d)) * ∑ i, x i ^ 2 for some x;
    • (μ - 10 ^ (-d)) * ∑ i, x i ^ 2 < Q x for some x.
  • The theorem writes Q(x) out as ∑ i, ∑ j, A i j * x i * x j, and c, μ, c+10−d and μ−10−d as decimals. So c is the smallest eigenvalue rounded down to d places, and μ the largest one rounded up.
  • Both bounds come from bisection on the grid 10−dℤ. The kernel checks exact factorizations LDLT over ℚ with nonnegative pivots of A−cI and μI−A, and the two rational vectors that show the bounds are sharp.
  • (digits := d) sets the number d of decimal places: 6 by default, between 1 and cas.maxDigits, which is 2000 by default (see Options).

Examples (13)#

Basic Examples (2)

The eigenvalues of this matrix are 1 and 3, and the bounds are exact:

In[1]:=
#cas [eigenvalueBounds] !![2, 1; 1, 2]
Out[1]=

Rayleigh bounds

1.000000≤λmin,λmax≤3.000000
1.000000 ≤ λ_min, λ_max ≤ 3.000000
Domain
2 × 2 symmetric real matrix
Input (matrix)
!![2, 1; 1, 2]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-6

(∀ (x : Fin 2 → ℝ),
    1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j ∧
      ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j ≤ 3.000000 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j < 1.000001 * ∑ i, x i ^ 2) ∧
    ∃ x, 2.999999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-6

    (∀ (x : Fin 2 → ℝ),
        1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j ∧
          ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j ≤ 3.000000 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j < 1.000001 * ∑ i, x i ^ 2) ∧
        ∃ x, 2.999999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![2, 1; 1, 2] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-6) |x|² and yᵀAy > (μ - 10^-6) |y|²

Here the extreme eigenvalues are 3∓3, rounded outward:

In[2]:=
#cas [eigenvalueBounds] !![4, 1, 0; 1, 3, 1; 0, 1, 2]
Out[2]=

Rayleigh bounds

1.267949≤λmin,λmax≤4.732051
1.267949 ≤ λ_min, λ_max ≤ 4.732051
Domain
3 × 3 symmetric real matrix
Input (matrix)
!![4, 1, 0; 1, 3, 1; 0, 1, 2]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-6

(∀ (x : Fin 3 → ℝ),
    1.267949 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ∧
      ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ≤ 4.732051 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j < 1.267950 * ∑ i, x i ^ 2) ∧
    ∃ x, 4.732050 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-6

    (∀ (x : Fin 3 → ℝ),
        1.267949 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ∧
          ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ≤ 4.732051 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j < 1.267950 * ∑ i, x i ^ 2) ∧
        ∃ x, 4.732050 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-6) |x|² and yᵀAy > (μ - 10^-6) |y|²

Scope (3)

Eigenvalues of very different sizes:

In[3]:=
#cas [eigenvalueBounds] !![1000000, 0; 0, 1]
Out[3]=

Rayleigh bounds

1.000000≤λmin,λmax≤1000000.000000
1.000000 ≤ λ_min, λ_max ≤ 1000000.000000
Domain
2 × 2 symmetric real matrix
Input (matrix)
!![1000000, 0; 0, 1]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-6

(∀ (x : Fin 2 → ℝ),
    1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j ∧
      ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j ≤ 1000000.000000 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j < 1.000001 * ∑ i, x i ^ 2) ∧
    ∃ x, 999999.999999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-6

    (∀ (x : Fin 2 → ℝ),
        1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j ∧
          ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j ≤ 1000000.000000 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j < 1.000001 * ∑ i, x i ^ 2) ∧
        ∃ x, 999999.999999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![1000000, 0; 0, 1] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-6) |x|² and yᵀAy > (μ - 10^-6) |y|²

A negative eigenvalue:

In[4]:=
#cas [eigenvalueBounds] !![1, 2; 2, 1]
Out[4]=

Rayleigh bounds

−1.000000≤λmin,λmax≤3.000000
-1.000000 ≤ λ_min, λ_max ≤ 3.000000
Domain
2 × 2 symmetric real matrix
Input (matrix)
!![1, 2; 2, 1]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-6

(∀ (x : Fin 2 → ℝ),
    -1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j ∧
      ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j ≤ 3.000000 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j < -0.999999 * ∑ i, x i ^ 2) ∧
    ∃ x, 2.999999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-6

    (∀ (x : Fin 2 → ℝ),
        -1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j ∧
          ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j ≤ 3.000000 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j < -0.999999 * ∑ i, x i ^ 2) ∧
        ∃ x, 2.999999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![1, 2; 2, 1] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-6) |x|² and yᵀAy > (μ - 10^-6) |y|²

Fractions, written as a list of rows:

In[5]:=
#cas [eigenvalueBounds] [[1/2, 1/4], [1/4, 1/2]]
Out[5]=

Rayleigh bounds

0.250000≤λmin,λmax≤0.750000
0.250000 ≤ λ_min, λ_max ≤ 0.750000
Domain
2 × 2 symmetric real matrix
Input (matrix)
[[1/2, 1/4], [1/4, 1/2]]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-6

(∀ (x : Fin 2 → ℝ),
    0.250000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j ∧
      ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j ≤ 0.750000 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j < 0.250001 * ∑ i, x i ^ 2) ∧
    ∃ x, 0.749999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-6

    (∀ (x : Fin 2 → ℝ),
        0.250000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j ∧
          ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j ≤ 0.750000 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j < 0.250001 * ∑ i, x i ^ 2) ∧
        ∃ x, 0.749999 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![1 / 2, 1 / 4; 1 / 4, 1 / 2] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-6) |x|² and yᵀAy > (μ - 10^-6) |y|²

Options (2)

Three decimal places:

In[6]:=
#cas (digits := 3) [eigenvalueBounds] !![4, 1, 0; 1, 3, 1; 0, 1, 2]
Out[6]=

Rayleigh bounds

1.267≤λmin,λmax≤4.733
1.267 ≤ λ_min, λ_max ≤ 4.733
Domain
3 × 3 symmetric real matrix
Input (matrix)
!![4, 1, 0; 1, 3, 1; 0, 1, 2]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-3

(∀ (x : Fin 3 → ℝ),
    1.267 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ∧
      ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ≤ 4.733 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j < 1.268 * ∑ i, x i ^ 2) ∧
    ∃ x, 4.732 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-3

    (∀ (x : Fin 3 → ℝ),
        1.267 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ∧
          ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j ≤ 4.733 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j < 1.268 * ∑ i, x i ^ 2) ∧
        ∃ x, 4.732 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![4, 1, 0; 1, 3, 1; 0, 1, 2] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-3) |x|² and yᵀAy > (μ - 10^-3) |y|²

Twenty places for the eigenvalues 5±52 of this matrix:

In[7]:=
#cas (digits := 20) [eigenvalueBounds] !![2, 1; 1, 3]
Out[7]=

Rayleigh bounds

1.38196601125010515179≤λmin,λmax≤3.61803398874989484821
1.38196601125010515179 ≤ λ_min, λ_max ≤ 3.61803398874989484821
Domain
2 × 2 symmetric real matrix
Input (matrix)
!![2, 1; 1, 3]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-20

(∀ (x : Fin 2 → ℝ),
    1.38196601125010515179 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j ∧
      ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j ≤ 3.61803398874989484821 * ∑ i, x i ^ 2) ∧
  (∃ x, ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j < 1.38196601125010515180 * ∑ i, x i ^ 2) ∧
    ∃ x, 3.61803398874989484820 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-20

    (∀ (x : Fin 2 → ℝ),
        1.38196601125010515179 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j ∧
          ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j ≤ 3.61803398874989484821 * ∑ i, x i ^ 2) ∧
      (∃ x, ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j < 1.38196601125010515180 * ∑ i, x i ^ 2) ∧
        ∃ x, 3.61803398874989484820 * ∑ i, x i ^ 2 < ∑ i, ∑ j, !![2, 1; 1, 3] i j * x i * x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-20) |x|² and yᵀAy > (μ - 10^-20) |y|²

Applications (1)

A proof can take the first part of the printed theorem as a hypothesis and use its lower bound. Only the three standard axioms are used:

In[8]:=
theorem rayleigh_lower
    (h : ∀ x : Fin 2 → ℝ,
      1.000000 * ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![(2 : ℝ), 1; 1, 2] i j * x i * x j ∧
        ∑ i, ∑ j, !![(2 : ℝ), 1; 1, 2] i j * x i * x j ≤ 3.000000 * ∑ i, x i ^ 2)
    (x : Fin 2 → ℝ) :
    ∑ i, x i ^ 2 ≤ ∑ i, ∑ j, !![(2 : ℝ), 1; 1, 2] i j * x i * x j := by
  have e : (1.000000 : ℝ) = 1 := by norm_num
  have h₁ := (h x).1
  rw [e, one_mul] at h₁
  exact h₁

#print axioms rayleigh_lower
Out[8]=

rayleigh_lower depends on the axioms propext, Classical.choice, Quot.sound.

Properties and Relations (2)

eigenvalues gives the exact eigenvalues, here 1 and 3:

In[9]:=
#cas [eigenvalues] !![2, 1; 1, 2]
Out[9]=

eigenvalues with multiplicity

[1, 3]
[1, 3]
Domain
ℚ^(2×2)
Input (matrix)
!![2, 1; 1, 2]

Checked by Lean’s kernel: Characteristic polynomial factored over ℚ

!![2, 1; 1, 2].charpoly = (Polynomial.X - 1) * (Polynomial.X - 3)
The certificate: 1 checked step
  1. Characteristic polynomial factored over ℚ

    !![2, 1; 1, 2].charpoly = (Polynomial.X - 1) * (Polynomial.X - 3)

    Checked by Lean’s kernel


A lower bound above 0 says that the matrix is positive definite, which positiveDefinite decides exactly:

In[10]:=
#cas [positiveDefinite] !![2, 1; 1, 2]
Out[10]=

Boolean

True
Domain
2 × 2 real matrix
Input (matrix)
!![2, 1; 1, 2]

Checked by Lean’s kernel: The matrix is positive definite

!![2, 1; 1, 2].PosDef
The certificate: 1 checked step
  1. The matrix is positive definite

    !![2, 1; 1, 2].PosDef

    Checked by Lean’s kernel

The computation
  • Certificate

    A = L D Lᵀ over ℚ with pivots D = [2, 3/2], all positive

Possible Issues (2)

The matrix has to be symmetric. eigenvalues takes every square matrix:

In[11]:=
#cas [eigenvalueBounds] !![1, 2; 3, 4]
Out[11]=

Error

eigenvalueBounds needs a symmetric matrix

The number of places is between 1 and cas.maxDigits:

In[12]:=
#cas (digits := 0) [eigenvalueBounds] !![2, 1; 1, 2]
Out[12]=

Error

eigenvalueBounds accepts between 1 and 2000 digits

Neat Examples (1)

The 10×10 Hilbert matrix, with entries 1i+j−1, is the classic example of an ill-conditioned matrix. Its smallest eigenvalue is about 1.09·10−13, and fourteen places bound it away from 0. In the theorem, Lean prints the decimals 0.00000000000010 and 0.00000000000011 as 10e-14 and 11e-14:

In[13]:=
#cas (digits := 14) [eigenvalueBounds] !![1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10;
  1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11;
  1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12;
  1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13;
  1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14;
  1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15;
  1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16;
  1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16, 1/17;
  1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16, 1/17, 1/18;
  1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16, 1/17, 1/18, 1/19]
Out[13]=

Rayleigh bounds

0.00000000000010≤λmin,λmax≤1.75191967026518
0.00000000000010 ≤ λ_min, λ_max ≤ 1.75191967026518
Domain
10 × 10 symmetric real matrix
Input (matrix)
!![1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10; 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11; 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12; 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13; 1/5, 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14; 1/6, 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15; 1/7, 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16; 1/8, 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16, 1/17; 1/9, 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16, 1/17, 1/18; 1/10, 1/11, 1/12, 1/13, 1/14, 1/15, 1/16, 1/17, 1/18, 1/19]

Checked by Lean’s kernel: Rayleigh bounds, sharp to 10^-14

(∀ (x : Fin 10 → ℝ),
    10e-14 * ∑ i, x i ^ 2 ≤
        ∑ i,
          ∑ j,
            !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                    1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                    1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                    1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                    1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                    1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                    1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                    1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                    1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                    1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                  i j *
                x i *
              x j ∧
      ∑ i,
          ∑ j,
            !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                    1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                    1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                    1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                    1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                    1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                    1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                    1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                    1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                    1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                  i j *
                x i *
              x j ≤
        1.75191967026518 * ∑ i, x i ^ 2) ∧
  (∃ x,
      ∑ i,
          ∑ j,
            !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                    1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                    1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                    1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                    1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                    1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                    1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                    1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                    1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                    1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                  i j *
                x i *
              x j <
        11e-14 * ∑ i, x i ^ 2) ∧
    ∃ x,
      1.75191967026517 * ∑ i, x i ^ 2 <
        ∑ i,
          ∑ j,
            !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                    1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                    1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                    1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                    1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                    1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                    1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                    1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                    1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                    1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                  i j *
                x i *
              x j
The certificate: 1 checked step
  1. Rayleigh bounds, sharp to 10^-14

    (∀ (x : Fin 10 → ℝ),
        10e-14 * ∑ i, x i ^ 2 ≤
            ∑ i,
              ∑ j,
                !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                        1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                        1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                        1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                        1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                        1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                        1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                        1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                        1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                        1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                      i j *
                    x i *
                  x j ∧
          ∑ i,
              ∑ j,
                !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                        1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                        1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                        1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                        1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                        1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                        1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                        1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                        1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                        1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                      i j *
                    x i *
                  x j ≤
            1.75191967026518 * ∑ i, x i ^ 2) ∧
      (∃ x,
          ∑ i,
              ∑ j,
                !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                        1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                        1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                        1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                        1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                        1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                        1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                        1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                        1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                        1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                      i j *
                    x i *
                  x j <
            11e-14 * ∑ i, x i ^ 2) ∧
        ∃ x,
          1.75191967026517 * ∑ i, x i ^ 2 <
            ∑ i,
              ∑ j,
                !![1, 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10;
                        1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11;
                        1 / 3, 1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12;
                        1 / 4, 1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13;
                        1 / 5, 1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14;
                        1 / 6, 1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15;
                        1 / 7, 1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16;
                        1 / 8, 1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17;
                        1 / 9, 1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18;
                        1 / 10, 1 / 11, 1 / 12, 1 / 13, 1 / 14, 1 / 15, 1 / 16, 1 / 17, 1 / 18, 1 / 19]
                      i j *
                    x i *
                  x j

    Checked by Lean’s kernel

The computation
  • Certificate

    A - cI = L D Lᵀ and μI - A = L' D' L'ᵀ over ℚ, with nonnegative pivots
    x, y over ℚ with xᵀAx < (c + 10^-14) |x|² and yᵀAy > (μ - 10^-14) |y|²

See Also

eigenvalues · positiveDefinite · N · enclose · Options