Skip to content

Commit 3ecbc03

Browse files
chore: Split RingTheory.IntegralClosure (#14826)
We create a new folder `RingTheory.IntegralClosure` and we move the relevant files (also doing some splitting).
1 parent cac1f0d commit 3ecbc03

File tree

21 files changed

+422
-261
lines changed

21 files changed

+422
-261
lines changed

Mathlib.lean

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3724,10 +3724,15 @@ import Mathlib.RingTheory.Ideal.Prod
37243724
import Mathlib.RingTheory.Ideal.Quotient
37253725
import Mathlib.RingTheory.Ideal.QuotientOperations
37263726
import Mathlib.RingTheory.Int.Basic
3727-
import Mathlib.RingTheory.IntegralClosure
3727+
import Mathlib.RingTheory.IntegralClosure.Algebra.Basic
3728+
import Mathlib.RingTheory.IntegralClosure.Algebra.Defs
3729+
import Mathlib.RingTheory.IntegralClosure.IntegralRestrict
3730+
import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed
3731+
import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic
3732+
import Mathlib.RingTheory.IntegralClosure.IsIntegral.Defs
3733+
import Mathlib.RingTheory.IntegralClosure.IsIntegralClosure.Basic
3734+
import Mathlib.RingTheory.IntegralClosure.IsIntegralClosure.Defs
37283735
import Mathlib.RingTheory.IntegralDomain
3729-
import Mathlib.RingTheory.IntegralRestrict
3730-
import Mathlib.RingTheory.IntegrallyClosed
37313736
import Mathlib.RingTheory.IsAdjoinRoot
37323737
import Mathlib.RingTheory.IsTensorProduct
37333738
import Mathlib.RingTheory.Jacobson

Mathlib/Algebra/GCDMonoid/IntegrallyClosed.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Andrew Yang
55
-/
66
import Mathlib.Algebra.GCDMonoid.Basic
7-
import Mathlib.RingTheory.IntegrallyClosed
7+
import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed
88
import Mathlib.RingTheory.Polynomial.Eisenstein.Basic
99

1010
#align_import algebra.gcd_monoid.integrally_closed from "leanprover-community/mathlib"@"2032a878972d5672e7c27c957e7a6e297b044973"

Mathlib/FieldTheory/Minpoly/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2019 Chris Hughes. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Chris Hughes, Johan Commelin
55
-/
6-
import Mathlib.RingTheory.IntegralClosure
6+
import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic
77

88
#align_import field_theory.minpoly.basic from "leanprover-community/mathlib"@"df0098f0db291900600f32070f6abb3e178be2ba"
99

Mathlib/NumberTheory/FunctionField.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Authors: Anne Baanen, Ashvni Narayanan
66
import Mathlib.Algebra.Order.Group.TypeTags
77
import Mathlib.FieldTheory.RatFunc.Degree
88
import Mathlib.RingTheory.DedekindDomain.IntegralClosure
9-
import Mathlib.RingTheory.IntegrallyClosed
9+
import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed
1010
import Mathlib.Topology.Algebra.Valued.ValuedField
1111

1212
#align_import number_theory.function_field from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"

Mathlib/RingTheory/Algebraic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2019 Johan Commelin. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Johan Commelin
55
-/
6-
import Mathlib.RingTheory.IntegralClosure
6+
import Mathlib.RingTheory.IntegralClosure.IsIntegralClosure.Basic
77
import Mathlib.RingTheory.Polynomial.IntegralNormalization
88

99
#align_import ring_theory.algebraic from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"

Mathlib/RingTheory/Discriminant.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2021 Riccardo Brasca. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Riccardo Brasca
55
-/
6-
import Mathlib.RingTheory.IntegrallyClosed
6+
import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed
77
import Mathlib.RingTheory.Trace.Basic
88
import Mathlib.RingTheory.Norm.Basic
99

Mathlib/RingTheory/FractionalIdeal/Operations.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Copyright (c) 2020 Anne Baanen. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Anne Baanen, Filippo A. E. Nuccio
55
-/
6-
import Mathlib.RingTheory.IntegralClosure
76
import Mathlib.RingTheory.FractionalIdeal.Basic
7+
import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic
88

99
#align_import ring_theory.fractional_ideal from "leanprover-community/mathlib"@"ed90a7d327c3a5caf65a6faf7e8a0d63c4605df7"
1010

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
/-
2+
Copyright (c) 2019 Kenny Lau. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Kenny Lau
5+
-/
6+
import Mathlib.RingTheory.IntegralClosure.Algebra.Defs
7+
import Mathlib.RingTheory.IntegralClosure.IsIntegral.Basic
8+
import Mathlib.LinearAlgebra.Matrix.Charpoly.LinearMap
9+
10+
#align_import ring_theory.integral_closure from "leanprover-community/mathlib"@"641b6a82006416ec431b2987b354af9311fed4f2"
11+
12+
/-!
13+
# Integral closure of a subring.
14+
15+
Let `A` be an `R`-algebra. We prove that integral elements form a sub-`R`-algebra of `A`.
16+
17+
## Main definitions
18+
19+
Let `R` be a `CommRing` and let `A` be an R-algebra.
20+
21+
* `integralClosure R A` : the integral closure of `R` in an `R`-algebra `A`.
22+
-/
23+
24+
25+
open Polynomial Submodule
26+
27+
section
28+
29+
variable {R A B S : Type*}
30+
variable [CommRing R] [CommRing A] [Ring B] [CommRing S]
31+
variable [Algebra R A] [Algebra R B] (f : R →+* S)
32+
33+
section
34+
35+
variable {A B : Type*} [Ring A] [Ring B] [Algebra R A] [Algebra R B]
36+
variable (f : A →ₐ[R] B) (hf : Function.Injective f)
37+
38+
end
39+
40+
instance Module.End.isIntegral {M : Type*} [AddCommGroup M] [Module R M] [Module.Finite R M] :
41+
Algebra.IsIntegral R (Module.End R M) :=
42+
⟨LinearMap.exists_monic_and_aeval_eq_zero R⟩
43+
#align module.End.is_integral Module.End.isIntegral
44+
45+
variable (R)
46+
theorem IsIntegral.of_finite [Module.Finite R B] (x : B) : IsIntegral R x :=
47+
(isIntegral_algHom_iff (Algebra.lmul R B) Algebra.lmul_injective).mp
48+
(Algebra.IsIntegral.isIntegral _)
49+
50+
variable (B)
51+
instance Algebra.IsIntegral.of_finite [Module.Finite R B] : Algebra.IsIntegral R B :=
52+
⟨.of_finite R⟩
53+
#align algebra.is_integral.of_finite Algebra.IsIntegral.of_finite
54+
55+
variable {R B}
56+
57+
/-- If `S` is a sub-`R`-algebra of `A` and `S` is finitely-generated as an `R`-module,
58+
then all elements of `S` are integral over `R`. -/
59+
theorem IsIntegral.of_mem_of_fg {A} [Ring A] [Algebra R A] (S : Subalgebra R A)
60+
(HS : S.toSubmodule.FG) (x : A) (hx : x ∈ S) : IsIntegral R x :=
61+
have : Module.Finite R S := ⟨(fg_top _).mpr HS⟩
62+
(isIntegral_algHom_iff S.val Subtype.val_injective).mpr (.of_finite R (⟨x, hx⟩ : S))
63+
#align is_integral_of_mem_of_fg IsIntegral.of_mem_of_fg
64+
65+
theorem RingHom.IsIntegralElem.of_mem_closure {x y z : S} (hx : f.IsIntegralElem x)
66+
(hy : f.IsIntegralElem y) (hz : z ∈ Subring.closure ({x, y} : Set S)) : f.IsIntegralElem z := by
67+
letI : Algebra R S := f.toAlgebra
68+
have := (IsIntegral.fg_adjoin_singleton hx).mul (IsIntegral.fg_adjoin_singleton hy)
69+
rw [← Algebra.adjoin_union_coe_submodule, Set.singleton_union] at this
70+
exact
71+
IsIntegral.of_mem_of_fg (Algebra.adjoin R {x, y}) this z
72+
(Algebra.mem_adjoin_iff.2 <| Subring.closure_mono Set.subset_union_right hz)
73+
#align ring_hom.is_integral_of_mem_closure RingHom.IsIntegralElem.of_mem_closure
74+
75+
nonrec theorem IsIntegral.of_mem_closure {x y z : A} (hx : IsIntegral R x) (hy : IsIntegral R y)
76+
(hz : z ∈ Subring.closure ({x, y} : Set A)) : IsIntegral R z :=
77+
hx.of_mem_closure (algebraMap R A) hy hz
78+
#align is_integral_of_mem_closure IsIntegral.of_mem_closure
79+
80+
variable (f : R →+* B)
81+
82+
theorem RingHom.IsIntegralElem.add (f : R →+* S) {x y : S}
83+
(hx : f.IsIntegralElem x) (hy : f.IsIntegralElem y) :
84+
f.IsIntegralElem (x + y) :=
85+
hx.of_mem_closure f hy <|
86+
Subring.add_mem _ (Subring.subset_closure (Or.inl rfl)) (Subring.subset_closure (Or.inr rfl))
87+
#align ring_hom.is_integral_add RingHom.IsIntegralElem.add
88+
89+
nonrec theorem IsIntegral.add {x y : A} (hx : IsIntegral R x) (hy : IsIntegral R y) :
90+
IsIntegral R (x + y) :=
91+
hx.add (algebraMap R A) hy
92+
#align is_integral_add IsIntegral.add
93+
94+
variable (f : R →+* S)
95+
96+
-- can be generalized to noncommutative S.
97+
theorem RingHom.IsIntegralElem.neg {x : S} (hx : f.IsIntegralElem x) : f.IsIntegralElem (-x) :=
98+
hx.of_mem_closure f hx (Subring.neg_mem _ (Subring.subset_closure (Or.inl rfl)))
99+
#align ring_hom.is_integral_neg RingHom.IsIntegralElem.neg
100+
101+
theorem IsIntegral.neg {x : B} (hx : IsIntegral R x) : IsIntegral R (-x) :=
102+
.of_mem_of_fg _ hx.fg_adjoin_singleton _ (Subalgebra.neg_mem _ <| Algebra.subset_adjoin rfl)
103+
#align is_integral_neg IsIntegral.neg
104+
105+
theorem RingHom.IsIntegralElem.sub {x y : S} (hx : f.IsIntegralElem x) (hy : f.IsIntegralElem y) :
106+
f.IsIntegralElem (x - y) := by
107+
simpa only [sub_eq_add_neg] using hx.add f (hy.neg f)
108+
#align ring_hom.is_integral_sub RingHom.IsIntegralElem.sub
109+
110+
nonrec theorem IsIntegral.sub {x y : A} (hx : IsIntegral R x) (hy : IsIntegral R y) :
111+
IsIntegral R (x - y) :=
112+
hx.sub (algebraMap R A) hy
113+
#align is_integral_sub IsIntegral.sub
114+
115+
theorem RingHom.IsIntegralElem.mul {x y : S} (hx : f.IsIntegralElem x) (hy : f.IsIntegralElem y) :
116+
f.IsIntegralElem (x * y) :=
117+
hx.of_mem_closure f hy
118+
(Subring.mul_mem _ (Subring.subset_closure (Or.inl rfl)) (Subring.subset_closure (Or.inr rfl)))
119+
#align ring_hom.is_integral_mul RingHom.IsIntegralElem.mul
120+
121+
nonrec theorem IsIntegral.mul {x y : A} (hx : IsIntegral R x) (hy : IsIntegral R y) :
122+
IsIntegral R (x * y) :=
123+
hx.mul (algebraMap R A) hy
124+
#align is_integral_mul IsIntegral.mul
125+
126+
theorem IsIntegral.smul {R} [CommSemiring R] [CommRing S] [Algebra R B] [Algebra S B] [Algebra R S]
127+
[IsScalarTower R S B] {x : B} (r : R)(hx : IsIntegral S x) : IsIntegral S (r • x) :=
128+
.of_mem_of_fg _ hx.fg_adjoin_singleton _ <| by
129+
rw [← algebraMap_smul S]; apply Subalgebra.smul_mem; exact Algebra.subset_adjoin rfl
130+
#align is_integral_smul IsIntegral.smul
131+
132+
variable (R A)
133+
134+
/-- The integral closure of `R` in an `R`-algebra `A`. -/
135+
def integralClosure : Subalgebra R A where
136+
carrier := { r | IsIntegral R r }
137+
zero_mem' := isIntegral_zero
138+
one_mem' := isIntegral_one
139+
add_mem' := IsIntegral.add
140+
mul_mem' := IsIntegral.mul
141+
algebraMap_mem' _ := isIntegral_algebraMap
142+
#align integral_closure integralClosure
143+
144+
end
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/-
2+
Copyright (c) 2019 Kenny Lau. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Kenny Lau
5+
-/
6+
import Mathlib.RingTheory.IntegralClosure.IsIntegral.Defs
7+
8+
#align_import ring_theory.integral_closure from "leanprover-community/mathlib"@"641b6a82006416ec431b2987b354af9311fed4f2"
9+
10+
/-!
11+
# Integral algebras
12+
13+
## Main definitions
14+
15+
Let `R` be a `CommRing` and let `A` be an R-algebra.
16+
17+
* `Algebra.IsIntegral R A` : An algebra is integral if every element of the extension is integral
18+
over the base ring.
19+
-/
20+
21+
22+
open Polynomial Submodule
23+
24+
section Ring
25+
26+
variable {R S A : Type*}
27+
variable [CommRing R] [Ring A] [Ring S] (f : R →+* S)
28+
29+
variable [Algebra R A] (R)
30+
31+
variable (A)
32+
33+
/-- An algebra is integral if every element of the extension is integral over the base ring. -/
34+
protected class Algebra.IsIntegral : Prop :=
35+
isIntegral : ∀ x : A, IsIntegral R x
36+
#align algebra.is_integral Algebra.IsIntegral
37+
38+
variable {R A}
39+
40+
lemma Algebra.isIntegral_def : Algebra.IsIntegral R A ↔ ∀ x : A, IsIntegral R x :=
41+
fun ⟨h⟩ ↦ h, fun h ↦ ⟨h⟩⟩
42+
43+
end Ring

Mathlib/RingTheory/IntegralRestrict.lean renamed to Mathlib/RingTheory/IntegralClosure/IntegralRestrict.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2023 Andrew Yang, Patrick Lutz. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Andrew Yang
55
-/
6-
import Mathlib.RingTheory.IntegrallyClosed
6+
import Mathlib.RingTheory.IntegralClosure.IntegrallyClosed
77
import Mathlib.RingTheory.LocalProperties
88
import Mathlib.RingTheory.Localization.NormTrace
99
import Mathlib.RingTheory.Localization.LocalizationLocalization

0 commit comments

Comments
 (0)