[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ IsEisensteinAt (comp (cyclotomic p ℤ) (X + 1)) (Submodule.span ℤ {↑p})
[PROOFSTEP]
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 <| Nat.prime_iff_prime_int.1 hp.out)
    (fun {i hi} => ?_) ?_
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ ↑p ≠ 0
[PROOFSTEP]
exact_mod_cast hp.out.ne_zero
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ Monic (comp (cyclotomic p ℤ) (X + 1))
[PROOFSTEP]
rw [show (X + 1 : ℤ[X]) = X + C 1 by simp]
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ X + 1 = X + ↑C 1
[PROOFSTEP]
simp
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ Monic (comp (cyclotomic p ℤ) (X + ↑C 1))
[PROOFSTEP]
refine (cyclotomic.monic p ℤ).comp (monic_X_add_C 1) fun h => ?_
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : natDegree (X + ↑C 1) = 0
⊢ False
[PROOFSTEP]
rw [natDegree_X_add_C] at h
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : 1 = 0
⊢ False
[PROOFSTEP]
exact zero_ne_one h.symm
[GOAL]
case refine_2
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
⊢ coeff (comp (cyclotomic p ℤ) (X + 1)) i ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
rw [cyclotomic_prime, geom_sum_X_comp_X_add_one_eq_sum, ← lcoeff_apply, LinearMap.map_sum]
[GOAL]
case refine_2
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
⊢ ∑ i_1 in range p, ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1) ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
conv =>
  congr
  congr
  next => skip
  ext
  rw [lcoeff_apply, ← C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| ∑ i_1 in range p, ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1) ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
  congr
  congr
  next => skip
  ext
  rw [lcoeff_apply, ← C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| ∑ i_1 in range p, ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1) ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
  congr
  congr
  next => skip
  ext
  rw [lcoeff_apply, ← C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| ∑ i_1 in range p, ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1) ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
congr
[GOAL]
case a
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| ∑ i_1 in range p, ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1)
case a
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| Submodule.span ℤ {↑p}
[PROOFSTEP]
congr
[GOAL]
case a.s
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| range p
case a.f
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| fun i_1 => ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1)
case a
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| Submodule.span ℤ {↑p}
[PROOFSTEP]
next => skip
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| range p
[PROOFSTEP]
skip
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| range p
[PROOFSTEP]
skip
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| range p
[PROOFSTEP]
skip
[GOAL]
case a.f
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| fun i_1 => ↑(lcoeff ℤ i) (↑(Nat.choose p (i_1 + 1)) * X ^ i_1)
case a
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| Submodule.span ℤ {↑p}
[PROOFSTEP]
ext
[GOAL]
case a.f.h
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
x✝ : ℕ
| ↑(lcoeff ℤ i) (↑(Nat.choose p (x✝ + 1)) * X ^ x✝)
case a
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
| Submodule.span ℤ {↑p}
[PROOFSTEP]
rw [lcoeff_apply, ← C_eq_nat_cast, C_mul_X_pow_eq_monomial, coeff_monomial]
[GOAL]
case refine_2
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
⊢ (∑ x in range p, if x = i then ↑(Nat.choose p (x + 1)) else 0) ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
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
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (cyclotomic p ℤ) * natDegree (X + 1)
⊢ X + 1 = X + ↑C 1
[PROOFSTEP]
simp
[GOAL]
case refine_2
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < p - 1
⊢ (∑ x in range p, if x = i then ↑(Nat.choose p (x + 1)) else 0) ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
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]
[GOAL]
case refine_2
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < p - 1
⊢ p ∣ Nat.choose p (i + 1)
[PROOFSTEP]
exact hp.out.dvd_choose_self i.succ_ne_zero (lt_tsub_iff_right.1 hi)
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ ¬coeff (comp (cyclotomic p ℤ) (X + 1)) 0 ∈ Submodule.span ℤ {↑p} ^ 2
[PROOFSTEP]
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]
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ ¬↑p ^ 2 ∣ ↑p
[PROOFSTEP]
intro h
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : ↑p ^ 2 ∣ ↑p
⊢ False
[PROOFSTEP]
obtain ⟨k, hk⟩ := Int.coe_nat_dvd.1 h
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : p = 1 * p * p * k
⊢ False
[PROOFSTEP]
rw [mul_assoc, mul_comm 1, mul_one] at hk
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : p = p * (p * k)
⊢ False
[PROOFSTEP]
nth_rw 1 [← Nat.mul_one p] at hk
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : p * 1 = p * (p * k)
⊢ False
[PROOFSTEP]
rw [mul_right_inj' hp.out.ne_zero] at hk
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : 1 = p * k
⊢ False
[PROOFSTEP]
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ IsEisensteinAt (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) (Submodule.span ℤ {↑p})
[PROOFSTEP]
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 <| Nat.prime_iff_prime_int.1 hp.out)
    ?_ ?_
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ↑p ≠ 0
[PROOFSTEP]
exact_mod_cast hp.out.ne_zero
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ Monic (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1))
[PROOFSTEP]
rw [show (X + 1 : ℤ[X]) = X + C 1 by simp]
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ X + 1 = X + ↑C 1
[PROOFSTEP]
simp
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ Monic (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1))
[PROOFSTEP]
refine (cyclotomic.monic _ ℤ).comp (monic_X_add_C 1) fun h => ?_
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : natDegree (X + ↑C 1) = 0
⊢ False
[PROOFSTEP]
rw [natDegree_X_add_C] at h
[GOAL]
case refine_1
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : 1 = 0
⊢ False
[PROOFSTEP]
exact zero_ne_one h.symm
[GOAL]
case refine_2
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
induction' n with n hn
[GOAL]
case refine_2.zero
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
⊢ ∀ {n : ℕ},
    n < natDegree (comp (cyclotomic (p ^ (Nat.zero + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (Nat.zero + 1)) ℤ) (X + 1)) n ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
intro i hi
[GOAL]
case refine_2.zero
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.zero + 1)) ℤ) (X + 1))
⊢ coeff (comp (cyclotomic (p ^ (Nat.zero + 1)) ℤ) (X + 1)) i ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
rw [Nat.zero_add, pow_one] at hi ⊢
[GOAL]
case refine_2.zero
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
i : ℕ
hi : i < natDegree (comp (cyclotomic p ℤ) (X + 1))
⊢ coeff (comp (cyclotomic p ℤ) (X + 1)) i ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
exact (cyclotomic_comp_X_add_one_isEisensteinAt p).mem hi
[GOAL]
case refine_2.succ
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
⊢ ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
intro i hi
[GOAL]
case refine_2.succ
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
⊢ coeff (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1)) i ∈ Submodule.span ℤ {↑p}
[PROOFSTEP]
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, 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]
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
⊢ ↑(coeff (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1)) i) = ↑(Int.castRingHom (ZMod p)) ?m.169451
[PROOFSTEP]
rfl
[GOAL]
case refine_2.succ
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
⊢ (if p ∣ i then coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) (i / p) else 0) = 0
[PROOFSTEP]
simp only [ite_eq_right_iff]
[GOAL]
case refine_2.succ
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
⊢ p ∣ i → coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) (i / p) = 0
[PROOFSTEP]
rintro ⟨k, hk⟩
[GOAL]
case refine_2.succ.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
k : ℕ
hk : i = p * k
⊢ coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) (i / p) = 0
[PROOFSTEP]
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] at hn hi
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (cyclotomic (p ^ (n + 1)) ℤ) * natDegree (X + 1) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) * natDegree (X + 1)
k : ℕ
hk : i = p * k
⊢ X + 1 = X + ↑C 1
[PROOFSTEP]
simp
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (cyclotomic (p ^ (n + 1)) ℤ) * natDegree (X + ↑C 1) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) * natDegree (X + 1)
k : ℕ
hk : i = p * k
⊢ X + 1 = X + ↑C 1
[PROOFSTEP]
simp
[GOAL]
case refine_2.succ.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ}, n_1 < p ^ n * (p - 1) → coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < p ^ (n + 1) * (p - 1)
k : ℕ
hk : i = p * k
⊢ coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) (i / p) = 0
[PROOFSTEP]
rw [hk, pow_succ, mul_assoc] at hi
[GOAL]
case refine_2.succ.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ}, n_1 < p ^ n * (p - 1) → coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) n_1 ∈ Submodule.span ℤ {↑p}
i k : ℕ
hi : p * k < p * (p ^ n * (p - 1))
hk : i = p * k
⊢ coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) (i / p) = 0
[PROOFSTEP]
rw [hk, mul_comm, Nat.mul_div_cancel _ hp.out.pos]
[GOAL]
case refine_2.succ.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ}, n_1 < p ^ n * (p - 1) → coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) n_1 ∈ Submodule.span ℤ {↑p}
i k : ℕ
hi : p * k < p * (p ^ n * (p - 1))
hk : i = p * k
⊢ coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) k = 0
[PROOFSTEP]
replace hn := hn (lt_of_mul_lt_mul_left' hi)
[GOAL]
case refine_2.succ.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n i k : ℕ
hi : p * k < p * (p ^ n * (p - 1))
hk : i = p * k
hn : coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) k ∈ Submodule.span ℤ {↑p}
⊢ coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) k = 0
[PROOFSTEP]
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
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n i k : ℕ
hi : p * k < p * (p ^ n * (p - 1))
hk : i = p * k
hn : ↑(coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) k) = 0
⊢ ↑(coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) k) = ↑(Int.castRingHom (ZMod p)) ?m.261153
[PROOFSTEP]
rfl
[GOAL]
case refine_2.succ.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n i k : ℕ
hi : p * k < p * (p ^ n * (p - 1))
hk : i = p * k
hn✝ : ↑(coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1)) k) = 0
hn : coeff (Polynomial.map (Int.castRingHom (ZMod p)) (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + ↑C 1))) k = 0
⊢ coeff (comp (cyclotomic (p ^ Nat.succ n) (ZMod p)) (X + 1)) k = 0
[PROOFSTEP]
simpa [map_comp] using hn
[GOAL]
case refine_2.succ.hn
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
⊢ p ∣ p ^ Nat.succ n
[PROOFSTEP]
exact ⟨p ^ n, by rw [pow_succ]⟩
[GOAL]
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
hn :
  ∀ {n_1 : ℕ},
    n_1 < natDegree (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) →
      coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) n_1 ∈ Submodule.span ℤ {↑p}
