Skip to content

Commit

Permalink
feat(FieldTheory.Separable) : generalize IsSeparable.of_equiv_equiv
Browse files Browse the repository at this point in the history
… to noncommutative cases (#17147)

Greetings! In this PR I attempt to generalize `IsSeparable.of_equiv_equiv` and some related codes to noncommutative cases. This could be useful in #16525 



Co-authored-by: Riccardo Brasca <[email protected]>
  • Loading branch information
Yu-Misaka and riccardobrasca committed Oct 30, 2024
1 parent 89e654a commit cefc7e3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Mathlib/FieldTheory/Minpoly/Field.lean
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ lemma dvd_iff {p : A[X]} : minpoly A x ∣ p ↔ Polynomial.aeval x p = 0 :=
theorem isRadical [IsReduced B] : IsRadical (minpoly A x) := fun n p dvd ↦ by
rw [dvd_iff] at dvd ⊢; rw [map_pow] at dvd; exact IsReduced.eq_zero _ ⟨n, dvd⟩

theorem dvd_map_of_isScalarTower (A K : Type*) {R : Type*} [CommRing A] [Field K] [CommRing R]
theorem dvd_map_of_isScalarTower (A K : Type*) {R : Type*} [CommRing A] [Field K] [Ring R]
[Algebra A K] [Algebra A R] [Algebra K R] [IsScalarTower A K R] (x : R) :
minpoly K x ∣ (minpoly A x).map (algebraMap A K) := by
refine minpoly.dvd K x ?_
Expand Down
30 changes: 17 additions & 13 deletions Mathlib/FieldTheory/Separable.lean
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ end AlgEquiv

section IsScalarTower

variable [Field L] [CommRing E] [Algebra F L]
variable [Field L] [Ring E] [Algebra F L]
[Algebra F E] [Algebra L E] [IsScalarTower F L E]

/-- If `E / L / F` is a scalar tower and `x : E` is separable over `F`, then it's also separable
Expand Down Expand Up @@ -713,25 +713,29 @@ end Field

section AlgEquiv

variable {A₁ B₁ A₂ B₂ : Type*} [Field A₁] [Field B₁]
[Field A₂] [Field B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
open RingHom RingEquiv

variable {A₁ B₁ A₂ B₂ : Type*} [Field A₁] [Ring B₁] [Field A₂] [Ring 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₁))
include e₁ e₂ he
include he

lemma IsSeparable.of_equiv_equiv {x : B₁} (h : IsSeparable A₁ x) : IsSeparable A₂ (e₂ x) :=
letI := e₁.toRingHom.toAlgebra
letI := ((algebraMap A₁ B₁).comp e₁.symm.toRingHom).toAlgebra
haveI : IsScalarTower A₁ A₂ B₁ := IsScalarTower.of_algebraMap_eq
(fun x ↦ by simp [RingHom.algebraMap_toAlgebra])
letI : Algebra A₂ B₁ :=
{ (algebraMap A₁ B₁).comp e₁.symm.toRingHom with
smul := fun a b ↦ ((algebraMap A₁ B₁).comp e₁.symm.toRingHom a) * b
commutes' := fun r x ↦ (Algebra.commutes) (e₁.symm.toRingHom r) x
smul_def' := fun _ _ ↦ rfl }
haveI : IsScalarTower A₁ A₂ B₁ := IsScalarTower.of_algebraMap_eq <| fun x ↦
(algebraMap A₁ B₁).congr_arg <| id ((e₁.symm_apply_apply x).symm)
let e : B₁ ≃ₐ[A₂] B₂ :=
{ e₂ with
commutes' := fun r ↦ by
simpa [RingHom.algebraMap_toAlgebra] using DFunLike.congr_fun he.symm (e₁.symm r) }
have := IsSeparable.tower_top A₂ h
IsSeparable.of_algHom e.symm ((e₂.symm_apply_apply x).symm ▸ this)
commutes' := fun x ↦ by
simpa [RingHom.algebraMap_toAlgebra] using DFunLike.congr_fun he.symm (e₁.symm x) }
(AlgEquiv.isSeparable_iff e).mpr <| IsSeparable.tower_top A₂ h

lemma Algebra.IsSeparable.of_equiv_equiv
[Algebra.IsSeparable A₁ B₁] : Algebra.IsSeparable A₂ B₂ :=
lemma Algebra.IsSeparable.of_equiv_equiv [Algebra.IsSeparable A₁ B₁] : Algebra.IsSeparable A₂ B₂ :=
fun x ↦ (e₂.apply_symm_apply x) ▸ _root_.IsSeparable.of_equiv_equiv e₁ e₂ he
(Algebra.IsSeparable.isSeparable _ _)⟩

Expand Down

0 comments on commit cefc7e3

Please sign in to comment.