Theorem: Polynomial.IsWeaklyEisensteinAt.exists_mem_adjoin_mul_eq_pow_natDegree_le
File: Mathlib/RingTheory/Polynomial/Eisenstein/Basic.lean

tactic: intro i hi
state_before: R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
⊢ ∀ (i : ℕ), natDegree (Polynomial.map (algebraMap R S) f) ≤ i → ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ i

tactic: obtain ⟨k, hk⟩ := exists_add_of_le hi
state_before: R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
i : ℕ
hi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i
⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ i

tactic: rw [hk, pow_add]
state_before: case intro
R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
i : ℕ
hi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i
k : ℕ
hk : i = natDegree (Polynomial.map (algebraMap R S) f) + k
⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ i

tactic: obtain ⟨y, hy, H⟩ := exists_mem_adjoin_mul_eq_pow_natDegree hx hmo hf
state_before: case intro
R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
i : ℕ
hi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i
k : ℕ
hk : i = natDegree (Polynomial.map (algebraMap R S) f) + k
⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k

tactic: refine' ⟨y * x ^ k, _, _⟩
state_before: case intro.intro.intro
R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
i : ℕ
hi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i
k : ℕ
hk : i = natDegree (Polynomial.map (algebraMap R S) f) + k
y : S
hy : y ∈ adjoin R {x}
H : ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)
⊢ ∃ y, y ∈ adjoin R {x} ∧ ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k

tactic: exact Subalgebra.mul_mem _ hy (Subalgebra.pow_mem _ (subset_adjoin (Set.mem_singleton x)) _)
state_before: case intro.intro.intro.refine'_1
R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
i : ℕ
hi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i
k : ℕ
hk : i = natDegree (Polynomial.map (algebraMap R S) f) + k
y : S
hy : y ∈ adjoin R {x}
H : ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)
⊢ y * x ^ k ∈ adjoin R {x}

tactic: rw [← mul_assoc _ y, H]
state_before: case intro.intro.intro.refine'_2
R : Type u
inst✝² : CommRing R
𝓟 : Ideal R
f : R[X]
hf✝ : IsWeaklyEisensteinAt f 𝓟
S : Type v
inst✝¹ : CommRing S
inst✝ : Algebra R S
p : R
x : S
hx : ↑(aeval x) f = 0
hmo : Monic f
hf : IsWeaklyEisensteinAt f (Submodule.span R {p})
i : ℕ
hi : natDegree (Polynomial.map (algebraMap R S) f) ≤ i
k : ℕ
hk : i = natDegree (Polynomial.map (algebraMap R S) f) + k
y : S
hy : y ∈ adjoin R {x}
H : ↑(algebraMap R S) p * y = x ^ natDegree (Polynomial.map (algebraMap R S) f)
⊢ ↑(algebraMap R S) p * (y * x ^ k) = x ^ natDegree (Polynomial.map (algebraMap R S) f) * x ^ k