Skip to content

Commit febaaa5

Browse files
authored
fix 2/2
1 parent 244a933 commit febaaa5

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

ArkLib/Data/MvPolynomial/Degrees.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,20 @@ theorem mem_restrictDegree_iff_degreeOf_le (p : MvPolynomial σ R) (n : ℕ) :
186186
apply Iff.trans (mem_restrictDegree_iff_sup σ p n)
187187
simp only [degreeOf]
188188

189+
/-- A polynomial in finitely many variables whose individual degrees are all at most `n` has
190+
total degree at most `(number of variables) * n`. -/
191+
theorem totalDegree_le_card_mul_of_mem_restrictDegree [Fintype σ] (p : MvPolynomial σ R) (n : ℕ)
192+
(hp : p ∈ restrictDegree σ R n) : p.totalDegree ≤ Fintype.card σ * n := by
193+
classical
194+
rw [mem_restrictDegree] at hp
195+
rw [MvPolynomial.totalDegree]
196+
apply Finset.sup_le
197+
intro s hs
198+
calc (s.sum fun _ e => e) = ∑ i : σ, s i := by
199+
rw [Finsupp.sum_fintype]; intro i; rfl
200+
_ ≤ ∑ _i : σ, n := Finset.sum_le_sum (fun i _ => hp s hs i)
201+
_ = Fintype.card σ * n := by simp [Finset.sum_const, mul_comm]
202+
189203
end DegreeOf
190204

191205
section Equiv

0 commit comments

Comments
 (0)