Documentation

QuantumInfo.ForMathlib.HermitianMat.CFC

Matrix operations on HermitianMats with the CFC

theorem Matrix.IsHermitian.spectrum_subset_Ici_of_sub {d : Type u_1} {š•œ : Type u_2} [Fintype d] [DecidableEq d] [RCLike š•œ] {A x : Matrix d d š•œ} (hA : A.IsHermitian) (hl : (x - A).PosSemidef) :
spectrum ā„ x āŠ† Set.Ici (⨅ (i : d), hA.eigenvalues i)
theorem Matrix.IsHermitian.spectrum_subset_Iic_of_sub {d : Type u_1} {š•œ : Type u_2} [Fintype d] [DecidableEq d] [RCLike š•œ] {A x : Matrix d d š•œ} (hA : A.IsHermitian) (hl : (A - x).PosSemidef) :
spectrum ā„ x āŠ† Set.Iic (⨆ (i : d), hA.eigenvalues i)
theorem Matrix.IsHermitian.spectrum_subset_of_mem_Icc {d : Type u_1} {š•œ : Type u_2} [Fintype d] [DecidableEq d] [RCLike š•œ] {A B x : Matrix d d š•œ} (hA : A.IsHermitian) (hB : B.IsHermitian) (hl : (x - A).PosSemidef) (hr : (B - x).PosSemidef) :
spectrum ā„ x āŠ† Set.Icc (⨅ (i : d), hA.eigenvalues i) (⨆ (i : d), hB.eigenvalues i)
@[simp]
theorem HermitianMat.conjTranspose_cfc {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) :
(_root_.cfc f ↑A).conjTranspose = _root_.cfc f ↑A
noncomputable def HermitianMat.cfc {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) :
HermitianMat d š•œ
Equations
Instances For
    @[simp]
    theorem HermitianMat.cfc_toMat {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) :
    ↑(A.cfc f) = _root_.cfc f ↑A
    @[simp]
    theorem HermitianMat.cfc_reindex {d : Type u_1} {dā‚‚ : Type u_2} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [Fintype dā‚‚] [DecidableEq dā‚‚] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) (e : d ā‰ƒ dā‚‚) :
    (A.reindex e).cfc f = (A.cfc f).reindex e

    Reindexing a matrix commutes with applying the CFC.

    theorem HermitianMat.inner_eq_trace_mul' {d : Type u_1} {š•œ : Type u_3} [Fintype d] [RCLike š•œ] (A B : HermitianMat d š•œ) :
    Inner.inner ā„ A B = RCLike.re (↑A * ↑B).trace
    @[simp]
    theorem HermitianMat.norm_one {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] :
    theorem HermitianMat.cfc_eigenvalues {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (f : ā„ → ā„) (A : HermitianMat d š•œ) :
    ∃ (e : d ā‰ƒ d), ⋯.eigenvalues = f ∘ ⋯.eigenvalues ∘ ⇑e
    theorem HermitianMat.norm_eq_trace_sq {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
    ↑‖A‖ ^ 2 = (↑A ^ 2).trace

    Here we give HermitianMat versions of many cfc theorems, like cfc_id, cfc_sub, cfc_comp, etc. We need these because (as above) HermitianMat.cfc is different from _root_.cfc.

    @[simp]
    theorem HermitianMat.cfc_id {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
    A.cfc id = A
    @[simp]
    theorem HermitianMat.cfc_id' {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
    (A.cfc fun (x : ā„) => x) = A
    theorem HermitianMat.cfc_add {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f g : ā„ → ā„) :
    A.cfc (f + g) = A.cfc f + A.cfc g
    theorem HermitianMat.cfc_sub {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f g : ā„ → ā„) :
    A.cfc (f - g) = A.cfc f - A.cfc g
    theorem HermitianMat.cfc_neg {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) :
    A.cfc (-f) = -A.cfc f
    theorem HermitianMat.coe_cfc_mul {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f g : ā„ → ā„) :
    ↑(A.cfc (f * g)) = ↑(A.cfc f) * ↑(A.cfc g)

    We don't have a direct analog of cfc_mul, since we can't generally multiply to HermitianMat's to get another one, so the theorem statement wouldn't be well-typed. But, we can say that the matrices are always equal. See cfc_conj for the coe-free analog to multiplication.

    theorem HermitianMat.cfc_comp {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f g : ā„ → ā„) :
    A.cfc (g ∘ f) = (A.cfc f).cfc g
    theorem HermitianMat.cfc_conj {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f g : ā„ → ā„) :
    (conj ↑(A.cfc g)) (A.cfc f) = A.cfc (f * g ^ 2)
    theorem HermitianMat.cfc_sq {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
    (A.cfc fun (x : ā„) => x ^ 2) = A ^ 2
    @[simp]
    theorem HermitianMat.cfc_const {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (r : ā„) :
    (A.cfc fun (x : ā„) => r) = r • 1
    @[simp]
    theorem HermitianMat.cfc_const_mul_id {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (r : ā„) :
    (A.cfc fun (x : ā„) => r * x) = r • A
    @[simp]
    theorem HermitianMat.cfc_const_mul {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) (r : ā„) :
    (A.cfc fun (x : ā„) => r * f x) = r • A.cfc f
    @[simp]
    theorem HermitianMat.cfc_apply_zero {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (f : ā„ → ā„) :
    cfc 0 f = f 0 • 1
    @[simp]
    theorem HermitianMat.cfc_apply_one {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (f : ā„ → ā„) :
    cfc 1 f = f 1 • 1
    theorem HermitianMat.cfc_congr {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) {f g : ā„ → ā„} (hfg : Set.EqOn f g (spectrum ā„ ↑A)) :
    A.cfc f = A.cfc g
    theorem HermitianMat.cfc_congr_of_zero_le {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} {f g : ā„ → ā„} (hA : 0 ≤ A) (hfg : Set.EqOn f g (Set.Ici 0)) :
    A.cfc f = A.cfc g

    Version of cfc_congr specialized to PSD matrices.

    theorem HermitianMat.cfc_congr_of_posDef {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} {f g : ā„ → ā„} (hA : (↑A).PosDef) (hfg : Set.EqOn f g (Set.Ioi 0)) :
    A.cfc f = A.cfc g

    Version of cfc_congr specialized to positive definite matrices.

    @[simp]
    theorem HermitianMat.cfc_diagonal {d : Type u_1} [Fintype d] [DecidableEq d] (f : ā„ → ā„) (g : d → ā„) :
    theorem HermitianMat.zero_le_cfc {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) :
    0 ≤ A.cfc f ↔ āˆ€ (i : d), 0 ≤ f (⋯.eigenvalues i)
    theorem HermitianMat.zero_le_cfc_of_zero_le {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} {f : ā„ → ā„} (hA : 0 ≤ A) (hf : āˆ€ i ≄ 0, 0 ≤ f i) :
    0 ≤ A.cfc f
    theorem HermitianMat.cfc_PosDef {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (f : ā„ → ā„) :
    (↑(A.cfc f)).PosDef ↔ āˆ€ (i : d), 0 < f (⋯.eigenvalues i)
    theorem HermitianMat.norm_eq_sum_eigenvalues_sq {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
    ‖A‖ ^ 2 = āˆ‘ i : d, ⋯.eigenvalues i ^ 2
    theorem HermitianMat.lt_smul_of_norm_lt {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} {r : ā„} (h : ‖A‖ ≤ r) :
    theorem HermitianMat.ball_subset_Icc {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (r : ā„) :
    Metric.ball A r āŠ† Set.Icc (A - r • 1) (A + r • 1)
    theorem HermitianMat.spectrum_subset_of_mem_Icc {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A B : HermitianMat d š•œ) :
    ∃ (a : ā„) (b : ā„), āˆ€ (x : HermitianMat d š•œ), A ≤ x ∧ x ≤ B → spectrum ā„ ↑x āŠ† Set.Icc a b
    theorem HermitianMat.cfc_continuous {d : Type u_1} [Fintype d] [DecidableEq d] {f : ā„ → ā„} (hf : Continuous f) :
    Continuous fun (x : HermitianMat d ā„‚) => x.cfc f
    def HermitianMat.rpow {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (p : ā„) :
    HermitianMat d š•œ

    Matrix power of a positive semidefinite matrix, as given by the elementwise real power of the diagonal in a diagonalized form.

    Note that this has the usual Real.rpow caveats, such as 0 to the power -1 giving 0.

    Equations
    Instances For
      instance HermitianMat.instRPow {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] :
      Pow (HermitianMat d š•œ) ā„
      Equations
      theorem HermitianMat.pow_eq_rpow {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (p : ā„) :
      A ^ p = A.rpow p
      theorem HermitianMat.pow_eq_cfc {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) (p : ā„) :
      A ^ p = A.cfc fun (x : ā„) => x ^ p
      theorem HermitianMat.diagonal_pow {d : Type u_1} [Fintype d] [DecidableEq d] (f : d → ā„) (p : ā„) :
      diagonal f ^ p = diagonal fun (i : d) => f i ^ p
      @[simp]
      theorem HermitianMat.pow_one {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
      A ^ 1 = A
      @[simp]
      theorem HermitianMat.reindex_pow {d : Type u_1} {dā‚‚ : Type u_2} [Fintype d] [DecidableEq d] [Fintype dā‚‚] [DecidableEq dā‚‚] (A : HermitianMat d ā„‚) (e : d ā‰ƒ dā‚‚) (p : ā„) :
      A.reindex e ^ p = (A ^ p).reindex e
      theorem HermitianMat.coe_rpow_add {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} (hA : 0 ≤ A) {p q : ā„} (hpq : p + q ≠ 0) :
      ↑(A ^ (p + q)) = ↑(A ^ p) * ↑(A ^ q)
      theorem HermitianMat.rpow_mul {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} (hA : 0 ≤ A) {p q : ā„} :
      A ^ (p * q) = (A ^ p) ^ q
      theorem HermitianMat.conj_rpow {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} (hA : 0 ≤ A) {p q : ā„} (hq : q ≠ 0) (hpq : p + 2 * q ≠ 0) :
      (conj ↑(A ^ q)) (A ^ p) = A ^ (p + 2 * q)
      theorem HermitianMat.pow_half_mul {d : Type u_4} {š•œ : Type u_5} [Fintype d] [DecidableEq d] [RCLike š•œ] {A : HermitianMat d š•œ} (hA : 0 ≤ A) :
      ↑(A ^ (1 / 2)) * ↑(A ^ (1 / 2)) = ↑A
      def HermitianMat.log {d : Type u_1} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [RCLike š•œ] (A : HermitianMat d š•œ) :
      HermitianMat d š•œ

      Matrix logarithm (base e) of a Hermitian matrix, as given by the elementwise real logarithm of the diagonal in a diagonalized form, using Real.log

      Note that this means that the nullspace of the image includes all of the nullspace of the original matrix. This contrasts to the standard definition, which is only defined for positive definite matrices, and the nullspace of the image is exactly the (Ī»=1)-eigenspace of the original matrix. It coincides with the standard definition if A is positive definite.

      Equations
      Instances For
        @[simp]
        theorem HermitianMat.reindex_log {d : Type u_1} {dā‚‚ : Type u_2} {š•œ : Type u_3} [Fintype d] [DecidableEq d] [Fintype dā‚‚] [DecidableEq dā‚‚] [RCLike š•œ] (A : HermitianMat d š•œ) (e : d ā‰ƒ dā‚‚) :
        (A.reindex e).log = A.log.reindex e