i : ℕ
hi : i < natDegree (comp (cyclotomic (p ^ (Nat.succ n + 1)) ℤ) (X + 1))
⊢ p ^ Nat.succ n = p * p ^ n
[PROOFSTEP]
rw [pow_succ]
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ¬coeff (comp (cyclotomic (p ^ (n + 1)) ℤ) (X + 1)) 0 ∈ Submodule.span ℤ {↑p} ^ 2
[PROOFSTEP]
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]
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ¬∑ i in range p, eval 1 ((X ^ p ^ n) ^ i) ∈ Submodule.span ℤ {↑p} ^ 2
[PROOFSTEP]
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]
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
⊢ ¬↑p ^ 2 ∣ ↑p
[PROOFSTEP]
intro h
[GOAL]
case refine_3
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : ↑p ^ 2 ∣ ↑p
⊢ False
[PROOFSTEP]
obtain ⟨k, hk⟩ := Int.coe_nat_dvd.1 h
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : p = 1 * p * p * k
⊢ False
[PROOFSTEP]
rw [mul_assoc, mul_comm 1, mul_one] at hk
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : p = p * (p * k)
⊢ False
[PROOFSTEP]
nth_rw 1 [← Nat.mul_one p] at hk
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : p * 1 = p * (p * k)
⊢ False
[PROOFSTEP]
rw [mul_right_inj' hp.out.ne_zero] at hk
[GOAL]
case refine_3.intro
R : Type u
p : ℕ
hp : Fact (Nat.Prime p)
n : ℕ
h : ↑p ^ 2 ∣ ↑p
k : ℕ
hk : 1 = p * k
⊢ False
[PROOFSTEP]
exact Nat.Prime.not_dvd_one hp.out (Dvd.intro k hk.symm)
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
⊢ p ∣ coeff Q 0
[PROOFSTEP]
letI := B.finiteDimensional
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
⊢ p ∣ coeff Q 0
[PROOFSTEP]
let P := minpoly R B.gen
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
⊢ p ∣ coeff Q 0
[PROOFSTEP]
obtain ⟨n, hn⟩ := Nat.exists_eq_succ_of_ne_zero B.dim_pos.ne'
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
⊢ p ∣ coeff Q 0
[PROOFSTEP]
have finrank_K_L : FiniteDimensional.finrank K L = B.dim := B.finrank
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
⊢ p ∣ coeff Q 0
[PROOFSTEP]
have deg_K_P : (minpoly K B.gen).natDegree = B.dim := B.natDegree_minpoly
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
⊢ p ∣ coeff Q 0
[PROOFSTEP]
have deg_R_P : P.natDegree = B.dim := by
  rw [← deg_K_P, minpoly.isIntegrallyClosed_eq_field_fractions' K hBint,
    (minpoly.monic hBint).natDegree_map (algebraMap R K)]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
⊢ natDegree P = B.dim
[PROOFSTEP]
rw [← deg_K_P, minpoly.isIntegrallyClosed_eq_field_fractions' K hBint,
  (minpoly.monic hBint).natDegree_map (algebraMap R K)]
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
⊢ p ∣ coeff Q 0
[PROOFSTEP]
choose! f hf using
  hei.isWeaklyEisensteinAt.exists_mem_adjoin_mul_eq_pow_natDegree_le (minpoly.aeval R B.gen) (minpoly.monic hBint)
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
⊢ p ∣ coeff Q 0
[PROOFSTEP]
simp only [(minpoly.monic hBint).natDegree_map, deg_R_P] at hf
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
⊢ p ∣ coeff Q 0
[PROOFSTEP]
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 =>
    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
  convert (IsUnit.dvd_mul_right ⟨(-1) ^ (n.succ * n), rfl⟩).mpr this using 1
  push_cast
  ring_nf
  rw [mul_comm _ 2, pow_mul, neg_one_sq, one_pow, mul_one]
    -- We claim the quotient of `Q^n * _` by `p^n` is the following `r`:
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
this : p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
⊢ p ∣ coeff Q 0
[PROOFSTEP]
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)
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
this : p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
⊢ p ∣ coeff Q 0
[PROOFSTEP]
refine @Prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd R _ _ _ _ n hp (?_ : _ ∣ _) hndiv
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
this : p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
⊢ p ^ succ n ∣ coeff Q 0 ^ succ n * coeff (minpoly R B.gen) 0 ^ n
[PROOFSTEP]
convert (IsUnit.dvd_mul_right ⟨(-1) ^ (n.succ * n), rfl⟩).mpr this using 1
[GOAL]
case h.e'_4
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
this : p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
⊢ coeff Q 0 ^ succ n * coeff (minpoly R B.gen) 0 ^ n =
    coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n) * ↑((-1) ^ (succ n * n))
