fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
basis_repr_tmul (a : A) (m : M) : (basis A b).repr (a ⊗ₜ m) = a • Finsupp.mapRange (algebraMap R A) (map_zero _) (b.repr m) := basisAux_tmul b _ _
theorem
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
basis_repr_tmul
null
basis_repr_symm_apply (a : A) (i : ι) : (basis A b).repr.symm (Finsupp.single i a) = a ⊗ₜ b.repr.symm (Finsupp.single i 1) := by simp [basis, LinearEquiv.coe_symm_mk', Equiv.uniqueProd_symm_apply, basisAux] @[simp]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
basis_repr_symm_apply
null
basis_apply (i : ι) : basis A b i = 1 ⊗ₜ b i := basis_repr_symm_apply b 1 i
theorem
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
basis_apply
null
basis_repr_symm_apply' (a : A) (i : ι) : a • basis A b i = a ⊗ₜ b i := by simpa using basis_repr_symm_apply b a i
theorem
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
basis_repr_symm_apply'
null
_root_.Module.Basis.baseChange_linearMap (b : Basis ι R M) (b' : Basis ι' R N) (ij : ι × ι') : baseChange A (b'.linearMap b ij) = (basis A b').linearMap (basis A b) ij := by apply (basis A b').ext intro k conv_lhs => simp only [basis_apply, baseChange_tmul] simp_rw [Basis.linearMap_apply_apply, basis_apply] split <;> simp only [TensorProduct.tmul_zero] variable [DecidableEq ι]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
_root_.Module.Basis.baseChange_linearMap
null
_root_.Module.Basis.baseChange_end (b : Basis ι R M) (ij : ι × ι) : baseChange A (b.end ij) = (basis A b).end ij := b.baseChange_linearMap A b ij
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
_root_.Module.Basis.baseChange_end
null
instFree (R A M : Type*) [CommSemiring R] [AddCommMonoid M] [Module R M] [Module.Free R M] [CommSemiring A] [Algebra R A] : Module.Free A (A ⊗[R] M) := Module.Free.of_basis <| Algebra.TensorProduct.basis A (Module.Free.chooseBasis R M)
instance
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
instFree
null
@[simp] toMatrix_baseChange (f : M₁ →ₗ[R] M₂) (b₁ : Basis ι R M₁) (b₂ : Basis ι₂ R M₂) : toMatrix (basis A b₁) (basis A b₂) (f.baseChange A) = (toMatrix b₁ b₂ f).map (algebraMap R A) := by ext; simp [toMatrix_apply]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.LinearAlgebra.Finsupp.Pi", "Mathlib.LinearAlgebra.FreeModule.Basic", "Mathlib.LinearAlgebra.Matrix.ToLin" ]
Mathlib/RingTheory/TensorProduct/Free.lean
toMatrix_baseChange
null
prodMap {M N M' N' : Type*} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] [AddCommMonoid M'] [AddCommMonoid N'] [Module R M'] [Module R N'] [Module S M'] [Module S N'] [IsScalarTower R S M'] [IsScalarTower R S N'] (f : M →ₗ[R] M') (g : N →ₗ[R] N') (hf : IsBaseChange S f) (hg : IsBaseChange S g) : IsBaseChange S (f.prodMap g) := by apply of_equiv (TensorProduct.prodRight R _ S M N ≪≫ₗ hf.equiv.prodCongr hg.equiv) intro p simp [equiv_tmul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.Localization.BaseChange" ]
Mathlib/RingTheory/TensorProduct/IsBaseChangePi.lean
prodMap
Base change commutes with binary products.
pi {ι : Type*} [Finite ι] {M M' : ι → Type*} [∀ i, AddCommMonoid (M i)] [∀ i, AddCommMonoid (M' i)] [∀ i, Module R (M i)] [∀ i, Module R (M' i)] [∀ i, Module S (M' i)] [∀ i, IsScalarTower R S (M' i)] (f : ∀ i, M i →ₗ[R] M' i) (hf : ∀ i, IsBaseChange S (f i)) : IsBaseChange S (.pi fun i ↦ f i ∘ₗ .proj i) := by classical cases nonempty_fintype ι apply of_equiv <| TensorProduct.piRight R S _ M ≪≫ₗ .piCongrRight fun i ↦ (hf i).equiv intro x ext i simp [equiv_tmul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.Localization.BaseChange" ]
Mathlib/RingTheory/TensorProduct/IsBaseChangePi.lean
pi
Base change commutes with finite products.
prodMap {M N M' N' : Type*} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] [AddCommMonoid M'] [AddCommMonoid N'] [Module R M'] [Module R N'] (f : M →ₗ[R] M') (g : N →ₗ[R] N') [IsLocalizedModule S f] [IsLocalizedModule S g] : IsLocalizedModule S (f.prodMap g) := by letI : Module (Localization S) M' := IsLocalizedModule.module S f letI : Module (Localization S) N' := IsLocalizedModule.module S g rw [isLocalizedModule_iff_isBaseChange S (Localization S)] apply IsBaseChange.prodMap · rw [← isLocalizedModule_iff_isBaseChange S] infer_instance · rw [← isLocalizedModule_iff_isBaseChange S] infer_instance
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.Localization.BaseChange" ]
Mathlib/RingTheory/TensorProduct/IsBaseChangePi.lean
prodMap
Localization of modules commutes with binary products.
pi {ι : Type*} [Finite ι] {M M' : ι → Type*} [∀ i, AddCommMonoid (M i)] [∀ i, AddCommMonoid (M' i)] [∀ i, Module R (M i)] [∀ i, Module R (M' i)] (f : ∀ i, M i →ₗ[R] M' i) [∀ i, IsLocalizedModule S (f i)] : IsLocalizedModule S (.pi fun i ↦ f i ∘ₗ .proj i) := by letI (i : ι) : Module (Localization S) (M' i) := IsLocalizedModule.module S (f i) rw [isLocalizedModule_iff_isBaseChange S (Localization S)] apply IsBaseChange.pi intro i rw [← isLocalizedModule_iff_isBaseChange S] infer_instance
instance
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.Localization.BaseChange" ]
Mathlib/RingTheory/TensorProduct/IsBaseChangePi.lean
pi
Localization of modules commutes with finite products.
noncomputable rTensor : MvPolynomial σ S ⊗[R] N ≃ₗ[S] (σ →₀ ℕ) →₀ (S ⊗[R] N) := TensorProduct.finsuppLeft' _ _ _ _ _
def
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor
The tensor product of a polynomial ring by a module is linearly equivalent to a Finsupp of a tensor product
rTensor_apply_tmul (p : MvPolynomial σ S) (n : N) : rTensor (p ⊗ₜ[R] n) = p.sum (fun i m ↦ Finsupp.single i (m ⊗ₜ[R] n)) := TensorProduct.finsuppLeft_apply_tmul p n
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor_apply_tmul
null
rTensor_apply_tmul_apply (p : MvPolynomial σ S) (n : N) (d : σ →₀ ℕ) : rTensor (p ⊗ₜ[R] n) d = (coeff d p) ⊗ₜ[R] n := TensorProduct.finsuppLeft_apply_tmul_apply p n d
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor_apply_tmul_apply
null
rTensor_apply_monomial_tmul (e : σ →₀ ℕ) (s : S) (n : N) (d : σ →₀ ℕ) : rTensor (monomial e s ⊗ₜ[R] n) d = if e = d then s ⊗ₜ[R] n else 0 := by simp only [rTensor_apply_tmul_apply, coeff_monomial, ite_tmul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor_apply_monomial_tmul
null
rTensor_apply_X_tmul (s : σ) (n : N) (d : σ →₀ ℕ) : rTensor (X s ⊗ₜ[R] n) d = if Finsupp.single s 1 = d then (1 : S) ⊗ₜ[R] n else 0 := by rw [rTensor_apply_tmul_apply, coeff_X', ite_tmul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor_apply_X_tmul
null
rTensor_apply (t : MvPolynomial σ S ⊗[R] N) (d : σ →₀ ℕ) : rTensor t d = ((lcoeff S d).restrictScalars R).rTensor N t := TensorProduct.finsuppLeft_apply t d @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor_apply
null
rTensor_symm_apply_single (d : σ →₀ ℕ) (s : S) (n : N) : rTensor.symm (Finsupp.single d (s ⊗ₜ n)) = (monomial d s) ⊗ₜ[R] n := TensorProduct.finsuppLeft_symm_apply_single (R := R) d s n
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensor_symm_apply_single
null
noncomputable scalarRTensor : MvPolynomial σ R ⊗[R] N ≃ₗ[R] (σ →₀ ℕ) →₀ N := TensorProduct.finsuppScalarLeft _ _ _
def
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensor
The tensor product of the polynomial algebra by a module is linearly equivalent to a Finsupp of that module
scalarRTensor_apply_tmul (p : MvPolynomial σ R) (n : N) : scalarRTensor (p ⊗ₜ[R] n) = p.sum (fun i m ↦ Finsupp.single i (m • n)) := TensorProduct.finsuppScalarLeft_apply_tmul p n
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensor_apply_tmul
null
scalarRTensor_apply_tmul_apply (p : MvPolynomial σ R) (n : N) (d : σ →₀ ℕ) : scalarRTensor (p ⊗ₜ[R] n) d = coeff d p • n := TensorProduct.finsuppScalarLeft_apply_tmul_apply p n d
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensor_apply_tmul_apply
null
scalarRTensor_apply_monomial_tmul (e : σ →₀ ℕ) (r : R) (n : N) (d : σ →₀ ℕ) : scalarRTensor (monomial e r ⊗ₜ[R] n) d = if e = d then r • n else 0 := by rw [scalarRTensor_apply_tmul_apply, coeff_monomial, ite_smul, zero_smul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensor_apply_monomial_tmul
null
scalarRTensor_apply_X_tmul_apply (s : σ) (n : N) (d : σ →₀ ℕ) : scalarRTensor (X s ⊗ₜ[R] n) d = if Finsupp.single s 1 = d then n else 0 := by rw [scalarRTensor_apply_tmul_apply, coeff_X', ite_smul, one_smul, zero_smul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensor_apply_X_tmul_apply
null
scalarRTensor_symm_apply_single (d : σ →₀ ℕ) (n : N) : scalarRTensor.symm (Finsupp.single d n) = (monomial d 1) ⊗ₜ[R] n := TensorProduct.finsuppScalarLeft_symm_apply_single d n
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensor_symm_apply_single
null
noncomputable rTensorAlgHom : (MvPolynomial σ S) ⊗[R] N →ₐ[S] MvPolynomial σ (S ⊗[R] N) := Algebra.TensorProduct.lift (mapAlgHom Algebra.TensorProduct.includeLeft) ((IsScalarTower.toAlgHom R (S ⊗[R] N) _).comp Algebra.TensorProduct.includeRight) (fun p n => by simp [commute_iff_eq, algebraMap_eq, mul_comm]) @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensorAlgHom
The algebra morphism from a tensor product of a polynomial algebra by an algebra to a polynomial algebra
coeff_rTensorAlgHom_tmul (p : MvPolynomial σ S) (n : N) (d : σ →₀ ℕ) : coeff d (rTensorAlgHom (p ⊗ₜ[R] n)) = (coeff d p) ⊗ₜ[R] n := by rw [rTensorAlgHom, Algebra.TensorProduct.lift_tmul] rw [AlgHom.coe_comp, IsScalarTower.coe_toAlgHom', Function.comp_apply, Algebra.TensorProduct.includeRight_apply] rw [algebraMap_eq, mul_comm, coeff_C_mul] simp [mapAlgHom, coeff_map]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
coeff_rTensorAlgHom_tmul
null
coeff_rTensorAlgHom_monomial_tmul (e : σ →₀ ℕ) (s : S) (n : N) (d : σ →₀ ℕ) : coeff d (rTensorAlgHom (monomial e s ⊗ₜ[R] n)) = if e = d then s ⊗ₜ[R] n else 0 := by simp [ite_tmul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
coeff_rTensorAlgHom_monomial_tmul
null
rTensorAlgHom_toLinearMap : (rTensorAlgHom : MvPolynomial σ S ⊗[R] N →ₐ[S] MvPolynomial σ (S ⊗[R] N)).toLinearMap = rTensor.toLinearMap := by ext d n e dsimp only [AlgebraTensorModule.curry_apply, TensorProduct.curry_apply, LinearMap.coe_restrictScalars, AlgHom.toLinearMap_apply] simp only [coe_comp, Function.comp_apply, AlgebraTensorModule.curry_apply, curry_apply, LinearMap.coe_restrictScalars, AlgHom.toLinearMap_apply] rw [coeff_rTensorAlgHom_tmul] simp only [coeff] exact (finsuppLeft_apply_tmul_apply _ _ _).symm
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensorAlgHom_toLinearMap
null
rTensorAlgHom_apply_eq (p : MvPolynomial σ S ⊗[R] N) : rTensorAlgHom (S := S) p = rTensor p := by rw [← AlgHom.toLinearMap_apply, rTensorAlgHom_toLinearMap] rfl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensorAlgHom_apply_eq
null
noncomputable rTensorAlgEquiv : (MvPolynomial σ S) ⊗[R] N ≃ₐ[S] MvPolynomial σ (S ⊗[R] N) := by apply AlgEquiv.ofLinearEquiv rTensor · simp only [Algebra.TensorProduct.one_def] apply symm rw [← LinearEquiv.symm_apply_eq] exact finsuppLeft_symm_apply_single (R := R) (0 : σ →₀ ℕ) (1 : S) (1 : N) · intro x y erw [← rTensorAlgHom_apply_eq (S := S)] simp only [map_mul, rTensorAlgHom_apply_eq] rfl @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensorAlgEquiv
The tensor product of a polynomial algebra by an algebra is algebraically equivalent to a polynomial algebra
rTensorAlgEquiv_apply (x : (MvPolynomial σ S) ⊗[R] N) : rTensorAlgEquiv x = rTensorAlgHom x := by rw [← AlgHom.coe_coe, ← AlgEquiv.toAlgHom_eq_coe] congr 1 ext _ d <;> simpa [rTensorAlgEquiv] using rTensor_apply_tmul_apply _ _ d
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
rTensorAlgEquiv_apply
null
noncomputable scalarRTensorAlgEquiv : MvPolynomial σ R ⊗[R] N ≃ₐ[R] MvPolynomial σ N := rTensorAlgEquiv.trans (mapAlgEquiv σ (Algebra.TensorProduct.lid R N))
def
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
scalarRTensorAlgEquiv
The tensor product of the polynomial algebra by an algebra is algebraically equivalent to a polynomial algebra with coefficients in that algebra
noncomputable algebraTensorAlgEquiv : A ⊗[R] MvPolynomial σ R ≃ₐ[A] MvPolynomial σ A := AlgEquiv.ofAlgHom (Algebra.TensorProduct.lift (Algebra.ofId A (MvPolynomial σ A)) (MvPolynomial.mapAlgHom <| Algebra.ofId R A) (fun _ _ ↦ Commute.all _ _)) (aeval (fun s ↦ 1 ⊗ₜ X s)) (by ext s; simp) (by ext s; simp) @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
algebraTensorAlgEquiv
Tensoring `MvPolynomial σ R` on the left by an `R`-algebra `A` is algebraically equivalent to `MvPolynomial σ A`.
algebraTensorAlgEquiv_tmul (a : A) (p : MvPolynomial σ R) : algebraTensorAlgEquiv R A (a ⊗ₜ p) = a • MvPolynomial.map (algebraMap R A) p := by simp [algebraTensorAlgEquiv, Algebra.smul_def] rfl @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
algebraTensorAlgEquiv_tmul
null
algebraTensorAlgEquiv_symm_X (s : σ) : (algebraTensorAlgEquiv R A).symm (X s) = 1 ⊗ₜ X s := by simp [algebraTensorAlgEquiv] @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
algebraTensorAlgEquiv_symm_X
null
algebraTensorAlgEquiv_symm_monomial (m : σ →₀ ℕ) (a : A) : (algebraTensorAlgEquiv R A).symm (monomial m a) = a ⊗ₜ monomial m 1 := by apply @Finsupp.induction σ ℕ _ _ m · simp [algebraTensorAlgEquiv] · intro i n f _ _ hfa simp only [algebraTensorAlgEquiv, AlgEquiv.ofAlgHom_symm_apply] at hfa ⊢ simp only [add_comm, monomial_add_single, map_mul, map_pow, aeval_X, Algebra.TensorProduct.tmul_pow, one_pow, hfa] nth_rw 2 [← mul_one a] rw [Algebra.TensorProduct.tmul_mul_tmul]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
algebraTensorAlgEquiv_symm_monomial
null
aeval_one_tmul (f : σ → S) (p : MvPolynomial σ R) : (aeval fun x ↦ (1 ⊗ₜ[R] f x : N ⊗[R] S)) p = 1 ⊗ₜ[R] (aeval f) p := by induction p using MvPolynomial.induction_on with | C a => simp only [algHom_C, Algebra.TensorProduct.algebraMap_apply] rw [← mul_one ((algebraMap R N) a), ← Algebra.smul_def, smul_tmul, Algebra.smul_def, mul_one] | add p q hp hq => simp [hp, hq, tmul_add] | mul_X p i h => simp [h]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.DirectSum.Finsupp", "Mathlib.Algebra.MvPolynomial.Eval", "Mathlib.RingTheory.TensorProduct.Basic", "Mathlib.Algebra.MvPolynomial.Equiv", "Mathlib.RingTheory.IsTensorProduct" ]
Mathlib/RingTheory/TensorProduct/MvPolynomial.lean
aeval_one_tmul
null
nontrivial_of_algebraMap_injective_of_isDomain (R A B : Type*) [CommRing R] [CommRing A] [CommRing B] [Algebra R A] [Algebra R B] (ha : Function.Injective (algebraMap R A)) (hb : Function.Injective (algebraMap R B)) [IsDomain A] [IsDomain B] : Nontrivial (A ⊗[R] B) := by haveI := ha.isDomain _ let FR := FractionRing R let FA := FractionRing A let FB := FractionRing B let fa : FR →ₐ[R] FA := IsFractionRing.liftAlgHom (g := Algebra.ofId R FA) ((IsFractionRing.injective A FA).comp ha) let fb : FR →ₐ[R] FB := IsFractionRing.liftAlgHom (g := Algebra.ofId R FB) ((IsFractionRing.injective B FB).comp hb) algebraize_only [fa.toRingHom, fb.toRingHom] exact Algebra.TensorProduct.mapOfCompatibleSMul FR R FA FB |>.comp (Algebra.TensorProduct.map (IsScalarTower.toAlgHom R A FA) (IsScalarTower.toAlgHom R B FB)) |>.toRingHom.domain_nontrivial
theorem
RingTheory
[ "Mathlib.LinearAlgebra.Basis.VectorSpace", "Mathlib.RingTheory.Flat.FaithfullyFlat.Basic", "Mathlib.RingTheory.Localization.FractionRing" ]
Mathlib/RingTheory/TensorProduct/Nontrivial.lean
nontrivial_of_algebraMap_injective_of_isDomain
If `A`, `B` are `R`-algebras, `R` injects into `A` and `B`, and `A` and `B` are domains (which implies `R` is also a domain), then `A ⊗[R] B` is nontrivial.
@[simp] piRightHom_one : piRightHom R S A B 1 = 1 := rfl variable {R S A B} in @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piRightHom_one
null
piRightHom_mul (x y : A ⊗[R] ∀ i, B i) : piRightHom R S A B (x * y) = piRightHom R S A B x * piRightHom R S A B y := by induction x · simp · induction y · simp · ext j simp · simp_all [mul_add] · simp_all [add_mul]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piRightHom_mul
null
piRightHom : A ⊗[R] (∀ i, B i) →ₐ[S] ∀ i, A ⊗[R] B i := AlgHom.ofLinearMap (_root_.TensorProduct.piRightHom R S A B) (by simp) (by simp) variable [Fintype ι] [DecidableEq ι]
def
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piRightHom
The canonical map `A ⊗[R] (∀ i, B i) →ₐ[S] ∀ i, A ⊗[R] B i`. This is an isomorphism if `ι` is finite (see `Algebra.TensorProduct.piRight`).
piRight : A ⊗[R] (∀ i, B i) ≃ₐ[S] ∀ i, A ⊗[R] B i := AlgEquiv.ofLinearEquiv (_root_.TensorProduct.piRight R S A B) (by simp) (by simp) @[simp]
def
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piRight
Tensor product of rings commutes with finite products on the right.
piRight_tmul (x : A) (f : ∀ i, B i) : piRight R S A B (x ⊗ₜ f) = (fun j ↦ x ⊗ₜ f j) := rfl variable (ι) in
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piRight_tmul
null
piScalarRight : A ⊗[R] (ι → R) ≃ₐ[S] ι → A := (piRight R S A (fun _ : ι ↦ R)).trans <| AlgEquiv.piCongrRight (fun _ ↦ Algebra.TensorProduct.rid R S A)
def
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piScalarRight
Variant of `Algebra.TensorProduct.piRight` with constant factors.
piScalarRight_tmul (x : A) (y : ι → R) : piScalarRight R S A ι (x ⊗ₜ y) = fun i ↦ y i • x := rfl @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piScalarRight_tmul
null
piScalarRight_tmul_apply (x : A) (y : ι → R) (i : ι) : piScalarRight R S A ι (x ⊗ₜ y) i = y i • x := rfl
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
piScalarRight_tmul_apply
null
prodRight_tmul (a : A) (x : B × C) : prodRight R S A B C (a ⊗ₜ x) = (a ⊗ₜ x.1, a ⊗ₜ x.2) := rfl @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
prodRight_tmul
null
prodRight_tmul_fst (a : A) (x : B × C) : (prodRight R S A B C (a ⊗ₜ x)).fst = a ⊗ₜ x.1 := rfl @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
prodRight_tmul_fst
null
prodRight_tmul_snd (a : A) (x : B × C) : (prodRight R S A B C (a ⊗ₜ x)).snd = a ⊗ₜ x.2 := rfl @[simp]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
prodRight_tmul_snd
null
prodRight_symm_tmul (a : A) (b : B) (c : C) : (prodRight R S A B C).symm (a ⊗ₜ b, a ⊗ₜ c) = a ⊗ₜ (b, c) := by apply (prodRight R S A B C).injective simp [prodRight_tmul]
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.Pi", "Mathlib.LinearAlgebra.TensorProduct.Pi", "Mathlib.LinearAlgebra.TensorProduct.Prod", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Pi.lean
prodRight_symm_tmul
null
private noncomputable quotIdealMapEquivTensorQuotAux : (B ⧸ (I.map <| algebraMap A B)) ≃ₗ[B] B ⊗[A] (A ⧸ I) := AddEquiv.toLinearEquiv (TensorProduct.tensorQuotEquivQuotSMul B I ≪≫ₗ Submodule.quotEquivOfEq _ _ (Ideal.smul_top_eq_map I) ≪≫ₗ Submodule.Quotient.restrictScalarsEquiv A (I.map <| algebraMap A B)).symm <| by intro c x obtain ⟨u, rfl⟩ := Ideal.Quotient.mk_surjective x rfl
def
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Ideal.Quotient.Operations", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Quotient.lean
quotIdealMapEquivTensorQuotAux
null
private quotIdealMapEquivTensorQuotAux_mk (b : B) : (quotIdealMapEquivTensorQuotAux B I) b = b ⊗ₜ[A] 1 := rfl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Ideal.Quotient.Operations", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Quotient.lean
quotIdealMapEquivTensorQuotAux_mk
null
noncomputable quotIdealMapEquivTensorQuot : (B ⧸ (I.map <| algebraMap A B)) ≃ₐ[B] B ⊗[A] (A ⧸ I) := AlgEquiv.ofLinearEquiv (quotIdealMapEquivTensorQuotAux B I) rfl (fun x y ↦ by obtain ⟨u, rfl⟩ := Ideal.Quotient.mk_surjective x obtain ⟨v, rfl⟩ := Ideal.Quotient.mk_surjective y simp_rw [← map_mul, quotIdealMapEquivTensorQuotAux_mk] simp) @[simp]
def
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Ideal.Quotient.Operations", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Quotient.lean
quotIdealMapEquivTensorQuot
`B ⊗[A] (A ⧸ I)` is isomorphic as an `A`-algebra to `B ⧸ I B`.
quotIdealMapEquivTensorQuot_mk (b : B) : quotIdealMapEquivTensorQuot B I b = b ⊗ₜ[A] 1 := rfl @[simp]
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Ideal.Quotient.Operations", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Quotient.lean
quotIdealMapEquivTensorQuot_mk
null
quotIdealMapEquivTensorQuot_symm_tmul (b : B) (a : A) : (quotIdealMapEquivTensorQuot B I).symm (b ⊗ₜ[A] a) = Submodule.Quotient.mk (a • b) := rfl
lemma
RingTheory
[ "Mathlib.LinearAlgebra.TensorProduct.Quotient", "Mathlib.RingTheory.Ideal.Quotient.Operations", "Mathlib.RingTheory.TensorProduct.Basic" ]
Mathlib/RingTheory/TensorProduct/Quotient.lean
quotIdealMapEquivTensorQuot_symm_tmul
null
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)) := by ext; rw [traceForm_toMatrix, of_apply, pow_add, h.basis_eq_pow, h.basis_eq_pow]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.traceForm_toMatrix_powerBasis
null
PowerBasis.trace_gen_eq_nextCoeff_minpoly [Nontrivial S] (pb : PowerBasis K S) : Algebra.trace K S pb.gen = -(minpoly K pb.gen).nextCoeff := by have d_pos : 0 < pb.dim := PowerBasis.dim_pos pb have d_pos' : 0 < (minpoly K pb.gen).natDegree := by simpa haveI : Nonempty (Fin pb.dim) := ⟨⟨0, d_pos⟩⟩ rw [trace_eq_matrix_trace pb.basis, trace_eq_neg_charpoly_coeff, charpoly_leftMulMatrix, ← pb.natDegree_minpoly, Fintype.card_fin, ← nextCoeff_of_natDegree_pos d_pos']
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
PowerBasis.trace_gen_eq_nextCoeff_minpoly
Given `pb : PowerBasis K S`, the trace of `pb.gen` is `-(minpoly K pb.gen).nextCoeff`.
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 := by rw [PowerBasis.trace_gen_eq_nextCoeff_minpoly, RingHom.map_neg, ← nextCoeff_map (algebraMap K F).injective, sum_roots_eq_nextCoeff_of_monic_of_split ((minpoly.monic (PowerBasis.isIntegral_gen _)).map _) ((splits_id_iff_splits _).2 hf), neg_neg]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
PowerBasis.trace_gen_eq_sum_roots
Given `pb : PowerBasis K S`, then the trace of `pb.gen` is `((minpoly K pb.gen).aroots F).sum`.
trace_gen_eq_zero {x : L} (hx : ¬IsIntegral K x) : Algebra.trace K K⟮x⟯ (AdjoinSimple.gen K x) = 0 := by rw [trace_eq_zero_of_not_exists_basis, LinearMap.zero_apply] contrapose! hx obtain ⟨s, ⟨b⟩⟩ := hx refine .of_mem_of_fg K⟮x⟯.toSubalgebra ?_ x ?_ · exact (Submodule.fg_iff_finiteDimensional _).mpr (FiniteDimensional.of_fintype_basis b) · exact subset_adjoin K _ (Set.mem_singleton x)
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_gen_eq_zero
null
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 := by have injKxL := (algebraMap K⟮x⟯ L).injective by_cases hx : IsIntegral K x; swap · simp [minpoly.eq_zero hx, trace_gen_eq_zero hx, aroots_def] rw [← adjoin.powerBasis_gen hx, (adjoin.powerBasis hx).trace_gen_eq_sum_roots] <;> rw [adjoin.powerBasis_gen hx, ← minpoly.algebraMap_eq injKxL] <;> try simp only [AdjoinSimple.algebraMap_gen _ _] exact hf
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_gen_eq_sum_roots
null
trace_eq_trace_adjoin [FiniteDimensional K L] (x : L) : trace K L x = finrank K⟮x⟯ L • trace K K⟮x⟯ (AdjoinSimple.gen K x) := by rw [← trace_trace (S := K⟮x⟯)] conv in x => rw [← AdjoinSimple.algebraMap_gen K x] rw [trace_algebraMap, LinearMap.map_smul_of_tower] variable {K} in
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_eq_trace_adjoin
null
trace_adjoinSimpleGen {x : L} (hx : IsIntegral K x) : trace K K⟮x⟯ (AdjoinSimple.gen K x) = -(minpoly K x).nextCoeff := by simpa [minpoly_gen K x] using PowerBasis.trace_gen_eq_nextCoeff_minpoly <| adjoin.powerBasis hx
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_adjoinSimpleGen
Trace of the generator of a simple adjoin equals negative of the next coefficient of its minimal polynomial coefficient.
trace_eq_finrank_mul_minpoly_nextCoeff [FiniteDimensional K L] (x : L) : trace K L x = finrank K⟮x⟯ L * -(minpoly K x).nextCoeff := by rw [trace_eq_trace_adjoin, trace_adjoinSimpleGen (.of_finite K x), Algebra.smul_def]; rfl variable {K}
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_eq_finrank_mul_minpoly_nextCoeff
null
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 := by rw [trace_eq_trace_adjoin K x, Algebra.smul_def, RingHom.map_mul, ← Algebra.smul_def, IntermediateField.AdjoinSimple.trace_gen_eq_sum_roots _ hF, IsScalarTower.algebraMap_smul]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_eq_sum_roots
null
Algebra.isIntegral_trace [FiniteDimensional L F] {x : F} (hx : IsIntegral R x) : IsIntegral R (Algebra.trace L F x) := by have hx' : IsIntegral L x := hx.tower_top rw [← isIntegral_algebraMap_iff (algebraMap L (AlgebraicClosure F)).injective, trace_eq_sum_roots] · refine (IsIntegral.multiset_sum ?_).nsmul _ intro y hy rw [mem_roots_map (minpoly.ne_zero hx')] at hy use minpoly R x, minpoly.monic hx rw [← aeval_def] at hy ⊢ exact minpoly.aeval_of_isScalarTower R x y hy · apply IsAlgClosed.splits_codomain
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.isIntegral_trace
null
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 := by simp_rw [Algebra.trace_apply, ← LinearMap.trace_conj' _ e.toLinearEquiv] congr; ext; simp [LinearEquiv.conj_apply]
lemma
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.trace_eq_of_algEquiv
null
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 := by classical by_cases h : ∃ s : Finset C, Nonempty (Basis s B C) · obtain ⟨s, ⟨b⟩⟩ := h letI : Algebra A B := RingHom.toAlgebra e letI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm rw [Algebra.trace_eq_matrix_trace b, Algebra.trace_eq_matrix_trace (b.mapCoeffs e.symm (by simp [Algebra.smul_def, ← he]))] rw [AddMonoidHom.map_trace] congr ext i j simp [leftMulMatrix_apply, LinearMap.toMatrix_apply] rw [trace_eq_zero_of_not_exists_basis _ h, trace_eq_zero_of_not_exists_basis, LinearMap.zero_apply, LinearMap.zero_apply, map_zero] intro ⟨s, ⟨b⟩⟩ exact h ⟨s, ⟨b.mapCoeffs e (by simp [Algebra.smul_def, ← he])⟩⟩
lemma
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.trace_eq_of_ringEquiv
null
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)) := by letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl } rw [← Algebra.trace_eq_of_ringEquiv e₁ he, ← Algebra.trace_eq_of_algEquiv e', RingEquiv.symm_apply_apply] rfl
lemma
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.trace_eq_of_equiv_equiv
null
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 := by letI := Classical.decEq E letI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb rw [pb.trace_gen_eq_sum_roots hE, Fintype.sum_equiv pb.liftEquiv', Finset.sum_mem_multiset, Finset.sum_eq_multiset_sum, Multiset.toFinset_val, Multiset.dedup_eq_self.mpr _, Multiset.map_id] · exact nodup_roots ((separable_map _).mpr hfx) swap · intro x; rfl · intro σ rw [PowerBasis.liftEquiv'_apply_coe, id_def] variable [IsAlgClosed E]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_eq_sum_embeddings_gen
null
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 := by haveI : FiniteDimensional L F := FiniteDimensional.right K L F haveI : Algebra.IsSeparable L F := Algebra.isSeparable_tower_top_of_isSeparable K L F letI : Fintype (L →ₐ[K] E) := PowerBasis.AlgHom.fintype pb rw [Fintype.sum_equiv algHomEquivSigma (fun σ : F →ₐ[K] E => _) fun σ => σ.1 pb.gen, ← Finset.univ_sigma_univ, Finset.sum_sigma, ← Finset.sum_nsmul] · refine Finset.sum_congr rfl fun σ _ => ?_ letI : Algebra L E := σ.toRingHom.toAlgebra simp_rw [Finset.sum_const, Finset.card_univ, ← AlgHom.card L F E] · intro σ simp only [algHomEquivSigma, Equiv.coe_fn_mk, AlgHom.restrictDomain, AlgHom.comp_apply, IsScalarTower.coe_toAlgHom']
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
sum_embeddings_eq_finrank_mul
null
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 := by have hx := Algebra.IsSeparable.isIntegral K x let pb := adjoin.powerBasis hx rw [trace_eq_trace_adjoin K x, Algebra.smul_def, RingHom.map_mul, ← adjoin.powerBasis_gen hx, trace_eq_sum_embeddings_gen E pb (IsAlgClosed.splits_codomain _), ← Algebra.smul_def, algebraMap_smul] · exact (sum_embeddings_eq_finrank_mul L E pb).symm · haveI := Algebra.isSeparable_tower_bot_of_isSeparable K K⟮x⟯ L exact Algebra.IsSeparable.isSeparable K _
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_eq_sum_embeddings
null
trace_eq_sum_automorphisms (x : L) [FiniteDimensional K L] [IsGalois K L] : algebraMap K L (Algebra.trace K L x) = ∑ σ : L ≃ₐ[K] L, σ x := by apply FaithfulSMul.algebraMap_injective L (AlgebraicClosure L) rw [_root_.map_sum (algebraMap L (AlgebraicClosure L))] rw [← Fintype.sum_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)] · rw [← trace_eq_sum_embeddings (AlgebraicClosure L) (x := x)] simp only [algebraMap_eq_smul_one, smul_one_smul] · intro σ simp only [Normal.algHomEquivAut, AlgHom.restrictNormal', Equiv.coe_fn_mk, AlgEquiv.coe_ofBijective, AlgHom.restrictNormal_commutes, algebraMap_self, RingHom.id_apply]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_eq_sum_automorphisms
null
Algebra.trace_eq_zero_of_not_isSeparable (H : ¬ Algebra.IsSeparable K L) : trace K L = 0 := by obtain ⟨p, hp⟩ := ExpChar.exists K have := expChar_ne_zero K p ext x by_cases h₀ : FiniteDimensional K L; swap · rw [trace_eq_zero_of_not_exists_basis] rintro ⟨s, ⟨b⟩⟩ exact h₀ (Module.Finite.of_basis b) by_cases hx : IsSeparable K x · lift x to separableClosure K L using hx rw [← IntermediateField.algebraMap_apply, ← trace_trace (S := separableClosure K L), trace_algebraMap] obtain ⟨n, hn⟩ := IsPurelyInseparable.finrank_eq_pow (separableClosure K L) L p cases n with | zero => rw [pow_zero, IntermediateField.finrank_eq_one_iff_eq_top, separableClosure.eq_top_iff] at hn cases H hn | succ n => cases hp with | zero => rw [one_pow, IntermediateField.finrank_eq_one_iff_eq_top, separableClosure.eq_top_iff] at hn cases H hn | prime hprime => rw [hn, pow_succ', MulAction.mul_smul, LinearMap.map_smul_of_tower, nsmul_eq_mul, CharP.cast_eq_zero, zero_mul, LinearMap.zero_apply] · rw [trace_eq_finrank_mul_minpoly_nextCoeff] obtain ⟨g, hg₁, m, hg₂⟩ := (minpoly.irreducible (IsIntegral.isIntegral (R := K) x)).hasSeparableContraction p cases m with | zero => obtain rfl : g = minpoly K x := by simpa using hg₂ cases hx hg₁ | succ n => rw [nextCoeff, if_neg, ← hg₂, coeff_expand (by positivity), if_neg, neg_zero, mul_zero, LinearMap.zero_apply] · rw [natDegree_expand] intro h have := Nat.dvd_sub (dvd_mul_left (p ^ (n + 1)) g.natDegree) h rw [tsub_tsub_cancel_of_le, Nat.dvd_one] at this · obtain rfl : g = minpoly K x := by simpa [this] using hg₂ cases hx hg₁ · rw [Nat.one_le_iff_ne_zero] have : g.natDegree ≠ 0 := fun e ↦ by have := congr(natDegree $hg₂) rw [natDegree_expand, e, zero_mul] at this exact (minpoly.natDegree_pos (IsIntegral.isIntegral x)).ne this positivity · exact (minpoly.natDegree_pos (IsIntegral.isIntegral x)).ne'
lemma
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.trace_eq_zero_of_not_isSeparable
null
noncomputable traceMatrix (b : κ → B) : Matrix κ κ A := of fun i j => traceForm A B (b i) (b j) @[simp]
def
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix
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`.
traceMatrix_apply (b : κ → B) (i j) : traceMatrix A b i j = traceForm A B (b i) (b j) := rfl
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_apply
null
traceMatrix_reindex {κ' : Type*} (b : Basis κ A B) (f : κ ≃ κ') : traceMatrix A (b.reindex f) = reindex f f (traceMatrix A b) := by ext (x y); simp variable {A}
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_reindex
null
traceMatrix_of_matrix_vecMul [Fintype κ] (b : κ → B) (P : Matrix κ κ A) : traceMatrix A (b ᵥ* P.map (algebraMap A B)) = Pᵀ * traceMatrix A b * P := by ext (α β) rw [traceMatrix_apply, vecMul, dotProduct, vecMul, dotProduct, Matrix.mul_apply, BilinForm.sum_left, Fintype.sum_congr _ _ fun i : κ => BilinForm.sum_right _ _ (b i * P.map (algebraMap A B) i α) fun y : κ => b y * P.map (algebraMap A B) y β, sum_comm] congr; ext x rw [Matrix.mul_apply, sum_mul] congr; ext y rw [map_apply, traceForm_apply, mul_comm (b y), ← smul_def] simp only [id.smul_eq_mul, RingHom.id_apply, map_apply, transpose_apply, LinearMap.map_smulₛₗ, Algebra.smul_mul_assoc] rw [mul_comm (b x), ← smul_def] ring_nf rw [mul_assoc] simp [mul_comm]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_of_matrix_vecMul
null
traceMatrix_of_matrix_mulVec [Fintype κ] (b : κ → B) (P : Matrix κ κ A) : traceMatrix A (P.map (algebraMap A B) *ᵥ b) = P * traceMatrix A b * Pᵀ := by refine AddEquiv.injective (transposeAddEquiv κ κ A) ?_ rw [transposeAddEquiv_apply, transposeAddEquiv_apply, ← vecMul_transpose, ← transpose_map, traceMatrix_of_matrix_vecMul, transpose_transpose]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_of_matrix_mulVec
null
traceMatrix_of_basis [Fintype κ] [DecidableEq κ] (b : Basis κ A B) : traceMatrix A b = BilinForm.toMatrix b (traceForm A B) := by ext (i j) rw [traceMatrix_apply, traceForm_apply, traceForm_toMatrix]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_of_basis
null
traceMatrix_of_basis_mulVec (b : Basis ι A B) (z : B) : traceMatrix A b *ᵥ b.equivFun z = fun i => trace A B (z * b i) := by ext i rw [← replicateCol_apply (ι := Fin 1) (traceMatrix A b *ᵥ b.equivFun z) i 0, replicateCol_mulVec, Matrix.mul_apply, traceMatrix] simp only [replicateCol_apply, traceForm_apply] conv_lhs => congr rfl ext rw [mul_comm _ (b.equivFun z _), ← smul_eq_mul, of_apply, ← LinearMap.map_smul] rw [← _root_.map_sum] congr conv_lhs => congr rfl ext rw [← mul_smul_comm] rw [← Finset.mul_sum, mul_comm z] congr rw [b.sum_equivFun] variable (A)
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_of_basis_mulVec
null
embeddingsMatrix (b : κ → B) : Matrix κ (B →ₐ[A] C) C := of fun i (σ : B →ₐ[A] C) => σ (b i) @[simp]
def
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
embeddingsMatrix
`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.
embeddingsMatrix_apply (b : κ → B) (i) (σ : B →ₐ[A] C) : embeddingsMatrix A C b i σ = σ (b i) := rfl
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
embeddingsMatrix_apply
null
embeddingsMatrixReindex (b : κ → B) (e : κ ≃ (B →ₐ[A] C)) := reindex (Equiv.refl κ) e.symm (embeddingsMatrix A C b) variable {A}
def
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
embeddingsMatrixReindex
`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)`.
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)ᵀ := by ext i j simp [embeddingsMatrixReindex, embeddingsMatrix]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
embeddingsMatrixReindex_eq_vandermonde
null
traceMatrix_eq_embeddingsMatrix_mul_trans : (traceMatrix K b).map (algebraMap K E) = embeddingsMatrix K E b * (embeddingsMatrix K E b)ᵀ := by ext (i j); simp [trace_eq_sum_embeddings, embeddingsMatrix, Matrix.mul_apply]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_eq_embeddingsMatrix_mul_trans
null
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)ᵀ := by rw [traceMatrix_eq_embeddingsMatrix_mul_trans, embeddingsMatrixReindex, reindex_apply, transpose_submatrix, ← submatrix_mul_transpose_submatrix, ← Equiv.coe_refl, Equiv.refl_symm]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceMatrix_eq_embeddingsMatrixReindex_mul_trans
null
det_traceMatrix_ne_zero' [Algebra.IsSeparable K L] : det (traceMatrix K pb.basis) ≠ 0 := by suffices algebraMap K (AlgebraicClosure L) (det (traceMatrix K pb.basis)) ≠ 0 by refine mt (fun ht => ?_) this rw [ht, RingHom.map_zero] haveI : FiniteDimensional K L := pb.finite let e : Fin pb.dim ≃ (L →ₐ[K] AlgebraicClosure L) := (Fintype.equivFinOfCardEq ?_).symm · rw [RingHom.map_det, RingHom.mapMatrix_apply, traceMatrix_eq_embeddingsMatrixReindex_mul_trans K _ _ e, embeddingsMatrixReindex_eq_vandermonde, det_mul, det_transpose] refine mt mul_self_eq_zero.mp ?_ simp only [det_vandermonde, Finset.prod_eq_zero_iff, not_exists, sub_eq_zero] rintro i ⟨_, j, hij, h⟩ exact (Finset.mem_Ioi.mp hij).ne' (e.injective <| pb.algHom_ext h) · rw [AlgHom.card, pb.finrank]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
det_traceMatrix_ne_zero'
null
det_traceForm_ne_zero [Algebra.IsSeparable K L] [DecidableEq ι] (b : Basis ι K L) : det (BilinForm.toMatrix b (traceForm K L)) ≠ 0 := by haveI : FiniteDimensional K L := FiniteDimensional.of_fintype_basis b let pb : PowerBasis K L := Field.powerBasisOfFiniteOfSeparable _ _ rw [← BilinForm.toMatrix_mul_basis_toMatrix pb.basis b, ← det_comm' (pb.basis.toMatrix_mul_toMatrix_flip b) _, ← Matrix.mul_assoc, det_mul] swap; · apply Basis.toMatrix_mul_toMatrix_flip refine mul_ne_zero (isUnit_of_mul_eq_one _ ((b.toMatrix pb.basis)ᵀ * b.toMatrix pb.basis).det ?_).ne_zero ?_ · calc (pb.basis.toMatrix b * (pb.basis.toMatrix b)ᵀ).det * ((b.toMatrix pb.basis)ᵀ * b.toMatrix pb.basis).det = (pb.basis.toMatrix b * (b.toMatrix pb.basis * pb.basis.toMatrix b)ᵀ * b.toMatrix pb.basis).det := by simp only [← det_mul, Matrix.mul_assoc, Matrix.transpose_mul] _ = 1 := by simp only [Basis.toMatrix_mul_toMatrix_flip, Matrix.transpose_one, Matrix.mul_one, Matrix.det_one] simpa only [traceMatrix_of_basis] using det_traceMatrix_ne_zero' pb variable (K L)
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
det_traceForm_ne_zero
null
@[stacks 0BIL "(1) => (3)"] traceForm_nondegenerate [FiniteDimensional K L] [Algebra.IsSeparable K L] : (traceForm K L).Nondegenerate := BilinForm.nondegenerate_of_det_ne_zero (traceForm K L) _ (det_traceForm_ne_zero (Module.finBasis K L)) @[stacks 0BIL]
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceForm_nondegenerate
Let $L/K$ be a finite extension of fields. If $L/K$ is separable, then `traceForm` is nondegenerate.
traceForm_nondegenerate_tfae [FiniteDimensional K L] : [Algebra.IsSeparable K L, Algebra.trace K L ≠ 0, (traceForm K L).Nondegenerate].TFAE := by tfae_have 1 → 3 := fun _ ↦ traceForm_nondegenerate K L tfae_have 3 → 2 := fun H₁ H₂ ↦ H₁.ne_zero (by ext; simp [H₂]) tfae_have 2 → 1 := not_imp_comm.mp Algebra.trace_eq_zero_of_not_isSeparable tfae_finish
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceForm_nondegenerate_tfae
null
Algebra.trace_ne_zero [FiniteDimensional K L] [Algebra.IsSeparable K L] : Algebra.trace K L ≠ 0 := ((traceForm_nondegenerate_tfae K L).out 0 1).mp ‹_›
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.trace_ne_zero
null
Algebra.trace_surjective [FiniteDimensional K L] [Algebra.IsSeparable K L] : Function.Surjective (Algebra.trace K L) := by rw [← LinearMap.range_eq_top] apply (IsSimpleOrder.eq_bot_or_eq_top (α := Ideal K) _).resolve_left rw [LinearMap.range_eq_bot] exact Algebra.trace_ne_zero K L variable {K L}
theorem
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
Algebra.trace_surjective
null
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) := by classical apply ((Algebra.traceForm K L).toDual (traceForm_nondegenerate K L)).injective apply pb.basis.ext intro j simp only [BilinForm.toDual_def, BilinForm.apply_dualBasis_left] apply (algebraMap K (AlgebraicClosure K)).injective have := congr_arg (coeff · i) (sum_smul_minpolyDiv_eq_X_pow (AlgebraicClosure K) pb.adjoin_gen_eq_top (r := j) (pb.finrank.symm ▸ j.prop)) simp only [Polynomial.map_smul, map_div₀, map_pow, RingHom.coe_coe, finset_sum_coeff, coeff_smul, coeff_map, smul_eq_mul, coeff_X_pow, ← Fin.ext_iff, @eq_comm _ i] at this rw [PowerBasis.coe_basis] simp only [MonoidWithZeroHom.map_ite_one_zero, traceForm_apply] rw [← this, trace_eq_sum_embeddings (E := AlgebraicClosure K)] apply Finset.sum_congr rfl intro σ _ simp only [map_mul, map_div₀, map_pow] ring
lemma
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
traceForm_dualBasis_powerBasis_eq
The dual basis of a power basis `{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ⁱ`.
trace_isNilpotent_of_isNilpotent {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] {x : S} (hx : IsNilpotent x) : IsNilpotent (trace R S x) := LinearMap.isNilpotent_trace_of_isNilpotent (hx.map (lmul R S))
lemma
RingTheory
[ "Mathlib.FieldTheory.Galois.Basic", "Mathlib.FieldTheory.Minpoly.MinpolyDiv", "Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure", "Mathlib.FieldTheory.PurelyInseparable.Basic", "Mathlib.LinearAlgebra.Determinant", "Mathlib.LinearAlgebra.Matrix.Charpoly.Minpoly", "Mathlib.LinearAlgebra.Vandermonde", "M...
Mathlib/RingTheory/Trace/Basic.lean
trace_isNilpotent_of_isNilpotent
The trace of a nilpotent element is nilpotent.
@[stacks 0BIF "Trace"] noncomputable trace : S →ₗ[R] R := (LinearMap.trace R S).comp (lmul R S).toLinearMap variable {S}
def
RingTheory
[ "Mathlib.LinearAlgebra.FiniteDimensional.Lemmas", "Mathlib.LinearAlgebra.Matrix.BilinearForm", "Mathlib.LinearAlgebra.Trace" ]
Mathlib/RingTheory/Trace/Defs.lean
trace
The trace of an element `s` of an `R`-algebra is the trace of `(s * ·)`, as an `R`-linear map.
trace_apply (x) : trace R S x = LinearMap.trace R S (lmul R S x) := rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.FiniteDimensional.Lemmas", "Mathlib.LinearAlgebra.Matrix.BilinearForm", "Mathlib.LinearAlgebra.Trace" ]
Mathlib/RingTheory/Trace/Defs.lean
trace_apply
null
trace_eq_zero_of_not_exists_basis (h : ¬∃ s : Finset S, Nonempty (Basis s R S)) : trace R S = 0 := by ext s; simp [trace_apply, LinearMap.trace, h] variable {R}
theorem
RingTheory
[ "Mathlib.LinearAlgebra.FiniteDimensional.Lemmas", "Mathlib.LinearAlgebra.Matrix.BilinearForm", "Mathlib.LinearAlgebra.Trace" ]
Mathlib/RingTheory/Trace/Defs.lean
trace_eq_zero_of_not_exists_basis
null
trace_eq_matrix_trace [DecidableEq ι] (b : Basis ι R S) (s : S) : trace R S s = Matrix.trace (Algebra.leftMulMatrix b s) := by rw [trace_apply, LinearMap.trace_eq_matrix_trace _ b, ← toMatrix_lmul_eq]; rfl
theorem
RingTheory
[ "Mathlib.LinearAlgebra.FiniteDimensional.Lemmas", "Mathlib.LinearAlgebra.Matrix.BilinearForm", "Mathlib.LinearAlgebra.Trace" ]
Mathlib/RingTheory/Trace/Defs.lean
trace_eq_matrix_trace
null
trace_algebraMap_of_basis (b : Basis ι R S) (x : R) : trace R S (algebraMap R S x) = Fintype.card ι • x := by haveI := Classical.decEq ι rw [trace_apply, LinearMap.trace_eq_matrix_trace R b, Matrix.trace] convert Finset.sum_const x simp [-coe_lmul_eq_mul]
theorem
RingTheory
[ "Mathlib.LinearAlgebra.FiniteDimensional.Lemmas", "Mathlib.LinearAlgebra.Matrix.BilinearForm", "Mathlib.LinearAlgebra.Trace" ]
Mathlib/RingTheory/Trace/Defs.lean
trace_algebraMap_of_basis
If `x` is in the base field `K`, then the trace is `[L : K] * x`.