Trace of a linear map #

This file defines the trace of a linear map.

See also LinearAlgebra/Matrix/Trace.lean for the trace of a matrix.

Tags #

linear_map, trace, diagonal

def LinearMap.traceAux (R : Type u) [] {M : Type v} [] [Module R M] {ι : Type w} [] [] (b : Basis ι R M) :
(M →ₗ[R] M) →ₗ[R] R

The trace of an endomorphism given a basis.

Equations
• = ∘ₗ
Instances For
theorem LinearMap.traceAux_def (R : Type u) [] {M : Type v} [] [Module R M] {ι : Type w} [] [] (b : Basis ι R M) (f : M →ₗ[R] M) :
f = ( f).trace
theorem LinearMap.traceAux_eq (R : Type u) [] {M : Type v} [] [Module R M] {ι : Type w} [] [] {κ : Type u_1} [] [] (b : Basis ι R M) (c : Basis κ R M) :
def LinearMap.trace (R : Type u) [] (M : Type v) [] [Module R M] :
(M →ₗ[R] M) →ₗ[R] R

Trace of an endomorphism independent of basis.

Equations
Instances For
theorem LinearMap.trace_eq_matrix_trace_of_finset (R : Type u) [] {M : Type v} [] [Module R M] {s : } (b : Basis { x : M // x s } R M) (f : M →ₗ[R] M) :
(LinearMap.trace R M) f = ( f).trace

Auxiliary lemma for trace_eq_matrix_trace.

theorem LinearMap.trace_eq_matrix_trace (R : Type u) [] {M : Type v} [] [Module R M] {ι : Type w} [] [] (b : Basis ι R M) (f : M →ₗ[R] M) :
(LinearMap.trace R M) f = ( f).trace
theorem LinearMap.trace_mul_comm (R : Type u) [] {M : Type v} [] [Module R M] (f : M →ₗ[R] M) (g : M →ₗ[R] M) :
(LinearMap.trace R M) (f * g) = (LinearMap.trace R M) (g * f)
theorem LinearMap.trace_mul_cycle (R : Type u) [] {M : Type v} [] [Module R M] (f : M →ₗ[R] M) (g : M →ₗ[R] M) (h : M →ₗ[R] M) :
(LinearMap.trace R M) (f * g * h) = (LinearMap.trace R M) (h * f * g)
theorem LinearMap.trace_mul_cycle' (R : Type u) [] {M : Type v} [] [Module R M] (f : M →ₗ[R] M) (g : M →ₗ[R] M) (h : M →ₗ[R] M) :
(LinearMap.trace R M) (f * (g * h)) = (LinearMap.trace R M) (h * (f * g))
@[simp]
theorem LinearMap.trace_conj (R : Type u) [] {M : Type v} [] [Module R M] (g : M →ₗ[R] M) (f : (M →ₗ[R] M)ˣ) :
(LinearMap.trace R M) (f * g * f⁻¹) = (LinearMap.trace R M) g

The trace of an endomorphism is invariant under conjugation

@[simp]
theorem LinearMap.trace_lie {R : Type u_2} {M : Type u_3} [] [] [Module R M] (f : ) (g : ) :
theorem LinearMap.trace_eq_contract_of_basis {R : Type u_1} [] {M : Type u_2} [] [Module R M] {ι : Type u_5} [] (b : Basis ι R M) :
∘ₗ =

The trace of a linear map correspond to the contraction pairing under the isomorphism End(M) ≃ M* ⊗ M

theorem LinearMap.trace_eq_contract_of_basis' {R : Type u_1} [] {M : Type u_2} [] [Module R M] {ι : Type u_5} [] [] (b : Basis ι R M) :
= ∘ₗ .symm

The trace of a linear map correspond to the contraction pairing under the isomorphism End(M) ≃ M* ⊗ M

@[simp]
theorem LinearMap.trace_eq_contract (R : Type u_1) [] (M : Type u_2) [] [Module R M] [] [] :
∘ₗ =

When M is finite free, the trace of a linear map correspond to the contraction pairing under the isomorphism End(M) ≃ M* ⊗ M

@[simp]
theorem LinearMap.trace_eq_contract_apply (R : Type u_1) [] (M : Type u_2) [] [Module R M] [] [] (x : TensorProduct R (Module.Dual R M) M) :
(LinearMap.trace R M) ((dualTensorHom R M M) x) = (contractLeft R M) x
theorem LinearMap.trace_eq_contract' (R : Type u_1) [] (M : Type u_2) [] [Module R M] [] [] :
= ∘ₗ (dualTensorHomEquiv R M M).symm

When M is finite free, the trace of a linear map correspond to the contraction pairing under the isomorphism End(M) ≃ M* ⊗ M

@[simp]
theorem LinearMap.trace_one (R : Type u_1) [] (M : Type u_2) [] [Module R M] [] [] :
(LinearMap.trace R M) 1 =

The trace of the identity endomorphism is the dimension of the free module

@[simp]
theorem LinearMap.trace_id (R : Type u_1) [] (M : Type u_2) [] [Module R M] [] [] :
(LinearMap.trace R M) LinearMap.id =

The trace of the identity endomorphism is the dimension of the free module

@[simp]
theorem LinearMap.trace_transpose (R : Type u_1) [] (M : Type u_2) [] [Module R M] [] [] :
LinearMap.trace R (Module.Dual R M) ∘ₗ Module.Dual.transpose =
theorem LinearMap.trace_prodMap (R : Type u_1) [] (M : Type u_2) [] [Module R M] (N : Type u_3) [] [Module R N] [] [] [] [] :
LinearMap.trace R (M × N) ∘ₗ LinearMap.prodMapLinear R M N M N R = LinearMap.id.coprod LinearMap.id ∘ₗ (LinearMap.trace R M).prodMap (LinearMap.trace R N)
theorem LinearMap.trace_prodMap' {R : Type u_1} [] {M : Type u_2} [] [Module R M] {N : Type u_3} [] [Module R N] [] [] [] [] (f : M →ₗ[R] M) (g : N →ₗ[R] N) :
(LinearMap.trace R (M × N)) (f.prodMap g) = (LinearMap.trace R M) f + (LinearMap.trace R N) g
theorem LinearMap.trace_tensorProduct (R : Type u_1) [] (M : Type u_2) [] [Module R M] (N : Type u_3) [] [Module R N] [] [] [] [] :
(TensorProduct.mapBilinear R M N M N).compr₂ (LinearMap.trace R (TensorProduct R M N)) = (LinearMap.lsmul R R).compl₁₂ (LinearMap.trace R M) (LinearMap.trace R N)
theorem LinearMap.trace_comp_comm (R : Type u_1) [] (M : Type u_2) [] [Module R M] (N : Type u_3) [] [Module R N] [] [] [] [] :
(LinearMap.llcomp R M N M).compr₂ (LinearMap.trace R M) = (LinearMap.llcomp R N M N).flip.compr₂ (LinearMap.trace R N)
@[simp]
theorem LinearMap.trace_transpose' {R : Type u_1} [] {M : Type u_2} [] [Module R M] [] [] (f : M →ₗ[R] M) :
(LinearMap.trace R (Module.Dual R M)) (Module.Dual.transpose f) = (LinearMap.trace R M) f
theorem LinearMap.trace_tensorProduct' {R : Type u_1} [] {M : Type u_2} [] [Module R M] {N : Type u_3} [] [Module R N] [] [] [] [] (f : M →ₗ[R] M) (g : N →ₗ[R] N) :
theorem LinearMap.trace_comp_comm' {R : Type u_1} [] {M : Type u_2} [] [Module R M] {N : Type u_3} [] [Module R N] [] [] [] [] (f : M →ₗ[R] N) (g : N →ₗ[R] M) :
(LinearMap.trace R M) (g ∘ₗ f) = (LinearMap.trace R N) (f ∘ₗ g)
theorem LinearMap.trace_comp_cycle {R : Type u_1} [] {M : Type u_2} [] [Module R M] {N : Type u_3} {P : Type u_4} [] [Module R N] [] [Module R P] [] [] [] [] (f : M →ₗ[R] N) (g : N →ₗ[R] P) (h : P →ₗ[R] M) :
(LinearMap.trace R P) (g ∘ₗ f ∘ₗ h) = (LinearMap.trace R N) (f ∘ₗ h ∘ₗ g)
theorem LinearMap.trace_comp_cycle' {R : Type u_1} [] {M : Type u_2} [] [Module R M] {N : Type u_3} {P : Type u_4} [] [Module R N] [] [Module R P] [] [] [] [] (f : M →ₗ[R] N) (g : N →ₗ[R] P) (h : P →ₗ[R] M) :
(LinearMap.trace R P) ((g ∘ₗ f) ∘ₗ h) = (LinearMap.trace R M) ((h ∘ₗ g) ∘ₗ f)
@[simp]
theorem LinearMap.trace_conj' {R : Type u_1} [] {M : Type u_2} [] [Module R M] {N : Type u_3} [] [Module R N] (f : M →ₗ[R] M) (e : M ≃ₗ[R] N) :
(LinearMap.trace R N) (e.conj f) = (LinearMap.trace R M) f
theorem LinearMap.IsProj.trace {R : Type u_1} [] {M : Type u_2} [] [Module R M] {p : } {f : M →ₗ[R] M} (h : ) [Module.Free R { x : M // x p }] [Module.Finite R { x : M // x p }] [Module.Free R { x : M // }] [Module.Finite R { x : M // }] :
(LinearMap.trace R M) f = (FiniteDimensional.finrank R { x : M // x p })
theorem LinearMap.isNilpotent_trace_of_isNilpotent {R : Type u_1} [] {M : Type u_2} [] [Module R M] [] [] {f : M →ₗ[R] M} (hf : ) :
theorem LinearMap.trace_comp_eq_mul_of_commute_of_isNilpotent {R : Type u_1} [] {M : Type u_2} [] [Module R M] [] [] [] {f : } {g : } (μ : R) (h_comm : Commute f g) (hg : IsNilpotent (g - (algebraMap R (Module.End R M)) μ)) :
(LinearMap.trace R M) (f ∘ₗ g) = μ * (LinearMap.trace R M) f
@[simp]
theorem LinearMap.trace_baseChange {R : Type u_1} [] {M : Type u_2} [] [Module R M] [] [] (f : M →ₗ[R] M) (A : Type u_6) [] [Algebra R A] :