Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit c76c3c5

Browse files
committed
feat(degree/basic.lean): degree_lt_iff_coeff_zero (#4792)
Changes to degree/basic.lean from #4786 Co-authored-by: tb65536 <tb65536@users.noreply.github.com>
1 parent 95b3add commit c76c3c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/data/polynomial/degree/basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,15 @@ theorem degree_le_iff_coeff_zero (f : polynomial R) (n : with_bot ℕ) :
742742
λ H, finset.sup_le $ λ b Hb, decidable.of_not_not $ λ Hn,
743743
(finsupp.mem_support_to_fun f b).1 Hb $ H b $ lt_of_not_ge Hn⟩
744744

745+
theorem degree_lt_iff_coeff_zero (f : polynomial R) (n : ℕ) :
746+
degree f < n ↔ ∀ m : ℕ, n ≤ m → coeff f m = 0 :=
747+
begin
748+
refine ⟨λ hf m hm, coeff_eq_zero_of_degree_lt (lt_of_lt_of_le hf (with_bot.coe_le_coe.2 hm)), _⟩,
749+
simp only [degree, finset.sup_lt_iff (with_bot.bot_lt_coe n), mem_support_iff,
750+
with_bot.some_eq_coe, with_bot.coe_lt_coe, ← @not_le ℕ],
751+
exact λ h m, mt (h m),
752+
end
753+
745754
lemma degree_lt_degree_mul_X (hp : p ≠ 0) : p.degree < (p * X).degree :=
746755
by haveI := nonzero.of_polynomial_ne hp; exact
747756
have leading_coeff p * leading_coeff X ≠ 0, by simpa,

0 commit comments

Comments
 (0)