ring_theory.polynomial.eisenstein.is_integral
β·
Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -101,7 +101,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [zero_add, pow_one] at hi β’
exact (cyclotomic_comp_X_add_one_isEisensteinAt p).Mem hi
Β· intro i hi
- rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd, β
+ rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.intCast_zmod_eq_zero_iff_dvd, β
Int.coe_castRingHom, β coeff_map, map_comp, map_cyclotomic, Polynomial.map_add, map_X,
Polynomial.map_one, pow_add, pow_one, cyclotomic_mul_prime_dvd_eq_pow, pow_comp, β
ZMod.expand_card, coeff_expand hp.out.pos]
@@ -113,7 +113,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [hk, pow_succ', mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
- rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
+ rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.intCast_zmod_eq_zero_iff_dvd,
β Int.coe_castRingHom, β coeff_map] at hn
simpa [map_comp] using hn
Β· exact β¨p ^ n, by rw [pow_succ']β©
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -68,13 +68,13 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
nat_degree_cyclotomic, Nat.totient_prime hp.out] at hi
simp only [hi.trans_le (Nat.sub_le _ _), sum_ite_eq', mem_range, if_true,
- Ideal.submodule_span_eq, Ideal.mem_span_singleton, Int.coe_nat_dvd]
+ Ideal.submodule_span_eq, Ideal.mem_span_singleton, Int.natCast_dvd_natCast]
exact hp.out.dvd_choose_self i.succ_ne_zero (lt_tsub_iff_right.1 hi)
Β· rw [coeff_zero_eq_eval_zero, eval_comp, cyclotomic_prime, eval_add, eval_X, eval_one, zero_add,
eval_geom_sum, one_geom_sum, Ideal.submodule_span_eq, Ideal.span_singleton_pow,
Ideal.mem_span_singleton]
intro h
- obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
+ obtain β¨k, hkβ© := Int.natCast_dvd_natCast.1 h
rw [β mul_assoc, mul_one, mul_assoc] at hk
nth_rw 1 [β Nat.mul_one p] at hk
rw [mul_right_inj' hp.out.ne_zero] at hk
@@ -110,20 +110,20 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
nat_degree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _),
Nat.add_one_sub_one] at hn hi
- rw [hk, pow_succ, mul_assoc] at hi
+ rw [hk, pow_succ', mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
β Int.coe_castRingHom, β coeff_map] at hn
simpa [map_comp] using hn
- Β· exact β¨p ^ n, by rw [pow_succ]β©
+ Β· exact β¨p ^ n, by rw [pow_succ']β©
Β· rw [coeff_zero_eq_eval_zero, eval_comp, cyclotomic_prime_pow_eq_geom_sum hp.out, eval_add,
eval_X, eval_one, zero_add, eval_finset_sum]
simp only [eval_pow, eval_X, one_pow, sum_const, card_range, Nat.smul_one_eq_coe,
submodule_span_eq, Ideal.submodule_span_eq, Ideal.span_singleton_pow,
Ideal.mem_span_singleton]
intro h
- obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
+ obtain β¨k, hkβ© := Int.natCast_dvd_natCast.1 h
rw [β mul_assoc, mul_one, mul_assoc] at hk
nth_rw 1 [β Nat.mul_one p] at hk
rw [mul_right_inj' hp.out.ne_zero] at hk
@@ -424,7 +424,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBa
z β adjoin R ({B.gen} : Set L) := by
induction' n with n hn
Β· simpa using hz
- Β· rw [pow_succ, mul_smul] at hz
+ Β· rw [pow_succ', mul_smul] at hz
exact
hn
(mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (IsIntegral.smul _ hzint)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -56,7 +56,7 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
(fun i hi => _) _
Β· rw [show (X + 1 : β€[X]) = X + C 1 by simp]
refine' (cyclotomic.monic p β€).comp (monic_X_add_C 1) fun h => _
- rw [nat_degree_X_add_C] at h
+ rw [nat_degree_X_add_C] at h
exact zero_ne_one h.symm
Β· rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, β lcoeff_apply, map_sum]
conv =>
@@ -66,7 +66,7 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
ext
rw [lcoeff_apply, β C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
- nat_degree_cyclotomic, Nat.totient_prime hp.out] at hi
+ nat_degree_cyclotomic, Nat.totient_prime hp.out] at hi
simp only [hi.trans_le (Nat.sub_le _ _), sum_ite_eq', mem_range, if_true,
Ideal.submodule_span_eq, Ideal.mem_span_singleton, Int.coe_nat_dvd]
exact hp.out.dvd_choose_self i.succ_ne_zero (lt_tsub_iff_right.1 hi)
@@ -75,9 +75,9 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
Ideal.mem_span_singleton]
intro h
obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
- rw [β mul_assoc, mul_one, mul_assoc] at hk
- nth_rw 1 [β Nat.mul_one p] at hk
- rw [mul_right_inj' hp.out.ne_zero] at hk
+ rw [β mul_assoc, mul_one, mul_assoc] at hk
+ nth_rw 1 [β Nat.mul_one p] at hk
+ rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_X_add_one_isEisensteinAt
-/
@@ -94,7 +94,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
_ _
Β· rw [show (X + 1 : β€[X]) = X + C 1 by simp]
refine' (cyclotomic.monic _ β€).comp (monic_X_add_C 1) fun h => _
- rw [nat_degree_X_add_C] at h
+ rw [nat_degree_X_add_C] at h
exact zero_ne_one h.symm
Β· induction' n with n hn
Β· intro i hi
@@ -109,12 +109,12 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rintro β¨k, hkβ©
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
nat_degree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _),
- Nat.add_one_sub_one] at hn hi
- rw [hk, pow_succ, mul_assoc] at hi
+ Nat.add_one_sub_one] at hn hi
+ rw [hk, pow_succ, mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
- β Int.coe_castRingHom, β coeff_map] at hn
+ β Int.coe_castRingHom, β coeff_map] at hn
simpa [map_comp] using hn
Β· exact β¨p ^ n, by rw [pow_succ]β©
Β· rw [coeff_zero_eq_eval_zero, eval_comp, cyclotomic_prime_pow_eq_geom_sum hp.out, eval_add,
@@ -124,9 +124,9 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
Ideal.mem_span_singleton]
intro h
obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
- rw [β mul_assoc, mul_one, mul_assoc] at hk
- nth_rw 1 [β Nat.mul_one p] at hk
- rw [mul_right_inj' hp.out.ne_zero] at hk
+ rw [β mul_assoc, mul_one, mul_assoc] at hk
+ nth_rw 1 [β Nat.mul_one p] at hk
+ rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt
-/
@@ -166,7 +166,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
choose! f hf using
hei.is_weakly_eisenstein_at.exists_mem_adjoin_mul_eq_pow_nat_degree_le (minpoly.aeval R B.gen)
(minpoly.monic hBint)
- simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
+ simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
-- The Eisenstein condition shows that `p` divides `Q.coeff 0`
-- if `p^n.succ` divides the following multiple of `Q.coeff 0^n.succ`:
suffices p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).coeff 0 ^ n)
@@ -181,7 +181,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
have aux : β i β (range (Q.nat_degree + 1)).eraseβ 0, B.dim β€ i + n :=
by
intro i hi
- simp only [mem_range, mem_erase] at hi
+ simp only [mem_range, mem_erase] at hi
rw [hn]
exact le_add_pred_of_pos _ hi.1
have hintsum :
@@ -245,13 +245,13 @@ theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [Co
(hQ : β i β range (Q.natDegree + 1), p β£ Q.coeff i) (hz : aeval x Q = p β’ z) :
z β adjoin A ({x} : Set B) := by
choose! f hf using hQ
- rw [aeval_eq_sum_range, sum_range] at hz
+ rw [aeval_eq_sum_range, sum_range] at hz
conv_lhs at hz =>
congr
skip
ext
rw [hf i (mem_range.2 (Fin.is_lt i)), β smul_smul]
- rw [β smul_sum] at hz
+ rw [β smul_sum] at hz
rw [β smul_right_injective _ hp hz]
exact
Subalgebra.sum_mem _ fun _ _ =>
@@ -279,14 +279,14 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
let Pβ := P.map (algebraMap R L)
-- There is a polynomial `Q` such that `p β’ z = aeval B.gen Q`. We can assume that
-- `Q.degree < P.degree` and `Q β 0`.
- rw [adjoin_singleton_eq_range_aeval] at hz
+ rw [adjoin_singleton_eq_range_aeval] at hz
obtain β¨Qβ, hQβ© := hz
set Q := Qβ %β P with hQβ
replace hQ : aeval B.gen Q = p β’ z
- Β· rw [β mod_by_monic_add_div Qβ (minpoly.monic hBint)] at hQ
+ Β· rw [β mod_by_monic_add_div Qβ (minpoly.monic hBint)] at hQ
simpa using hQ
by_cases hQzero : Q = 0
- Β· simp only [hQzero, Algebra.smul_def, zero_eq_mul, aeval_zero] at hQ
+ Β· simp only [hQzero, Algebra.smul_def, zero_eq_mul, aeval_zero] at hQ
cases' hQ with H Hβ
Β· have : Function.Injective (algebraMap R L) :=
by
@@ -307,14 +307,14 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
exact n
-- Two technical results we will need about `P.nat_degree` and `Q.nat_degree`.
have H := degree_mod_by_monic_lt Qβ (minpoly.monic hBint)
- rw [β hQβ, β hP] at H
+ rw [β hQβ, β hP] at H
replace H :=
Nat.lt_iff_add_one_le.1
(lt_of_lt_of_le
(lt_of_le_of_lt (Nat.lt_iff_add_one_le.1 (Nat.lt_of_succ_lt_succ (mem_range.1 hj)))
(lt_succ_self _))
(Nat.lt_iff_add_one_le.1 ((nat_degree_lt_nat_degree_iff hQzero).2 H)))
- rw [add_assoc] at H
+ rw [add_assoc] at H
have Hj : Q.nat_degree + 1 = j + 1 + (Q.nat_degree - j) := by
rw [β add_comm 1, β add_comm 1, add_assoc, add_right_inj, β
Nat.add_sub_assoc (Nat.lt_of_succ_lt_succ (mem_range.1 hj)).le, add_comm,
@@ -347,7 +347,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
rw [(minpoly.monic hBint).natDegree_map, add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
Β· exact Nat.zero_le _
Β· refine' one_le_iff_ne_zero.2 fun h => _
- rw [h] at hk
+ rw [h] at hk
simpa using hk
Β· infer_instance
-- The Eisenstein condition shows that `p` divides `Q.coeff j`
@@ -366,15 +366,15 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
-- Using `hQ : aeval B.gen Q = p β’ z`, we write `p β’ z` as a sum of terms of degree less than
-- `j+1`, that are multiples of `p` by induction, and terms of degree at least `j+1`.
rw [aeval_eq_sum_range, Hj, range_add, sum_union (disjoint_range_add_left_embedding _ _),
- sum_congr rfl hg, add_comm] at hQ
+ sum_congr rfl hg, add_comm] at hQ
-- We multiply this equality by `B.gen ^ (P.nat_degree-(j+2))`, so we can use `hfβ` on the terms
-- we didn't know were multiples of `p`, and we take the norm on both sides.
replace hQ := congr_arg (fun x => x * B.gen ^ (P.nat_degree - (j + 2))) hQ
- simp_rw [sum_map, addLeftEmbedding_apply, add_mul, sum_mul, mul_assoc] at hQ
+ simp_rw [sum_map, addLeftEmbedding_apply, add_mul, sum_mul, mul_assoc] at hQ
rw [β
insert_erase (mem_range.2 (tsub_pos_iff_lt.2 <| Nat.lt_of_succ_lt_succ <| mem_range.1 hj)),
sum_insert (not_mem_erase 0 _), add_zero, sum_congr rfl hfβ, β mul_sum, β mul_sum, add_assoc,
- β mul_add, smul_mul_assoc, β pow_add, Algebra.smul_def] at hQ
+ β mul_add, smul_mul_assoc, β pow_add, Algebra.smul_def] at hQ
replace hQ := congr_arg (norm K) (eq_sub_of_add_eq hQ)
-- We obtain an equality of elements of `K`, but everything is integral, so we can move to `R`
-- and simplify `hQ`.
@@ -395,7 +395,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
rw [add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
Β· exact zero_le _
Β· refine' one_le_iff_ne_zero.2 fun h => _
- rw [h] at hk
+ rw [h] at hk
simpa using hk
obtain β¨r, hrβ© := is_integral_iff.1 (is_integral_norm K hintsum)
rw [Algebra.smul_def, mul_assoc, β mul_sub, _root_.map_mul, algebraMap_apply R K L, map_pow,
@@ -403,12 +403,12 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
finrank B, β hr, power_basis.norm_gen_eq_coeff_zero_minpoly,
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, coeff_map,
show (-1 : K) = algebraMap R K (-1) by simp, β map_pow, β map_pow, β _root_.map_mul, β
- map_pow, β _root_.map_mul, β map_pow, β _root_.map_mul] at hQ
+ map_pow, β _root_.map_mul, β map_pow, β _root_.map_mul] at hQ
-- We can now finish the proof.
have hppdiv : p ^ B.dim β£ p ^ B.dim * r := dvd_mul_of_dvd_left dvd_rfl _
rwa [β IsFractionRing.injective R K hQ, mul_comm, β Units.coe_neg_one, mul_pow, β
Units.val_pow_eq_pow_val, β Units.val_pow_eq_pow_val, mul_assoc,
- IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
+ IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt
-/
@@ -424,7 +424,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBa
z β adjoin R ({B.gen} : Set L) := by
induction' n with n hn
Β· simpa using hz
- Β· rw [pow_succ, mul_smul] at hz
+ Β· rw [pow_succ, mul_smul] at hz
exact
hn
(mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (IsIntegral.smul _ hzint)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -108,8 +108,8 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
Β· simp only [ite_eq_right_iff]
rintro β¨k, hkβ©
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
- nat_degree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _), Nat.succ_sub_one] at
- hn hi
+ nat_degree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _),
+ Nat.add_one_sub_one] at hn hi
rw [hk, pow_succ, mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
@@ -189,8 +189,8 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
(z * B.gen ^ n - β x : β in (range (Q.nat_degree + 1)).eraseβ 0, Q.coeff x β’ f (x + n)) :=
by
refine'
- isIntegral_sub (isIntegral_mul hzint (IsIntegral.pow hBint _))
- (IsIntegral.sum _ fun i hi => isIntegral_smul _ _)
+ IsIntegral.sub (IsIntegral.mul hzint (IsIntegral.pow hBint _))
+ (IsIntegral.sum _ fun i hi => IsIntegral.smul _ _)
exact adjoin_le_integralClosure hBint (hf _ (aux i hi)).1
obtain β¨r, hrβ© := is_integral_iff.1 (is_integral_norm K hintsum)
use r
@@ -386,10 +386,10 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
β x : β in range (j + 1), g x β’ B.gen ^ x * B.gen ^ (P.nat_degree - (j + 2)))) :=
by
refine'
- isIntegral_sub (isIntegral_mul hzint (IsIntegral.pow hBint _))
- (isIntegral_add (IsIntegral.sum _ fun k hk => isIntegral_smul _ _)
+ IsIntegral.sub (IsIntegral.mul hzint (IsIntegral.pow hBint _))
+ (IsIntegral.add (IsIntegral.sum _ fun k hk => IsIntegral.smul _ _)
(IsIntegral.sum _ fun k hk =>
- isIntegral_mul (isIntegral_smul _ (IsIntegral.pow hBint _)) (IsIntegral.pow hBint _)))
+ IsIntegral.mul (IsIntegral.smul _ (IsIntegral.pow hBint _)) (IsIntegral.pow hBint _)))
refine' adjoin_le_integralClosure hBint (hf _ _).1
rw [(minpoly.monic hBint).natDegree_map (algebraMap R L)]
rw [add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
@@ -427,7 +427,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBa
Β· rw [pow_succ, mul_smul] at hz
exact
hn
- (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (isIntegral_smul _ hzint)
+ (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (IsIntegral.smul _ hzint)
hz hei)
#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -58,7 +58,7 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
refine' (cyclotomic.monic p β€).comp (monic_X_add_C 1) fun h => _
rw [nat_degree_X_add_C] at h
exact zero_ne_one h.symm
- Β· rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, β lcoeff_apply, LinearMap.map_sum]
+ Β· rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, β lcoeff_apply, map_sum]
conv =>
congr
congr
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,10 +3,10 @@ Copyright (c) 2022 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-/
-import Mathbin.Data.Nat.Choose.Dvd
-import Mathbin.RingTheory.IntegrallyClosed
-import Mathbin.RingTheory.Norm
-import Mathbin.RingTheory.Polynomial.Cyclotomic.Expand
+import Data.Nat.Choose.Dvd
+import RingTheory.IntegrallyClosed
+import RingTheory.Norm
+import RingTheory.Polynomial.Cyclotomic.Expand
#align_import ring_theory.polynomial.eisenstein.is_integral from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,17 +2,14 @@
Copyright (c) 2022 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-
-! This file was ported from Lean 3 source module ring_theory.polynomial.eisenstein.is_integral
-! leanprover-community/mathlib commit e8e130de9dba4ed6897183c3193c752ffadbcc77
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Nat.Choose.Dvd
import Mathbin.RingTheory.IntegrallyClosed
import Mathbin.RingTheory.Norm
import Mathbin.RingTheory.Polynomial.Cyclotomic.Expand
+#align_import ring_theory.polynomial.eisenstein.is_integral from "leanprover-community/mathlib"@"e8e130de9dba4ed6897183c3193c752ffadbcc77"
+
/-!
# Eisenstein polynomials
mathlib commit https://github.com/leanprover-community/mathlib/commit/fdc286cc6967a012f41b87f76dcd2797b53152af
@@ -47,8 +47,8 @@ local notation "π" => Submodule.span β€ {p}
open Polynomial
-#print cyclotomic_comp_x_add_one_isEisensteinAt /-
-theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
+#print cyclotomic_comp_X_add_one_isEisensteinAt /-
+theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
((cyclotomic p β€).comp (X + 1)).IsEisensteinAt π :=
by
refine'
@@ -82,11 +82,11 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
nth_rw 1 [β Nat.mul_one p] at hk
rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
-#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_x_add_one_isEisensteinAt
+#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_X_add_one_isEisensteinAt
-/
-#print cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt /-
-theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
+#print cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt /-
+theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
((cyclotomic (p ^ (n + 1)) β€).comp (X + 1)).IsEisensteinAt π :=
by
refine'
@@ -102,7 +102,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
Β· induction' n with n hn
Β· intro i hi
rw [zero_add, pow_one] at hi β’
- exact (cyclotomic_comp_x_add_one_isEisensteinAt p).Mem hi
+ exact (cyclotomic_comp_X_add_one_isEisensteinAt p).Mem hi
Β· intro i hi
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd, β
Int.coe_castRingHom, β coeff_map, map_comp, map_cyclotomic, Polynomial.map_add, map_X,
@@ -131,7 +131,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
nth_rw 1 [β Nat.mul_one p] at hk
rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
-#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt
+#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt
-/
end Cyclotomic
@@ -148,12 +148,12 @@ local notation "π" => Submodule.span R {p}
open IsIntegrallyClosed PowerBasis Nat Polynomial IsScalarTower
-#print dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at /-
+#print dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt /-
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `Q : R[X]` is such that
`aeval B.gen Q = p β’ z`, then `p β£ Q.coeff 0`. -/
-theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
+theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p β’ z)
(hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.coeff 0 :=
by
@@ -239,7 +239,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
Β· rw [aeval_eq_sum_range,
Finset.add_sum_erase (range (Q.nat_degree + 1)) fun i => Q.coeff i β’ B.gen ^ i]
simp
-#align dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at
+#align dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt
-/
#print mem_adjoin_of_dvd_coeff_of_dvd_aeval /-
@@ -262,13 +262,13 @@ theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [Co
#align mem_adjoin_of_dvd_coeff_of_dvd_aeval mem_adjoin_of_dvd_coeff_of_dvd_aeval
-/
-#print mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at /-
+#print mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt /-
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p β’ z β adjoin R {B.gen}`, then
`z β adjoin R {B.gen}`. -/
-theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
- (hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} (hzint : IsIntegral R z)
+theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L} (hp : Prime p)
+ (hBint : IsIntegral R B.gen) {z : L} (hzint : IsIntegral R z)
(hz : p β’ z β adjoin R ({B.gen} : Set L)) (hei : (minpoly R B.gen).IsEisensteinAt π) :
z β adjoin R ({B.gen} : Set L) :=
by
@@ -304,7 +304,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
refine' mem_adjoin_of_dvd_coeff_of_dvd_aeval hp.ne_zero (fun i => _) hQ
refine' Nat.case_strong_induction_on i _ fun j hind => _
Β· intro H
- exact dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at hp hBint hQ hzint hei
+ exact dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt hp hBint hQ hzint hei
Β· intro hj
refine' hp.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd _ hndiv
exact n
@@ -412,16 +412,16 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
rwa [β IsFractionRing.injective R K hQ, mul_comm, β Units.coe_neg_one, mul_pow, β
Units.val_pow_eq_pow_val, β Units.val_pow_eq_pow_val, mul_assoc,
IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
-#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at
+#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt
-/
-#print mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at /-
+#print mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt /-
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p ^ n β’ z β adjoin R {B.gen}`,
then `z β adjoin R {B.gen}`. Together with `algebra.discr_mul_is_integral_mem_adjoin` this result
often allows to compute the ring of integers of `L`. -/
-theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
+theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {n : β} {z : L} (hzint : IsIntegral R z)
(hz : p ^ n β’ z β adjoin R ({B.gen} : Set L)) (hei : (minpoly R B.gen).IsEisensteinAt π) :
z β adjoin R ({B.gen} : Set L) := by
@@ -430,9 +430,9 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at {B : Powe
Β· rw [pow_succ, mul_smul] at hz
exact
hn
- (mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at hp hBint
- (isIntegral_smul _ hzint) hz hei)
-#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at
+ (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (isIntegral_smul _ hzint)
+ hz hei)
+#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt
-/
end IsIntegral
mathlib commit https://github.com/leanprover-community/mathlib/commit/6285167a053ad0990fc88e56c48ccd9fae6550eb
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module ring_theory.polynomial.eisenstein.is_integral
-! leanprover-community/mathlib commit 5bfbcca0a7ffdd21cf1682e59106d6c942434a32
+! leanprover-community/mathlib commit e8e130de9dba4ed6897183c3193c752ffadbcc77
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.RingTheory.Polynomial.Cyclotomic.Expand
/-!
# Eisenstein polynomials
+
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
In this file we gather more miscellaneous results about Eisenstein polynomials
## Main results
mathlib commit https://github.com/leanprover-community/mathlib/commit/f2ad3645af9effcdb587637dc28a6074edc813f9
@@ -44,6 +44,7 @@ local notation "π" => Submodule.span β€ {p}
open Polynomial
+#print cyclotomic_comp_x_add_one_isEisensteinAt /-
theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
((cyclotomic p β€).comp (X + 1)).IsEisensteinAt π :=
by
@@ -79,7 +80,9 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_x_add_one_isEisensteinAt
+-/
+#print cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt /-
theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
((cyclotomic (p ^ (n + 1)) β€).comp (X + 1)).IsEisensteinAt π :=
by
@@ -126,6 +129,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt
+-/
end Cyclotomic
@@ -141,6 +145,7 @@ local notation "π" => Submodule.span R {p}
open IsIntegrallyClosed PowerBasis Nat Polynomial IsScalarTower
+#print dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at /-
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `Q : R[X]` is such that
@@ -232,7 +237,9 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
Finset.add_sum_erase (range (Q.nat_degree + 1)) fun i => Q.coeff i β’ B.gen ^ i]
simp
#align dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at
+-/
+#print mem_adjoin_of_dvd_coeff_of_dvd_aeval /-
theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [CommRing B]
[Algebra A B] [NoZeroSMulDivisors A B] {Q : A[X]} {p : A} {x z : B} (hp : p β 0)
(hQ : β i β range (Q.natDegree + 1), p β£ Q.coeff i) (hz : aeval x Q = p β’ z) :
@@ -250,7 +257,9 @@ theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [Co
Subalgebra.sum_mem _ fun _ _ =>
Subalgebra.smul_mem _ (Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton _)) _) _
#align mem_adjoin_of_dvd_coeff_of_dvd_aeval mem_adjoin_of_dvd_coeff_of_dvd_aeval
+-/
+#print mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at /-
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p β’ z β adjoin R {B.gen}`, then
@@ -401,7 +410,9 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
Units.val_pow_eq_pow_val, β Units.val_pow_eq_pow_val, mul_assoc,
IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at
+-/
+#print mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at /-
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p ^ n β’ z β adjoin R {B.gen}`,
@@ -419,6 +430,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at {B : Powe
(mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at hp hBint
(isIntegral_smul _ hzint) hz hei)
#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at
+-/
end IsIntegral
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -40,7 +40,6 @@ section Cyclotomic
variable (p : β)
--- mathport name: exprπ
local notation "π" => Submodule.span β€ {p}
open Polynomial
@@ -138,7 +137,6 @@ variable [Algebra K L] [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSepa
variable [IsDomain R] [IsFractionRing R K] [IsIntegrallyClosed R]
--- mathport name: exprπ
local notation "π" => Submodule.span R {p}
open IsIntegrallyClosed PowerBasis Nat Polynomial IsScalarTower
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -374,8 +374,8 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
have hintsum :
IsIntegral R
(z * B.gen ^ (P.nat_degree - (j + 2)) -
- ((β x : β in (range (Q.nat_degree - j)).eraseβ 0,
- Q.coeff (j + 1 + x) β’ f (x + P.nat_degree - 1)) +
+ (β x : β in (range (Q.nat_degree - j)).eraseβ 0,
+ Q.coeff (j + 1 + x) β’ f (x + P.nat_degree - 1) +
β x : β in range (j + 1), g x β’ B.gen ^ x * B.gen ^ (P.nat_degree - (j + 2)))) :=
by
refine'
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -203,7 +203,6 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
β x : β in (range (Q.nat_degree + 1)).eraseβ 0, p β’ Q.coeff x β’ f (x + n)) :=
(congr_arg (norm K) (eq_sub_of_add_eq _))
_ = _ := _
-
Β· simp only [Algebra.smul_def, algebraMap_apply R K L, Algebra.norm_algebraMap, _root_.map_mul,
_root_.map_pow, finrank_K_L, power_basis.norm_gen_eq_coeff_zero_minpoly,
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, coeff_map, β hn]
@@ -224,7 +223,6 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
by rw [pow_zero]
_ = aeval B.gen Q * B.gen ^ n := _
_ = _ := by rw [hQ, Algebra.smul_mul_assoc]
-
Β· have :
β i β (range (Q.nat_degree + 1)).eraseβ 0,
Q.coeff i β’ (B.gen ^ i * B.gen ^ n) = p β’ Q.coeff i β’ f (i + n) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -171,7 +171,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
refine' Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd hp (_ : _ ^ n.succ β£ _) hndiv
- convert(IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
+ convert (IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
push_cast
ring_nf; simp [pow_right_comm _ _ 2]
-- We claim the quotient of `Q^n * _` by `p^n` is the following `r`:
mathlib commit https://github.com/leanprover-community/mathlib/commit/34ebaffc1d1e8e783fc05438ec2e70af87275ac9
@@ -149,7 +149,7 @@ extension of `K`, generated by an integral power basis `B` such that the minimal
`aeval B.gen Q = p β’ z`, then `p β£ Q.coeff 0`. -/
theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p β’ z)
- (hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.Coeff 0 :=
+ (hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.coeff 0 :=
by
-- First define some abbreviations.
letI := B.finite_dimensional
@@ -166,9 +166,9 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
-- The Eisenstein condition shows that `p` divides `Q.coeff 0`
-- if `p^n.succ` divides the following multiple of `Q.coeff 0^n.succ`:
- suffices p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).Coeff 0 ^ n)
+ suffices p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).coeff 0 ^ n)
by
- have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).Coeff 0 := fun h =>
+ have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
refine' Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd hp (_ : _ ^ n.succ β£ _) hndiv
convert(IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
@@ -239,7 +239,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [CommRing B]
[Algebra A B] [NoZeroSMulDivisors A B] {Q : A[X]} {p : A} {x z : B} (hp : p β 0)
- (hQ : β i β range (Q.natDegree + 1), p β£ Q.Coeff i) (hz : aeval x Q = p β’ z) :
+ (hQ : β i β range (Q.natDegree + 1), p β£ Q.coeff i) (hz : aeval x Q = p β’ z) :
z β adjoin A ({x} : Set B) := by
choose! f hf using hQ
rw [aeval_eq_sum_range, sum_range] at hz
@@ -265,7 +265,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
z β adjoin R ({B.gen} : Set L) :=
by
-- First define some abbreviations.
- have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).Coeff 0 := fun h =>
+ have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
letI := FiniteDimensional B
set P := minpoly R B.gen with hP
@@ -349,7 +349,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
-- if `p^n.succ` divides the following multiple of `Q.coeff (succ j)^n.succ`:
suffices
p ^ n.succ β£
- Q.coeff (succ j) ^ n.succ * (minpoly R B.gen).Coeff 0 ^ (succ j + (P.nat_degree - (j + 2)))
+ Q.coeff (succ j) ^ n.succ * (minpoly R B.gen).coeff 0 ^ (succ j + (P.nat_degree - (j + 2)))
by
convert this
rw [Nat.succ_eq_add_one, add_assoc, β Nat.add_sub_assoc H, β add_assoc, add_comm (j + 1),
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -56,7 +56,7 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
(fun i hi => _) _
Β· rw [show (X + 1 : β€[X]) = X + C 1 by simp]
refine' (cyclotomic.monic p β€).comp (monic_X_add_C 1) fun h => _
- rw [nat_degree_X_add_C] at h
+ rw [nat_degree_X_add_C] at h
exact zero_ne_one h.symm
Β· rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, β lcoeff_apply, LinearMap.map_sum]
conv =>
@@ -66,7 +66,7 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
ext
rw [lcoeff_apply, β C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
- nat_degree_cyclotomic, Nat.totient_prime hp.out] at hi
+ nat_degree_cyclotomic, Nat.totient_prime hp.out] at hi
simp only [hi.trans_le (Nat.sub_le _ _), sum_ite_eq', mem_range, if_true,
Ideal.submodule_span_eq, Ideal.mem_span_singleton, Int.coe_nat_dvd]
exact hp.out.dvd_choose_self i.succ_ne_zero (lt_tsub_iff_right.1 hi)
@@ -75,9 +75,9 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
Ideal.mem_span_singleton]
intro h
obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
- rw [β mul_assoc, mul_one, mul_assoc] at hk
- nth_rw 1 [β Nat.mul_one p] at hk
- rw [mul_right_inj' hp.out.ne_zero] at hk
+ rw [β mul_assoc, mul_one, mul_assoc] at hk
+ nth_rw 1 [β Nat.mul_one p] at hk
+ rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_x_add_one_isEisensteinAt
@@ -92,11 +92,11 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
_ _
Β· rw [show (X + 1 : β€[X]) = X + C 1 by simp]
refine' (cyclotomic.monic _ β€).comp (monic_X_add_C 1) fun h => _
- rw [nat_degree_X_add_C] at h
+ rw [nat_degree_X_add_C] at h
exact zero_ne_one h.symm
Β· induction' n with n hn
Β· intro i hi
- rw [zero_add, pow_one] at hiβ’
+ rw [zero_add, pow_one] at hi β’
exact (cyclotomic_comp_x_add_one_isEisensteinAt p).Mem hi
Β· intro i hi
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd, β
@@ -107,12 +107,12 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
rintro β¨k, hkβ©
rw [nat_degree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, nat_degree_X_add_C, mul_one,
nat_degree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _), Nat.succ_sub_one] at
- hn hi
- rw [hk, pow_succ, mul_assoc] at hi
+ hn hi
+ rw [hk, pow_succ, mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
- β Int.coe_castRingHom, β coeff_map] at hn
+ β Int.coe_castRingHom, β coeff_map] at hn
simpa [map_comp] using hn
Β· exact β¨p ^ n, by rw [pow_succ]β©
Β· rw [coeff_zero_eq_eval_zero, eval_comp, cyclotomic_prime_pow_eq_geom_sum hp.out, eval_add,
@@ -122,9 +122,9 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
Ideal.mem_span_singleton]
intro h
obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
- rw [β mul_assoc, mul_one, mul_assoc] at hk
- nth_rw 1 [β Nat.mul_one p] at hk
- rw [mul_right_inj' hp.out.ne_zero] at hk
+ rw [β mul_assoc, mul_one, mul_assoc] at hk
+ nth_rw 1 [β Nat.mul_one p] at hk
+ rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt
@@ -163,7 +163,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
choose! f hf using
hei.is_weakly_eisenstein_at.exists_mem_adjoin_mul_eq_pow_nat_degree_le (minpoly.aeval R B.gen)
(minpoly.monic hBint)
- simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
+ simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
-- The Eisenstein condition shows that `p` divides `Q.coeff 0`
-- if `p^n.succ` divides the following multiple of `Q.coeff 0^n.succ`:
suffices p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).Coeff 0 ^ n)
@@ -178,7 +178,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
have aux : β i β (range (Q.nat_degree + 1)).eraseβ 0, B.dim β€ i + n :=
by
intro i hi
- simp only [mem_range, mem_erase] at hi
+ simp only [mem_range, mem_erase] at hi
rw [hn]
exact le_add_pred_of_pos _ hi.1
have hintsum :
@@ -242,13 +242,13 @@ theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [Co
(hQ : β i β range (Q.natDegree + 1), p β£ Q.Coeff i) (hz : aeval x Q = p β’ z) :
z β adjoin A ({x} : Set B) := by
choose! f hf using hQ
- rw [aeval_eq_sum_range, sum_range] at hz
+ rw [aeval_eq_sum_range, sum_range] at hz
conv_lhs at hz =>
congr
skip
ext
rw [hf i (mem_range.2 (Fin.is_lt i)), β smul_smul]
- rw [β smul_sum] at hz
+ rw [β smul_sum] at hz
rw [β smul_right_injective _ hp hz]
exact
Subalgebra.sum_mem _ fun _ _ =>
@@ -274,14 +274,14 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
let Pβ := P.map (algebraMap R L)
-- There is a polynomial `Q` such that `p β’ z = aeval B.gen Q`. We can assume that
-- `Q.degree < P.degree` and `Q β 0`.
- rw [adjoin_singleton_eq_range_aeval] at hz
+ rw [adjoin_singleton_eq_range_aeval] at hz
obtain β¨Qβ, hQβ© := hz
set Q := Qβ %β P with hQβ
replace hQ : aeval B.gen Q = p β’ z
- Β· rw [β mod_by_monic_add_div Qβ (minpoly.monic hBint)] at hQ
+ Β· rw [β mod_by_monic_add_div Qβ (minpoly.monic hBint)] at hQ
simpa using hQ
by_cases hQzero : Q = 0
- Β· simp only [hQzero, Algebra.smul_def, zero_eq_mul, aeval_zero] at hQ
+ Β· simp only [hQzero, Algebra.smul_def, zero_eq_mul, aeval_zero] at hQ
cases' hQ with H Hβ
Β· have : Function.Injective (algebraMap R L) :=
by
@@ -302,14 +302,14 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
exact n
-- Two technical results we will need about `P.nat_degree` and `Q.nat_degree`.
have H := degree_mod_by_monic_lt Qβ (minpoly.monic hBint)
- rw [β hQβ, β hP] at H
+ rw [β hQβ, β hP] at H
replace H :=
Nat.lt_iff_add_one_le.1
(lt_of_lt_of_le
(lt_of_le_of_lt (Nat.lt_iff_add_one_le.1 (Nat.lt_of_succ_lt_succ (mem_range.1 hj)))
(lt_succ_self _))
(Nat.lt_iff_add_one_le.1 ((nat_degree_lt_nat_degree_iff hQzero).2 H)))
- rw [add_assoc] at H
+ rw [add_assoc] at H
have Hj : Q.nat_degree + 1 = j + 1 + (Q.nat_degree - j) := by
rw [β add_comm 1, β add_comm 1, add_assoc, add_right_inj, β
Nat.add_sub_assoc (Nat.lt_of_succ_lt_succ (mem_range.1 hj)).le, add_comm,
@@ -342,7 +342,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
rw [(minpoly.monic hBint).natDegree_map, add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
Β· exact Nat.zero_le _
Β· refine' one_le_iff_ne_zero.2 fun h => _
- rw [h] at hk
+ rw [h] at hk
simpa using hk
Β· infer_instance
-- The Eisenstein condition shows that `p` divides `Q.coeff j`
@@ -361,15 +361,15 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
-- Using `hQ : aeval B.gen Q = p β’ z`, we write `p β’ z` as a sum of terms of degree less than
-- `j+1`, that are multiples of `p` by induction, and terms of degree at least `j+1`.
rw [aeval_eq_sum_range, Hj, range_add, sum_union (disjoint_range_add_left_embedding _ _),
- sum_congr rfl hg, add_comm] at hQ
+ sum_congr rfl hg, add_comm] at hQ
-- We multiply this equality by `B.gen ^ (P.nat_degree-(j+2))`, so we can use `hfβ` on the terms
-- we didn't know were multiples of `p`, and we take the norm on both sides.
replace hQ := congr_arg (fun x => x * B.gen ^ (P.nat_degree - (j + 2))) hQ
- simp_rw [sum_map, addLeftEmbedding_apply, add_mul, sum_mul, mul_assoc] at hQ
+ simp_rw [sum_map, addLeftEmbedding_apply, add_mul, sum_mul, mul_assoc] at hQ
rw [β
insert_erase (mem_range.2 (tsub_pos_iff_lt.2 <| Nat.lt_of_succ_lt_succ <| mem_range.1 hj)),
sum_insert (not_mem_erase 0 _), add_zero, sum_congr rfl hfβ, β mul_sum, β mul_sum, add_assoc,
- β mul_add, smul_mul_assoc, β pow_add, Algebra.smul_def] at hQ
+ β mul_add, smul_mul_assoc, β pow_add, Algebra.smul_def] at hQ
replace hQ := congr_arg (norm K) (eq_sub_of_add_eq hQ)
-- We obtain an equality of elements of `K`, but everything is integral, so we can move to `R`
-- and simplify `hQ`.
@@ -390,7 +390,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
rw [add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
Β· exact zero_le _
Β· refine' one_le_iff_ne_zero.2 fun h => _
- rw [h] at hk
+ rw [h] at hk
simpa using hk
obtain β¨r, hrβ© := is_integral_iff.1 (is_integral_norm K hintsum)
rw [Algebra.smul_def, mul_assoc, β mul_sub, _root_.map_mul, algebraMap_apply R K L, map_pow,
@@ -398,12 +398,12 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
finrank B, β hr, power_basis.norm_gen_eq_coeff_zero_minpoly,
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, coeff_map,
show (-1 : K) = algebraMap R K (-1) by simp, β map_pow, β map_pow, β _root_.map_mul, β
- map_pow, β _root_.map_mul, β map_pow, β _root_.map_mul] at hQ
+ map_pow, β _root_.map_mul, β map_pow, β _root_.map_mul] at hQ
-- We can now finish the proof.
have hppdiv : p ^ B.dim β£ p ^ B.dim * r := dvd_mul_of_dvd_left dvd_rfl _
rwa [β IsFractionRing.injective R K hQ, mul_comm, β Units.coe_neg_one, mul_pow, β
Units.val_pow_eq_pow_val, β Units.val_pow_eq_pow_val, mul_assoc,
- IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
+ IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
@@ -417,7 +417,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at {B : Powe
z β adjoin R ({B.gen} : Set L) := by
induction' n with n hn
Β· simpa using hz
- Β· rw [pow_succ, mul_smul] at hz
+ Β· rw [pow_succ, mul_smul] at hz
exact
hn
(mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at hp hBint
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -34,7 +34,7 @@ variable {R : Type u}
open Ideal Algebra Finset
-open BigOperators Polynomial
+open scoped BigOperators Polynomial
section Cyclotomic
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -173,8 +173,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
refine' Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd hp (_ : _ ^ n.succ β£ _) hndiv
convert(IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
push_cast
- ring_nf
- simp [pow_right_comm _ _ 2]
+ ring_nf; simp [pow_right_comm _ _ 2]
-- We claim the quotient of `Q^n * _` by `p^n` is the following `r`:
have aux : β i β (range (Q.nat_degree + 1)).eraseβ 0, B.dim β€ i + n :=
by
@@ -209,7 +208,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
_root_.map_pow, finrank_K_L, power_basis.norm_gen_eq_coeff_zero_minpoly,
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, coeff_map, β hn]
ring
- swap
+ swap;
Β·
simp_rw [β smul_sum, β smul_sub, Algebra.smul_def p, algebraMap_apply R K L, _root_.map_mul,
Algebra.norm_algebraMap, finrank_K_L, hr, β hn]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ef95945cd48c932c9e034872bd25c3c220d9c946
@@ -4,14 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module ring_theory.polynomial.eisenstein.is_integral
-! leanprover-community/mathlib commit ceb887ddf3344dab425292e497fa2af91498437c
+! leanprover-community/mathlib commit 5bfbcca0a7ffdd21cf1682e59106d6c942434a32
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Data.Nat.Choose.Dvd
import Mathbin.RingTheory.IntegrallyClosed
import Mathbin.RingTheory.Norm
-import Mathbin.RingTheory.Polynomial.Cyclotomic.Basic
+import Mathbin.RingTheory.Polynomial.Cyclotomic.Expand
/-!
# Eisenstein polynomials
mathlib commit https://github.com/leanprover-community/mathlib/commit/75e7fca56381d056096ce5d05e938f63a6567828
@@ -149,7 +149,7 @@ extension of `K`, generated by an integral power basis `B` such that the minimal
`aeval B.gen Q = p β’ z`, then `p β£ Q.coeff 0`. -/
theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p β’ z)
- (hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.coeff 0 :=
+ (hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.Coeff 0 :=
by
-- First define some abbreviations.
letI := B.finite_dimensional
@@ -166,9 +166,9 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
-- The Eisenstein condition shows that `p` divides `Q.coeff 0`
-- if `p^n.succ` divides the following multiple of `Q.coeff 0^n.succ`:
- suffices p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).coeff 0 ^ n)
+ suffices p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).Coeff 0 ^ n)
by
- have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
+ have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).Coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
refine' Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd hp (_ : _ ^ n.succ β£ _) hndiv
convert(IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
@@ -240,7 +240,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [CommRing B]
[Algebra A B] [NoZeroSMulDivisors A B] {Q : A[X]} {p : A} {x z : B} (hp : p β 0)
- (hQ : β i β range (Q.natDegree + 1), p β£ Q.coeff i) (hz : aeval x Q = p β’ z) :
+ (hQ : β i β range (Q.natDegree + 1), p β£ Q.Coeff i) (hz : aeval x Q = p β’ z) :
z β adjoin A ({x} : Set B) := by
choose! f hf using hQ
rw [aeval_eq_sum_range, sum_range] at hz
@@ -266,7 +266,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
z β adjoin R ({B.gen} : Set L) :=
by
-- First define some abbreviations.
- have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
+ have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).Coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
letI := FiniteDimensional B
set P := minpoly R B.gen with hP
@@ -350,7 +350,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
-- if `p^n.succ` divides the following multiple of `Q.coeff (succ j)^n.succ`:
suffices
p ^ n.succ β£
- Q.coeff (succ j) ^ n.succ * (minpoly R B.gen).coeff 0 ^ (succ j + (P.nat_degree - (j + 2)))
+ Q.coeff (succ j) ^ n.succ * (minpoly R B.gen).Coeff 0 ^ (succ j + (P.nat_degree - (j + 2)))
by
convert this
rw [Nat.succ_eq_add_one, add_assoc, β Nat.add_sub_assoc H, β add_assoc, add_comm (j + 1),
mathlib commit https://github.com/leanprover-community/mathlib/commit/08e1d8d4d989df3a6df86f385e9053ec8a372cc1
@@ -205,13 +205,13 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
(congr_arg (norm K) (eq_sub_of_add_eq _))
_ = _ := _
- Β· simp only [Algebra.smul_def, algebra_map_apply R K L, Algebra.norm_algebraMap, _root_.map_mul,
+ Β· simp only [Algebra.smul_def, algebraMap_apply R K L, Algebra.norm_algebraMap, _root_.map_mul,
_root_.map_pow, finrank_K_L, power_basis.norm_gen_eq_coeff_zero_minpoly,
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, coeff_map, β hn]
ring
swap
Β·
- simp_rw [β smul_sum, β smul_sub, Algebra.smul_def p, algebra_map_apply R K L, _root_.map_mul,
+ simp_rw [β smul_sum, β smul_sub, Algebra.smul_def p, algebraMap_apply R K L, _root_.map_mul,
Algebra.norm_algebraMap, finrank_K_L, hr, β hn]
calc
_ =
@@ -394,8 +394,8 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
rw [h] at hk
simpa using hk
obtain β¨r, hrβ© := is_integral_iff.1 (is_integral_norm K hintsum)
- rw [Algebra.smul_def, mul_assoc, β mul_sub, _root_.map_mul, algebra_map_apply R K L, map_pow,
- Algebra.norm_algebraMap, _root_.map_mul, algebra_map_apply R K L, Algebra.norm_algebraMap,
+ rw [Algebra.smul_def, mul_assoc, β mul_sub, _root_.map_mul, algebraMap_apply R K L, map_pow,
+ Algebra.norm_algebraMap, _root_.map_mul, algebraMap_apply R K L, Algebra.norm_algebraMap,
finrank B, β hr, power_basis.norm_gen_eq_coeff_zero_minpoly,
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, coeff_map,
show (-1 : K) = algebraMap R K (-1) by simp, β map_pow, β map_pow, β _root_.map_mul, β
mathlib commit https://github.com/leanprover-community/mathlib/commit/02ba8949f486ebecf93fe7460f1ed0564b5e442c
@@ -99,7 +99,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [zero_add, pow_one] at hiβ’
exact (cyclotomic_comp_x_add_one_isEisensteinAt p).Mem hi
Β· intro i hi
- rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_coe_zMod_eq_zero_iff_dvd, β
+ rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd, β
Int.coe_castRingHom, β coeff_map, map_comp, map_cyclotomic, Polynomial.map_add, map_X,
Polynomial.map_one, pow_add, pow_one, cyclotomic_mul_prime_dvd_eq_pow, pow_comp, β
ZMod.expand_card, coeff_expand hp.out.pos]
@@ -111,7 +111,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [hk, pow_succ, mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
- rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_coe_zMod_eq_zero_iff_dvd,
+ rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
β Int.coe_castRingHom, β coeff_map] at hn
simpa [map_comp] using hn
Β· exact β¨p ^ n, by rw [pow_succ]β©
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -171,7 +171,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
refine' Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd hp (_ : _ ^ n.succ β£ _) hndiv
- convert (IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
+ convert(IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
push_cast
ring_nf
simp [pow_right_comm _ _ 2]
mathlib commit https://github.com/leanprover-community/mathlib/commit/1a313d8bba1bad05faba71a4a4e9742ab5bd9efd
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
! This file was ported from Lean 3 source module ring_theory.polynomial.eisenstein.is_integral
-! leanprover-community/mathlib commit 966e0cf0685c9cedf8a3283ac69eef4d5f2eaca2
+! leanprover-community/mathlib commit ceb887ddf3344dab425292e497fa2af91498437c
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
+import Mathbin.Data.Nat.Choose.Dvd
import Mathbin.RingTheory.IntegrallyClosed
import Mathbin.RingTheory.Norm
import Mathbin.RingTheory.Polynomial.Cyclotomic.Basic
mathlib commit https://github.com/leanprover-community/mathlib/commit/38f16f960f5006c6c0c2bac7b0aba5273188f4e5
@@ -45,7 +45,7 @@ local notation "π" => Submodule.span β€ {p}
open Polynomial
theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
- ((cyclotomic p β€).comp (x + 1)).IsEisensteinAt π :=
+ ((cyclotomic p β€).comp (X + 1)).IsEisensteinAt π :=
by
refine'
monic.is_eisenstein_at_of_mem_of_not_mem _
@@ -81,7 +81,7 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_x_add_one_isEisensteinAt
theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
- ((cyclotomic (p ^ (n + 1)) β€).comp (x + 1)).IsEisensteinAt π :=
+ ((cyclotomic (p ^ (n + 1)) β€).comp (X + 1)).IsEisensteinAt π :=
by
refine'
monic.is_eisenstein_at_of_mem_of_not_mem _
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -201,7 +201,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
norm K
(p β’ (z * B.gen ^ n) -
β x : β in (range (Q.nat_degree + 1)).eraseβ 0, p β’ Q.coeff x β’ f (x + n)) :=
- congr_arg (norm K) (eq_sub_of_add_eq _)
+ (congr_arg (norm K) (eq_sub_of_add_eq _))
_ = _ := _
Β· simp only [Algebra.smul_def, algebra_map_apply R K L, Algebra.norm_algebraMap, _root_.map_mul,
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -272,7 +272,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
exact dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt hp hBint hQ hzint hei
Β· intro hj
convert hp.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd _ hndiv
- exact n
+ Β· exact n
-- Two technical results we will need about `P.natDegree` and `Q.natDegree`.
have H := degree_modByMonic_lt Qβ (minpoly.monic hBint)
rw [β hQβ, β hP] at H
nat_cast
/int_cast
/rat_cast
to natCast
/intCast
/ratCast
(#11486)
Now that I am defining NNRat.cast
, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast
/intCast
/ratCast
over nat_cast
/int_cast
/rat_cast
, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.
@@ -56,7 +56,7 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
congr
next => skip
ext
- rw [lcoeff_apply, β C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
+ rw [lcoeff_apply, β C_eq_natCast, C_mul_X_pow_eq_monomial, coeff_monomial]
rw [natDegree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, natDegree_X_add_C, mul_one,
natDegree_cyclotomic, Nat.totient_prime hp.out] at hi
simp only [hi.trans_le (Nat.sub_le _ _), sum_ite_eq', mem_range, if_true,
@@ -88,7 +88,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [Nat.zero_add, pow_one] at hi β’
exact (cyclotomic_comp_X_add_one_isEisensteinAt p).mem hi
Β· intro i hi
- rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
+ rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.intCast_zmod_eq_zero_iff_dvd,
show β(_ : β€) = Int.castRingHom (ZMod p) _ by rfl, β coeff_map, map_comp, map_cyclotomic,
Polynomial.map_add, map_X, Polynomial.map_one, pow_add, pow_one,
cyclotomic_mul_prime_dvd_eq_pow, pow_comp, β ZMod.expand_card, coeff_expand hp.out.pos]
@@ -100,7 +100,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [hk, pow_succ', mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
- rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
+ rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.intCast_zmod_eq_zero_iff_dvd,
show β(_ : β€) = Int.castRingHom (ZMod p) _ by rfl, β coeff_map] at hn
simpa [map_comp] using hn
Β· exact β¨p ^ n, by rw [pow_succ']β©
coe_nat
to natCast
(#11637)
Reduce the diff of #11499
All in the Int
namespace:
ofNat_eq_cast
β ofNat_eq_natCast
cast_eq_cast_iff_Nat
β natCast_inj
natCast_eq_ofNat
β ofNat_eq_natCast
coe_nat_sub
β natCast_sub
coe_nat_nonneg
β natCast_nonneg
sign_coe_add_one
β sign_natCast_add_one
nat_succ_eq_int_succ
β natCast_succ
succ_neg_nat_succ
β succ_neg_natCast_succ
coe_pred_of_pos
β natCast_pred_of_pos
coe_nat_div
β natCast_div
coe_nat_ediv
β natCast_ediv
sign_coe_nat_of_nonzero
β sign_natCast_of_ne_zero
toNat_coe_nat
β toNat_natCast
toNat_coe_nat_add_one
β toNat_natCast_add_one
coe_nat_dvd
β natCast_dvd_natCast
coe_nat_dvd_left
β natCast_dvd
coe_nat_dvd_right
β dvd_natCast
le_coe_nat_sub
β le_natCast_sub
succ_coe_nat_pos
β succ_natCast_pos
coe_nat_modEq_iff
β natCast_modEq_iff
coe_natAbs
β natCast_natAbs
coe_nat_eq_zero
β natCast_eq_zero
coe_nat_ne_zero
β natCast_ne_zero
coe_nat_ne_zero_iff_pos
β natCast_ne_zero_iff_pos
abs_coe_nat
β abs_natCast
coe_nat_nonpos_iff
β natCast_nonpos_iff
Also rename Nat.coe_nat_dvd
to Nat.cast_dvd_cast
@@ -60,13 +60,13 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
rw [natDegree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, natDegree_X_add_C, mul_one,
natDegree_cyclotomic, Nat.totient_prime hp.out] at hi
simp only [hi.trans_le (Nat.sub_le _ _), sum_ite_eq', mem_range, if_true,
- Ideal.submodule_span_eq, Ideal.mem_span_singleton, Int.coe_nat_dvd]
+ Ideal.submodule_span_eq, Ideal.mem_span_singleton, Int.natCast_dvd_natCast]
exact hp.out.dvd_choose_self i.succ_ne_zero (lt_tsub_iff_right.1 hi)
Β· rw [coeff_zero_eq_eval_zero, eval_comp, cyclotomic_prime, eval_add, eval_X, eval_one, zero_add,
eval_geom_sum, one_geom_sum, Ideal.submodule_span_eq, Ideal.span_singleton_pow,
Ideal.mem_span_singleton]
intro h
- obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
+ obtain β¨k, hkβ© := Int.natCast_dvd_natCast.1 h
rw [mul_assoc, mul_comm 1, mul_one] at hk
nth_rw 1 [β Nat.mul_one p] at hk
rw [mul_right_inj' hp.out.ne_zero] at hk
@@ -110,7 +110,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
submodule_span_eq, Ideal.submodule_span_eq, Ideal.span_singleton_pow,
Ideal.mem_span_singleton]
intro h
- obtain β¨k, hkβ© := Int.coe_nat_dvd.1 h
+ obtain β¨k, hkβ© := Int.natCast_dvd_natCast.1 h
rw [mul_assoc, mul_comm 1, mul_one] at hk
nth_rw 1 [β Nat.mul_one p] at hk
rw [mul_right_inj' hp.out.ne_zero] at hk
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : β (n : β) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -97,13 +97,13 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [natDegree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, natDegree_X_add_C, mul_one,
natDegree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _), Nat.add_one_sub_one]
at hn hi
- rw [hk, pow_succ, mul_assoc] at hi
+ rw [hk, pow_succ', mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
show β(_ : β€) = Int.castRingHom (ZMod p) _ by rfl, β coeff_map] at hn
simpa [map_comp] using hn
- Β· exact β¨p ^ n, by rw [pow_succ]β©
+ Β· exact β¨p ^ n, by rw [pow_succ']β©
Β· rw [coeff_zero_eq_eval_zero, eval_comp, cyclotomic_prime_pow_eq_geom_sum hp.out, eval_add,
eval_X, eval_one, zero_add, eval_finset_sum]
simp only [eval_pow, eval_X, one_pow, sum_const, card_range, Nat.smul_one_eq_coe,
@@ -383,7 +383,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBa
z β adjoin R ({B.gen} : Set L) := by
induction' n with n hn
Β· simpa using hz
- Β· rw [_root_.pow_succ, mul_smul] at hz
+ Β· rw [_root_.pow_succ', mul_smul] at hz
exact
hn (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (hzint.smul _) hz hei)
#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -123,9 +123,7 @@ end Cyclotomic
section IsIntegral
variable {K : Type v} {L : Type z} {p : R} [CommRing R] [Field K] [Field L]
-
variable [Algebra K L] [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
-
variable [IsDomain R] [IsFractionRing R K] [IsIntegrallyClosed R]
local notation "π" => Submodule.span R {(p : R)}
Prove isSemisimple_of_mem_adjoin
: if two commuting endomorphisms of a finite-dimensional vector space over a perfect field are both semisimple, then every endomorphism in the algebra generated by them (in particular their product and sum) is semisimple.
In the same file LinearAlgebra/Semisimple.lean, eq_zero_of_isNilpotent_isSemisimple
and isSemisimple_of_squarefree_aeval_eq_zero
are golfed, and IsSemisimple.minpoly_squarefree
is proved
RingTheory/SimpleModule.lean:
Define IsSemisimpleRing R
to mean that R is a semisimple R-module.
add properties of simple modules and a characterization (they are exactly the quotients of the ring by maximal left ideals).
The annihilator of a semisimple module is a radical ideal.
Any module over a semisimple ring is semisimple.
A finite product of semisimple rings is semisimple.
Any quotient of a semisimple ring is semisimple.
Add Artin--Wedderburn as a TODO (proof_wanted).
Order/Atoms.lean: add the instance from IsSimpleOrder
to ComplementedLattice
, so that IsSimpleModule β IsSemisimpleModule
is automatically inferred.
Prerequisites for showing a product of semisimple rings is semisimple:
Algebra/Module/Submodule/Map.lean: generalize orderIsoMapComap
so that it only requires RingHomSurjective
rather than RingHomInvPair
Algebra/Ring/CompTypeclasses.lean, Mathlib/Algebra/Ring/Pi.lean, Algebra/Ring/Prod.lean: add RingHomSurjective instances
RingTheory/Artinian.lean:
quotNilradicalEquivPi
: the quotient of a commutative Artinian ring R by its nilradical is isomorphic to the (finite) product of its quotients by maximal ideals (therefore a product of fields).
equivPi
: if the ring is moreover reduced, then the ring itself is a product of fields. Deduce that R is a semisimple ring and both R and R[X] are decomposition monoids. Requires RingEquiv.quotientBot
in RingTheory/Ideal/QuotientOperations.lean.
Data/Polynomial/Eval.lean: the polynomial ring over a finite product of rings is isomorphic to the product of polynomial rings over individual rings. (Used to show R[X] is a decomposition monoid.)
Other necessary results:
FieldTheory/Minpoly/Field.lean: the minimal polynomial of an element in a reduced algebra over a field is radical.
RingTheory/PowerBasis.lean: generalize PowerBasis.finiteDimensional
and rename it to .finite
.
Annihilator stuff, some of which do not end up being used:
RingTheory/Ideal/Operations.lean: define Module.annihilator
and redefine Submodule.annihilator
in terms of it; add lemmas, including one that says an arbitrary intersection of radical ideals is radical. The new lemma Ideal.isRadical_iff_pow_one_lt
depends on pow_imp_self_of_one_lt
in Mathlib/Data/Nat/Interval.lean, which is also used to golf the proof of isRadical_iff_pow_one_lt
.
Algebra/Module/Torsion.lean: add a lemma and an instance (unused)
Data/Polynomial/Module/Basic.lean: add a def (unused) and a lemma
LinearAlgebra/AnnihilatingPolynomial.lean: add lemma span_minpoly_eq_annihilator
Some results about idempotent linear maps (projections) and idempotent elements, used to show that any (left) ideal in a semisimple ring is spanned by an idempotent element (unused):
LinearAlgebra/Projection.lean: add def isIdempotentElemEquiv
LinearAlgebra/Span.lean: add two lemmas
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -140,7 +140,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
(hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p β’ z)
(hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.coeff 0 := by
-- First define some abbreviations.
- letI := B.finiteDimensional
+ letI := B.finite
let P := minpoly R B.gen
obtain β¨n, hnβ© := Nat.exists_eq_succ_of_ne_zero B.dim_pos.ne'
have finrank_K_L : FiniteDimensional.finrank K L = B.dim := B.finrank
@@ -243,7 +243,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
-- First define some abbreviations.
have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
- letI := finiteDimensional B
+ have := B.finite
set P := minpoly R B.gen with hP
obtain β¨n, hnβ© := Nat.exists_eq_succ_of_ne_zero B.dim_pos.ne'
haveI : NoZeroSMulDivisors R L := NoZeroSMulDivisors.trans R K L
I ran tryAtEachStep on all files under Mathlib
to find all locations where omega
succeeds. For each that was a linarith
without an only
, I tried replacing it with omega
, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesop
s along the way.
@@ -328,7 +328,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
(minpoly.monic hBint).natDegree_map (algebraMap R K), β
minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, natDegree_minpoly, hn, Nat.sub_one,
Nat.pred_succ]
- linarith
+ omega
-- Using `hQ : aeval B.gen Q = p β’ z`, we write `p β’ z` as a sum of terms of degree less than
-- `j+1`, that are multiples of `p` by induction, and terms of degree at least `j+1`.
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -253,8 +253,8 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
rw [adjoin_singleton_eq_range_aeval] at hz
obtain β¨Qβ, hQβ© := hz
set Q := Qβ %β P with hQβ
- replace hQ : aeval B.gen Q = p β’ z
- Β· rw [β modByMonic_add_div Qβ (minpoly.monic hBint)] at hQ
+ replace hQ : aeval B.gen Q = p β’ z := by
+ rw [β modByMonic_add_div Qβ (minpoly.monic hBint)] at hQ
simpa using hQ
by_cases hQzero : Q = 0
Β· simp only [hQzero, Algebra.smul_def, zero_eq_mul, aeval_zero] at hQ
@@ -290,8 +290,9 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
-- By induction hypothesis we can find `g : β β R` such that
-- `k β range (j + 1) β Q.coeff k β’ B.gen ^ k = (algebraMap R L) p * g k β’ B.gen ^ k`-
choose! g hg using hind
- replace hg : β k β range (j + 1), Q.coeff k β’ B.gen ^ k = algebraMap R L p * g k β’ B.gen ^ k
- Β· intro k hk
+ replace hg : β k β range (j + 1), Q.coeff k β’ B.gen ^ k =
+ algebraMap R L p * g k β’ B.gen ^ k := by
+ intro k hk
rw [hg k (mem_range_succ_iff.1 hk)
(mem_range_succ_iff.2
(le_trans (mem_range_succ_iff.1 hk) (succ_le_iff.1 (mem_range_succ_iff.1 hj)).le)),
IsRelPrime
and DecompositionMonoid
and refactor (#10327)
Introduce typeclass DecompositionMonoid
, which says every element in the monoid is primal, i.e., whenever an element divides a product b * c
, it can be factored into a product such that the factors divides b
and c
respectively. A domain is called pre-Schreier if its multiplicative monoid is a decomposition monoid, and these are more general than GCD domains.
Show that any GCDMonoid
is a DecompositionMonoid
. In order for lemmas about DecompositionMonoid
s to automatically apply to UniqueFactorizationMonoid
s, we add instances from UniqueFactorizationMonoid Ξ±
to Nonempty (NormalizedGCDMonoid Ξ±)
to Nonempty (GCDMonoid Ξ±)
to DecompositionMonoid Ξ±
. (Zulip) See the bottom of message for an updated diagram of classes and instances.
Introduce binary predicate IsRelPrime
which says that the only common divisors of the two elements are units. Replace previous occurrences in mathlib by this predicate.
Duplicate all lemmas about IsCoprime
in Coprime/Basic (except three lemmas about smul) to IsRelPrime
. Due to import constraints, they are spread into three files Algebra/Divisibility/Units (including key lemmas assuming DecompositionMonoid), GroupWithZero/Divisibility, and Coprime/Basic.
Show IsCoprime
always imply IsRelPrime
and is equivalent to it in Bezout rings. To reduce duplication, the definition of Bezout rings and the GCDMonoid instance are moved from RingTheory/Bezout to RingTheory/PrincipalIdealDomain, and some results in PrincipalIdealDomain are generalized to Bezout rings.
Remove the recently added file Squarefree/UniqueFactorizationMonoid and place the results appropriately within Squarefree/Basic. All results are generalized to DecompositionMonoid or weaker except the last one.
With this PR, all the following instances (indicated by arrows) now work; this PR fills the central part.
EuclideanDomain (bundled)
β β
IsPrincipalIdealRing β Field (bundled)
β β
NormalizationMonoid β NormalizedGCDMonoid β GCDMonoid IsBezout β ValuationRing β DiscreteValuationRing
β β β β
Nonempty NormalizationMonoid β Nonempty NormalizedGCDMonoid β Nonempty GCDMonoid β IsIntegrallyClosed
β β
WfDvdMonoid β UniqueFactorizationMonoid β DecompositionMonoid
β
IsPrincipalIdealRing
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com> Co-authored-by: Oliver Nash <github@olivernash.org>
@@ -370,7 +370,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
have hppdiv : p ^ B.dim β£ p ^ B.dim * r := dvd_mul_of_dvd_left dvd_rfl _
rwa [β IsFractionRing.injective R K hQ, mul_comm, β Units.coe_neg_one, mul_pow, β
Units.val_pow_eq_pow_val, β Units.val_pow_eq_pow_val, mul_assoc,
- IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
+ Units.dvd_mul_left, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
@@ -95,7 +95,7 @@ theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (
Β· simp only [ite_eq_right_iff]
rintro β¨k, hkβ©
rw [natDegree_comp, show (X + 1 : β€[X]) = X + C 1 by simp, natDegree_X_add_C, mul_one,
- natDegree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _), Nat.succ_sub_one]
+ natDegree_cyclotomic, Nat.totient_prime_pow hp.out (Nat.succ_pos _), Nat.add_one_sub_one]
at hn hi
rw [hk, pow_succ, mul_assoc] at hi
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
exact_mod_cast
tactic with mod_cast
elaborator where possible (#8404)
We still have the exact_mod_cast
tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast
are the ones that don't work using the term elaborator by itself.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -44,7 +44,7 @@ open Polynomial
theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
((cyclotomic p β€).comp (X + 1)).IsEisensteinAt π := by
refine Monic.isEisensteinAt_of_mem_of_not_mem ?_
- (Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (by exact_mod_cast hp.out.ne_zero)).2 <|
+ (Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (mod_cast hp.out.ne_zero)).2 <|
Nat.prime_iff_prime_int.1 hp.out) (fun {i hi} => ?_) ?_
Β· rw [show (X + 1 : β€[X]) = X + C 1 by simp]
refine (cyclotomic.monic p β€).comp (monic_X_add_C 1) fun h => ?_
@@ -77,7 +77,7 @@ set_option linter.uppercaseLean3 false in
theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
((cyclotomic (p ^ (n + 1)) β€).comp (X + 1)).IsEisensteinAt π := by
refine Monic.isEisensteinAt_of_mem_of_not_mem ?_
- (Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (by exact_mod_cast hp.out.ne_zero)).2 <|
+ (Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (mod_cast hp.out.ne_zero)).2 <|
Nat.prime_iff_prime_int.1 hp.out) ?_ ?_
Β· rw [show (X + 1 : β€[X]) = X + C 1 by simp]
refine (cyclotomic.monic _ β€).comp (monic_X_add_C 1) fun h => ?_
Initially I just wanted to add more dot notations for IsIntegral and IsAlgebraic (done in #8437); then I noticed near-duplicates
Algebra.isIntegral_of_finite [Field R] [Ring A]
and
RingHom.IsIntegral.of_finite [CommRing R] [CommRing A]
so I went on to generalize the latter to cover the former, and generalized everything in the IntegralClosure file to the noncommutative case whenever possible.
In the process I noticed more golfs, which result in this PR. Most notably, isIntegral_of_mem_of_FG is now proven using Cayley-Hamilton and doesn't depend on the Noetherian case isIntegral_of_noetherian; the latter is now proven using the former. In total the golfs makes mathlib 227 lines leaner (+487 -714).
The main changes are in the single file RingTheory/IntegralClosure:
Change the definition of Algebra.IsIntegral
which makes it unfold to IsIntegral
rather than RingHom.IsIntegralElem
because the former has much more APIs.
Fix lemma names involving is_integral
which are actually about IsIntegralElem
:
RingHom.is_integral_map
β RingHom.isIntegralElem_map
RingHom.is_integral_of_mem_closure
β RingHom.IsIntegralElem.of_mem_closure
RingHom.is_integral_zero/one
β RingHom.isIntegralElem_zero/one
RingHom.is_integral_add/neg/sub/mul/of_mul_unit
β RingHom.IsIntegralElem.add/neg/sub/mul/of_mul_unit
Add a lemma Algebra.IsIntegral.of_injective
.
Move isIntegral_of_(submodule_)noetherian
down and golf them.
Remove (Algebra.)isIntegral_of_finite
that work only over fields, in favor of the more general (Algebra.)isIntegral.of_finite
.
Merge duplicate lemmas isIntegral_of_isScalarTower
and isIntegral_tower_top_of_isIntegral
into IsIntegral.tower_top
.
Golf IsIntegral.of_mem_of_fg
by first proving IsIntegral.of_finite
using Cayley-Hamilton.
Add a docstring mentioning the Kurosh problem at Algebra.IsIntegral.finite
. The negative solution to the problem means the theorem doesn't generalize to noncommutative algebras.
Golf IsIntegral.tmul
and isField_of_isIntegral_of_isField(')
.
Combine isIntegral_trans_aux
into isIntegral_trans
and golf.
Add Algebra
namespace to isIntegral_sup
.
rename lemmas for dot notation:
RingHom.isIntegral_trans
β RingHom.IsIntegral.trans
RingHom.isIntegral_quotient/tower_bot/top_of_isIntegral
β RingHom.IsIntegral.quotient/tower_bot/top
isIntegral_of_mem_closure'
β IsIntegral.of_mem_closure'
(and the '' version)
isIntegral_of_surjective
β Algebra.isIntegral_of_surjective
The next changed file is RingTheory/Algebraic:
Rename:
of_larger_base
β tower_top
(for consistency with IsIntegral
)
Algebra.isAlgebraic_of_finite
β Algebra.IsAlgebraic.of_finite
Algebra.isAlgebraic_trans
β Algebra.IsAlgebraic.trans
Add new lemmasAlgebra.IsIntegral.isAlgebraic
, isAlgebraic_algHom_iff
, and Algebra.IsAlgebraic.of_injective
to streamline some proofs.
The generalization from CommRing to Ring requires an additional lemma scaleRoots_evalβ_mul_of_commute
in Polynomial/ScaleRoots.
A lemma Algebra.lmul_injective
is added to Algebra/Bilinear (in order to golf the proof of IsIntegral.of_mem_of_fg
).
In all other files, I merely fix the changed names, or use newly available dot notations.
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@@ -174,9 +174,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
have hintsum :
IsIntegral R
(z * B.gen ^ n - β x : β in (range (Q.natDegree + 1)).erase 0, Q.coeff x β’ f (x + n)) := by
- refine
- IsIntegral.sub (IsIntegral.mul hzint (IsIntegral.pow hBint _))
- (IsIntegral.sum _ fun i hi => IsIntegral.smul _ ?_)
+ refine (hzint.mul (hBint.pow _)).sub (.sum _ fun i hi => .smul _ ?_)
exact adjoin_le_integralClosure hBint (hf _ (aux i hi)).1
obtain β¨r, hrβ© := isIntegral_iff.1 (isIntegral_norm K hintsum)
use r
@@ -351,10 +349,9 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
(β x : β in (range (Q.natDegree - j)).erase 0,
Q.coeff (j + 1 + x) β’ f (x + P.natDegree - 1) +
β x : β in range (j + 1), g x β’ B.gen ^ x * B.gen ^ (P.natDegree - (j + 2)))) := by
- refine IsIntegral.sub (IsIntegral.mul hzint (IsIntegral.pow hBint _))
- (IsIntegral.add (IsIntegral.sum _ fun k hk => IsIntegral.smul _ ?_)
- (IsIntegral.sum _ fun k _ =>
- IsIntegral.mul (IsIntegral.smul _ (IsIntegral.pow hBint _)) (IsIntegral.pow hBint _)))
+ refine (hzint.mul (hBint.pow _)).sub
+ (.add (.sum _ fun k hk => .smul _ ?_)
+ (.sum _ fun k _ => .mul (.smul _ (.pow hBint _)) (hBint.pow _)))
refine adjoin_le_integralClosure hBint (hf _ ?_).1
rw [(minpoly.monic hBint).natDegree_map (algebraMap R L)]
rw [add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
@@ -389,9 +386,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBa
Β· simpa using hz
Β· rw [_root_.pow_succ, mul_smul] at hz
exact
- hn
- (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint
- (IsIntegral.smul _ hzint) hz hei)
+ hn (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (hzint.smul _) hz hei)
#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt
end IsIntegral
This PR tests a string-based tool for renaming declarations.
Inspired by this Zulip thread, I am trying to reduce the diff of #8406.
This PR makes the following renames:
| From | To |
@@ -175,8 +175,8 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
IsIntegral R
(z * B.gen ^ n - β x : β in (range (Q.natDegree + 1)).erase 0, Q.coeff x β’ f (x + n)) := by
refine
- isIntegral_sub (isIntegral_mul hzint (IsIntegral.pow hBint _))
- (IsIntegral.sum _ fun i hi => isIntegral_smul _ ?_)
+ IsIntegral.sub (IsIntegral.mul hzint (IsIntegral.pow hBint _))
+ (IsIntegral.sum _ fun i hi => IsIntegral.smul _ ?_)
exact adjoin_le_integralClosure hBint (hf _ (aux i hi)).1
obtain β¨r, hrβ© := isIntegral_iff.1 (isIntegral_norm K hintsum)
use r
@@ -351,10 +351,10 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis
(β x : β in (range (Q.natDegree - j)).erase 0,
Q.coeff (j + 1 + x) β’ f (x + P.natDegree - 1) +
β x : β in range (j + 1), g x β’ B.gen ^ x * B.gen ^ (P.natDegree - (j + 2)))) := by
- refine isIntegral_sub (isIntegral_mul hzint (IsIntegral.pow hBint _))
- (isIntegral_add (IsIntegral.sum _ fun k hk => isIntegral_smul _ ?_)
+ refine IsIntegral.sub (IsIntegral.mul hzint (IsIntegral.pow hBint _))
+ (IsIntegral.add (IsIntegral.sum _ fun k hk => IsIntegral.smul _ ?_)
(IsIntegral.sum _ fun k _ =>
- isIntegral_mul (isIntegral_smul _ (IsIntegral.pow hBint _)) (IsIntegral.pow hBint _)))
+ IsIntegral.mul (IsIntegral.smul _ (IsIntegral.pow hBint _)) (IsIntegral.pow hBint _)))
refine adjoin_le_integralClosure hBint (hf _ ?_).1
rw [(minpoly.monic hBint).natDegree_map (algebraMap R L)]
rw [add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
@@ -391,7 +391,7 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBa
exact
hn
(mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint
- (isIntegral_smul _ hzint) hz hei)
+ (IsIntegral.smul _ hzint) hz hei)
#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt
end IsIntegral
_root_.map_sum
more consistently (#7189)
Also _root_.map_smul
when in the neighbourhood.
@@ -50,7 +50,7 @@ theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
refine (cyclotomic.monic p β€).comp (monic_X_add_C 1) fun h => ?_
rw [natDegree_X_add_C] at h
exact zero_ne_one h.symm
- Β· rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, β lcoeff_apply, LinearMap.map_sum]
+ Β· rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, β lcoeff_apply, map_sum]
conv =>
congr
congr
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -216,7 +216,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
simp
#align dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt
-theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [CommRing B]
+theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type*} [CommSemiring A] [CommRing B]
[Algebra A B] [NoZeroSMulDivisors A B] {Q : A[X]} {p : A} {x z : B} (hp : p β 0)
(hQ : β i β range (Q.natDegree + 1), p β£ Q.coeff i) (hz : aeval x Q = p β’ z) :
z β adjoin A ({x} : Set B) := by
@@ -2,17 +2,14 @@
Copyright (c) 2022 Riccardo Brasca. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Riccardo Brasca
-
-! This file was ported from Lean 3 source module ring_theory.polynomial.eisenstein.is_integral
-! leanprover-community/mathlib commit 5bfbcca0a7ffdd21cf1682e59106d6c942434a32
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Nat.Choose.Dvd
import Mathlib.RingTheory.IntegrallyClosed
import Mathlib.RingTheory.Norm
import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand
+#align_import ring_theory.polynomial.eisenstein.is_integral from "leanprover-community/mathlib"@"5bfbcca0a7ffdd21cf1682e59106d6c942434a32"
+
/-!
# Eisenstein polynomials
In this file we gather more miscellaneous results about Eisenstein polynomials
@@ -162,7 +162,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : Pow
p ^ n.succ β£ Q.coeff 0 ^ n.succ * ((-1) ^ (n.succ * n) * (minpoly R B.gen).coeff 0 ^ n) by
have hndiv : Β¬p ^ 2 β£ (minpoly R B.gen).coeff 0 := fun h =>
hei.not_mem ((span_singleton_pow p 2).symm βΈ Ideal.mem_span_singleton.2 h)
- refine @Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd R _ _ _ _ n hp (?_ : _ β£ _) hndiv
+ refine @Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd R _ _ _ _ n hp (?_ : _ β£ _) hndiv
convert (IsUnit.dvd_mul_right β¨(-1) ^ (n.succ * n), rflβ©).mpr this using 1
push_cast
ring_nf
@@ -18,11 +18,11 @@ import Mathlib.RingTheory.Polynomial.Cyclotomic.Expand
In this file we gather more miscellaneous results about Eisenstein polynomials
## Main results
-* `mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at`: let `K` be the field of fraction
+* `mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt`: let `K` be the field of fraction
of an integrally closed domain `R` and let `L` be a separable extension of `K`, generated by an
integral power basis `B` such that the minimal polynomial of `B.gen` is Eisenstein at `p`. Given
`z : L` integral over `R`, if `p ^ n β’ z β adjoin R {B.gen}`, then `z β adjoin R {B.gen}`.
- Together with `algebra.discr_mul_is_integral_mem_adjoin` this result often allows to compute the
+ Together with `Algebra.discr_mul_isIntegral_mem_adjoin` this result often allows to compute the
ring of integers of `L`.
-/
@@ -40,13 +40,11 @@ section Cyclotomic
variable (p : β)
--- Porting note: to prevent Lean complaigning about this notation
-set_option quotPrecheck false
-local notation "π" => Submodule.span β€ {βp}
+local notation "π" => Submodule.span β€ {(p : β€)}
open Polynomial
-theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
+theorem cyclotomic_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] :
((cyclotomic p β€).comp (X + 1)).IsEisensteinAt π := by
refine Monic.isEisensteinAt_of_mem_of_not_mem ?_
(Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (by exact_mod_cast hp.out.ne_zero)).2 <|
@@ -77,9 +75,9 @@ theorem cyclotomic_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] :
rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
set_option linter.uppercaseLean3 false in
-#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_x_add_one_isEisensteinAt
+#align cyclotomic_comp_X_add_one_is_eisenstein_at cyclotomic_comp_X_add_one_isEisensteinAt
-theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
+theorem cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt [hp : Fact p.Prime] (n : β) :
((cyclotomic (p ^ (n + 1)) β€).comp (X + 1)).IsEisensteinAt π := by
refine Monic.isEisensteinAt_of_mem_of_not_mem ?_
(Ideal.IsPrime.ne_top <| (Ideal.span_singleton_prime (by exact_mod_cast hp.out.ne_zero)).2 <|
@@ -91,7 +89,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
Β· induction' n with n hn
Β· intro i hi
rw [Nat.zero_add, pow_one] at hi β’
- exact (cyclotomic_comp_x_add_one_isEisensteinAt p).mem hi
+ exact (cyclotomic_comp_X_add_one_isEisensteinAt p).mem hi
Β· intro i hi
rw [Ideal.submodule_span_eq, Ideal.mem_span_singleton, β ZMod.int_cast_zmod_eq_zero_iff_dvd,
show β(_ : β€) = Int.castRingHom (ZMod p) _ by rfl, β coeff_map, map_comp, map_cyclotomic,
@@ -121,7 +119,7 @@ theorem cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt [hp : Fact p.Prime] (
rw [mul_right_inj' hp.out.ne_zero] at hk
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
set_option linter.uppercaseLean3 false in
-#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_x_add_one_isEisensteinAt
+#align cyclotomic_prime_pow_comp_X_add_one_is_eisenstein_at cyclotomic_prime_pow_comp_X_add_one_isEisensteinAt
end Cyclotomic
@@ -133,9 +131,7 @@ variable [Algebra K L] [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSepa
variable [IsDomain R] [IsFractionRing R K] [IsIntegrallyClosed R]
--- Porting note: to prevent Lean complaigning about this notation
-set_option quotPrecheck false
-local notation "π" => Submodule.span R {p}
+local notation "π" => Submodule.span R {(p : R)}
open IsIntegrallyClosed PowerBasis Nat Polynomial IsScalarTower
@@ -143,7 +139,7 @@ open IsIntegrallyClosed PowerBasis Nat Polynomial IsScalarTower
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `Q : R[X]` is such that
`aeval B.gen Q = p β’ z`, then `p β£ Q.coeff 0`. -/
-theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
+theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} {Q : R[X]} (hQ : aeval B.gen Q = p β’ z)
(hzint : IsIntegral R z) (hei : (minpoly R B.gen).IsEisensteinAt π) : p β£ Q.coeff 0 := by
-- First define some abbreviations.
@@ -221,7 +217,7 @@ theorem dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at {B :
Β· rw [aeval_eq_sum_range,
Finset.add_sum_erase (range (Q.natDegree + 1)) fun i => Q.coeff i β’ B.gen ^ i]
simp
-#align dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at
+#align dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt
theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [CommRing B]
[Algebra A B] [NoZeroSMulDivisors A B] {Q : A[X]} {p : A} {x z : B} (hp : p β 0)
@@ -245,7 +241,7 @@ theorem mem_adjoin_of_dvd_coeff_of_dvd_aeval {A B : Type _} [CommSemiring A] [Co
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p β’ z β adjoin R {B.gen}`, then
`z β adjoin R {B.gen}`. -/
-theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
+theorem mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {z : L} (hzint : IsIntegral R z)
(hz : p β’ z β adjoin R ({B.gen} : Set L)) (hei : (minpoly R B.gen).IsEisensteinAt π) :
z β adjoin R ({B.gen} : Set L) := by
@@ -276,15 +272,15 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
Β· rw [Hβ]
exact Subalgebra.zero_mem _
-- It is enough to prove that all coefficients of `Q` are divisible by `p`, by induction.
- -- The base case is `dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at`.
+ -- The base case is `dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt`.
refine mem_adjoin_of_dvd_coeff_of_dvd_aeval hp.ne_zero (fun i => ?_) hQ
induction' i using Nat.case_strong_induction_on with j hind
Β· intro _
- exact dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_is_eiseinstein_at hp hBint hQ hzint hei
+ exact dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt hp hBint hQ hzint hei
Β· intro hj
convert hp.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd _ hndiv
exact n
- -- Two technical results we will need about `P.nat_degree` and `Q.nat_degree`.
+ -- Two technical results we will need about `P.natDegree` and `Q.natDegree`.
have H := degree_modByMonic_lt Qβ (minpoly.monic hBint)
rw [β hQβ, β hP] at H
replace H := Nat.lt_iff_add_one_le.1
@@ -342,7 +338,7 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
-- `j+1`, that are multiples of `p` by induction, and terms of degree at least `j+1`.
rw [aeval_eq_sum_range, Hj, range_add, sum_union (disjoint_range_addLeftEmbedding _ _),
sum_congr rfl hg, add_comm] at hQ
- -- We multiply this equality by `B.gen ^ (P.nat_degree-(j+2))`, so we can use `hfβ` on the terms
+ -- We multiply this equality by `B.gen ^ (P.natDegree-(j+2))`, so we can use `hfβ` on the terms
-- we didn't know were multiples of `p`, and we take the norm on both sides.
replace hQ := congr_arg (fun x => x * B.gen ^ (P.natDegree - (j + 2))) hQ
simp_rw [sum_map, addLeftEmbedding_apply, add_mul, sum_mul, mul_assoc] at hQ
@@ -381,14 +377,14 @@ theorem mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at {B : PowerBas
rwa [β IsFractionRing.injective R K hQ, mul_comm, β Units.coe_neg_one, mul_pow, β
Units.val_pow_eq_pow_val, β Units.val_pow_eq_pow_val, mul_assoc,
IsUnit.dvd_mul_left _ _ _ β¨_, rflβ©, mul_comm, β Nat.succ_eq_add_one, hn] at hppdiv
-#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at
+#align mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt
/-- Let `K` be the field of fraction of an integrally closed domain `R` and let `L` be a separable
extension of `K`, generated by an integral power basis `B` such that the minimal polynomial of
`B.gen` is Eisenstein at `p`. Given `z : L` integral over `R`, if `p ^ n β’ z β adjoin R {B.gen}`,
-then `z β adjoin R {B.gen}`. Together with `algebra.discr_mul_is_integral_mem_adjoin` this result
+then `z β adjoin R {B.gen}`. Together with `Algebra.discr_mul_isIntegral_mem_adjoin` this result
often allows to compute the ring of integers of `L`. -/
-theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at {B : PowerBasis K L}
+theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt {B : PowerBasis K L}
(hp : Prime p) (hBint : IsIntegral R B.gen) {n : β} {z : L} (hzint : IsIntegral R z)
(hz : p ^ n β’ z β adjoin R ({B.gen} : Set L)) (hei : (minpoly R B.gen).IsEisensteinAt π) :
z β adjoin R ({B.gen} : Set L) := by
@@ -397,8 +393,8 @@ theorem mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at {B : Powe
Β· rw [_root_.pow_succ, mul_smul] at hz
exact
hn
- (mem_adjoin_of_smul_prime_smul_of_minpoly_is_eiseinstein_at hp hBint
+ (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint
(isIntegral_smul _ hzint) hz hei)
-#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at
+#align mem_adjoin_of_smul_prime_pow_smul_of_minpoly_is_eiseinstein_at mem_adjoin_of_smul_prime_pow_smul_of_minpoly_isEisensteinAt
end IsIntegral
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file