Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 825edd3

Browse files
committed
chore(ring_theory): protect algebra.is_integral (#18178)
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
1 parent 975c8c3 commit 825edd3

7 files changed

Lines changed: 28 additions & 29 deletions

File tree

src/field_theory/intermediate_field.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ begin
360360
end
361361

362362
lemma coe_is_integral_iff {R : Type*} [comm_ring R] [algebra R K] [algebra R L]
363-
[is_scalar_tower R K L] {x : S} : is_integral R (x : L) ↔ _root_.is_integral R x :=
363+
[is_scalar_tower R K L] {x : S} : is_integral R (x : L) ↔ is_integral R x :=
364364
begin
365365
refine ⟨λ h, _, λ h, _⟩,
366366
{ obtain ⟨P, hPmo, hProot⟩ := h,

src/field_theory/minpoly/is_integrally_closed.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ alg_equiv.of_bijective (minpoly.to_adjoin R x)
180180

181181
/-- The `power_basis` of `adjoin R {x}` given by `x`. See `algebra.adjoin.power_basis` for a version
182182
over a field. -/
183-
@[simps] def _root_.algebra.adjoin.power_basis' (hx : _root_.is_integral R x) :
184-
_root_.power_basis R (algebra.adjoin R ({x} : set S)) :=
183+
@[simps] def _root_.algebra.adjoin.power_basis' (hx : is_integral R x) :
184+
power_basis R (algebra.adjoin R ({x} : set S)) :=
185185
power_basis.map (adjoin_root.power_basis' (minpoly.monic hx)) (minpoly.equiv_adjoin hx)
186186

187187
/-- The power basis given by `x` if `B.gen ∈ adjoin R {x}`. -/
188-
@[simps] noncomputable def _root_.power_basis.of_gen_mem_adjoin' (B : _root_.power_basis R S)
188+
@[simps] noncomputable def _root_.power_basis.of_gen_mem_adjoin' (B : power_basis R S)
189189
(hint : is_integral R x) (hx : B.gen ∈ adjoin R ({x} : set S)) :
190-
_root_.power_basis R S :=
190+
power_basis R S :=
191191
(algebra.adjoin.power_basis' hint).map $
192192
(subalgebra.equiv_of_eq _ _ $ power_basis.adjoin_eq_top_of_gen_mem_adjoin hx).trans
193193
subalgebra.top_equiv

src/ring_theory/adjoin/power_basis.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ open_locale big_operators
2727

2828
/-- The elements `1, x, ..., x ^ (d - 1)` for a basis for the `K`-module `K[x]`,
2929
where `d` is the degree of the minimal polynomial of `x`. -/
30-
noncomputable def adjoin.power_basis_aux {x : S} (hx : _root_.is_integral K x) :
30+
noncomputable def adjoin.power_basis_aux {x : S} (hx : is_integral K x) :
3131
basis (fin (minpoly K x).nat_degree) K (adjoin K ({x} : set S)) :=
3232
begin
3333
have hST : function.injective (algebra_map (adjoin K ({x} : set S)) S) := subtype.coe_injective,
34-
have hx' : _root_.is_integral K
34+
have hx' : is_integral K
3535
(show adjoin K ({x} : set S), from ⟨x, subset_adjoin (set.mem_singleton x)⟩),
3636
{ apply (is_integral_algebra_map_iff hST).mp,
3737
convert hx,
@@ -55,7 +55,7 @@ end
5555
/-- The power basis `1, x, ..., x ^ (d - 1)` for `K[x]`,
5656
where `d` is the degree of the minimal polynomial of `x`. See `algebra.adjoin.power_basis'` for
5757
a version over a more general base ring. -/
58-
@[simps gen dim] noncomputable def adjoin.power_basis {x : S} (hx : _root_.is_integral K x) :
58+
@[simps gen dim] noncomputable def adjoin.power_basis {x : S} (hx : is_integral K x) :
5959
power_basis K (adjoin K ({x} : set S)) :=
6060
{ gen := ⟨x, subset_adjoin (set.mem_singleton x)⟩,
6161
dim := (minpoly K x).nat_degree,
@@ -69,7 +69,7 @@ open algebra
6969
/-- The power basis given by `x` if `B.gen ∈ adjoin K {x}`. See `power_basis.of_gen_mem_adjoin'`
7070
for a version over a more general base ring. -/
7171
@[simps] noncomputable def power_basis.of_gen_mem_adjoin {x : S} (B : power_basis K S)
72-
(hint : _root_.is_integral K x) (hx : B.gen ∈ adjoin K ({x} : set S)) : power_basis K S :=
72+
(hint : is_integral K x) (hx : B.gen ∈ adjoin K ({x} : set S)) : power_basis K S :=
7373
(algebra.adjoin.power_basis hint).map $
7474
(subalgebra.equiv_of_eq _ _ $ power_basis.adjoin_eq_top_of_gen_mem_adjoin hx).trans
7575
subalgebra.top_equiv
@@ -173,7 +173,7 @@ if `minpoly K B.gen = (minpoly R B.gen).map (algebra_map R L)`. This is the case
173173
if `R` is a GCD domain and `K` is its fraction ring. -/
174174
lemma to_matrix_is_integral {B B' : power_basis K S} {P : R[X]} (h : aeval B.gen P = B'.gen)
175175
(hB : is_integral R B.gen) (hmin : minpoly K B.gen = (minpoly R B.gen).map (algebra_map R K)) :
176-
∀ i j, _root_.is_integral R (B.basis.to_matrix B'.basis i j) :=
176+
∀ i j, is_integral R (B.basis.to_matrix B'.basis i j) :=
177177
begin
178178
intros i j,
179179
rw [B.basis.to_matrix_apply, B'.coe_basis],

src/ring_theory/discriminant.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,6 @@ section integral
261261

262262
variables {R : Type z} [comm_ring R] [algebra R K] [algebra R L] [is_scalar_tower R K L]
263263

264-
local notation `is_integral` := _root_.is_integral
265-
266264
/-- If `K` and `L` are fields and `is_scalar_tower R K L`, and `b : ι → L` satisfies
267265
` ∀ i, is_integral R (b i)`, then `is_integral R (discr K b)`. -/
268266
lemma discr_is_integral {b : ι → L} (h : ∀ i, is_integral R (b i)) :

src/ring_theory/integral_closure.lean

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def is_integral (x : A) : Prop :=
5959
variable (A)
6060

6161
/-- An algebra is integral if every element of the extension is integral over the base ring -/
62-
def algebra.is_integral : Prop :=
62+
protected def algebra.is_integral : Prop :=
6363
(algebra_map R A).is_integral
6464

6565
variables {R A}
@@ -865,7 +865,7 @@ variables [algebra R A] [is_scalar_tower R A B]
865865

866866
/-- If A is an R-algebra all of whose elements are integral over R,
867867
and x is an element of an A-algebra that is integral over A, then x is integral over R.-/
868-
lemma is_integral_trans (A_int : is_integral R A) (x : B) (hx : is_integral A x) :
868+
lemma is_integral_trans (A_int : algebra.is_integral R A) (x : B) (hx : is_integral A x) :
869869
is_integral R x :=
870870
begin
871871
rcases hx with ⟨p, pmonic, hp⟩,
@@ -883,7 +883,8 @@ end
883883
/-- If A is an R-algebra all of whose elements are integral over R,
884884
and B is an A-algebra all of whose elements are integral over A,
885885
then all elements of B are integral over R.-/
886-
lemma algebra.is_integral_trans (hA : is_integral R A) (hB : is_integral A B) : is_integral R B :=
886+
lemma algebra.is_integral_trans (hA : algebra.is_integral R A) (hB : algebra.is_integral A B) :
887+
algebra.is_integral R B :=
887888
λ x, is_integral_trans hA x (hB x)
888889

889890
lemma ring_hom.is_integral_trans (hf : f.is_integral) (hg : g.is_integral) :
@@ -895,8 +896,8 @@ lemma ring_hom.is_integral_trans (hf : f.is_integral) (hg : g.is_integral) :
895896
lemma ring_hom.is_integral_of_surjective (hf : function.surjective f) : f.is_integral :=
896897
λ x, (hf x).rec_on (λ y hy, (hy ▸ f.is_integral_map : f.is_integral_elem x))
897898

898-
lemma is_integral_of_surjective (h : function.surjective (algebra_map R A)) : is_integral R A :=
899-
(algebra_map R A).is_integral_of_surjective h
899+
lemma is_integral_of_surjective (h : function.surjective (algebra_map R A)) :
900+
algebra.is_integral R A := (algebra_map R A).is_integral_of_surjective h
900901

901902
/-- If `R → A → B` is an algebra tower with `A → B` injective,
902903
then if the entire tower is an integral extension so is `R → A` -/
@@ -949,8 +950,8 @@ begin
949950
simpa only [hom_eval₂, eval₂_map] using congr_arg (ideal.quotient.mk I) hpx
950951
end
951952

952-
lemma is_integral_quotient_of_is_integral {I : ideal A} (hRA : is_integral R A) :
953-
is_integral (R ⧸ I.comap (algebra_map R A)) (A ⧸ I) :=
953+
lemma is_integral_quotient_of_is_integral {I : ideal A} (hRA : algebra.is_integral R A) :
954+
algebra.is_integral (R ⧸ I.comap (algebra_map R A)) (A ⧸ I) :=
954955
(algebra_map R A).is_integral_quotient_of_is_integral hRA
955956

956957
lemma is_integral_quotient_map_iff {I : ideal S} :
@@ -967,7 +968,7 @@ end
967968
/-- If the integral extension `R → S` is injective, and `S` is a field, then `R` is also a field. -/
968969
lemma is_field_of_is_integral_of_is_field
969970
{R S : Type*} [comm_ring R] [nontrivial R] [comm_ring S] [is_domain S]
970-
[algebra R S] (H : is_integral R S) (hRS : function.injective (algebra_map R S))
971+
[algebra R S] (H : algebra.is_integral R S) (hRS : function.injective (algebra_map R S))
971972
(hS : is_field S) : is_field R :=
972973
begin
973974
refine ⟨⟨0, 1, zero_ne_one⟩, mul_comm, λ a ha, _⟩,

src/ring_theory/norm.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ variable {K}
191191
section intermediate_field
192192

193193
lemma _root_.intermediate_field.adjoin_simple.norm_gen_eq_one {x : L}
194-
(hx : ¬_root_.is_integral K x) : norm K (adjoin_simple.gen K x) = 1 :=
194+
(hx : ¬is_integral K x) : norm K (adjoin_simple.gen K x) = 1 :=
195195
begin
196196
rw [norm_eq_one_of_not_exists_basis],
197197
contrapose! hx,
@@ -207,9 +207,9 @@ lemma _root_.intermediate_field.adjoin_simple.norm_gen_eq_prod_roots (x : L)
207207
((minpoly K x).map (algebra_map K F)).roots.prod :=
208208
begin
209209
have injKxL := (algebra_map K⟮x⟯ L).injective,
210-
by_cases hx : _root_.is_integral K x, swap,
210+
by_cases hx : is_integral K x, swap,
211211
{ simp [minpoly.eq_zero hx, intermediate_field.adjoin_simple.norm_gen_eq_one hx] },
212-
have hx' : _root_.is_integral K (adjoin_simple.gen K x),
212+
have hx' : is_integral K (adjoin_simple.gen K x),
213213
{ rwa [← is_integral_algebra_map_iff injKxL, adjoin_simple.algebra_map_gen],
214214
apply_instance },
215215
rw [← adjoin.power_basis_gen hx, power_basis.norm_gen_eq_prod_roots];
@@ -297,10 +297,10 @@ begin
297297
end
298298

299299
lemma is_integral_norm [algebra R L] [algebra R K] [is_scalar_tower R K L]
300-
[is_separable K L] [finite_dimensional K L] {x : L} (hx : _root_.is_integral R x) :
301-
_root_.is_integral R (norm K x) :=
300+
[is_separable K L] [finite_dimensional K L] {x : L} (hx : is_integral R x) :
301+
is_integral R (norm K x) :=
302302
begin
303-
have hx' : _root_.is_integral K x := is_integral_of_is_scalar_tower hx,
303+
have hx' : is_integral K x := is_integral_of_is_scalar_tower hx,
304304
rw [← is_integral_algebra_map_iff (algebra_map K (algebraic_closure L)).injective,
305305
norm_eq_prod_roots],
306306
{ refine (is_integral.multiset_prod (λ y hy, _)).pow _,

src/ring_theory/trace.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,10 @@ variables [algebra R L] [algebra L F] [algebra R F] [is_scalar_tower R L F]
283283

284284
open polynomial
285285

286-
lemma algebra.is_integral_trace [finite_dimensional L F] {x : F} (hx : _root_.is_integral R x) :
287-
_root_.is_integral R (algebra.trace L F x) :=
286+
lemma algebra.is_integral_trace [finite_dimensional L F] {x : F} (hx : is_integral R x) :
287+
is_integral R (algebra.trace L F x) :=
288288
begin
289-
have hx' : _root_.is_integral L x := is_integral_of_is_scalar_tower hx,
289+
have hx' : is_integral L x := is_integral_of_is_scalar_tower hx,
290290
rw [← is_integral_algebra_map_iff (algebra_map L (algebraic_closure F)).injective,
291291
trace_eq_sum_roots],
292292
{ refine (is_integral.multiset_sum _).nsmul _,

0 commit comments

Comments
 (0)