Documentation

CslibFrontier.Foundations.Analysis.Convex.Ellipsoid

Ellipsoids and the central-cut update #

For a positive definite A : Matrix ι ι ℝ and c : ι → ℝ, the ellipsoid Matrix.ellipsoid A c = {x | (x - c) ⬝ᵥ A⁻¹ *ᵥ (x - c) ≤ 1} has volume √(det A) times the volume of the Euclidean unit ball. A central cut through the center c in direction a ≠ 0 keeps the half {x | a ⬝ᵥ x ≤ a ⬝ᵥ c}. With n = card ι and b = A a / √(aᵀ A a), the central-cut update

c' = c - b / (n + 1), A' = n² / (n² - 1) · (A - 2 / (n + 1) · b bᵀ)

(for n ≥ 2; for n = 1 it is bisection, A' = A / 4) gives an ellipsoid E(A', c') that contains the half-ellipsoid and whose volume is smaller by the factor (n² / (n² - 1)) ^ ((n - 1) / 2) · n / (n + 1) < exp (-1 / (2 (n + 1))). This is the geometric step of Khachiyan's ellipsoid method; the iteration with a separation oracle is Cslib.Algorithms.Ellipsoid.

centralCutShape is written as n² / (n² - 1) · (A - b bᵀ) + (n / (n + 1))² · b bᵀ, which equals the formula above for n ≥ 2 (centralCutShape_of_two_le_card). For n = 1 the matrix A - b bᵀ vanishes, so the same expression is A / 4 (centralCutShape_of_card_eq_one) and every statement below holds for all n ≥ 1 without a case split in the definition.

The proofs are direct: the inverse of A' is (n² - 1) / n² · A⁻¹ + 2 (n + 1) / n² · a aᵀ / (aᵀ A a) (inv_centralCutShape), containment reduces to Cauchy–Schwarz for A⁻¹, the determinant follows from the matrix determinant lemma, and the volume formula uses CFC.sqrt A and Mathlib's addHaar_preimage_linearMap and EuclideanSpace.volume_closedBall.

Main definitions #

Main results #

References #

def Matrix.ellipsoid {ι : Type u_1} [Fintype ι] [DecidableEq ι] (A : Matrix ι ι ℝ) (c : ι → ℝ) :
Set (ι → ℝ)

The ellipsoid {x | (x - c) ⬝ᵥ A⁻¹ *ᵥ (x - c) ≤ 1} with shape matrix A and center c. It is the usual ellipsoid when A is positive definite [GrotschelLovaszSchrijver1988, Section 3.1].

theorem Matrix.mem_ellipsoid {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} {c x : ι → ℝ} :
x ∈ A.ellipsoid c ↔ (x - c) ⬝ᵥ A⁻¹.mulVec (x - c) ≤ 1
theorem Matrix.center_mem_ellipsoid {ι : Type u_1} [Fintype ι] [DecidableEq ι] (A : Matrix ι ι ℝ) (c : ι → ℝ) :
theorem Matrix.convex_ellipsoid {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} (hA : A.PosDef) (c : ι → ℝ) :

An ellipsoid with positive definite shape is convex.

theorem Matrix.ellipsoid_sq_smul_one {ι : Type u_1} [Fintype ι] [DecidableEq ι] {r : ℝ} (hr : r ≠ 0) (z : ι → ℝ) :
(r ^ 2 • 1).ellipsoid z = {x : ι → ℝ | (x - z) ⬝ᵥ (x - z) ≤ r ^ 2}

The ellipsoid with shape r² • 1 is the closed Euclidean ball of radius r.

theorem Matrix.PosDef.sq_smul_one {ι : Type u_1} [DecidableEq ι] {r : ℝ} (hr : r ≠ 0) :
(r ^ 2 • 1).PosDef

The unit ellipsoid E(1, 0) is the preimage of the closed unit ball of EuclideanSpace ℝ ι.

The volume of the unit ellipsoid is that of the Euclidean unit ball, so it is π ^ (n / 2) / Γ (n / 2 + 1) by EuclideanSpace.volume_closedBall.

Volume of an ellipsoid: vol E(A, c) = √(det A) · vol E(1, 0) for positive definite A [GrotschelLovaszSchrijver1988, Section 3.1].

theorem Matrix.volume_ellipsoid_pos {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} (hA : A.PosDef) (c : ι → ℝ) :
theorem Matrix.volume_ellipsoid_lt_top {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} (hA : A.PosDef) (c : ι → ℝ) :

The ball E(r² • 1, z) of radius r > 0 has volume rⁿ · vol E(1, 0).

noncomputable def Matrix.centralCutDir {ι : Type u_1} [Fintype ι] (A : Matrix ι ι ℝ) (a : ι → ℝ) :
ι → ℝ

The direction b = A a / √(aᵀ A a) of a central cut with normal a: the new center moves from c by -b / (n + 1).

noncomputable def Matrix.centralCutCenter {ι : Type u_1} [Fintype ι] (A : Matrix ι ι ℝ) (c a : ι → ℝ) :
ι → ℝ

The center c - b / (n + 1) of the ellipsoid after a central cut of E(A, c) with normal a, keeping {x | a ⬝ᵥ x ≤ a ⬝ᵥ c}. Here n = card ι and b = centralCutDir A a.

noncomputable def Matrix.centralCutShape {ι : Type u_1} [Fintype ι] (A : Matrix ι ι ℝ) (a : ι → ℝ) :
Matrix ι ι ℝ

The shape n² / (n² - 1) · (A - b bᵀ) + (n / (n + 1))² · b bᵀ of the ellipsoid after a central cut with normal a, where n = card ι and b = centralCutDir A a. For n ≥ 2 this is the textbook n² / (n² - 1) · (A - 2 / (n + 1) · b bᵀ) (centralCutShape_of_two_le_card); for n = 1 it is A / 4 (centralCutShape_of_card_eq_one).

theorem Matrix.centralCutShape_of_two_le_card {ι : Type u_1} [Fintype ι] (A : Matrix ι ι ℝ) (a : ι → ℝ) (h : 2 ≤ Fintype.card ι) :
A.centralCutShape a = (↑(Fintype.card ι) ^ 2 / (↑(Fintype.card ι) ^ 2 - 1)) • (A - (2 / (↑(Fintype.card ι) + 1)) • vecMulVec (A.centralCutDir a) (A.centralCutDir a))

For n ≥ 2, centralCutShape is the update of [GrotschelLovaszSchrijver1988, Section 3.1] and [BertsimasTsitsiklis1997, Theorem 8.1].

theorem Matrix.inv_centralCutShape {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} {a : ι → ℝ} (hA : A.PosDef) (ha : a ≠ 0) :
(A.centralCutShape a)⁻¹ = ((↑(Fintype.card ι) ^ 2 - 1) / ↑(Fintype.card ι) ^ 2) • A⁻¹ + (2 * (↑(Fintype.card ι) + 1) / (↑(Fintype.card ι) ^ 2 * a ⬝ᵥ A.mulVec a)) • vecMulVec a a

The inverse of the updated shape is (n² - 1) / n² · A⁻¹ + 2 (n + 1) / n² · a aᵀ / (aᵀ A a).

theorem Matrix.PosDef.centralCutShape {ι : Type u_1} [Fintype ι] {A : Matrix ι ι ℝ} {a : ι → ℝ} (hA : A.PosDef) (ha : a ≠ 0) :

The updated shape matrix is positive definite, so the update can be iterated.

theorem Matrix.centralCutShape_of_card_eq_one {ι : Type u_1} [Fintype ι] {A : Matrix ι ι ℝ} {a : ι → ℝ} (hA : A.PosDef) (ha : a ≠ 0) (h : Fintype.card ι = 1) :
A.centralCutShape a = (1 / 4) • A

In dimension one the central cut is bisection: the new shape is A / 4.

theorem Matrix.ellipsoid_inter_halfspace_subset {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} {a : ι → ℝ} (hA : A.PosDef) (ha : a ≠ 0) (c : ι → ℝ) :
A.ellipsoid c ∩ {x : ι → ℝ | a ⬝ᵥ x ≤ a ⬝ᵥ c} ⊆ (A.centralCutShape a).ellipsoid (A.centralCutCenter c a)

Half-ellipsoid containment: the updated ellipsoid contains the half of E(A, c) on the side a ⬝ᵥ x ≤ a ⬝ᵥ c of the hyperplane through the center [GrotschelLovaszSchrijver1988, Section 3.1], [BertsimasTsitsiklis1997, Theorem 8.1(a)] (with the opposite sign convention for a).

theorem Matrix.det_centralCutShape {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} {a : ι → ℝ} (hA : A.PosDef) (ha : a ≠ 0) :
(A.centralCutShape a).det = (↑(Fintype.card ι) ^ 2 / (↑(Fintype.card ι) ^ 2 - 1)) ^ (Fintype.card ι - 1) * (↑(Fintype.card ι) / (↑(Fintype.card ι) + 1)) ^ 2 * A.det

The determinant of the updated shape: det A' = (n² / (n² - 1)) ^ (n - 1) · (n / (n + 1))² · det A, for every n ≥ 1 (for n = 1 the first factor is 1).

theorem Matrix.volume_ellipsoid_centralCut_lt {ι : Type u_1} [Fintype ι] [DecidableEq ι] {A : Matrix ι ι ℝ} {a : ι → ℝ} (hA : A.PosDef) (ha : a ≠ 0) (c : ι → ℝ) :

Volume ratio of a central cut: vol E(A', c') < exp (-1 / (2 (n + 1))) · vol E(A, c) [BertsimasTsitsiklis1997, Theorem 8.1(b)], [GrotschelLovaszSchrijver1988, Section 3.1]. Bertsimas and Tsitsiklis state it for n ≥ 2; it is proved here for every n ≥ 1, the case n = 1 (bisection, ratio 1 / 2 < exp (-1 / 4)) being added. The proof bounds the exact ratio √(det A' / det A) from det_centralCutShape using 1 + x ≤ exp x.