The transformed spectrum governs convergence. The preconditioner changes the search spaces; the unpreconditioned CG statements should not be applied verbatim to PCG iterates.
These library results describe the mathematical PCG iterates. The implementation page establishes that its stored output is exactly the specified iterate; convergence and approximation results are collected here.
Theorem (The Chebyshev bound for PCG).
in \kappa = a'/a: for Hermitian \mathbf{A}, positive definite \mathbf{M} and the spectrum of \mathbf{M}\mathbf{A} in [a, a'], 0 < a, \|\mathbf{x}_\star - \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, q)\|_{\mathbf{A}}^2 \le 4\Bigl(\frac{\sqrt{a'/a} - 1}{\sqrt{a'/a} + 1}\Bigr)^{2q} \|\mathbf{x}_\star - \mathbf{x}_0\|_{\mathbf{A}}^2 \,. Spectral equivalence a\mathbf{M}^{-1} \preceq \mathbf{A} \preceq a'\mathbf{M}^{-1} gives the hypothesis by Matrix.PosDef.spectrum_mul_subset_Icc_of_le. [Saad2003, §9.2]; [Greenbaum1997, §8.1]; locators to verify.
Lean statement and details
Matrix.IsHermitian.re_quadForm_sub_pcgIterate_le_four_mul_pow.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] [DecidableEq n] {A M : Matrix n n 𝕜} (hA : A.IsHermitian)
(hM : M.PosDef) {a a' : ℝ} (ha : 0 < a) (hs : spectrum ℝ (M * A) ⊆ Set.Icc a a') {b xs : n → 𝕜}
(hxs : A *ᵥ xs = b) (x₀ : n → 𝕜) (q : ℕ) :
RCLike.re (quadForm A (xs - pcgIterate A M b x₀ q)) ≤
4 * ((√(a' / a) - 1) / (√(a' / a) + 1)) ^ (2 * q) * RCLike.re (quadForm A (xs - x₀))
for positive definite \mathbf{A} and \mathbf{M} and \mathbf{A}\mathbf{x}_\star = \mathbf{b}, PCG reaches the solution once q is at least the grade of \mathbf{M}\mathbf{r}_0 for \mathbf{M}\mathbf{A}, \mathbf{r}_0 = \mathbf{b} - \mathbf{A}\mathbf{x}_0: \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, q) = \mathbf{x}_\star. [Saad2003, Proposition 5.6]; [Saad2003, §9.2.1]. A projection method onto an invariant subspace containing the right side is exact (Proposition 5.6), the Krylov space is invariant from the grade on ([Saad2003, Proposition 6.1]), and PCG is CG on the split system (§9.2.1).
Lean statement and details
Matrix.PosDef.pcgIterate_eq_of_krylovGrade_le.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
[Fintype n] [DecidableEq n] {A M : Matrix n n 𝕜} (hA : A.PosDef) (hM : M.PosDef) {b xs : n → 𝕜}
(hxs : A *ᵥ xs = b) (x₀ : n → 𝕜) {q : ℕ} (h : krylovGrade (M * A) (M *ᵥ (b - A *ᵥ x₀)) ≤ q) :
pcgIterate A M b x₀ q = xs
Theorem (PCG minimises the \mathbf{A}-norm error).
over \mathbf{x}_0 + \mathcal{K}_q(\mathbf{M}\mathbf{A}, \mathbf{M}\mathbf{r}_0), for positive definite \mathbf{A} and every \mathbf{M}, with \mathbf{A}\mathbf{x}_\star = \mathbf{b} and \mathbf{r}_0 = \mathbf{b} - \mathbf{A}\mathbf{x}_0: \|\mathbf{x}_\star - \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, q)\|_{\mathbf{A}}^2 \le \|\mathbf{x}_\star - \mathbf{y}\|_{\mathbf{A}}^2 for every such \mathbf{y}. [Saad2003, §9.2].
Lean statement and details
Matrix.PosDef.isMinOn_pcgIterate.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n]
[DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosDef) (M : Matrix n n 𝕜) {b xs : n → 𝕜}
(hxs : A *ᵥ xs = b) (x₀ : n → 𝕜) (q : ℕ) :
IsMinOn (fun y ↦ RCLike.re (quadForm A (xs - y)))
(↑(AffineSubspace.mk' x₀ (krylovSpace (M * A) (M *ᵥ (b - A *ᵥ x₀)) q))) (pcgIterate A M b x₀ q)
Theorem (PCG: orthogonal residuals and conjugate directions).
, for positive definite \mathbf{A} and \mathbf{M}: \mathbf{p}_j^{\mathsf{H}}\mathbf{A}\mathbf{p}_k = 0 for j < k. [Saad2003, §9.2.1]; [HestenesStiefel1952, Theorem 5:1]. Saad shows that the PCG directions are \mathbf{L}^{-\mathsf{H}} times the CG directions of the split system \mathbf{L}^{-1}\mathbf{A}\mathbf{L}^{-\mathsf{H}}, \mathbf{M}^{-1} = \mathbf{L}\mathbf{L}^{\mathsf{H}}, with the same \mathbf{A}-inner products, and those are conjugate by Hestenes and Stiefel; both work over \mathbb{R}.
Lean statement and details
Matrix.PosDef.star_pcgState_p_dotProduct_mulVec_eq_zero.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] {A M : Matrix n n 𝕜} (hA : A.PosDef) (hM : M.PosDef) {b x₀ : n → 𝕜}
{j k : ℕ} (hjk : j < k) : star (pcgState A M b x₀ j).p ⬝ᵥ A *ᵥ (pcgState A M b x₀ k).p = 0
Theorem (PCG kills outlying eigenvalues of \mathbf{M}\mathbf{A}).
for positive definite \mathbf{A} and \mathbf{M} with the spectrum of \mathbf{M}\mathbf{A} in [a, a'] \cup T, 0 < a, and \lvert\prod_{t \in T}(1 - x/t)\rvert \le C on [a, a'], \|\mathbf{x}_\star - \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, m + d)\|_{\mathbf{A}}^2 \le 4C^2\Bigl(\frac{\sqrt{a'/a} - 1}{\sqrt{a'/a} + 1}\Bigr)^{2d} \|\mathbf{x}_\star - \mathbf{x}_0\|_{\mathbf{A}}^2 \,,m = \lvert T \rvert. The form used for low-rank-plus-identity preconditioners.
Lean statement and details
Matrix.PosDef.re_quadForm_sub_pcgIterate_le_four_mul_sq_mul_pow.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] [DecidableEq n] {A M : Matrix n n 𝕜} (hA : A.PosDef) (hM : M.PosDef)
{a a' : ℝ} (ha : 0 < a) {T : Finset ℝ} (hs : spectrum ℝ (M * A) ⊆ Set.Icc a a' ∪ ↑T) {C : ℝ}
(hC : ∀ x ∈ Set.Icc a a', |∏ t ∈ T, (1 - x / t)| ≤ C) {b xs : n → 𝕜} (hxs : A *ᵥ xs = b)
(x₀ : n → 𝕜) (d : ℕ) :
RCLike.re (quadForm A (xs - pcgIterate A M b x₀ (T.card + d))) ≤
4 * C ^ 2 * ((√(a' / a) - 1) / (√(a' / a) + 1)) ^ (2 * d) * RCLike.re (quadForm A (xs - x₀))
Theorem (The preconditioned Hestenes–Stiefel iterates are the PCG iterates).
for positive definite \mathbf{A} and \mathbf{M} and every k, with no breakdown hypothesis, \mathbf{x}_k = \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, k). [Saad2003, §9.2]; locator to verify.
Lean statement and details
Matrix.PosDef.pcgState_x_eq.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2} [Fintype n]
[DecidableEq n] {A M : Matrix n n 𝕜} (hA : A.PosDef) (hM : M.PosDef) (b x₀ : n → 𝕜) (k : ℕ) :
(pcgState A M b x₀ k).x = pcgIterate A M b x₀ k
for positive definite \mathbf{A} and \mathbf{M} and \mathbf{A}\mathbf{x}_\star = \mathbf{b}, \|\mathbf{x}_\star - \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, q)\|_{\mathbf{A}}^2 \le \mathsf{residualMinimax}(\sigma(\mathbf{M}\mathbf{A}), q)^2 \|\mathbf{x}_\star - \mathbf{x}_0\|_{\mathbf{A}}^2 \,, where \mathsf{residualMinimax}(\sigma(\mathbf{M}\mathbf{A}), q) = \min_{p}\max_{\lambda \in \sigma(\mathbf{M}\mathbf{A})}\lvert p(\lambda) \rvert over real p with \deg p \le q, p(0) = 1. It is the CG theorem for the split system. [Saad2003, Theorem 6.29]; [Saad2003, §9.2.1]. The proof of Theorem 6.29 gives the CG bound with the maximum over the eigenvalues, and §9.2.1 shows that PCG is CG on the split system \mathbf{L}^{-1}\mathbf{A}\mathbf{L}^{-\mathsf{H}}, \mathbf{M}^{-1} = \mathbf{L}\mathbf{L}^{\mathsf{H}}, whose spectrum is that of \mathbf{M}\mathbf{A} (Saad's preconditioner is \mathbf{M}^{-1} here); Saad works over \mathbb{R}.
Lean statement and details
Matrix.PosDef.re_quadForm_sub_pcgIterate_le_residualMinimax_sq_mul.{u_1, u_2} {𝕜 : Type u_1}
[RCLike 𝕜] {n : Type u_2} [Fintype n] [DecidableEq n] {A M : Matrix n n 𝕜} (hA : A.PosDef)
(hM : M.PosDef) {b xs : n → 𝕜} (hxs : A *ᵥ xs = b) (x₀ : n → 𝕜) (q : ℕ) :
RCLike.re (quadForm A (xs - pcgIterate A M b x₀ q)) ≤
residualMinimax (spectrum ℝ (M * A)) q ^ 2 * RCLike.re (quadForm A (xs - x₀))
for positive definite \mathbf{A}, invertible \mathbf{C} with \mathbf{M} = \mathbf{C}\mathbf{C}^{\mathsf{H}} and \mathbf{C}\mathbf{y}_0 = \mathbf{x}_0, \mathsf{pcgIterate}(\mathbf{A}, \mathbf{M}, \mathbf{b}, \mathbf{x}_0, q) = \mathbf{C}\,\mathsf{cgIterate}(\mathbf{C}^{\mathsf{H}}\mathbf{A}\mathbf{C}, \mathbf{C}^{\mathsf{H}}\mathbf{b}, \mathbf{y}_0, q). Any factor works, the Cholesky factor or \mathbf{M}^{1/2}. [Saad2003, §9.2.1].
Lean statement and details
Matrix.PosDef.pcgIterate_eq_mulVec_cgIterate.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜] {n : Type u_2}
[Fintype n] [DecidableEq n] {A : Matrix n n 𝕜} (hA : A.PosDef) {M C : Matrix n n 𝕜}
(hC : IsUnit C) (hM : M = C * Cᴴ) {b x₀ y₀ : n → 𝕜} (hy₀ : C *ᵥ y₀ = x₀) (q : ℕ) :
pcgIterate A M b x₀ q = C *ᵥ cgIterate (Cᴴ * A * C) (Cᴴ *ᵥ b) y₀ q
Theorem (The preconditioned recurrence is the split recurrence).
for Hermitian \mathbf{A} and any \mathbf{C} with \mathbf{M} = \mathbf{C}\mathbf{C}^{\mathsf{H}}, the computed \mathbf{z}_j are \mathbf{C}\mathbf{q}_j for the canonical Lanczos basis of \mathbf{C}^{\mathsf{H}}\mathbf{A}\mathbf{C} from \mathbf{C}^{\mathsf{H}}\mathbf{b}, every q, with no breakdown hypothesis and no invertibility of \mathbf{C}: the matrix of the \mathbf{z}_j computed by q steps from \mathbf{b} is \mathbf{C}\,\mathsf{arnoldiMatrix}(\mathbf{C}^{\mathsf{H}}\mathbf{A}\mathbf{C}, \mathbf{C}^{\mathsf{H}}\mathbf{b}, q). [ElmanSilvesterWathen2014, Algorithm 4.1]; locator to verify.
Lean statement and details
Matrix.IsHermitian.preconditionedLanczosMatrix_eq.{u_1, u_2} {𝕜 : Type u_1} [RCLike 𝕜]
{n : Type u_2} [Fintype n] [DecidableEq n] {A M : Matrix n n 𝕜} (hA : A.IsHermitian)
{C : Matrix n n 𝕜} (hM : M = C * Cᴴ) (b : n → 𝕜) (q : ℕ) :
preconditionedLanczosMatrix A M b q = C * arnoldiMatrix (Cᴴ * A * C) (Cᴴ *ᵥ b) q