[PROOFSTEP]
push_cast
[GOAL]
case h.e'_4
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
this : p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
⊢ coeff Q 0 ^ succ n * coeff (minpoly R B.gen) 0 ^ n =
    coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n) * (-1) ^ (succ n * n)
[PROOFSTEP]
ring_nf
[GOAL]
case h.e'_4
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
this : p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
⊢ coeff Q 0 ^ succ n * coeff (minpoly R B.gen) 0 ^ n =
    coeff Q 0 ^ succ n * coeff (minpoly R B.gen) 0 ^ n * (-1) ^ (succ n * n * 2)
[PROOFSTEP]
rw [mul_comm _ 2, pow_mul, neg_one_sq, one_pow, mul_one]
  -- We claim the quotient of `Q^n * _` by `p^n` is the following `r`:
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
⊢ p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
[PROOFSTEP]
have aux : ∀ i ∈ (range (Q.natDegree + 1)).erase 0, B.dim ≤ i + n :=
  by
  intro i hi
  simp only [mem_range, mem_erase] at hi
  rw [hn]
  exact le_add_pred_of_pos _ hi.1
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
⊢ ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
[PROOFSTEP]
intro i hi
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
i : ℕ
hi : i ∈ Finset.erase (range (natDegree Q + 1)) 0
⊢ B.dim ≤ i + n
[PROOFSTEP]
simp only [mem_range, mem_erase] at hi
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
i : ℕ
hi : i ≠ 0 ∧ i < natDegree Q + 1
⊢ B.dim ≤ i + n
[PROOFSTEP]
rw [hn]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
i : ℕ
hi : i ≠ 0 ∧ i < natDegree Q + 1
⊢ succ n ≤ i + n
[PROOFSTEP]
exact le_add_pred_of_pos _ hi.1
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
⊢ p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
[PROOFSTEP]
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 _ ?_)
  exact adjoin_le_integralClosure hBint (hf _ (aux i hi)).1
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
⊢ IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
[PROOFSTEP]
refine
  isIntegral_sub (isIntegral_mul hzint (IsIntegral.pow hBint _)) (IsIntegral.sum _ fun i hi => isIntegral_smul _ ?_)
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
i : ℕ
hi : i ∈ Finset.erase (range (natDegree Q + 1)) 0
⊢ IsIntegral R (f (i + n))
[PROOFSTEP]
exact adjoin_le_integralClosure hBint (hf _ (aux i hi)).1
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
[PROOFSTEP]
obtain ⟨r, hr⟩ := isIntegral_iff.1 (isIntegral_norm K hintsum)
[GOAL]
case intro.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ p ^ succ n ∣ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)
[PROOFSTEP]
use r
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n) = p ^ succ n * r
[PROOFSTEP]
apply IsFractionRing.injective R K
[GOAL]
case h.a
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(algebraMap R K) (coeff Q 0 ^ succ n * ((-1) ^ (succ n * n) * coeff (minpoly R B.gen) 0 ^ n)) =
    ↑(algebraMap R K) (p ^ succ n * r)
[PROOFSTEP]
simp only [_root_.map_mul, _root_.map_pow, _root_.map_neg, _root_.map_one]
  -- Both sides are actually norms:
[GOAL]
case h.a
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(algebraMap R K) (coeff Q 0) ^ succ n * ((-1) ^ (succ n * n) * ↑(algebraMap R K) (coeff (minpoly R B.gen) 0) ^ n) =
    ↑(algebraMap R K) p ^ succ n * ↑(algebraMap R K) r
[PROOFSTEP]
calc
  _ = norm K (Q.coeff 0 • B.gen ^ n) := ?_
  _ = norm K (p • (z * B.gen ^ n) - ∑ x : ℕ in (range (Q.natDegree + 1)).erase 0, p • Q.coeff x • f (x + n)) :=
    (congr_arg (norm K) (eq_sub_of_add_eq ?_))
  _ = _ := ?_
