File: Mathlib/LinearAlgebra/Matrix/Hermitian.lean

full_name: Matrix.«_aux_Mathlib_LinearAlgebra_Matrix_Hermitian___macroRules_Matrix_term⟪_,_⟫_1»
code: local notation "⟪" x ", " y "⟫" => @inner α _ _ x y
goal: Lean.Macro

full_name: Matrix.IsHermitian
code: /-- A matrix is hermitian if it is equal to its conjugate transpose. On the reals, this definition
captures symmetric matrices. -/
def IsHermitian (A : Matrix n n α) : Prop 
goal: Prop

full_name: Matrix.instDecidableIsHermitianOfEqConjTranspose
code: instance (A : Matrix n n α) [Decidable (Aᴴ = A)] : Decidable (IsHermitian A) 
goal: Decidable A.IsHermitian

full_name: Matrix.IsHermitian.eq
code: theorem IsHermitian.eq {A : Matrix n n α} (h : A.IsHermitian) : Aᴴ = A 
goal: A.conjTranspose = A

full_name: Matrix.IsHermitian.isSelfAdjoint
code: protected theorem IsHermitian.isSelfAdjoint {A : Matrix n n α} (h : A.IsHermitian) :
    IsSelfAdjoint A 
goal: IsSelfAdjoint A

full_name: Matrix.IsHermitian.ext
code: theorem IsHermitian.ext {A : Matrix n n α} : (∀ i j, star (A j i) = A i j) → A.IsHermitian 
goal: (∀ (i j : n), star (A j i) = A i j) → A.IsHermitian

full_name: Matrix.IsHermitian.apply
code: theorem IsHermitian.apply {A : Matrix n n α} (h : A.IsHermitian) (i j : n) : star (A j i) = A i j 
goal: star (A j i) = A i j

full_name: Matrix.IsHermitian.ext_iff
code: theorem IsHermitian.ext_iff {A : Matrix n n α} : A.IsHermitian ↔ ∀ i j, star (A j i) = A i j 
goal: A.IsHermitian ↔ ∀ (i j : n), star (A j i) = A i j

full_name: Matrix.IsHermitian.map
code: @[simp]
theorem IsHermitian.map {A : Matrix n n α} (h : A.IsHermitian) (f : α → β)
    (hf : Function.Semiconj f star star) : (A.map f).IsHermitian 
goal: (A.map f).IsHermitian

full_name: Matrix.IsHermitian.transpose
code: theorem IsHermitian.transpose {A : Matrix n n α} (h : A.IsHermitian) : Aᵀ.IsHermitian 
goal: A.transpose.IsHermitian

full_name: Matrix.isHermitian_transpose_iff
code: @[simp]
theorem isHermitian_transpose_iff (A : Matrix n n α) : Aᵀ.IsHermitian ↔ A.IsHermitian 
goal: A.transpose.IsHermitian ↔ A.IsHermitian

full_name: Matrix.IsHermitian.conjTranspose
code: theorem IsHermitian.conjTranspose {A : Matrix n n α} (h : A.IsHermitian) : Aᴴ.IsHermitian 
goal: A.conjTranspose.IsHermitian

full_name: Matrix.IsHermitian.submatrix
code: @[simp]
theorem IsHermitian.submatrix {A : Matrix n n α} (h : A.IsHermitian) (f : m → n) :
    (A.submatrix f f).IsHermitian 
goal: (A.submatrix f f).IsHermitian

full_name: Matrix.isHermitian_submatrix_equiv
code: @[simp]
theorem isHermitian_submatrix_equiv {A : Matrix n n α} (e : m ≃ n) :
    (A.submatrix e e).IsHermitian ↔ A.IsHermitian 
goal: (A.submatrix ⇑e ⇑e).IsHermitian ↔ A.IsHermitian

full_name: Matrix.isHermitian_conjTranspose_iff
code: @[simp]
theorem isHermitian_conjTranspose_iff (A : Matrix n n α) : Aᴴ.IsHermitian ↔ A.IsHermitian 
goal: A.conjTranspose.IsHermitian ↔ A.IsHermitian

full_name: Matrix.IsHermitian.fromBlocks
code: /-- A block matrix `A.from_blocks B C D` is hermitian,
    if `A` and `D` are hermitian and `Bᴴ = C`. -/
