Documentation

Mathlib.LinearAlgebra.Trace

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) [CommSemiring R] {M : Type v} [AddCommMonoid M] [Module R M] {ι : Type w} [DecidableEq ι] [Fintype ι] (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) [CommSemiring R] {M : Type v} [AddCommMonoid M] [Module R M] {ι : Type w} [DecidableEq ι] [Fintype ι] (b : Basis ι R M) (f : M →ₗ[R] M) :
    theorem LinearMap.traceAux_eq (R : Type u) [CommSemiring R] {M : Type v} [AddCommMonoid M] [Module R M] {ι : Type w} [DecidableEq ι] [Fintype ι] {κ : Type u_1} [DecidableEq κ] [Fintype κ] (b : Basis ι R M) (c : Basis κ R M) :
    def LinearMap.trace (R : Type u) [CommSemiring R] (M : Type v) [AddCommMonoid M] [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) [CommSemiring R] {M : Type v} [AddCommMonoid M] [Module R M] {s : Finset M} (b : Basis { x // x s } R M) (f : M →ₗ[R] M) :

      Auxiliary lemma for trace_eq_matrix_trace.

      theorem LinearMap.trace_eq_matrix_trace (R : Type u) [CommSemiring R] {M : Type v} [AddCommMonoid M] [Module R M] {ι : Type w} [DecidableEq ι] [Fintype ι] (b : Basis ι R M) (f : M →ₗ[R] M) :
      theorem LinearMap.trace_mul_comm (R : Type u) [CommSemiring R] {M : Type v} [AddCommMonoid M] [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) [CommSemiring R] {M : Type v} [AddCommMonoid M] [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) [CommSemiring R] {M : Type v} [AddCommMonoid M] [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) [CommSemiring R] {M : Type v} [AddCommMonoid M] [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

      theorem LinearMap.trace_eq_contract_of_basis {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {ι : Type u_5} [Finite ι] (b : Basis ι R M) :

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

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

      @[simp]

      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) [CommRing R] (M : Type u_2) [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] (x : TensorProduct R (Module.Dual R M) M) :
      ↑(LinearMap.trace R M) (↑(dualTensorHom R M M) x) = ↑(contractLeft R M) x

      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) [CommRing R] (M : Type u_2) [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] :

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

      @[simp]
      theorem LinearMap.trace_id (R : Type u_1) [CommRing R] (M : Type u_2) [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] :
      ↑(LinearMap.trace R M) LinearMap.id = ↑(FiniteDimensional.finrank R M)

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

      @[simp]
      theorem LinearMap.trace_transpose (R : Type u_1) [CommRing R] (M : Type u_2) [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] :
      LinearMap.comp (LinearMap.trace R (Module.Dual R M)) Module.Dual.transpose = LinearMap.trace R M
      theorem LinearMap.trace_prodMap' {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {N : Type u_3} [AddCommGroup N] [Module R N] [Module.Free R M] [Module.Finite R M] [Module.Free R N] [Module.Finite R N] (f : M →ₗ[R] M) (g : N →ₗ[R] N) :
      ↑(LinearMap.trace R (M × N)) (LinearMap.prodMap f g) = ↑(LinearMap.trace R M) f + ↑(LinearMap.trace R N) g
      @[simp]
      theorem LinearMap.trace_transpose' {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite 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} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {N : Type u_3} [AddCommGroup N] [Module R N] [Module.Free R M] [Module.Finite R M] [Module.Free R N] [Module.Finite R N] (f : M →ₗ[R] M) (g : N →ₗ[R] N) :
      theorem LinearMap.trace_comp_comm' {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {N : Type u_3} [AddCommGroup N] [Module R N] [Module.Free R M] [Module.Finite R M] [Module.Free R N] [Module.Finite R N] (f : M →ₗ[R] N) (g : N →ₗ[R] M) :
      theorem LinearMap.trace_comp_cycle {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {N : Type u_3} {P : Type u_4} [AddCommGroup N] [Module R N] [AddCommGroup P] [Module R P] [Module.Free R N] [Module.Finite R N] [Module.Free R P] [Module.Finite R P] (f : M →ₗ[R] N) (g : N →ₗ[R] P) (h : P →ₗ[R] M) :
      theorem LinearMap.trace_comp_cycle' {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {N : Type u_3} {P : Type u_4} [AddCommGroup N] [Module R N] [AddCommGroup P] [Module R P] [Module.Free R M] [Module.Finite R M] [Module.Free R P] [Module.Finite R P] (f : M →ₗ[R] N) (g : N →ₗ[R] P) (h : P →ₗ[R] M) :
      @[simp]
      theorem LinearMap.trace_conj' {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] {N : Type u_3} [AddCommGroup N] [Module R N] [Module.Free R M] [Module.Finite R M] [Module.Free R N] [Module.Finite R N] (f : M →ₗ[R] M) (e : M ≃ₗ[R] N) :
      ↑(LinearMap.trace R N) (↑(LinearEquiv.conj e) f) = ↑(LinearMap.trace R M) f
      theorem LinearMap.IsProj.trace {R : Type u_1} [CommRing R] {M : Type u_2} [AddCommGroup M] [Module R M] [Module.Free R M] [Module.Finite R M] {p : Submodule R M} {f : M →ₗ[R] M} (h : LinearMap.IsProj p f) [Module.Free R { x // x p }] [Module.Finite R { x // x p }] [Module.Free R { x // x LinearMap.ker f }] [Module.Finite R { x // x LinearMap.ker f }] :
      ↑(LinearMap.trace R M) f = ↑(FiniteDimensional.finrank R { x // x p })