[GOAL]
case h.a.calc_1
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(algebraMap R K) (coeff Q 0) ^ succ n * ((-1) ^ (succ n * n) * ↑(algebraMap R K) (coeff (minpoly R B.gen) 0) ^ n) =
    ↑(Algebra.norm K) (coeff Q 0 • B.gen ^ n)
[PROOFSTEP]
simp only [Algebra.smul_def, algebraMap_apply R K L, Algebra.norm_algebraMap, _root_.map_mul, _root_.map_pow,
  finrank_K_L, PowerBasis.norm_gen_eq_coeff_zero_minpoly, minpoly.isIntegrallyClosed_eq_field_fractions' K hBint,
  coeff_map, ← hn]
[GOAL]
case h.a.calc_1
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(algebraMap R K) (coeff Q 0) ^ B.dim * ((-1) ^ (B.dim * n) * ↑(algebraMap R K) (coeff (minpoly R B.gen) 0) ^ n) =
    ↑(algebraMap R K) (coeff Q 0) ^ B.dim * ((-1) ^ B.dim * ↑(algebraMap R K) (coeff (minpoly R B.gen) 0)) ^ n
[PROOFSTEP]
ring
[GOAL]
case h.a.calc_2
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ coeff Q 0 • B.gen ^ n + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, p • coeff Q x • f (x + n) =
    p • (z * B.gen ^ n)
case h.a.calc_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(Algebra.norm K) (p • (z * B.gen ^ n) - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, p • coeff Q x • f (x + n)) =
    ↑(algebraMap R K) p ^ succ n * ↑(algebraMap R K) r
[PROOFSTEP]
swap
[GOAL]
case h.a.calc_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(Algebra.norm K) (p • (z * B.gen ^ n) - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, p • coeff Q x • f (x + n)) =
    ↑(algebraMap R K) p ^ succ n * ↑(algebraMap R K) r
[PROOFSTEP]
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]
[GOAL]
case h.a.calc_2
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ coeff Q 0 • B.gen ^ n + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, p • coeff Q x • f (x + n) =
    p • (z * B.gen ^ n)
[PROOFSTEP]
calc
  _ = (Q.coeff 0 • ↑1 + ∑ x : ℕ in (range (Q.natDegree + 1)).erase 0, Q.coeff x • B.gen ^ x) * B.gen ^ n := ?_
  _ = (Q.coeff 0 • B.gen ^ 0 + ∑ x : ℕ in (range (Q.natDegree + 1)).erase 0, Q.coeff x • B.gen ^ x) * B.gen ^ n := by
    rw [_root_.pow_zero]
  _ = aeval B.gen Q * B.gen ^ n := ?_
  _ = _ := by rw [hQ, Algebra.smul_mul_assoc]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ (coeff Q 0 • 1 + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • B.gen ^ x) * B.gen ^ n =
    (coeff Q 0 • B.gen ^ 0 + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • B.gen ^ x) * B.gen ^ n
[PROOFSTEP]
rw [_root_.pow_zero]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ↑(aeval B.gen) Q * B.gen ^ n = p • (z * B.gen ^ n)
[PROOFSTEP]
rw [hQ, Algebra.smul_mul_assoc]
[GOAL]
case h.a.calc_2.calc_1
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ coeff Q 0 • B.gen ^ n + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, p • coeff Q x • f (x + n) =
    (coeff Q 0 • 1 + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • B.gen ^ x) * B.gen ^ n
[PROOFSTEP]
have : ∀ i ∈ (range (Q.natDegree + 1)).erase 0, Q.coeff i • (B.gen ^ i * B.gen ^ n) = p • Q.coeff i • f (i + n) :=
  by
  intro i hi
  rw [← pow_add, ← (hf _ (aux i hi)).2, ← Algebra.smul_def, smul_smul, mul_comm _ p, smul_smul]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ ∀ (i : ℕ),
    i ∈ Finset.erase (range (natDegree Q + 1)) 0 → coeff Q i • (B.gen ^ i * B.gen ^ n) = p • coeff Q i • f (i + n)
[PROOFSTEP]
intro i hi
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
i : ℕ
hi : i ∈ Finset.erase (range (natDegree Q + 1)) 0
⊢ coeff Q i • (B.gen ^ i * B.gen ^ n) = p • coeff Q i • f (i + n)
[PROOFSTEP]
rw [← pow_add, ← (hf _ (aux i hi)).2, ← Algebra.smul_def, smul_smul, mul_comm _ p, smul_smul]
[GOAL]
case h.a.calc_2.calc_1
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
this :
  ∀ (i : ℕ),
    i ∈ Finset.erase (range (natDegree Q + 1)) 0 → coeff Q i • (B.gen ^ i * B.gen ^ n) = p • coeff Q i • f (i + n)
⊢ coeff Q 0 • B.gen ^ n + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, p • coeff Q x • f (x + n) =
    (coeff Q 0 • 1 + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • B.gen ^ x) * B.gen ^ n
[PROOFSTEP]
simp only [add_mul, smul_mul_assoc, one_mul, sum_mul, sum_congr rfl this]
[GOAL]
case h.a.calc_2.calc_2
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ (coeff Q 0 • B.gen ^ 0 + ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • B.gen ^ x) * B.gen ^ n =
    ↑(aeval B.gen) Q * B.gen ^ n
[PROOFSTEP]
rw [aeval_eq_sum_range, Finset.add_sum_erase (range (Q.natDegree + 1)) fun i => Q.coeff i • B.gen ^ i]
[GOAL]
case h.a.calc_2.calc_2
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
Q : R[X]
hQ : ↑(aeval B.gen) Q = p • z
hzint : IsIntegral R z
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
n : ℕ
hn : B.dim = succ n
finrank_K_L : FiniteDimensional.finrank K L = B.dim
deg_K_P : natDegree (minpoly K B.gen) = B.dim
deg_R_P : natDegree P = B.dim
f : ℕ → L
hf : ∀ (i : ℕ), B.dim ≤ i → f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
aux : ∀ (i : ℕ), i ∈ Finset.erase (range (natDegree Q + 1)) 0 → B.dim ≤ i + n
hintsum : IsIntegral R (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))))
      r =
    ↑(Algebra.norm K) (z * B.gen ^ n - ∑ x in Finset.erase (range (natDegree Q + 1)) 0, coeff Q x • f (x + n))