theorem IsHermitian.fromBlocks {A : Matrix m m α} {B : Matrix m n α} {C : Matrix n m α}
    {D : Matrix n n α} (hA : A.IsHermitian) (hBC : Bᴴ = C) (hD : D.IsHermitian) :
    (A.fromBlocks B C D).IsHermitian 
goal: (Matrix.fromBlocks A B C D).IsHermitian

full_name: Matrix.isHermitian_fromBlocks_iff
code: /-- This is the `iff` version of `Matrix.IsHermitian.fromBlocks`. -/
theorem isHermitian_fromBlocks_iff {A : Matrix m m α} {B : Matrix m n α} {C : Matrix n m α}
    {D : Matrix n n α} :
    (A.fromBlocks B C D).IsHermitian ↔ A.IsHermitian ∧ Bᴴ = C ∧ Cᴴ = B ∧ D.IsHermitian 
goal: (Matrix.fromBlocks A B C D).IsHermitian ↔ A.IsHermitian ∧ B.conjTranspose = C ∧ C.conjTranspose = B ∧ D.IsHermitian

full_name: Matrix.isHermitian_diagonal_of_self_adjoint
code: /-- A diagonal matrix is hermitian if the entries are self-adjoint (as a vector) -/
theorem isHermitian_diagonal_of_self_adjoint [DecidableEq n] (v : n → α) (h : IsSelfAdjoint v) :
    (diagonal v).IsHermitian 
goal: (Matrix.diagonal v).IsHermitian

full_name: Matrix.isHermitian_diagonal_iff
code: /-- A diagonal matrix is hermitian if each diagonal entry is self-adjoint -/
lemma isHermitian_diagonal_iff [DecidableEq n] {d : n → α} :
    IsHermitian (diagonal d) ↔ (∀ i : n, IsSelfAdjoint (d i)) 
goal: (Matrix.diagonal d).IsHermitian ↔ ∀ (i : n), IsSelfAdjoint (d i)

full_name: Matrix.isHermitian_diagonal
code: /-- A diagonal matrix is hermitian if the entries have the trivial `star` operation
(such as on the reals). -/
@[simp]
theorem isHermitian_diagonal [TrivialStar α] [DecidableEq n] (v : n → α) :
    (diagonal v).IsHermitian 
goal: (Matrix.diagonal v).IsHermitian

full_name: Matrix.isHermitian_zero
code: @[simp]
theorem isHermitian_zero : (0 : Matrix n n α).IsHermitian 
goal: Matrix.IsHermitian 0

full_name: Matrix.IsHermitian.add
code: @[simp]
theorem IsHermitian.add {A B : Matrix n n α} (hA : A.IsHermitian) (hB : B.IsHermitian) :
    (A + B).IsHermitian 
goal: (A + B).IsHermitian

full_name: Matrix.isHermitian_add_transpose_self
code: theorem isHermitian_add_transpose_self (A : Matrix n n α) : (A + Aᴴ).IsHermitian 
goal: (A + A.conjTranspose).IsHermitian

full_name: Matrix.isHermitian_transpose_add_self
code: theorem isHermitian_transpose_add_self (A : Matrix n n α) : (Aᴴ + A).IsHermitian 
goal: (A.conjTranspose + A).IsHermitian

full_name: Matrix.IsHermitian.neg
code: @[simp]
theorem IsHermitian.neg {A : Matrix n n α} (h : A.IsHermitian) : (-A).IsHermitian 
goal: (-A).IsHermitian

full_name: Matrix.IsHermitian.sub
code: @[simp]
theorem IsHermitian.sub {A B : Matrix n n α} (hA : A.IsHermitian) (hB : B.IsHermitian) :
    (A - B).IsHermitian 
goal: (A - B).IsHermitian

full_name: Matrix.isHermitian_mul_conjTranspose_self
code: /-- Note this is more general than `IsSelfAdjoint.mul_star_self` as `B` can be rectangular. -/
theorem isHermitian_mul_conjTranspose_self [Fintype n] (A : Matrix m n α) :
    (A * Aᴴ).IsHermitian 
goal: (A * A.conjTranspose).IsHermitian

full_name: Matrix.isHermitian_transpose_mul_self
code: /-- Note this is more general than `IsSelfAdjoint.star_mul_self` as `B` can be rectangular. -/
theorem isHermitian_transpose_mul_self [Fintype m] (A : Matrix m n α) : (Aᴴ * A).IsHermitian 
goal: (A.conjTranspose * A).IsHermitian

