Symmetric matrices #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file contains the definition and basic results about symmetric matrices.
Main definition #
matrix.is_symm
: a matrixA : matrix n n α
is "symmetric" ifAᵀ = A
.
Tags #
symm, symmetric, matrix
A version of matrix.ext_iff
that unfolds the matrix.transpose
.
@[ext]
A version of matrix.ext
that unfolds the matrix.transpose
.
theorem
matrix.is_symm_mul_transpose_self
{α : Type u_1}
{n : Type u_3}
[fintype n]
[comm_semiring α]
(A : matrix n n α) :
theorem
matrix.is_symm_transpose_mul_self
{α : Type u_1}
{n : Type u_3}
[fintype n]
[comm_semiring α]
(A : matrix n n α) :
theorem
matrix.is_symm_add_transpose_self
{α : Type u_1}
{n : Type u_3}
[add_comm_semigroup α]
(A : matrix n n α) :
theorem
matrix.is_symm_transpose_add_self
{α : Type u_1}
{n : Type u_3}
[add_comm_semigroup α]
(A : matrix n n α) :
@[simp]
theorem
matrix.is_symm_one
{α : Type u_1}
{n : Type u_3}
[decidable_eq n]
[has_zero α]
[has_one α] :
1.is_symm
@[simp]
theorem
matrix.is_symm_diagonal
{α : Type u_1}
{n : Type u_3}
[decidable_eq n]
[has_zero α]
(v : n → α) :
The diagonal matrix diagonal v
is symmetric.
theorem
matrix.is_symm.from_blocks
{α : Type u_1}
{n : Type u_3}
{m : Type u_4}
{A : matrix m m α}
{B : matrix m n α}
{C : matrix n m α}
{D : matrix n n α}
(hA : A.is_symm)
(hBC : B.transpose = C)
(hD : D.is_symm) :
(matrix.from_blocks A B C D).is_symm
A block matrix A.from_blocks B C D
is symmetric,
if A
and D
are symmetric and Bᵀ = C
.
theorem
matrix.is_symm_from_blocks_iff
{α : Type u_1}
{n : Type u_3}
{m : Type u_4}
{A : matrix m m α}
{B : matrix m n α}
{C : matrix n m α}
{D : matrix n n α} :
This is the iff
version of matrix.is_symm.from_blocks
.