⊢ 0 ∈ range (natDegree Q + 1)
[PROOFSTEP]
simp
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hQ : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → p ∣ coeff Q i
hz : ↑(aeval x) Q = p • z
⊢ z ∈ adjoin A {x}
[PROOFSTEP]
choose! f hf using hQ
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ↑(aeval x) Q = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
⊢ z ∈ adjoin A {x}
[PROOFSTEP]
rw [aeval_eq_sum_range, sum_range] at hz
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
⊢ z ∈ adjoin A {x}
[PROOFSTEP]
conv_lhs at hz =>
  congr
  next => skip
  ext i
  rw [hf i (mem_range.2 (Fin.is_lt i)), ← smul_smul]
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i
[PROOFSTEP]
  congr
  next => skip
  ext i
  rw [hf i (mem_range.2 (Fin.is_lt i)), ← smul_smul]
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i
[PROOFSTEP]
  congr
  next => skip
  ext i
  rw [hf i (mem_range.2 (Fin.is_lt i)), ← smul_smul]
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i
[PROOFSTEP]
congr
[GOAL]
case s
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| univ
case f
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| fun i => coeff Q ↑i • x ^ ↑i
[PROOFSTEP]
next => skip
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| univ
[PROOFSTEP]
skip
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| univ
[PROOFSTEP]
skip
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| univ
[PROOFSTEP]
skip
[GOAL]
case f
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
| fun i => coeff Q ↑i • x ^ ↑i
[PROOFSTEP]
ext i
[GOAL]
case f.h
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
hz : ∑ i : Fin (natDegree Q + 1), coeff Q ↑i • x ^ ↑i = p • z
f : ℕ → A
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
i : Fin (natDegree Q + 1)
| coeff Q ↑i • x ^ ↑i
[PROOFSTEP]
rw [hf i (mem_range.2 (Fin.is_lt i)), ← smul_smul]
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
f : ℕ → A
hz : ∑ i : Fin (natDegree Q + 1), p • f ↑i • x ^ ↑i = p • z
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
⊢ z ∈ adjoin A {x}
[PROOFSTEP]
rw [← smul_sum] at hz
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
f : ℕ → A
hz : p • ∑ x_1 : Fin (natDegree Q + 1), f ↑x_1 • x ^ ↑x_1 = p • z
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
⊢ z ∈ adjoin A {x}
[PROOFSTEP]
rw [← smul_right_injective _ hp hz]
[GOAL]
R : Type u
K : Type v
L : Type z
p✝ : R
inst✝¹⁴ : CommRing R
inst✝¹³ : Field K
inst✝¹² : Field L
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra R L
inst✝⁹ : Algebra R K
inst✝⁸ : IsScalarTower R K L
inst✝⁷ : IsSeparable K L
inst✝⁶ : IsDomain R
inst✝⁵ : IsFractionRing R K
inst✝⁴ : IsIntegrallyClosed R
A : Type u_1
B : Type u_2
inst✝³ : CommSemiring A
inst✝² : CommRing B
inst✝¹ : Algebra A B
inst✝ : NoZeroSMulDivisors A B
Q : A[X]
p : A
x z : B
hp : p ≠ 0
f : ℕ → A
hz : p • ∑ x_1 : Fin (natDegree Q + 1), f ↑x_1 • x ^ ↑x_1 = p • z
hf : ∀ (i : ℕ), i ∈ range (natDegree Q + 1) → coeff Q i = p * f i
⊢ ∑ x_1 : Fin (natDegree Q + 1), f ↑x_1 • x ^ ↑x_1 ∈ adjoin A {x}
[PROOFSTEP]
exact
  Subalgebra.sum_mem _ fun _ _ => Subalgebra.smul_mem _ (Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton _)) _) _
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
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)
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
letI := finiteDimensional B
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff (minpoly R B.gen) 0
this : FiniteDimensional K L := finiteDimensional B
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
set P := minpoly R B.gen with hP
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
obtain ⟨n, hn⟩ := Nat.exists_eq_succ_of_ne_zero B.dim_pos.ne'
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
this : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
haveI : NoZeroSMulDivisors R L := NoZeroSMulDivisors.trans R K L
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
let _ :=
  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`.
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ adjoin R {B.gen}
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
rw [adjoin_singleton_eq_range_aeval] at hz
[GOAL]
case intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
hz : p • z ∈ AlgHom.range (aeval B.gen)
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
obtain ⟨Q₁, hQ⟩ := hz
[GOAL]
case intro.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
hQ : ↑↑(aeval B.gen) Q₁ = p • z
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
set Q := Q₁ %ₘ P with hQ₁
[GOAL]
case intro.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
hQ : ↑↑(aeval B.gen) Q₁ = p • z
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
replace hQ : aeval B.gen Q = p • z
[GOAL]
case hQ
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
hQ : ↑↑(aeval B.gen) Q₁ = p • z
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
⊢ ↑(aeval B.gen) Q = p • z
[PROOFSTEP]
rw [← modByMonic_add_div Q₁ (minpoly.monic hBint)] at hQ
[GOAL]
case hQ
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
hQ : ↑↑(aeval B.gen) (Q₁ %ₘ minpoly R B.gen + minpoly R B.gen * (Q₁ /ₘ minpoly R B.gen)) = p • z
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
⊢ ↑(aeval B.gen) Q = p • z
[PROOFSTEP]
simpa using hQ
[GOAL]
case intro.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
by_cases hQzero : Q = 0
[GOAL]
case pos
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : Q = 0
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
simp only [hQzero, Algebra.smul_def, zero_eq_mul, aeval_zero] at hQ
[GOAL]
case pos
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
hQ : ↑(algebraMap R L) p = 0 ∨ z = 0
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
cases' hQ with H H₁
[GOAL]
case pos.inl
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H : ↑(algebraMap R L) p = 0
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
have : Function.Injective (algebraMap R L) := by
  rw [algebraMap_eq R K L]
  exact (algebraMap K L).injective.comp (IsFractionRing.injective R K)
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H : ↑(algebraMap R L) p = 0
⊢ Function.Injective ↑(algebraMap R L)
[PROOFSTEP]
rw [algebraMap_eq R K L]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H : ↑(algebraMap R L) p = 0
⊢ Function.Injective ↑(RingHom.comp (algebraMap K L) (algebraMap R K))
[PROOFSTEP]
exact (algebraMap K L).injective.comp (IsFractionRing.injective R K)
[GOAL]
case pos.inl
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝¹ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this✝ : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H : ↑(algebraMap R L) p = 0
this : Function.Injective ↑(algebraMap R L)
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
exfalso
[GOAL]
case pos.inl.h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝¹ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this✝ : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H : ↑(algebraMap R L) p = 0
this : Function.Injective ↑(algebraMap R L)
⊢ False
[PROOFSTEP]
exact hp.ne_zero ((injective_iff_map_eq_zero _).1 this _ H)
[GOAL]
case pos.inr
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H₁ : z = 0
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
rw [H₁]
[GOAL]
case pos.inr
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : Q = 0
H₁ : z = 0
⊢ 0 ∈ adjoin R {B.gen}
[PROOFSTEP]
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_isEisensteinAt`.
[GOAL]
case neg
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
refine mem_adjoin_of_dvd_coeff_of_dvd_aeval hp.ne_zero (fun i => ?_) hQ
[GOAL]
case neg
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
i : ℕ
⊢ i ∈ range (natDegree Q + 1) → p ∣ coeff Q i
[PROOFSTEP]
induction' i using Nat.case_strong_induction_on with j hind
[GOAL]
case neg.hz
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
⊢ 0 ∈ range (natDegree Q + 1) → p ∣ coeff Q 0
[PROOFSTEP]
intro _
[GOAL]
case neg.hz
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
a✝ : 0 ∈ range (natDegree Q + 1)
⊢ p ∣ coeff Q 0
[PROOFSTEP]
exact dvd_coeff_zero_of_aeval_eq_prime_smul_of_minpoly_isEisensteinAt hp hBint hQ hzint hei
[GOAL]
case neg.hi
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
⊢ succ j ∈ range (natDegree Q + 1) → p ∣ coeff Q (succ j)
[PROOFSTEP]
intro hj
[GOAL]
case neg.hi
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
⊢ p ∣ coeff Q (succ j)
[PROOFSTEP]
convert hp.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd _ hndiv
[GOAL]
case neg.hi.convert_2
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
⊢ ℕ
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
⊢ p ^ succ ?neg.hi.convert_2✝ ∣ coeff Q (succ j) ^ succ ?neg.hi.convert_2✝ * coeff P 0 ^ ?neg.hi.convert_2✝
[PROOFSTEP]
exact n
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
have H := degree_modByMonic_lt Q₁ (minpoly.monic hBint)
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
H : degree (Q₁ %ₘ minpoly R B.gen) < degree (minpoly R B.gen)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
rw [← hQ₁, ← hP] at H
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
H : degree Q < degree P
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
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 ((natDegree_lt_natDegree_iff hQzero).2 H)))
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
H : j + 1 + 1 ≤ natDegree P
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
rw [add_assoc] at H
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
have Hj : Q.natDegree + 1 = j + 1 + (Q.natDegree - 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, Nat.add_sub_cancel]
    -- 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`-
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
⊢ natDegree Q + 1 = j + 1 + (natDegree Q - j)
[PROOFSTEP]
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, Nat.add_sub_cancel]
  -- 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`-
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hind : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → p ∣ coeff Q m
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
choose! g hg using hind
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → coeff Q m = p * g m
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
replace hg : ∀ k ∈ range (j + 1), Q.coeff k • B.gen ^ k = algebraMap R L p * g k • B.gen ^ k
[GOAL]
case hg
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → coeff Q m = p * g m
⊢ ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
[PROOFSTEP]
intro k hk
[GOAL]
case hg
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (m : ℕ), m ≤ j → m ∈ range (natDegree Q + 1) → coeff Q m = p * g m
k : ℕ
hk : k ∈ range (j + 1)
⊢ coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
[PROOFSTEP]
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)),
  Algebra.smul_def, Algebra.smul_def, RingHom.map_mul, mul_assoc]
  -- Since `minpoly R B.gen` is Eiseinstein, we can find `f : ℕ → L` such that
      -- `(map (algebraMap R L) (minpoly R B.gen)).nat_degree ≤ i` implies `f i ∈ adjoin R {B.gen}`
      -- and `(algebraMap R L) p * f i = B.gen ^ i`. We will also need `hf₁`, a reformulation of this
      -- property.
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
choose! f hf using
  IsWeaklyEisensteinAt.exists_mem_adjoin_mul_eq_pow_natDegree_le (minpoly.aeval R B.gen) (minpoly.monic hBint)
    hei.isWeaklyEisensteinAt
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
have hf₁ :
  ∀ k ∈ (range (Q.natDegree - j)).erase 0,
    Q.coeff (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (P.natDegree - (j + 2)) =
      (algebraMap R L) p * Q.coeff (j + 1 + k) • f (k + P.natDegree - 1) :=
  by
  intro k hk
  rw [smul_mul_assoc, ← pow_add, ← Nat.add_sub_assoc H, ← add_assoc j 1 1, add_comm (j + 1) 1, add_assoc (j + 1),
    add_comm _ (k + P.natDegree), Nat.add_sub_add_right, ← (hf (k + P.natDegree - 1) _).2, mul_smul_comm]
  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
    simp at hk
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
⊢ ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
[PROOFSTEP]
intro k hk
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
    ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
[PROOFSTEP]
rw [smul_mul_assoc, ← pow_add, ← Nat.add_sub_assoc H, ← add_assoc j 1 1, add_comm (j + 1) 1, add_assoc (j + 1),
  add_comm _ (k + P.natDegree), Nat.add_sub_add_right, ← (hf (k + P.natDegree - 1) _).2, mul_smul_comm]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ k + natDegree P - 1
[PROOFSTEP]
rw [(minpoly.monic hBint).natDegree_map, add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ 0 ≤ k - 1
[PROOFSTEP]
exact Nat.zero_le _
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ 1 ≤ k
[PROOFSTEP]
refine one_le_iff_ne_zero.2 fun h => ?_
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
h : k = 0
⊢ False
[PROOFSTEP]
rw [h] at hk
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
k : ℕ
hk : 0 ∈ Finset.erase (range (natDegree Q - j)) 0
h : k = 0
⊢ False
[PROOFSTEP]
simp at hk
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
suffices p ^ n.succ ∣ Q.coeff (succ j) ^ n.succ * (minpoly R B.gen).coeff 0 ^ (succ j + (P.natDegree - (j + 2)))
  by
  convert this
  rw [Nat.succ_eq_add_one, add_assoc, ← Nat.add_sub_assoc H, ← add_assoc, add_comm (j + 1), Nat.add_sub_add_left, ←
    Nat.add_sub_assoc, Nat.add_sub_add_left, hP, ← (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
    -- 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`.
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝¹ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this✝ : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
this : p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff P 0 ^ n
[PROOFSTEP]
convert this
[GOAL]
case h.e'_4.h.e'_6.h.e'_6
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝¹ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this✝ : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
this : p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
⊢ n = succ j + (natDegree P - (j + 2))
[PROOFSTEP]
rw [Nat.succ_eq_add_one, add_assoc, ← Nat.add_sub_assoc H, ← add_assoc, add_comm (j + 1), Nat.add_sub_add_left, ←
  Nat.add_sub_assoc, Nat.add_sub_add_left, hP, ← (minpoly.monic hBint).natDegree_map (algebraMap R K), ←
  minpoly.isIntegrallyClosed_eq_field_fractions' K hBint, natDegree_minpoly, hn, Nat.sub_one, Nat.pred_succ]
[GOAL]
case h.e'_4.h.e'_6.h.e'_6.h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝¹ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this✝ : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
this : p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
⊢ j + 1 ≤ natDegree P
[PROOFSTEP]
linarith
  -- 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`.
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQ : ↑(aeval B.gen) Q = p • z
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
rw [aeval_eq_sum_range, Hj, range_add, sum_union (disjoint_range_addLeftEmbedding _ _), sum_congr rfl hg, add_comm] at
  hQ
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hQ :
  ∑ x in Finset.map (addLeftEmbedding (j + 1)) (range (natDegree Q - j)), coeff Q x • B.gen ^ x +
      ∑ x in range (j + 1), ↑(algebraMap R L) p * g x • B.gen ^ x =
    p • z
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
replace hQ := congr_arg (fun x => x * B.gen ^ (P.natDegree - (j + 2))) hQ
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  (fun x => x * B.gen ^ (natDegree P - (j + 2)))
      (∑ x in Finset.map (addLeftEmbedding (j + 1)) (range (natDegree Q - j)), coeff Q x • B.gen ^ x +
        ∑ x in range (j + 1), ↑(algebraMap R L) p * g x • B.gen ^ x) =
    (fun x => x * B.gen ^ (natDegree P - (j + 2))) (p • z)
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
simp_rw [sum_map, addLeftEmbedding_apply, add_mul, sum_mul, mul_assoc] at hQ
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ∑ x in range (natDegree (Q₁ %ₘ minpoly R B.gen) - j),
        coeff (Q₁ %ₘ minpoly R B.gen) (j + 1 + x) • B.gen ^ (j + 1 + x) *
          B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) +
      ∑ x in range (j + 1), ↑(algebraMap R L) p * (g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))) =
    p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
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
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2))) +
      ↑(algebraMap R L) p *
        (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
          ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))) =
    p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
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`.
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
have hintsum :
  IsIntegral R
    (z * B.gen ^ (P.natDegree - (j + 2)) -
      (∑ 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 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]
  · exact _root_.zero_le _
  · refine one_le_iff_ne_zero.2 fun h => ?_
    rw [h] at hk
    simp at hk
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
⊢ IsIntegral R
    (z * B.gen ^ (natDegree P - (j + 2)) -
      (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
        ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
[PROOFSTEP]
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 _)))
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ IsIntegral R (f (k + natDegree P - 1))
[PROOFSTEP]
refine adjoin_le_integralClosure hBint (hf _ ?_).1
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ k + natDegree P - 1
[PROOFSTEP]
rw [(minpoly.monic hBint).natDegree_map (algebraMap R L)]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ natDegree (minpoly R B.gen) ≤ k + natDegree P - 1
[PROOFSTEP]
rw [add_comm, Nat.add_sub_assoc, le_add_iff_nonneg_right]
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ 0 ≤ k - 1
[PROOFSTEP]
exact _root_.zero_le _
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
⊢ 1 ≤ k
[PROOFSTEP]
refine one_le_iff_ne_zero.2 fun h => ?_
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : k ∈ Finset.erase (range (natDegree Q - j)) 0
h : k = 0
⊢ False
[PROOFSTEP]
rw [h] at hk
[GOAL]
case h
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
k : ℕ
hk : 0 ∈ Finset.erase (range (natDegree Q - j)) 0
h : k = 0
⊢ False
[PROOFSTEP]
simp at hk
[GOAL]
case neg.hi.convert_3
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
hintsum :
  IsIntegral R
    (z * B.gen ^ (natDegree P - (j + 2)) -
      (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
        ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
obtain ⟨r, hr⟩ := isIntegral_iff.1 (isIntegral_norm K hintsum)
[GOAL]
case neg.hi.convert_3.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hQ :
  ↑(Algebra.norm K)
      (↑(algebraMap R L) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) *
        B.gen ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(Algebra.norm K)
      (p • z * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2)) -
        ↑(algebraMap R L) p *
          (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
            ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree (minpoly R B.gen) - (j + 2))))
hintsum :
  IsIntegral R
    (z * B.gen ^ (natDegree P - (j + 2)) -
      (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
        ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
r : R
hr :
  ↑(algebraMap R
          ((fun x => K)
            (z * B.gen ^ (natDegree P - (j + 2)) -
              (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
                ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))))
      r =
    ↑(Algebra.norm K)
      (z * B.gen ^ (natDegree P - (j + 2)) -
        (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
          ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
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,
  PowerBasis.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
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hintsum :
  IsIntegral R
    (z * B.gen ^ (natDegree P - (j + 2)) -
      (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
        ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
r : R
hQ :
  ↑(algebraMap R K) (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1)) ^ B.dim *
      ((-1) ^ B.dim * ↑(algebraMap R K) (coeff (minpoly R B.gen) 0)) ^
        (j + 1 + (natDegree (minpoly R B.gen) - (j + 2))) =
    ↑(algebraMap R K) p ^ B.dim *
      ↑(algebraMap R
            ((fun x => K)
              (z * B.gen ^ (natDegree P - (j + 2)) -
                (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
                  ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))))
        r
hr :
  ↑(algebraMap R
          ((fun x => K)
            (z * B.gen ^ (natDegree P - (j + 2)) -
              (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
                ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))))
      r =
    ↑(Algebra.norm K)
      (z * B.gen ^ (natDegree P - (j + 2)) -
        (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
          ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
⊢ -1 = ↑(algebraMap R K) (-1)
[PROOFSTEP]
simp
[GOAL]
case neg.hi.convert_3.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hintsum :
  IsIntegral R
    (z * B.gen ^ (natDegree P - (j + 2)) -
      (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
        ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
r : R
hQ :
  ↑(algebraMap R K)
      (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1) ^ B.dim *
        ((-1) ^ B.dim * coeff (minpoly R B.gen) 0) ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(algebraMap R K) (p ^ B.dim * r)
hr :
  ↑(algebraMap R
          ((fun x => K)
            (z * B.gen ^ (natDegree P - (j + 2)) -
              (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
                ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))))
      r =
    ↑(Algebra.norm K)
      (z * B.gen ^ (natDegree P - (j + 2)) -
        (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
          ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
have hppdiv : p ^ B.dim ∣ p ^ B.dim * r := dvd_mul_of_dvd_left dvd_rfl _
[GOAL]
case neg.hi.convert_3.intro
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
z : L
hzint : IsIntegral R z
this✝ : FiniteDimensional K L := finiteDimensional B
P : R[X] := minpoly R B.gen
hei : IsEisensteinAt P (Submodule.span R {p})
hndiv : ¬p ^ 2 ∣ coeff P 0
hP : P = minpoly R B.gen
n : ℕ
hn : B.dim = succ n
this : NoZeroSMulDivisors R L
x✝ : L[X] := Polynomial.map (algebraMap R L) P
Q₁ : R[X]
Q : R[X] := Q₁ %ₘ P
hQ₁ : Q = Q₁ %ₘ P
hQzero : ¬Q = 0
j : ℕ
hj : succ j ∈ range (natDegree Q + 1)
H : j + (1 + 1) ≤ natDegree P
Hj : natDegree Q + 1 = j + 1 + (natDegree Q - j)
g : ℕ → R
hg : ∀ (k : ℕ), k ∈ range (j + 1) → coeff Q k • B.gen ^ k = ↑(algebraMap R L) p * g k • B.gen ^ k
f : ℕ → L
hf :
  ∀ (i : ℕ),
    natDegree (Polynomial.map (algebraMap R L) (minpoly R B.gen)) ≤ i →
      f i ∈ adjoin R {B.gen} ∧ ↑(algebraMap R L) p * f i = B.gen ^ i
hf₁ :
  ∀ (k : ℕ),
    k ∈ Finset.erase (range (natDegree Q - j)) 0 →
      coeff Q (j + 1 + k) • B.gen ^ (j + 1 + k) * B.gen ^ (natDegree P - (j + 2)) =
        ↑(algebraMap R L) p * coeff Q (j + 1 + k) • f (k + natDegree P - 1)
hintsum :
  IsIntegral R
    (z * B.gen ^ (natDegree P - (j + 2)) -
      (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
        ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
r : R
hQ :
  ↑(algebraMap R K)
      (coeff (Q₁ %ₘ minpoly R B.gen) (j + 1) ^ B.dim *
        ((-1) ^ B.dim * coeff (minpoly R B.gen) 0) ^ (j + 1 + (natDegree (minpoly R B.gen) - (j + 2)))) =
    ↑(algebraMap R K) (p ^ B.dim * r)
hr :
  ↑(algebraMap R
          ((fun x => K)
            (z * B.gen ^ (natDegree P - (j + 2)) -
              (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
                ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))))
      r =
    ↑(Algebra.norm K)
      (z * B.gen ^ (natDegree P - (j + 2)) -
        (∑ x in Finset.erase (range (natDegree Q - j)) 0, coeff Q (j + 1 + x) • f (x + natDegree P - 1) +
          ∑ x in range (j + 1), g x • B.gen ^ x * B.gen ^ (natDegree P - (j + 2))))
hppdiv : p ^ B.dim ∣ p ^ B.dim * r
⊢ p ^ succ n ∣ coeff Q (succ j) ^ succ n * coeff (minpoly R B.gen) 0 ^ (succ j + (natDegree P - (j + 2)))
[PROOFSTEP]
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
[GOAL]
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
n : ℕ
z : L
hzint : IsIntegral R z
hz : p ^ n • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
induction' n with n hn
[GOAL]
case zero
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
n : ℕ
z : L
hzint : IsIntegral R z
hz✝ : p ^ n • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
hz : p ^ Nat.zero • z ∈ adjoin R {B.gen}
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
simpa using hz
[GOAL]
case succ
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
n✝ : ℕ
z : L
hzint : IsIntegral R z
hz✝ : p ^ n✝ • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
n : ℕ
hn : p ^ n • z ∈ adjoin R {B.gen} → z ∈ adjoin R {B.gen}
hz : p ^ succ n • z ∈ adjoin R {B.gen}
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
rw [_root_.pow_succ, mul_smul] at hz
[GOAL]
case succ
R : Type u
K : Type v
L : Type z
p : R
inst✝¹⁰ : CommRing R
inst✝⁹ : Field K
inst✝⁸ : Field L
inst✝⁷ : Algebra K L
inst✝⁶ : Algebra R L
inst✝⁵ : Algebra R K
inst✝⁴ : IsScalarTower R K L
inst✝³ : IsSeparable K L
inst✝² : IsDomain R
inst✝¹ : IsFractionRing R K
inst✝ : IsIntegrallyClosed R
B : PowerBasis K L
hp : _root_.Prime p
hBint : IsIntegral R B.gen
n✝ : ℕ
z : L
hzint : IsIntegral R z
hz✝ : p ^ n✝ • z ∈ adjoin R {B.gen}
hei : IsEisensteinAt (minpoly R B.gen) (Submodule.span R {p})
n : ℕ
hn : p ^ n • z ∈ adjoin R {B.gen} → z ∈ adjoin R {B.gen}
hz : p • p ^ n • z ∈ adjoin R {B.gen}
⊢ z ∈ adjoin R {B.gen}
[PROOFSTEP]
exact hn (mem_adjoin_of_smul_prime_smul_of_minpoly_isEisensteinAt hp hBint (isIntegral_smul _ hzint) hz hei)