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) :
    ↑(Algebra.trace R S) x = ↑(LinearMap.trace R S) (↑(Algebra.lmul R S) x)
    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, Nonempty (Basis { x // 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) :
    ↑(Algebra.trace R S) (↑(algebraMap R S) x) = Fintype.card ι x

    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 ι] [Fintype κ] (b : Basis ι R S) (c : Basis κ S 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] :
    @[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.fst + ↑(Algebra.trace R T) x.snd
    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) :
      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 => ↑(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) :
      ↑(Algebra.trace K S) pb.gen = -Polynomial.nextCoeff (minpoly K pb.gen)

      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) :
      ↑(Algebra.trace K { x // x Kx }) (IntermediateField.AdjoinSimple.gen K x) = 0
      theorem IntermediateField.AdjoinSimple.trace_gen_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] (x : L) (hf : Polynomial.Splits (algebraMap K F) (minpoly 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) :
      ↑(Algebra.trace K L) x = FiniteDimensional.finrank { x // x Kx } L ↑(Algebra.trace K { x // x Kx }) (IntermediateField.AdjoinSimple.gen K x)
      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)) :
      ↑(algebraMap K F) (↑(Algebra.trace K L) x) = FiniteDimensional.finrank { x // x Kx } L Multiset.sum (Polynomial.aroots (minpoly K x) F)
      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) :
      IsIntegral R (↑(Algebra.trace L F) 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 σ => σ 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 σ => σ (↑(algebraMap L F) pb.gen)) = FiniteDimensional.finrank L F Finset.sum Finset.univ fun σ => σ 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 σ => σ 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 σ => σ 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 : κ) :
        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)) :
          (fun x => Matrix κ κ C) (Algebra.embeddingsMatrix A C b)

          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 => ↑(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) :