full_name: Matrix.isHermitian_conjTranspose_mul_mul
code: /-- Note this is more general than `IsSelfAdjoint.conjugate'` as `B` can be rectangular. -/
theorem isHermitian_conjTranspose_mul_mul [Fintype m] {A : Matrix m m α} (B : Matrix m n α)
    (hA : A.IsHermitian) : (Bᴴ * A * B).IsHermitian 
goal: (B.conjTranspose * A * B).IsHermitian

full_name: Matrix.isHermitian_mul_mul_conjTranspose
code: /-- Note this is more general than `IsSelfAdjoint.conjugate` as `B` can be rectangular. -/
theorem isHermitian_mul_mul_conjTranspose [Fintype m] {A : Matrix m m α} (B : Matrix n m α)
    (hA : A.IsHermitian) : (B * A * Bᴴ).IsHermitian 
goal: (B * A * B.conjTranspose).IsHermitian

full_name: Matrix.commute_iff
code: lemma commute_iff [Fintype n] {A B : Matrix n n α}
    (hA : A.IsHermitian) (hB : B.IsHermitian) : Commute A B ↔ (A * B).IsHermitian 
goal: Commute A B ↔ (A * B).IsHermitian

full_name: Matrix.isHermitian_one
code: /-- Note this is more general for matrices than `isSelfAdjoint_one` as it does not
require `Fintype n`, which is necessary for `Monoid (Matrix n n R)`. -/
@[simp]
theorem isHermitian_one [DecidableEq n] : (1 : Matrix n n α).IsHermitian 
goal: Matrix.IsHermitian 1

full_name: Matrix.IsHermitian.pow
code: theorem IsHermitian.pow [Fintype n] [DecidableEq n] {A : Matrix n n α} (h : A.IsHermitian) (k : ℕ) :
    (A ^ k).IsHermitian 
goal: (A ^ k).IsHermitian

full_name: Matrix.IsHermitian.inv
code: theorem IsHermitian.inv [Fintype m] [DecidableEq m] {A : Matrix m m α} (hA : A.IsHermitian) :
    A⁻¹.IsHermitian 
goal: A⁻¹.IsHermitian

full_name: Matrix.isHermitian_inv
code: @[simp]
theorem isHermitian_inv [Fintype m] [DecidableEq m] (A : Matrix m m α) [Invertible A] :
    A⁻¹.IsHermitian ↔ A.IsHermitian 
goal: A⁻¹.IsHermitian ↔ A.IsHermitian

full_name: Matrix.IsHermitian.adjugate
code: theorem IsHermitian.adjugate [Fintype m] [DecidableEq m] {A : Matrix m m α} (hA : A.IsHermitian) :
    A.adjugate.IsHermitian 
goal: A.adjugate.IsHermitian

full_name: Matrix.IsHermitian.zpow
code: /-- Note that `IsSelfAdjoint.zpow` does not apply to matrices as they are not a division ring. -/
theorem IsHermitian.zpow [Fintype m] [DecidableEq m] {A : Matrix m m α} (h : A.IsHermitian)
    (k : ℤ) :
    (A ^ k).IsHermitian 
goal: (A ^ k).IsHermitian

full_name: Matrix.IsHermitian.coe_re_apply_self
code: /-- The diagonal elements of a complex hermitian matrix are real. -/
theorem IsHermitian.coe_re_apply_self {A : Matrix n n α} (h : A.IsHermitian) (i : n) :
    (re (A i i) : α) = A i i 
goal: ↑(RCLike.re (A i i)) = A i i

full_name: Matrix.IsHermitian.coe_re_diag
code: /-- The diagonal elements of a complex hermitian matrix are real. -/
theorem IsHermitian.coe_re_diag {A : Matrix n n α} (h : A.IsHermitian) :
    (fun i => (re (A.diag i) : α)) = A.diag 
goal: (fun i => ↑(RCLike.re (A.diag i))) = A.diag

full_name: Matrix.isHermitian_iff_isSymmetric
code: /-- A matrix is hermitian iff the corresponding linear map is self adjoint. -/
theorem isHermitian_iff_isSymmetric [Fintype n] [DecidableEq n] {A : Matrix n n α} :
    IsHermitian A ↔ A.toEuclideanLin.IsSymmetric 
goal: A.IsHermitian ↔ (Matrix.toEuclideanLin A).IsSymmetric