File: Mathlib/RingTheory/Trace/Basic.lean

full_name: Algebra.traceForm_toMatrix_powerBasis
code: theorem Algebra.traceForm_toMatrix_powerBasis (h : PowerBasis R S) :
    BilinForm.toMatrix h.basis (traceForm R S) = of fun i j => trace R S (h.gen ^ (i.1 + j.1)) 
goal: (BilinForm.toMatrix h.basis) (Algebra.traceForm R S) = Matrix.of fun i j => (Algebra.trace R S) (h.gen ^ (↑i + ↑j))

full_name: PowerBasis.trace_gen_eq_nextCoeff_minpoly
code: /-- Given `pb : PowerBasis K S`, the trace of `pb.gen` is `-(minpoly K pb.gen).nextCoeff`. -/
theorem PowerBasis.trace_gen_eq_nextCoeff_minpoly [Nontrivial S] (pb : PowerBasis K S) :
    Algebra.trace K S pb.gen = -(minpoly K pb.gen).nextCoeff 
goal: (Algebra.trace K S) pb.gen = -(minpoly K pb.gen).nextCoeff

full_name: PowerBasis.trace_gen_eq_sum_roots
code: /-- Given `pb : PowerBasis K S`, then the trace of `pb.gen` is
`((minpoly K pb.gen).aroots F).sum`. -/
theorem PowerBasis.trace_gen_eq_sum_roots [Nontrivial S] (pb : PowerBasis K S)
    (hf : (minpoly K pb.gen).Splits (algebraMap K F)) :
    algebraMap K F (trace K S pb.gen) = ((minpoly K pb.gen).aroots F).sum 
goal: (algebraMap K F) ((Algebra.trace K S) pb.gen) = ((minpoly K pb.gen).aroots F).sum

full_name: IntermediateField.AdjoinSimple.trace_gen_eq_zero
code: theorem trace_gen_eq_zero {x : L} (hx : ¬IsIntegral K x) :
    Algebra.trace K K⟮x⟯ (AdjoinSimple.gen K x) = 0 
goal: (Algebra.trace K ↥K⟮x⟯) (IntermediateField.AdjoinSimple.gen K x) = 0

full_name: IntermediateField.AdjoinSimple.trace_gen_eq_sum_roots
code: theorem trace_gen_eq_sum_roots (x : L) (hf : (minpoly K x).Splits (algebraMap K F)) :
    algebraMap K F (trace K K⟮x⟯ (AdjoinSimple.gen K x)) =
      ((minpoly K x).aroots F).sum 
goal: (algebraMap K F) ((Algebra.trace K ↥K⟮x⟯) (IntermediateField.AdjoinSimple.gen K x)) = ((minpoly K x).aroots F).sum

full_name: trace_eq_trace_adjoin
code: theorem trace_eq_trace_adjoin [FiniteDimensional K L] (x : L) :
    Algebra.trace K L x = finrank K⟮x⟯ L • trace K K⟮x⟯ (AdjoinSimple.gen K x) 
goal: (Algebra.trace K L) x =
  FiniteDimensional.finrank (↥K⟮x⟯) L • (Algebra.trace K ↥K⟮x⟯) (IntermediateField.AdjoinSimple.gen K x)

full_name: trace_eq_sum_roots
code: theorem trace_eq_sum_roots [FiniteDimensional K L] {x : L}
    (hF : (minpoly K x).Splits (algebraMap K F)) :
    algebraMap K F (Algebra.trace K L x) =
      finrank K⟮x⟯ L • ((minpoly K x).aroots F).sum 
goal: (algebraMap K F) ((Algebra.trace K L) x) = FiniteDimensional.finrank (↥K⟮x⟯) L • ((minpoly K x).aroots F).sum

full_name: Algebra.isIntegral_trace
code: theorem Algebra.isIntegral_trace [FiniteDimensional L F] {x : F} (hx : IsIntegral R x) :
    IsIntegral R (Algebra.trace L F x) 
goal: IsIntegral R ((Algebra.trace L F) x)

full_name: Algebra.trace_eq_of_algEquiv
code: lemma Algebra.trace_eq_of_algEquiv {A B C : Type*} [CommRing A] [CommRing B] [CommRing C]
    [Algebra A B] [Algebra A C] (e : B ≃ₐ[A] C) (x) :
    Algebra.trace A C (e x) = Algebra.trace A B x 
goal: (Algebra.trace A C) (e x) = (Algebra.trace A B) x

full_name: Algebra.trace_eq_of_ringEquiv
code: lemma Algebra.trace_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [CommRing C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C) (x) :
    e (Algebra.trace A C x) = Algebra.trace B C x 
goal: e ((Algebra.trace A C) x) = (Algebra.trace B C) x

