Module docstring
{"# # Integral closure as a characteristic predicate
We prove basic properties of IsIntegralClosure.
"}
{"# # Integral closure as a characteristic predicate
We prove basic properties of IsIntegralClosure.
"}
IsIntegral.isUnit
theorem
[Field R] [Ring S] [IsDomain S] [Algebra R S] {x : S} (int : IsIntegral R x) (h0 : x ≠ 0) : IsUnit x
/-- A nonzero element in a domain integral over a field is a unit. -/
theorem IsIntegral.isUnit [Field R] [Ring S] [IsDomain S] [Algebra R S] {x : S}
(int : IsIntegral R x) (h0 : x ≠ 0) : IsUnit x :=
have : FiniteDimensional R (adjoin R {x}) := ⟨(Submodule.fg_top _).mpr int.fg_adjoin_singleton⟩
(FiniteDimensional.isUnit R (K := adjoin R {x})
(x := ⟨x, subset_adjoin rfl⟩) <| mt Subtype.ext_iff.mp h0).map (adjoin R {x}).val
isField_of_isIntegral_of_isField'
theorem
[CommRing R] [CommRing S] [IsDomain S] [Algebra R S] [Algebra.IsIntegral R S] (hR : IsField R) : IsField S
/-- A commutative domain that is an integral algebra over a field is a field. -/
theorem isField_of_isIntegral_of_isField' [CommRing R] [CommRing S] [IsDomain S]
[Algebra R S] [Algebra.IsIntegral R S] (hR : IsField R) : IsField S where
exists_pair_ne := ⟨0, 1, zero_ne_one⟩
mul_comm := mul_comm
mul_inv_cancel {x} hx := by
letI := hR.toField
obtain ⟨y, rfl⟩ := (Algebra.IsIntegral.isIntegral (R := R) x).isUnit hx
exact ⟨y.inv, y.val_inv⟩
IsIntegral.inv_mem_adjoin
theorem
(int : IsIntegral R x) : x⁻¹ ∈ adjoin R { x }
theorem IsIntegral.inv_mem_adjoin (int : IsIntegral R x) : x⁻¹x⁻¹ ∈ adjoin R {x} := by
obtain rfl | h0 := eq_or_ne x 0
· rw [inv_zero]; exact Subalgebra.zero_mem _
have : FiniteDimensional R (adjoin R {x}) := ⟨(Submodule.fg_top _).mpr int.fg_adjoin_singleton⟩
obtain ⟨⟨y, hy⟩, h1⟩ := FiniteDimensional.exists_mul_eq_one R
(K := adjoin R {x}) (x := ⟨x, subset_adjoin rfl⟩) (mt Subtype.ext_iff.mp h0)
rwa [← mul_left_cancel₀ h0 ((Subtype.ext_iff.mp h1).trans (mul_inv_cancel₀ h0).symm)]
IsIntegral.inv_mem
theorem
(int : IsIntegral R x) (hx : x ∈ A) : x⁻¹ ∈ A
/-- The inverse of an integral element in a subalgebra of a division ring over a field
also lies in that subalgebra. -/
theorem IsIntegral.inv_mem (int : IsIntegral R x) (hx : x ∈ A) : x⁻¹x⁻¹ ∈ A :=
adjoin_le (Set.singleton_subset_iff.mpr hx) int.inv_mem_adjoin
Algebra.IsIntegral.inv_mem
theorem
[Algebra.IsIntegral R A] (hx : x ∈ A) : x⁻¹ ∈ A
/-- An integral subalgebra of a division ring over a field is closed under inverses. -/
theorem Algebra.IsIntegral.inv_mem [Algebra.IsIntegral R A] (hx : x ∈ A) : x⁻¹x⁻¹ ∈ A :=
((isIntegral_algHom_iff A.val Subtype.val_injective).mpr <|
Algebra.IsIntegral.isIntegral (⟨x, hx⟩ : A)).inv_mem hx
IsIntegral.inv
theorem
(int : IsIntegral R x) : IsIntegral R x⁻¹
/-- The inverse of an integral element in a division ring over a field is also integral. -/
theorem IsIntegral.inv (int : IsIntegral R x) : IsIntegral R x⁻¹ :=
.of_mem_of_fg _ int.fg_adjoin_singleton _ int.inv_mem_adjoin
IsIntegral.mem_of_inv_mem
theorem
(int : IsIntegral R x) (inv_mem : x⁻¹ ∈ A) : x ∈ A
theorem IsIntegral.mem_of_inv_mem (int : IsIntegral R x) (inv_mem : x⁻¹x⁻¹ ∈ A) : x ∈ A := by
rw [← inv_inv x]; exact int.inv.inv_mem inv_mem
Algebra.IsIntegral.finite
theorem
[Algebra.IsIntegral R A] [h' : Algebra.FiniteType R A] : Module.Finite R A
/-- The [Kurosh problem](https://en.wikipedia.org/wiki/Kurosh_problem) asks to show that
this is still true when `A` is not necessarily commutative and `R` is a field, but it has
been solved in the negative. See https://arxiv.org/pdf/1706.02383.pdf for criteria for a
finitely generated algebraic (= integral) algebra over a field to be finite dimensional.
This could be an `instance`, but we tend to go from `Module.Finite` to `IsIntegral`/`IsAlgebraic`,
and making it an instance will cause the search to be complicated a lot.
-/
theorem Algebra.IsIntegral.finite [Algebra.IsIntegral R A] [h' : Algebra.FiniteType R A] :
Module.Finite R A :=
have ⟨s, hs⟩ := h'
⟨by apply hs ▸ fg_adjoin_of_finite s.finite_toSet fun x _ ↦ Algebra.IsIntegral.isIntegral x⟩
Algebra.finite_iff_isIntegral_and_finiteType
theorem
: Module.Finite R A ↔ Algebra.IsIntegral R A ∧ Algebra.FiniteType R A
/-- finite = integral + finite type -/
theorem Algebra.finite_iff_isIntegral_and_finiteType :
Module.FiniteModule.Finite R A ↔ Algebra.IsIntegral R A ∧ Algebra.FiniteType R A :=
⟨fun _ ↦ ⟨⟨.of_finite R⟩, inferInstance⟩, fun ⟨h, _⟩ ↦ h.finite⟩
RingHom.IsIntegral.to_finite
theorem
(h : f.IsIntegral) (h' : f.FiniteType) : f.Finite
theorem RingHom.IsIntegral.to_finite (h : f.IsIntegral) (h' : f.FiniteType) : f.Finite :=
let _ := f.toAlgebra
let _ : Algebra.IsIntegral R S := ⟨h⟩
Algebra.IsIntegral.finite (h' := h')
RingHom.finite_iff_isIntegral_and_finiteType
theorem
: f.Finite ↔ f.IsIntegral ∧ f.FiniteType
/-- finite = integral + finite type -/
theorem RingHom.finite_iff_isIntegral_and_finiteType : f.Finite ↔ f.IsIntegral ∧ f.FiniteType :=
⟨fun h ↦ ⟨h.to_isIntegral, h.to_finiteType⟩, fun ⟨h, h'⟩ ↦ h.to_finite h'⟩
mem_integralClosure_iff_mem_fg
theorem
{r : A} : r ∈ integralClosure R A ↔ ∃ M : Subalgebra R A, M.toSubmodule.FG ∧ r ∈ M
adjoin_le_integralClosure
theorem
{x : A} (hx : IsIntegral R x) : Algebra.adjoin R { x } ≤ integralClosure R A
theorem adjoin_le_integralClosure {x : A} (hx : IsIntegral R x) :
Algebra.adjoin R {x} ≤ integralClosure R A := by
rw [Algebra.adjoin_le_iff]
simp only [SetLike.mem_coe, Set.singleton_subset_iff]
exact hx
le_integralClosure_iff_isIntegral
theorem
{S : Subalgebra R A} : S ≤ integralClosure R A ↔ Algebra.IsIntegral R S
theorem le_integralClosure_iff_isIntegral {S : Subalgebra R A} :
S ≤ integralClosure R A ↔ Algebra.IsIntegral R S :=
SetLike.forall.symm.trans <|
(forall_congr' fun x =>
show IsIntegralIsIntegral R (algebraMap S A x) ↔ IsIntegral R x from
isIntegral_algebraMap_iff Subtype.coe_injective).trans
Algebra.isIntegral_def.symm
Algebra.IsIntegral.adjoin
theorem
{S : Set A} (hS : ∀ x ∈ S, IsIntegral R x) : Algebra.IsIntegral R (adjoin R S)
theorem Algebra.IsIntegral.adjoin {S : Set A} (hS : ∀ x ∈ S, IsIntegral R x) :
Algebra.IsIntegral R (adjoin R S) :=
le_integralClosure_iff_isIntegral.mp <| adjoin_le hS
integralClosure_eq_top_iff
theorem
: integralClosure R A = ⊤ ↔ Algebra.IsIntegral R A
Algebra.isIntegral_sup
theorem
{S T : Subalgebra R A} :
Algebra.IsIntegral R (S ⊔ T : Subalgebra R A) ↔ Algebra.IsIntegral R S ∧ Algebra.IsIntegral R T
Algebra.isIntegral_iSup
theorem
{ι} (S : ι → Subalgebra R A) : Algebra.IsIntegral R ↑(iSup S) ↔ ∀ i, Algebra.IsIntegral R (S i)
theorem Algebra.isIntegral_iSup {ι} (S : ι → Subalgebra R A) :
Algebra.IsIntegralAlgebra.IsIntegral R ↑(iSup S) ↔ ∀ i, Algebra.IsIntegral R (S i) := by
simp_rw [← le_integralClosure_iff_isIntegral, iSup_le_iff]
integralClosure_map_algEquiv
theorem
[Algebra R S] (f : A ≃ₐ[R] S) : (integralClosure R A).map (f : A →ₐ[R] S) = integralClosure R S
/-- Mapping an integral closure along an `AlgEquiv` gives the integral closure. -/
theorem integralClosure_map_algEquiv [Algebra R S] (f : A ≃ₐ[R] S) :
(integralClosure R A).map (f : A →ₐ[R] S) = integralClosure R S := by
ext y
rw [Subalgebra.mem_map]
constructor
· rintro ⟨x, hx, rfl⟩
exact hx.map f
· intro hy
use f.symm y, hy.map (f.symm : S →ₐ[R] A)
simp
AlgHom.mapIntegralClosure
definition
[Algebra R S] (f : A →ₐ[R] S) : integralClosure R A →ₐ[R] integralClosure R S
/-- An `AlgHom` between two rings restrict to an `AlgHom` between the integral closures inside
them. -/
def AlgHom.mapIntegralClosure [Algebra R S] (f : A →ₐ[R] S) :
integralClosureintegralClosure R A →ₐ[R] integralClosure R S :=
(f.restrictDomain (integralClosure R A)).codRestrict (integralClosure R S) (fun ⟨_, h⟩ => h.map f)
AlgHom.coe_mapIntegralClosure
theorem
[Algebra R S] (f : A →ₐ[R] S) (x : integralClosure R A) : (f.mapIntegralClosure x : S) = f (x : A)
@[simp]
theorem AlgHom.coe_mapIntegralClosure [Algebra R S] (f : A →ₐ[R] S)
(x : integralClosure R A) : (f.mapIntegralClosure x : S) = f (x : A) := rfl
AlgEquiv.mapIntegralClosure
definition
[Algebra R S] (f : A ≃ₐ[R] S) : integralClosure R A ≃ₐ[R] integralClosure R S
/-- An `AlgEquiv` between two rings restrict to an `AlgEquiv` between the integral closures inside
them. -/
def AlgEquiv.mapIntegralClosure [Algebra R S] (f : A ≃ₐ[R] S) :
integralClosureintegralClosure R A ≃ₐ[R] integralClosure R S :=
AlgEquiv.ofAlgHom (f : A →ₐ[R] S).mapIntegralClosure (f.symm : S →ₐ[R] A).mapIntegralClosure
(AlgHom.ext fun _ ↦ Subtype.ext (f.right_inv _))
(AlgHom.ext fun _ ↦ Subtype.ext (f.left_inv _))
AlgEquiv.coe_mapIntegralClosure
theorem
[Algebra R S] (f : A ≃ₐ[R] S) (x : integralClosure R A) : (f.mapIntegralClosure x : S) = f (x : A)
@[simp]
theorem AlgEquiv.coe_mapIntegralClosure [Algebra R S] (f : A ≃ₐ[R] S)
(x : integralClosure R A) : (f.mapIntegralClosure x : S) = f (x : A) := rfl
integralClosure.isIntegral
theorem
(x : integralClosure R A) : IsIntegral R x
theorem integralClosure.isIntegral (x : integralClosure R A) : IsIntegral R x :=
let ⟨p, hpm, hpx⟩ := x.2
⟨p, hpm,
Subtype.eq <| by
rwa [← aeval_def, ← Subalgebra.val_apply, aeval_algHom_apply] at hpx⟩
integralClosure.AlgebraIsIntegral
instance
: Algebra.IsIntegral R (integralClosure R A)
instance integralClosure.AlgebraIsIntegral : Algebra.IsIntegral R (integralClosure R A) :=
⟨integralClosure.isIntegral⟩
IsIntegral.of_mul_unit
theorem
{x y : B} {r : R} (hr : algebraMap R B r * y = 1) (hx : IsIntegral R (x * y)) : IsIntegral R x
theorem IsIntegral.of_mul_unit {x y : B} {r : R} (hr : algebraMap R B r * y = 1)
(hx : IsIntegral R (x * y)) : IsIntegral R x := by
obtain ⟨p, p_monic, hp⟩ := hx
refine ⟨scaleRoots p r, (monic_scaleRoots_iff r).2 p_monic, ?_⟩
convert scaleRoots_aeval_eq_zero hp
rw [Algebra.commutes] at hr ⊢
rw [mul_assoc, hr, mul_one]; rfl
RingHom.IsIntegralElem.of_mul_unit
theorem
(x y : S) (r : R) (hr : f r * y = 1) (hx : f.IsIntegralElem (x * y)) : f.IsIntegralElem x
theorem RingHom.IsIntegralElem.of_mul_unit (x y : S) (r : R) (hr : f r * y = 1)
(hx : f.IsIntegralElem (x * y)) : f.IsIntegralElem x :=
letI : Algebra R S := f.toAlgebra
IsIntegral.of_mul_unit hr hx
IsIntegral.of_mem_closure'
theorem
(G : Set A) (hG : ∀ x ∈ G, IsIntegral R x) : ∀ x ∈ Subring.closure G, IsIntegral R x
/-- Generalization of `IsIntegral.of_mem_closure` bootstrapped up from that lemma -/
theorem IsIntegral.of_mem_closure' (G : Set A) (hG : ∀ x ∈ G, IsIntegral R x) :
∀ x ∈ Subring.closure G, IsIntegral R x := fun _ hx ↦
Subring.closure_induction hG isIntegral_zero isIntegral_one (fun _ _ _ _ ↦ IsIntegral.add)
(fun _ _ ↦ IsIntegral.neg) (fun _ _ _ _ ↦ IsIntegral.mul) hx
IsIntegral.of_mem_closure''
theorem
{S : Type*} [CommRing S] {f : R →+* S} (G : Set S) (hG : ∀ x ∈ G, f.IsIntegralElem x) :
∀ x ∈ Subring.closure G, f.IsIntegralElem x
theorem IsIntegral.of_mem_closure'' {S : Type*} [CommRing S] {f : R →+* S} (G : Set S)
(hG : ∀ x ∈ G, f.IsIntegralElem x) : ∀ x ∈ Subring.closure G, f.IsIntegralElem x := fun x hx =>
@IsIntegral.of_mem_closure' R S _ _ f.toAlgebra G hG x hx
IsIntegral.pow
theorem
{x : B} (h : IsIntegral R x) (n : ℕ) : IsIntegral R (x ^ n)
theorem IsIntegral.pow {x : B} (h : IsIntegral R x) (n : ℕ) : IsIntegral R (x ^ n) :=
.of_mem_of_fg _ h.fg_adjoin_singleton _ <|
Subalgebra.pow_mem _ (by exact Algebra.subset_adjoin rfl) _
IsIntegral.nsmul
theorem
{x : B} (h : IsIntegral R x) (n : ℕ) : IsIntegral R (n • x)
theorem IsIntegral.nsmul {x : B} (h : IsIntegral R x) (n : ℕ) : IsIntegral R (n • x) :=
h.smul n
IsIntegral.zsmul
theorem
{x : B} (h : IsIntegral R x) (n : ℤ) : IsIntegral R (n • x)
theorem IsIntegral.zsmul {x : B} (h : IsIntegral R x) (n : ℤ) : IsIntegral R (n • x) :=
h.smul n
IsIntegral.multiset_prod
theorem
{s : Multiset A} (h : ∀ x ∈ s, IsIntegral R x) : IsIntegral R s.prod
theorem IsIntegral.multiset_prod {s : Multiset A} (h : ∀ x ∈ s, IsIntegral R x) :
IsIntegral R s.prod :=
(integralClosure R A).multiset_prod_mem h
IsIntegral.multiset_sum
theorem
{s : Multiset A} (h : ∀ x ∈ s, IsIntegral R x) : IsIntegral R s.sum
theorem IsIntegral.multiset_sum {s : Multiset A} (h : ∀ x ∈ s, IsIntegral R x) :
IsIntegral R s.sum :=
(integralClosure R A).multiset_sum_mem h
IsIntegral.prod
theorem
{α : Type*} {s : Finset α} (f : α → A) (h : ∀ x ∈ s, IsIntegral R (f x)) : IsIntegral R (∏ x ∈ s, f x)
theorem IsIntegral.prod {α : Type*} {s : Finset α} (f : α → A) (h : ∀ x ∈ s, IsIntegral R (f x)) :
IsIntegral R (∏ x ∈ s, f x) :=
(integralClosure R A).prod_mem h
IsIntegral.sum
theorem
{α : Type*} {s : Finset α} (f : α → A) (h : ∀ x ∈ s, IsIntegral R (f x)) : IsIntegral R (∑ x ∈ s, f x)
theorem IsIntegral.sum {α : Type*} {s : Finset α} (f : α → A) (h : ∀ x ∈ s, IsIntegral R (f x)) :
IsIntegral R (∑ x ∈ s, f x) :=
(integralClosure R A).sum_mem h
IsIntegral.det
theorem
{n : Type*} [Fintype n] [DecidableEq n] {M : Matrix n n A} (h : ∀ i j, IsIntegral R (M i j)) : IsIntegral R M.det
theorem IsIntegral.det {n : Type*} [Fintype n] [DecidableEq n] {M : Matrix n n A}
(h : ∀ i j, IsIntegral R (M i j)) : IsIntegral R M.det := by
rw [Matrix.det_apply]
exact IsIntegral.sum _ fun σ _hσ ↦ (IsIntegral.prod _ fun i _hi => h _ _).zsmul _
IsIntegral.pow_iff
theorem
{x : A} {n : ℕ} (hn : 0 < n) : IsIntegral R (x ^ n) ↔ IsIntegral R x
@[simp]
theorem IsIntegral.pow_iff {x : A} {n : ℕ} (hn : 0 < n) : IsIntegralIsIntegral R (x ^ n) ↔ IsIntegral R x :=
⟨IsIntegral.of_pow hn, fun hx ↦ hx.pow n⟩
IsIntegral.tmul
theorem
(x : A) {y : B} (h : IsIntegral R y) : IsIntegral A (x ⊗ₜ[R] y)
theorem IsIntegral.tmul (x : A) {y : B} (h : IsIntegral R y) : IsIntegral A (x ⊗ₜ[R] y) := by
rw [← mul_one x, ← smul_eq_mul, ← smul_tmul']
exact smul _ (h.map_of_comp_eq (algebraMap R A)
(Algebra.TensorProduct.includeRight (R := R) (A := A) (B := B)).toRingHom
Algebra.TensorProduct.includeLeftRingHom_comp_algebraMap)
RingHom.isIntegralElem_leadingCoeff_mul
theorem
(h : p.eval₂ f x = 0) : f.IsIntegralElem (f p.leadingCoeff * x)
/-- Given a `p : R[X]` and a `x : S` such that `p.eval₂ f x = 0`,
`f p.leadingCoeff * x` is integral. -/
theorem RingHom.isIntegralElem_leadingCoeff_mul (h : p.eval₂ f x = 0) :
f.IsIntegralElem (f p.leadingCoeff * x) := by
by_cases h' : 1 ≤ p.natDegree
· use integralNormalization p
have : p ≠ 0 := fun h'' => by
rw [h'', natDegree_zero] at h'
exact Nat.not_succ_le_zero 0 h'
use monic_integralNormalization this
rw [integralNormalization_eval₂_leadingCoeff_mul h' f x, h, mul_zero]
· by_cases hp : p.map f = 0
· apply_fun fun q => coeff q p.natDegree at hp
rw [coeff_map, coeff_zero, coeff_natDegree] at hp
rw [hp, zero_mul]
exact f.isIntegralElem_zero
· rw [Nat.one_le_iff_ne_zero, Classical.not_not] at h'
rw [eq_C_of_natDegree_eq_zero h', eval₂_C] at h
suffices p.map f = 0 by exact (hp this).elim
rw [eq_C_of_natDegree_eq_zero h', map_C, h, C_eq_zero]
isIntegral_leadingCoeff_smul
theorem
[Algebra R S] (h : aeval x p = 0) : IsIntegral R (p.leadingCoeff • x)
/-- Given a `p : R[X]` and a root `x : S`,
then `p.leadingCoeff • x : S` is integral over `R`. -/
theorem isIntegral_leadingCoeff_smul [Algebra R S] (h : aeval x p = 0) :
IsIntegral R (p.leadingCoeff • x) := by
rw [aeval_def] at h
rw [Algebra.smul_def]
exact (algebraMap R S).isIntegralElem_leadingCoeff_mul p x h
Polynomial.Monic.quotient_isIntegralElem
theorem
{g : S[X]} (mon : g.Monic) {I : Ideal S[X]} (h : g ∈ I) :
((Ideal.Quotient.mk I).comp (algebraMap S S[X])).IsIntegralElem (Ideal.Quotient.mk I X)
lemma Polynomial.Monic.quotient_isIntegralElem {g : S[X]} (mon : g.Monic) {I : Ideal S[X]}
(h : g ∈ I) :
((Ideal.Quotient.mk I).comp (algebraMap S S[X])).IsIntegralElem (Ideal.Quotient.mk I X) := by
exact ⟨g, mon, by
rw [← (Ideal.Quotient.eq_zero_iff_mem.mpr h), eval₂_eq_sum_range]
nth_rw 3 [(as_sum_range_C_mul_X_pow g)]
simp only [map_sum, algebraMap_eq, RingHom.coe_comp, Function.comp_apply, map_mul, map_pow]⟩
Polynomial.Monic.quotient_isIntegral
theorem
{g : S[X]} (mon : g.Monic) {I : Ideal S[X]} (h : g ∈ I) :
((Ideal.Quotient.mkₐ S I).comp (Algebra.ofId S S[X])).IsIntegral
lemma Polynomial.Monic.quotient_isIntegral {g : S[X]} (mon : g.Monic) {I : Ideal S[X]} (h : g ∈ I) :
((Ideal.Quotient.mkₐ S I).comp (Algebra.ofId S S[X])).IsIntegral := by
have eq_top : Algebra.adjoin S {(Ideal.Quotient.mkₐ S I) X} = ⊤ := by
ext g
constructor
· simp only [Algebra.mem_top, implies_true]
· intro _
obtain ⟨g', hg⟩ := Ideal.Quotient.mkₐ_surjective S I g
have : g = (Polynomial.aeval ((Ideal.Quotient.mkₐ S I) X)) g' := by
nth_rw 1 [← hg, aeval_eq_sum_range' (lt_add_one _),
as_sum_range_C_mul_X_pow g', map_sum]
simp only [Polynomial.C_mul', ← map_pow, map_smul]
exact this ▸ (aeval_mem_adjoin_singleton S ((Ideal.Quotient.mk I) Polynomial.X))
exact fun a ↦ (eq_top ▸ adjoin_le_integralClosure <| mon.quotient_isIntegralElem h)
Algebra.mem_top
integralClosure.isIntegralClosure
instance
(R A : Type*) [CommRing R] [CommRing A] [Algebra R A] : IsIntegralClosure (integralClosure R A) R A
instance integralClosure.isIntegralClosure (R A : Type*) [CommRing R] [CommRing A] [Algebra R A] :
IsIntegralClosure (integralClosure R A) R A where
algebraMap_injective' := Subtype.coe_injective
isIntegral_iff {x} := ⟨fun h => ⟨⟨x, h⟩, rfl⟩, by rintro ⟨⟨_, h⟩, rfl⟩; exact h⟩
IsIntegralClosure.algebraMap_injective
theorem
(A R B : Type*) [CommRing R] [CommSemiring A] [CommRing B] [Algebra R B] [Algebra A B] [IsIntegralClosure A R B] :
Function.Injective (algebraMap A B)
theorem algebraMap_injective (A R B : Type*) [CommRing R] [CommSemiring A] [CommRing B]
[Algebra R B] [Algebra A B] [IsIntegralClosure A R B] : Function.Injective (algebraMap A B) :=
algebraMap_injective' R
IsIntegralClosure.isIntegral
theorem
[Algebra R A] [IsScalarTower R A B] (x : A) : IsIntegral R x
protected theorem isIntegral [Algebra R A] [IsScalarTower R A B] (x : A) : IsIntegral R x :=
(isIntegral_algebraMap_iff (algebraMap_injective A R B)).mp <|
show IsIntegral R (algebraMap A B x) from isIntegral_iff.mpr ⟨x, rfl⟩
IsIntegralClosure.isIntegral_algebra
theorem
[Algebra R A] [IsScalarTower R A B] : Algebra.IsIntegral R A
theorem isIntegral_algebra [Algebra R A] [IsScalarTower R A B] : Algebra.IsIntegral R A :=
⟨fun x => IsIntegralClosure.isIntegral R B x⟩
IsIntegralClosure.noZeroSMulDivisors
theorem
[SMul R A] [IsScalarTower R A B] [NoZeroSMulDivisors R B] : NoZeroSMulDivisors R A
theorem noZeroSMulDivisors [SMul R A] [IsScalarTower R A B] [NoZeroSMulDivisors R B] :
NoZeroSMulDivisors R A := by
refine
Function.Injective.noZeroSMulDivisors _ (IsIntegralClosure.algebraMap_injective A R B)
(map_zero _) fun _ _ => ?_
simp only [Algebra.algebraMap_eq_smul_one, IsScalarTower.smul_assoc]
IsIntegralClosure.mk'
definition
(x : B) (hx : IsIntegral R x) : A
/-- If `x : B` is integral over `R`, then it is an element of the integral closure of `R` in `B`. -/
noncomputable def mk' (x : B) (hx : IsIntegral R x) : A :=
Classical.choose (isIntegral_iff.mp hx)
IsIntegralClosure.algebraMap_mk'
theorem
(x : B) (hx : IsIntegral R x) : algebraMap A B (mk' A x hx) = x
@[simp]
theorem algebraMap_mk' (x : B) (hx : IsIntegral R x) : algebraMap A B (mk' A x hx) = x :=
Classical.choose_spec (isIntegral_iff.mp hx)
IsIntegralClosure.mk'_add
theorem
(x y : B) (hx : IsIntegral R x) (hy : IsIntegral R y) : mk' A (x + y) (hx.add hy) = mk' A x hx + mk' A y hy
theorem mk'_add (x y : B) (hx : IsIntegral R x) (hy : IsIntegral R y) :
mk' A (x + y) (hx.add hy) = mk' A x hx + mk' A y hy :=
algebraMap_injective A R B <| by simp only [algebraMap_mk', RingHom.map_add]
IsIntegralClosure.mk'_mul
theorem
(x y : B) (hx : IsIntegral R x) (hy : IsIntegral R y) : mk' A (x * y) (hx.mul hy) = mk' A x hx * mk' A y hy
theorem mk'_mul (x y : B) (hx : IsIntegral R x) (hy : IsIntegral R y) :
mk' A (x * y) (hx.mul hy) = mk' A x hx * mk' A y hy :=
algebraMap_injective A R B <| by simp only [algebraMap_mk', RingHom.map_mul]
IsIntegralClosure.isField
theorem
[Algebra R A] [IsScalarTower R A B] [IsDomain A] (hR : IsField R) : IsField A
/-- The integral closure of a field in a commutative domain is always a field. -/
theorem isField [Algebra R A] [IsScalarTower R A B] [IsDomain A] (hR : IsField R) :
IsField A :=
have := IsIntegralClosure.isIntegral_algebra R (A := A) B
isField_of_isIntegral_of_isField' hR
IsIntegralClosure.lift
definition
: S →ₐ[R] A
/-- If `B / S / R` is a tower of ring extensions where `S` is integral over `R`,
then `S` maps (uniquely) into an integral closure `B / A / R`. -/
noncomputable def lift : S →ₐ[R] A where
toFun x := mk' A (algebraMap S B x) (IsIntegral.algebraMap
(Algebra.IsIntegral.isIntegral (R := R) x))
map_one' := by simp only [RingHom.map_one, mk'_one]
map_zero' := by simp only [RingHom.map_zero, mk'_zero]
map_add' x y := by simp_rw [← mk'_add, map_add]
map_mul' x y := by simp_rw [← mk'_mul, RingHom.map_mul]
commutes' x := by simp_rw [← IsScalarTower.algebraMap_apply, mk'_algebraMap]
IsIntegralClosure.algebraMap_lift
theorem
(x : S) : algebraMap A B (lift R A B x) = algebraMap S B x
@[simp]
theorem algebraMap_lift (x : S) : algebraMap A B (lift R A B x) = algebraMap S B x :=
algebraMap_mk' A (algebraMap S B x) (IsIntegral.algebraMap
(Algebra.IsIntegral.isIntegral (R := R) x))
IsIntegralClosure.equiv
definition
: A ≃ₐ[R] A'
/-- Integral closures are all isomorphic to each other. -/
noncomputable def equiv : A ≃ₐ[R] A' :=
AlgEquiv.ofAlgHom
(lift R A' B (isIntegral := isIntegral_algebra R B))
(lift R A B (isIntegral := isIntegral_algebra R B))
(by ext x; apply algebraMap_injective A' R B; simp)
(by ext x; apply algebraMap_injective A R B; simp)
IsIntegralClosure.algebraMap_equiv
theorem
(x : A) : algebraMap A' B (equiv R A B A' x) = algebraMap A B x
@[simp]
theorem algebraMap_equiv (x : A) : algebraMap A' B (equiv R A B A' x) = algebraMap A B x :=
algebraMap_lift R A' B (isIntegral := isIntegral_algebra R B) x
isIntegral_trans
theorem
[Algebra.IsIntegral R A] (x : B) (hx : IsIntegral A x) : IsIntegral R x
/-- If A is an R-algebra all of whose elements are integral over R,
and x is an element of an A-algebra that is integral over A, then x is integral over R. -/
theorem isIntegral_trans [Algebra.IsIntegral R A] (x : B) (hx : IsIntegral A x) :
IsIntegral R x := by
rcases hx with ⟨p, pmonic, hp⟩
let S := adjoin R (p.coeffs : Set A)
have : Module.Finite R S := ⟨(Subalgebra.toSubmodule S).fg_top.mpr <|
fg_adjoin_of_finite p.coeffs.finite_toSet fun a _ ↦ Algebra.IsIntegral.isIntegral a⟩
let p' : S[X] := p.toSubring S.toSubring subset_adjoin
have hSx : IsIntegral S x := ⟨p', (p.monic_toSubring _ _).mpr pmonic, by
rw [IsScalarTower.algebraMap_eq S A B, ← eval₂_map]
convert hp; apply p.map_toSubring S.toSubring⟩
let Sx := Subalgebra.toSubmodule (adjoin S {x})
let MSx : Module S Sx := SMulMemClass.toModule _ -- the next line times out without this
have : Module.Finite S Sx := ⟨(Submodule.fg_top _).mpr hSx.fg_adjoin_singleton⟩
refine .of_mem_of_fg ((adjoin S {x}).restrictScalars R) ?_ _
((Subalgebra.mem_restrictScalars R).mpr <| subset_adjoin rfl)
rw [← Submodule.fg_top, ← Module.finite_def]
letI : SMul S Sx := { MSx with } -- need this even though MSx is there
have : IsScalarTower R S Sx :=
Submodule.isScalarTower Sx -- Lean looks for `Module A Sx` without this
exact Module.Finite.trans S Sx
Algebra.IsIntegral.trans
theorem
[Algebra.IsIntegral R A] [Algebra.IsIntegral A B] : Algebra.IsIntegral R B
/-- If A is an R-algebra all of whose elements are integral over R,
and B is an A-algebra all of whose elements are integral over A,
then all elements of B are integral over R. -/
protected theorem Algebra.IsIntegral.trans
[Algebra.IsIntegral R A] [Algebra.IsIntegral A B] : Algebra.IsIntegral R B :=
⟨fun x ↦ isIntegral_trans x (Algebra.IsIntegral.isIntegral (R := A) x)⟩
RingHom.IsIntegral.trans
theorem
(hf : f.IsIntegral) (hg : g.IsIntegral) : (g.comp f).IsIntegral
protected theorem RingHom.IsIntegral.trans
(hf : f.IsIntegral) (hg : g.IsIntegral) : (g.comp f).IsIntegral :=
let _ := f.toAlgebra; let _ := g.toAlgebra; let _ := (g.comp f).toAlgebra
have : IsScalarTower R S T := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl
have : Algebra.IsIntegral R S := ⟨hf⟩
have : Algebra.IsIntegral S T := ⟨hg⟩
have : Algebra.IsIntegral R T := Algebra.IsIntegral.trans S
Algebra.IsIntegral.isIntegral
IsIntegralClosure.tower_top
theorem
{B C : Type*} [CommSemiring C] [CommRing B] [Algebra R B] [Algebra A B] [Algebra C B] [IsScalarTower R A B]
[IsIntegralClosure C R B] [Algebra.IsIntegral R A] : IsIntegralClosure C A B
/-- If `R → A → B` is an algebra tower, `C` is the integral closure of `R` in `B`
and `A` is integral over `R`, then `C` is the integral closure of `A` in `B`. -/
lemma IsIntegralClosure.tower_top {B C : Type*} [CommSemiring C] [CommRing B]
[Algebra R B] [Algebra A B] [Algebra C B] [IsScalarTower R A B]
[IsIntegralClosure C R B] [Algebra.IsIntegral R A] :
IsIntegralClosure C A B :=
⟨IsIntegralClosure.algebraMap_injective _ R _,
fun hx => (IsIntegralClosure.isIntegral_iff).mp (isIntegral_trans (R := R) _ hx),
fun hx => ((IsIntegralClosure.isIntegral_iff (R := R)).mpr hx).tower_top⟩
RingHom.isIntegral_of_surjective
theorem
(hf : Function.Surjective f) : f.IsIntegral
theorem RingHom.isIntegral_of_surjective (hf : Function.Surjective f) : f.IsIntegral :=
fun x ↦ (hf x).recOn fun _y hy ↦ hy ▸ f.isIntegralElem_map
Algebra.isIntegral_of_surjective
theorem
(h : Function.Surjective (algebraMap R A)) : Algebra.IsIntegral R A
theorem Algebra.isIntegral_of_surjective (h : Function.Surjective (algebraMap R A)) :
Algebra.IsIntegral R A :=
⟨(algebraMap R A).isIntegral_of_surjective h⟩
IsIntegral.tower_bot
theorem
(H : Function.Injective (algebraMap A B)) {x : A} (h : IsIntegral R (algebraMap A B x)) : IsIntegral R x
/-- If `R → A → B` is an algebra tower with `A → B` injective,
then if the entire tower is an integral extension so is `R → A` -/
theorem IsIntegral.tower_bot (H : Function.Injective (algebraMap A B)) {x : A}
(h : IsIntegral R (algebraMap A B x)) : IsIntegral R x :=
(isIntegral_algHom_iff (IsScalarTower.toAlgHom R A B) H).mp h
RingHom.IsIntegral.tower_bot
theorem
(hg : Function.Injective g) (hfg : (g.comp f).IsIntegral) : f.IsIntegral
nonrec theorem RingHom.IsIntegral.tower_bot (hg : Function.Injective g)
(hfg : (g.comp f).IsIntegral) : f.IsIntegral :=
letI := f.toAlgebra; letI := g.toAlgebra; letI := (g.comp f).toAlgebra
haveI : IsScalarTower R S T := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl
fun x ↦ IsIntegral.tower_bot hg (hfg (g x))
Algebra.IsIntegral.tower_bot
theorem
[Algebra R S] [Algebra R T] [Algebra S T] [NoZeroSMulDivisors S T] [Nontrivial T] [IsScalarTower R S T]
[h : Algebra.IsIntegral R T] : Algebra.IsIntegral R S
/-- Let `T / S / R` be a tower of algebras, `T` is non-trivial and is a torsion free `S`-module,
then if `T` is an integral `R`-algebra, then `S` is an integral `R`-algebra. -/
theorem Algebra.IsIntegral.tower_bot [Algebra R S] [Algebra R T] [Algebra S T]
[NoZeroSMulDivisors S T] [Nontrivial T] [IsScalarTower R S T]
[h : Algebra.IsIntegral R T] : Algebra.IsIntegral R S where
isIntegral := by
apply RingHom.IsIntegral.tower_bot (algebraMap R S) (algebraMap S T)
(FaithfulSMul.algebraMap_injective S T)
rw [← IsScalarTower.algebraMap_eq R S T]
exact h.isIntegral
IsIntegral.tower_bot_of_field
theorem
{R A B : Type*} [CommRing R] [Field A] [Ring B] [Nontrivial B] [Algebra R A] [Algebra A B] [Algebra R B]
[IsScalarTower R A B] {x : A} (h : IsIntegral R (algebraMap A B x)) : IsIntegral R x
theorem IsIntegral.tower_bot_of_field {R A B : Type*} [CommRing R] [Field A]
[Ring B] [Nontrivial B] [Algebra R A] [Algebra A B] [Algebra R B] [IsScalarTower R A B]
{x : A} (h : IsIntegral R (algebraMap A B x)) : IsIntegral R x :=
h.tower_bot (algebraMap A B).injective
RingHom.isIntegralElem.of_comp
theorem
{x : T} (h : (g.comp f).IsIntegralElem x) : g.IsIntegralElem x
theorem RingHom.isIntegralElem.of_comp {x : T} (h : (g.comp f).IsIntegralElem x) :
g.IsIntegralElem x :=
let ⟨p, hp, hp'⟩ := h
⟨p.map f, hp.map f, by rwa [← eval₂_map] at hp'⟩
RingHom.IsIntegral.tower_top
theorem
(h : (g.comp f).IsIntegral) : g.IsIntegral
theorem RingHom.IsIntegral.tower_top (h : (g.comp f).IsIntegral) : g.IsIntegral :=
fun x ↦ RingHom.isIntegralElem.of_comp f g (h x)
Algebra.IsIntegral.tower_top
theorem
[Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T] [h : Algebra.IsIntegral R T] : Algebra.IsIntegral S T
/-- Let `T / S / R` be a tower of algebras, `T` is an integral `R`-algebra, then it is integral
as an `S`-algebra. -/
theorem Algebra.IsIntegral.tower_top [Algebra R S] [Algebra R T] [Algebra S T] [IsScalarTower R S T]
[h : Algebra.IsIntegral R T] : Algebra.IsIntegral S T where
isIntegral := by
apply RingHom.IsIntegral.tower_top (algebraMap R S) (algebraMap S T)
rw [← IsScalarTower.algebraMap_eq R S T]
exact h.isIntegral
RingHom.IsIntegral.quotient
theorem
{I : Ideal S} (hf : f.IsIntegral) : (Ideal.quotientMap I f le_rfl).IsIntegral
theorem RingHom.IsIntegral.quotient {I : Ideal S} (hf : f.IsIntegral) :
(Ideal.quotientMap I f le_rfl).IsIntegral := by
rintro ⟨x⟩
obtain ⟨p, p_monic, hpx⟩ := hf x
refine ⟨p.map (Ideal.Quotient.mk _), p_monic.map _, ?_⟩
simpa only [hom_eval₂, eval₂_map] using congr_arg (Ideal.Quotient.mk I) hpx
instIsIntegralQuotientIdeal
instance
{I : Ideal A} [Algebra.IsIntegral R A] : Algebra.IsIntegral R (A ⧸ I)
instance {I : Ideal A} [Algebra.IsIntegral R A] : Algebra.IsIntegral R (A ⧸ I) :=
Algebra.IsIntegral.trans A
Algebra.IsIntegral.quotient
instance
{I : Ideal A} [Algebra.IsIntegral R A] : Algebra.IsIntegral (R ⧸ I.comap (algebraMap R A)) (A ⧸ I)
instance Algebra.IsIntegral.quotient {I : Ideal A} [Algebra.IsIntegral R A] :
Algebra.IsIntegral (R ⧸ I.comap (algebraMap R A)) (A ⧸ I) :=
⟨RingHom.IsIntegral.quotient (algebraMap R A) Algebra.IsIntegral.isIntegral⟩
isIntegral_quotientMap_iff
theorem
{I : Ideal S} : (Ideal.quotientMap I f le_rfl).IsIntegral ↔ ((Ideal.Quotient.mk I).comp f : R →+* S ⧸ I).IsIntegral
theorem isIntegral_quotientMap_iff {I : Ideal S} :
(Ideal.quotientMap I f le_rfl).IsIntegral ↔
((Ideal.Quotient.mk I).comp f : R →+* S ⧸ I).IsIntegral := by
let g := Ideal.Quotient.mk (I.comap f)
-- Porting note: added type ascription
have : (Ideal.quotientMap I f le_rfl).comp g = (Ideal.Quotient.mk I).comp f :=
Ideal.quotientMap_comp_mk le_rfl
refine ⟨fun h => ?_, fun h => RingHom.IsIntegral.tower_top g _ (this ▸ h)⟩
refine this ▸ RingHom.IsIntegral.trans g (Ideal.quotientMap I f le_rfl) ?_ h
exact g.isIntegral_of_surjective Ideal.Quotient.mk_surjective
isField_of_isIntegral_of_isField
theorem
{R S : Type*} [CommRing R] [CommRing S] [Algebra R S] [Algebra.IsIntegral R S]
(hRS : Function.Injective (algebraMap R S)) (hS : IsField S) : IsField R
/-- If the integral extension `R → S` is injective, and `S` is a field, then `R` is also a field. -/
theorem isField_of_isIntegral_of_isField {R S : Type*} [CommRing R] [CommRing S]
[Algebra R S] [Algebra.IsIntegral R S]
(hRS : Function.Injective (algebraMap R S)) (hS : IsField S) : IsField R := by
have := hS.nontrivial; have := Module.nontrivial R S
refine ⟨⟨0, 1, zero_ne_one⟩, mul_comm, fun {a} ha ↦ ?_⟩
-- Let `a_inv` be the inverse of `algebraMap R S a`,
-- then we need to show that `a_inv` is of the form `algebraMap R S b`.
obtain ⟨a_inv, ha_inv⟩ := hS.mul_inv_cancel fun h ↦ ha (hRS (h.trans (RingHom.map_zero _).symm))
letI : Invertible a_inv := (Units.mkOfMulEqOne a_inv _ <| mul_comm _ a_inv ▸ ha_inv).invertible
-- Let `p : R[X]` be monic with root `a_inv`,
obtain ⟨p, p_monic, hp⟩ := Algebra.IsIntegral.isIntegral (R := R) a_inv
-- and `q` be `p` with coefficients reversed (so `q(a) = q'(a) * a + 1`).
-- We have `q(a) = 0`, so `-q'(a)` is the inverse of `a`.
use -p.reverse.divX.eval a -- -q'(a)
nth_rewrite 1 [mul_neg, ← eval_X (x := a), ← eval_mul, ← p_monic, ← coeff_zero_reverse,
← add_eq_zero_iff_neg_eq, ← eval_C (a := p.reverse.coeff 0), ← eval_add, X_mul_divX_add,
← (injective_iff_map_eq_zero' _).mp hRS, ← aeval_algebraMap_apply_eq_algebraMap_eval]
rwa [← eval₂_reverse_eq_zero_iff] at hp
Algebra.IsIntegral.isField_iff_isField
theorem
{R S : Type*} [CommRing R] [CommRing S] [IsDomain S] [Algebra R S] [Algebra.IsIntegral R S]
(hRS : Function.Injective (algebraMap R S)) : IsField R ↔ IsField S
theorem Algebra.IsIntegral.isField_iff_isField {R S : Type*} [CommRing R]
[CommRing S] [IsDomain S] [Algebra R S] [Algebra.IsIntegral R S]
(hRS : Function.Injective (algebraMap R S)) : IsFieldIsField R ↔ IsField S :=
⟨isField_of_isIntegral_of_isField', isField_of_isIntegral_of_isField hRS⟩
integralClosure_idem
theorem
{R A : Type*} [CommRing R] [CommRing A] [Algebra R A] : integralClosure (integralClosure R A) A = ⊥
theorem integralClosure_idem {R A : Type*} [CommRing R] [CommRing A] [Algebra R A] :
integralClosure (integralClosure R A) A = ⊥ :=
letI := (integralClosure R A).algebra
eq_bot_iff.2 fun x hx ↦ Algebra.mem_bot.2
⟨⟨x, isIntegral_trans (A := integralClosure R A) x hx⟩, rfl⟩
instIsDomainSubtypeMemSubalgebraIntegralClosure
instance
: IsDomain (integralClosure R S)
instance : IsDomain (integralClosure R S) :=
inferInstance
roots_mem_integralClosure
theorem
{f : R[X]} (hf : f.Monic) {a : S} (ha : a ∈ f.aroots S) : a ∈ integralClosure R S
theorem roots_mem_integralClosure {f : R[X]} (hf : f.Monic) {a : S}
(ha : a ∈ f.aroots S) : a ∈ integralClosure R S :=
⟨f, hf, (eval₂_eq_eval_map _).trans <| (mem_roots <| (hf.map _).ne_zero).1 ha⟩