case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ degreeLE R ↑n ≤ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))

case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1))) ≤ degreeLE R ↑n
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ degreeLE R ↑n = Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
apply le_antisymm
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ ↑(range (n + 1)) ⊆ (fun n => X ^ n) ⁻¹' ↑(degreeLE R ↑n)
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1))) ≤ degreeLE R ↑n
rw [Submodule.span_le, Finset.coe_image, Set.image_subset_iff]
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n k : ℕ
hk : k ∈ ↑(range (n + 1))
⊢ k ∈ (fun n => X ^ n) ⁻¹' ↑(degreeLE R ↑n)
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ ↑(range (n + 1)) ⊆ (fun n => X ^ n) ⁻¹' ↑(degreeLE R ↑n)
intro k hk
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n k : ℕ
hk : k ∈ ↑(range (n + 1))
⊢ degree ((fun n => X ^ n) k) ≤ ↑n
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n k : ℕ
hk : k ∈ ↑(range (n + 1))
⊢ k ∈ (fun n => X ^ n) ⁻¹' ↑(degreeLE R ↑n)
apply mem_degreeLE.2
no goals
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n k : ℕ
hk : k ∈ ↑(range (n + 1))
⊢ degree ((fun n => X ^ n) k) ≤ ↑n
exact
  (degree_X_pow_le _).trans (WithBot.coe_le_coe.2 <| Nat.le_of_lt_succ <| Finset.mem_range.1 hk)
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : p ∈ degreeLE R ↑n
⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
⊢ degreeLE R ↑n ≤ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
intro p hp
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : p ∈ degreeLE R ↑n
⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
replace hp := mem_degreeLE.1 hp
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
⊢ ∑ n in support p, ↑(monomial n) (coeff p n) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
⊢ p ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
rw [← Polynomial.sum_monomial_eq p, Polynomial.sum]
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
k : ℕ
hk : k ∈ support p
⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
⊢ ∑ n in support p, ↑(monomial n) (coeff p n) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
refine' Submodule.sum_mem _ fun k hk => _
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
k : ℕ
hk : k ∈ support p
this : k ≤ ↑n
⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
k : ℕ
hk : k ∈ support p
⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
have := WithBot.coe_le_coe.1 (Finset.sup_le_iff.1 hp k hk)
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
k : ℕ
hk : k ∈ support p
this : k ≤ ↑n
⊢ coeff p k • X ^ k ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
k : ℕ
hk : k ∈ support p
this : k ≤ ↑n
⊢ ↑(monomial k) (coeff p k) ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
rw [← C_mul_X_pow_eq_monomial, C_mul']
no goals
case a
R : Type u
S : Type ?u.6585
inst✝ : Semiring R
n : ℕ
p : R[X]
hp : degree p ≤ ↑n
k : ℕ
hk : k ∈ support p
this : k ≤ ↑n
⊢ coeff p k • X ^ k ∈ Submodule.span R ↑(image (fun n => X ^ n) (range (n + 1)))
refine'
  Submodule.smul_mem _ _
    (Submodule.subset_span <|
      Finset.mem_coe.2 <|
        Finset.mem_image.2 ⟨_, Finset.mem_range.2 (Nat.lt_succ_of_le this), rfl⟩)