full_name: Algebra.trace_eq_of_equiv_equiv
code: lemma Algebra.trace_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [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) :
    Algebra.trace A₁ B₁ x = e₁.symm (Algebra.trace A₂ B₂ (e₂ x)) 
goal: (Algebra.trace A₁ B₁) x = e₁.symm ((Algebra.trace A₂ B₂) (e₂ x))

full_name: trace_eq_sum_embeddings_gen
code: theorem trace_eq_sum_embeddings_gen (pb : PowerBasis K L)
    (hE : (minpoly K pb.gen).Splits (algebraMap K E)) (hfx : IsSeparable K pb.gen) :
    algebraMap K E (Algebra.trace K L pb.gen) =
      (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ => σ pb.gen 
goal: (algebraMap K E) ((Algebra.trace K L) pb.gen) = ∑ σ : L →ₐ[K] E, σ pb.gen

full_name: sum_embeddings_eq_finrank_mul
code: theorem sum_embeddings_eq_finrank_mul [FiniteDimensional K F] [Algebra.IsSeparable K F]
    (pb : PowerBasis K L) :
    ∑ σ : F →ₐ[K] E, σ (algebraMap L F pb.gen) =
      finrank L F •
        (@Finset.univ _ (PowerBasis.AlgHom.fintype pb)).sum fun σ : L →ₐ[K] E => σ pb.gen 
goal: ∑ σ : F →ₐ[K] E, σ ((algebraMap L F) pb.gen) = FiniteDimensional.finrank L F • ∑ σ : L →ₐ[K] E, σ pb.gen

full_name: trace_eq_sum_embeddings
code: theorem trace_eq_sum_embeddings [FiniteDimensional K L] [Algebra.IsSeparable K L] {x : L} :
    algebraMap K E (Algebra.trace K L x) = ∑ σ : L →ₐ[K] E, σ x 
goal: (algebraMap K E) ((Algebra.trace K L) x) = ∑ σ : L →ₐ[K] E, σ x

full_name: trace_eq_sum_automorphisms
code: theorem trace_eq_sum_automorphisms (x : L) [FiniteDimensional K L] [IsGalois K L] :
    algebraMap K L (Algebra.trace K L x) = ∑ σ : L ≃ₐ[K] L, σ x 
goal: (algebraMap K L) ((Algebra.trace K L) x) = ∑ σ : L ≃ₐ[K] L, σ x

full_name: Algebra.traceMatrix
code: /-- 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`. -/
noncomputable def traceMatrix (b : κ → B) : Matrix κ κ A 
goal: Matrix κ κ A

full_name: Algebra.traceMatrix_apply
code: @[simp]
theorem traceMatrix_apply (b : κ → B) (i j) : traceMatrix A b i j = traceForm A B (b i) (b j) 
goal: Algebra.traceMatrix A b i j = ((Algebra.traceForm A B) (b i)) (b j)

full_name: Algebra.traceMatrix_reindex
code: theorem traceMatrix_reindex {κ' : Type*} (b : Basis κ A B) (f : κ ≃ κ') :
    traceMatrix A (b.reindex f) = reindex f f (traceMatrix A b) 
goal: Algebra.traceMatrix A ⇑(b.reindex f) = (Matrix.reindex f f) (Algebra.traceMatrix A ⇑b)

full_name: Algebra.traceMatrix_of_matrix_vecMul
code: theorem traceMatrix_of_matrix_vecMul [Fintype κ] (b : κ → B) (P : Matrix κ κ A) :
    traceMatrix A (b ᵥ* P.map (algebraMap A B)) = Pᵀ * traceMatrix A b * P 
goal: Algebra.traceMatrix A (b ᵥ* P.map ⇑(algebraMap A B)) = Pᵀ * Algebra.traceMatrix A b * P

full_name: Algebra.traceMatrix_of_matrix_mulVec
code: theorem traceMatrix_of_matrix_mulVec [Fintype κ] (b : κ → B) (P : Matrix κ κ A) :
    traceMatrix A (P.map (algebraMap A B) *ᵥ b) = P * traceMatrix A b * Pᵀ 
goal: Algebra.traceMatrix A (P.map ⇑(algebraMap A B) *ᵥ b) = P * Algebra.traceMatrix A b * Pᵀ

full_name: Algebra.traceMatrix_of_basis
code: theorem traceMatrix_of_basis [Fintype κ] [DecidableEq κ] (b : Basis κ A B) :
    traceMatrix A b = BilinForm.toMatrix b (traceForm A B) 
goal: Algebra.traceMatrix A ⇑b = (BilinForm.toMatrix b) (Algebra.traceForm A B)

full_name: Algebra.traceMatrix_of_basis_mulVec
code: theorem traceMatrix_of_basis_mulVec (b : Basis ι A B) (z : B) :
    traceMatrix A b *ᵥ b.equivFun z = fun i => trace A B (z * b i) 
goal: Algebra.traceMatrix A ⇑b *ᵥ b.equivFun z = fun i => (Algebra.trace A B) (z * b i)

full_name: Algebra.embeddingsMatrix
code: /-- `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. -/
def embeddingsMatrix (b : κ → B) : Matrix κ (B →ₐ[A] C) C 
goal: Matrix κ (B →ₐ[A] C) C

full_name: Algebra.embeddingsMatrix_apply
code: @[simp]
theorem embeddingsMatrix_apply (b : κ → B) (i) (σ : B →ₐ[A] C) :
    embeddingsMatrix A C b i σ = σ (b i) 
goal: Algebra.embeddingsMatrix A C b i σ = σ (b i)

full_name: Algebra.embeddingsMatrixReindex
code: /-- `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)`. -/
def embeddingsMatrixReindex (b : κ → B) (e : κ ≃ (B →ₐ[A] C)) 
goal: Matrix κ κ C

full_name: Algebra.embeddingsMatrixReindex_eq_vandermonde
code: theorem embeddingsMatrixReindex_eq_vandermonde (pb : PowerBasis A B)
    (e : Fin pb.dim ≃ (B →ₐ[A] C)) :
    embeddingsMatrixReindex A C pb.basis e = (vandermonde fun i => e i pb.gen)ᵀ 
goal: Algebra.embeddingsMatrixReindex A C (⇑pb.basis) e = (Matrix.vandermonde fun i => (e i) pb.gen)ᵀ

full_name: Algebra.traceMatrix_eq_embeddingsMatrix_mul_trans
code: theorem traceMatrix_eq_embeddingsMatrix_mul_trans : (traceMatrix K b).map (algebraMap K E) =
    embeddingsMatrix K E b * (embeddingsMatrix K E b)ᵀ 
goal: (Algebra.traceMatrix K b).map ⇑(algebraMap K E) = Algebra.embeddingsMatrix K E b * (Algebra.embeddingsMatrix K E b)ᵀ

full_name: Algebra.traceMatrix_eq_embeddingsMatrixReindex_mul_trans
code: theorem traceMatrix_eq_embeddingsMatrixReindex_mul_trans [Fintype κ] (e : κ ≃ (L →ₐ[K] E)) :
    (traceMatrix K b).map (algebraMap K E) =
      embeddingsMatrixReindex K E b e * (embeddingsMatrixReindex K E b e)ᵀ 
goal: (Algebra.traceMatrix K b).map ⇑(algebraMap K E) =
  Algebra.embeddingsMatrixReindex K E b e * (Algebra.embeddingsMatrixReindex K E b e)ᵀ

full_name: det_traceMatrix_ne_zero'
code: theorem det_traceMatrix_ne_zero' [Algebra.IsSeparable K L] : det (traceMatrix K pb.basis) ≠ 0 
goal: (Algebra.traceMatrix K ⇑pb.basis).det ≠ 0

full_name: det_traceForm_ne_zero
code: theorem det_traceForm_ne_zero [Algebra.IsSeparable K L] [DecidableEq ι] (b : Basis ι K L) :
    det (BilinForm.toMatrix b (traceForm K L)) ≠ 0 
goal: ((BilinForm.toMatrix b) (Algebra.traceForm K L)).det ≠ 0

full_name: traceForm_nondegenerate
code: theorem traceForm_nondegenerate [FiniteDimensional K L] [Algebra.IsSeparable K L] :
    (traceForm K L).Nondegenerate 
goal: (Algebra.traceForm K L).Nondegenerate

full_name: Algebra.trace_ne_zero
code: theorem Algebra.trace_ne_zero [FiniteDimensional K L] [Algebra.IsSeparable K L] :
    Algebra.trace K L ≠ 0 
goal: Algebra.trace K L ≠ 0

full_name: Algebra.trace_surjective
code: theorem Algebra.trace_surjective [FiniteDimensional K L] [Algebra.IsSeparable K L] :
    Function.Surjective (Algebra.trace K L) 
goal: Function.Surjective ⇑(Algebra.trace K L)

full_name: traceForm_dualBasis_powerBasis_eq
code: /--
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ⁱ`.
-/
lemma traceForm_dualBasis_powerBasis_eq [FiniteDimensional K L] [Algebra.IsSeparable K L]
    (pb : PowerBasis K L) (i) :
    (Algebra.traceForm K L).dualBasis (traceForm_nondegenerate K L) pb.basis i =
      (minpolyDiv K pb.gen).coeff i / aeval pb.gen (derivative <| minpoly K pb.gen) 
goal: ((Algebra.traceForm K L).dualBasis ⋯ pb.basis) i =
  (minpolyDiv K pb.gen).coeff ↑i / (Polynomial.aeval pb.gen) (Polynomial.derivative (minpoly K pb.gen))