Documentation

Mathlib.RingTheory.Trace

Trace for (finite) ring extensions. #

Suppose we have an R-algebra S with a finite basis. For each s : S, the trace of the linear map given by multiplying by s gives information about the roots of the minimal polynomial of s over R.

Main definitions #

Main results #

Implementation notes #

Typically, the trace is defined specifically for finite field extensions. The definition is as general as possible and the assumption that we have fields or that the extension is finite is added to the lemmas as needed.

We only define the trace for left multiplication (Algebra.leftMulMatrix, i.e. LinearMap.mulLeft). For now, the definitions assume S is commutative, so the choice doesn't matter anyway.

References #

noncomputable def Algebra.trace (R : Type u_1) (S : Type u_2) [CommRing R] [CommRing S] [Algebra R S] :

The trace of an element s of an R-algebra is the trace of (s * ·), as an R-linear map.

Equations
Instances For
    theorem Algebra.trace_apply (R : Type u_1) {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] (x : S) :
    theorem Algebra.trace_eq_zero_of_not_exists_basis (R : Type u_1) {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] (h : ¬∃ (s : Finset S), Nonempty (Basis { x : S // x s } R S)) :
    theorem Algebra.trace_eq_matrix_trace {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] {ι : Type w} [Fintype ι] [DecidableEq ι] (b : Basis ι R S) (s : S) :
    theorem Algebra.trace_algebraMap_of_basis {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] {ι : Type w} [Fintype ι] (b : Basis ι R S) (x : R) :

    If x is in the base field K, then the trace is [L : K] * x.

    @[simp]
    theorem Algebra.trace_algebraMap {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] (x : K) :

    If x is in the base field K, then the trace is [L : K] * x.

    (If L is not finite-dimensional over K, then trace and finrank return 0.)

    theorem Algebra.trace_trace_of_basis {R : Type u_1} {S : Type u_2} {T : Type u_3} [CommRing R] [CommRing S] [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T] {ι : Type u_6} {κ : Type u_7} [Finite ι] [Finite κ] (b : Basis ι R S) (c : Basis κ S T) (x : T) :
    (Algebra.trace R S) ((Algebra.trace S T) x) = (Algebra.trace R T) x
    theorem Algebra.trace_comp_trace_of_basis {R : Type u_1} {S : Type u_2} {T : Type u_3} [CommRing R] [CommRing S] [CommRing T] [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T] {ι : Type u_6} {κ : Type u_7} [Finite ι] [Finite κ] (b : Basis ι R S) (c : Basis κ S T) :
    Algebra.trace R S ∘ₗ R (Algebra.trace S T) = Algebra.trace R T
    @[simp]
    theorem Algebra.trace_trace {T : Type u_3} [CommRing T] {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] [Algebra K T] [Algebra L T] [IsScalarTower K L T] [FiniteDimensional K L] [FiniteDimensional L T] (x : T) :
    (Algebra.trace K L) ((Algebra.trace L T) x) = (Algebra.trace K T) x
    @[simp]
    theorem Algebra.trace_comp_trace {T : Type u_3} [CommRing T] {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] [Algebra K T] [Algebra L T] [IsScalarTower K L T] [FiniteDimensional K L] [FiniteDimensional L T] :
    Algebra.trace K L ∘ₗ K (Algebra.trace L T) = Algebra.trace K T
    @[simp]
    theorem Algebra.trace_prod_apply {R : Type u_1} {S : Type u_2} {T : Type u_3} [CommRing R] [CommRing S] [CommRing T] [Algebra R S] [Algebra R T] [Module.Free R S] [Module.Free R T] [Module.Finite R S] [Module.Finite R T] (x : S × T) :
    (Algebra.trace R (S × T)) x = (Algebra.trace R S) x.1 + (Algebra.trace R T) x.2
    theorem Algebra.trace_prod {R : Type u_1} {S : Type u_2} {T : Type u_3} [CommRing R] [CommRing S] [CommRing T] [Algebra R S] [Algebra R T] [Module.Free R S] [Module.Free R T] [Module.Finite R S] [Module.Finite R T] :
    noncomputable def Algebra.traceForm (R : Type u_1) (S : Type u_2) [CommRing R] [CommRing S] [Algebra R S] :

    The traceForm maps x y : S to the trace of x * y. It is a symmetric bilinear form and is nondegenerate if the extension is separable.

    Equations
    Instances For
      @[simp]
      theorem Algebra.traceForm_apply (R : Type u_1) {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] (x : S) (y : S) :
      ((Algebra.traceForm R S) x) y = (Algebra.trace R S) (x * y)
      theorem Algebra.traceForm_toMatrix (R : Type u_1) {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] {ι : Type w} [Fintype ι] (b : Basis ι R S) [DecidableEq ι] (i : ι) (j : ι) :
      (BilinForm.toMatrix b) (Algebra.traceForm R S) i j = (Algebra.trace R S) (b i * b j)
      theorem Algebra.traceForm_toMatrix_powerBasis (R : Type u_1) {S : Type u_2} [CommRing R] [CommRing S] [Algebra R S] (h : PowerBasis R S) :
      (BilinForm.toMatrix h.basis) (Algebra.traceForm R S) = Matrix.of fun (i j : Fin h.dim) => (Algebra.trace R S) (h.gen ^ (i + j))
      theorem PowerBasis.trace_gen_eq_nextCoeff_minpoly {S : Type u_2} [CommRing S] {K : Type u_4} [Field K] [Algebra K S] [Nontrivial S] (pb : PowerBasis K S) :

      Given pb : PowerBasis K S, the trace of pb.gen is -(minpoly K pb.gen).nextCoeff.

      theorem PowerBasis.trace_gen_eq_sum_roots {S : Type u_2} [CommRing S] {K : Type u_4} [Field K] {F : Type u_6} [Field F] [Algebra K S] [Algebra K F] [Nontrivial S] (pb : PowerBasis K S) (hf : Polynomial.Splits (algebraMap K F) (minpoly K pb.gen)) :
      (algebraMap K F) ((Algebra.trace K S) pb.gen) = Multiset.sum (Polynomial.aroots (minpoly K pb.gen) F)

      Given pb : PowerBasis K S, then the trace of pb.gen is ((minpoly K pb.gen).aroots F).sum.

      theorem IntermediateField.AdjoinSimple.trace_gen_eq_zero {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] {x : L} (hx : ¬IsIntegral K x) :
      theorem trace_eq_trace_adjoin (K : Type u_4) {L : Type u_5} [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] (x : L) :
      theorem trace_eq_sum_roots {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] {F : Type u_6} [Field F] [Algebra K F] [FiniteDimensional K L] {x : L} (hF : Polynomial.Splits (algebraMap K F) (minpoly K x)) :
      theorem Algebra.isIntegral_trace {R : Type u_1} [CommRing R] {L : Type u_5} [Field L] {F : Type u_6} [Field F] [Algebra R L] [Algebra L F] [Algebra R F] [IsScalarTower R L F] [FiniteDimensional L F] {x : F} (hx : IsIntegral R x) :
      theorem Algebra.trace_eq_of_algEquiv {A : Type u_7} {B : Type u_8} {C : Type u_9} [CommRing A] [CommRing B] [CommRing C] [Algebra A B] [Algebra A C] (e : B ≃ₐ[A] C) (x : B) :
      (Algebra.trace A C) (e x) = (Algebra.trace A B) x
      theorem Algebra.trace_eq_of_ringEquiv {A : Type u_7} {B : Type u_8} {C : Type u_9} [CommRing A] [CommRing B] [CommRing C] [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : RingHom.comp (algebraMap B C) e = algebraMap A C) (x : C) :
      e ((Algebra.trace A C) x) = (Algebra.trace B C) x
      theorem Algebra.trace_eq_of_equiv_equiv {A₁ : Type u_7} {B₁ : Type u_8} {A₂ : Type u_9} {B₂ : Type u_10} [CommRing A₁] [CommRing B₁] [CommRing A₂] [CommRing B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂) (he : RingHom.comp (algebraMap A₂ B₂) e₁ = RingHom.comp (e₂) (algebraMap A₁ B₁)) (x : B₁) :
      (Algebra.trace A₁ B₁) x = (RingEquiv.symm e₁) ((Algebra.trace A₂ B₂) (e₂ x))
      theorem trace_eq_sum_embeddings_gen {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] (E : Type u_7) [Field E] [Algebra K E] (pb : PowerBasis K L) (hE : Polynomial.Splits (algebraMap K E) (minpoly K pb.gen)) (hfx : Polynomial.Separable (minpoly K pb.gen)) :
      (algebraMap K E) ((Algebra.trace K L) pb.gen) = Finset.sum Finset.univ fun (σ : L →ₐ[K] E) => σ pb.gen
      theorem sum_embeddings_eq_finrank_mul {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] (F : Type u_6) [Field F] [Algebra L F] [Algebra K F] [IsScalarTower K L F] (E : Type u_7) [Field E] [Algebra K E] [IsAlgClosed E] [FiniteDimensional K F] [IsSeparable K F] (pb : PowerBasis K L) :
      (Finset.sum Finset.univ fun (σ : F →ₐ[K] E) => σ ((algebraMap L F) pb.gen)) = FiniteDimensional.finrank L F Finset.sum Finset.univ fun (σ : L →ₐ[K] E) => σ pb.gen
      theorem trace_eq_sum_embeddings {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] (E : Type u_7) [Field E] [Algebra K E] [IsAlgClosed E] [FiniteDimensional K L] [IsSeparable K L] {x : L} :
      (algebraMap K E) ((Algebra.trace K L) x) = Finset.sum Finset.univ fun (σ : L →ₐ[K] E) => σ x
      theorem trace_eq_sum_automorphisms {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] (x : L) [FiniteDimensional K L] [IsGalois K L] :
      (algebraMap K L) ((Algebra.trace K L) x) = Finset.sum Finset.univ fun (σ : L ≃ₐ[K] L) => σ x
      noncomputable def Algebra.traceMatrix {κ : Type w} (A : Type u) {B : Type v} [CommRing A] [CommRing B] [Algebra A B] (b : κB) :
      Matrix κ κ A

      Given an A-algebra B and b, a κ-indexed family of elements of B, we define traceMatrix A b as the matrix whose (i j)-th element is the trace of b i * b j.

      Equations
      Instances For
        @[simp]
        theorem Algebra.traceMatrix_apply {κ : Type w} (A : Type u) {B : Type v} [CommRing A] [CommRing B] [Algebra A B] (b : κB) (i : κ) (j : κ) :
        Algebra.traceMatrix A b i j = ((Algebra.traceForm A B) (b i)) (b j)
        theorem Algebra.traceMatrix_reindex {κ : Type w} (A : Type u) {B : Type v} [CommRing A] [CommRing B] [Algebra A B] {κ' : Type u_7} (b : Basis κ A B) (f : κ κ') :
        theorem Algebra.traceMatrix_of_matrix_vecMul {κ : Type w} {A : Type u} {B : Type v} [CommRing A] [CommRing B] [Algebra A B] [Fintype κ] (b : κB) (P : Matrix κ κ A) :
        theorem Algebra.traceMatrix_of_matrix_mulVec {κ : Type w} {A : Type u} {B : Type v} [CommRing A] [CommRing B] [Algebra A B] [Fintype κ] (b : κB) (P : Matrix κ κ A) :
        theorem Algebra.traceMatrix_of_basis {κ : Type w} {A : Type u} {B : Type v} [CommRing A] [CommRing B] [Algebra A B] [Fintype κ] [DecidableEq κ] (b : Basis κ A B) :
        theorem Algebra.traceMatrix_of_basis_mulVec {ι : Type w} [Fintype ι] {A : Type u} {B : Type v} [CommRing A] [CommRing B] [Algebra A B] (b : Basis ι A B) (z : B) :
        Matrix.mulVec (Algebra.traceMatrix A b) ((Basis.equivFun b) z) = fun (i : ι) => (Algebra.trace A B) (z * b i)
        def Algebra.embeddingsMatrix {κ : Type w} (A : Type u) {B : Type v} (C : Type z) [CommRing A] [CommRing B] [Algebra A B] [CommRing C] [Algebra A C] (b : κB) :
        Matrix κ (B →ₐ[A] C) C

        embeddingsMatrix A C b : Matrix κ (B →ₐ[A] C) C is the matrix whose (i, σ) coefficient is σ (b i). It is mostly useful for fields when Fintype.card κ = finrank A B and C is algebraically closed.

        Equations
        Instances For
          @[simp]
          theorem Algebra.embeddingsMatrix_apply {κ : Type w} (A : Type u) {B : Type v} (C : Type z) [CommRing A] [CommRing B] [Algebra A B] [CommRing C] [Algebra A C] (b : κB) (i : κ) (σ : B →ₐ[A] C) :
          Algebra.embeddingsMatrix A C b i σ = σ (b i)
          def Algebra.embeddingsMatrixReindex {κ : Type w} (A : Type u) {B : Type v} (C : Type z) [CommRing A] [CommRing B] [Algebra A B] [CommRing C] [Algebra A C] (b : κB) (e : κ (B →ₐ[A] C)) :
          Matrix κ κ C

          embeddingsMatrixReindex A C b e : Matrix κ κ C is the matrix whose (i, j) coefficient is σⱼ (b i), where σⱼ : B →ₐ[A] C is the embedding corresponding to j : κ given by a bijection e : κ ≃ (B →ₐ[A] C). It is mostly useful for fields and C is algebraically closed. In this case, in presence of h : Fintype.card κ = finrank A B, one can take e := equivOfCardEq ((AlgHom.card A B C).trans h.symm).

          Equations
          Instances For
            theorem Algebra.embeddingsMatrixReindex_eq_vandermonde {A : Type u} {B : Type v} (C : Type z) [CommRing A] [CommRing B] [Algebra A B] [CommRing C] [Algebra A C] (pb : PowerBasis A B) (e : Fin pb.dim (B →ₐ[A] C)) :
            Algebra.embeddingsMatrixReindex A C (pb.basis) e = Matrix.transpose (Matrix.vandermonde fun (i : Fin pb.dim) => (e i) pb.gen)
            theorem det_traceMatrix_ne_zero' {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] (pb : PowerBasis K L) [IsSeparable K L] :
            theorem det_traceForm_ne_zero {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] {ι : Type w} [Fintype ι] [IsSeparable K L] [DecidableEq ι] (b : Basis ι K L) :
            theorem Algebra.trace_ne_zero (K : Type u_4) (L : Type u_5) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsSeparable K L] :
            theorem traceForm_dualBasis_powerBasis_eq {K : Type u_4} {L : Type u_5} [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsSeparable K L] (pb : PowerBasis K L) (i : Fin pb.dim) :
            (LinearMap.BilinForm.dualBasis (Algebra.traceForm K L) pb.basis) i = Polynomial.coeff (minpolyDiv K pb.gen) i / (Polynomial.aeval pb.gen) (Polynomial.derivative (minpoly K pb.gen))

            The dual basis of a powerbasis {1, x, x²...} under the trace form is aᵢ / f'(x), with f being the minimal polynomial of x and f / (X - x) = ∑ aᵢxⁱ.