Skip to content

Commit 119f074

Browse files
committed
Relax assumptions
1 parent 52c3ea1 commit 119f074

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

Mathlib/Analysis/Polynomial/Order.lean

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ section PolynomialSign
3030

3131
variable {P : ℝ[X]} {x : ℝ}
3232

33-
theorem zero_lt_eval_of_roots_lt_of_leadingCoeff_pos
34-
(hroots : ∀ y, P.IsRoot y → y < x) (hlc : 0 < P.leadingCoeff) : 0 < P.eval x := by
33+
theorem zero_lt_eval_of_roots_lt_of_leadingCoeff_nonneg
34+
(hroots : ∀ y, P.IsRoot y → y < x) (hlc : 0 ≤ P.leadingCoeff) : 0 < P.eval x := by
35+
replace hlc : 0 < P.leadingCoeff := by
36+
contrapose! hroots
37+
exact ⟨x, by simp [leadingCoeff_eq_zero.mp <| eq_of_le_of_ge hroots hlc], le_refl x⟩
3538
by_cases! hdeg : P.degree ≤ 0
3639
· rwa [eq_C_of_degree_le_zero hdeg, ← natDegree_eq_zero_iff_degree_le_zero.mpr hdeg, eval_C]
3740
contrapose! hroots
@@ -48,16 +51,14 @@ theorem zero_le_eval_of_roots_le_of_leadingCoeff_nonneg
4851
by_cases! hroots' : ∃ y, P.IsRoot y ∧ x ≤ y
4952
· obtain ⟨y, hroot, hle⟩ := hroots'
5053
rw [eq_of_le_of_ge hle (hroots y hroot), hroot]
51-
by_cases! hlc' : P.leadingCoeff ≤ 0
52-
· rw [leadingCoeff_eq_zero.mp <| eq_of_le_of_ge hlc' hlc, eval_zero]
53-
· exact (zero_lt_eval_of_roots_lt_of_leadingCoeff_pos hroots' hlc').le
54+
· exact (zero_lt_eval_of_roots_lt_of_leadingCoeff_nonneg hroots' hlc).le
5455

55-
theorem eval_lt_zero_of_roots_lt_of_leadingCoeff_neg
56-
(hroots : ∀ y, P.IsRoot y → y < x) (hlc : P.leadingCoeff < 0) : P.eval x < 0 := by
56+
theorem eval_lt_zero_of_roots_lt_of_leadingCoeff_nonpos
57+
(hroots : ∀ y, P.IsRoot y → y < x) (hlc : P.leadingCoeff 0) : P.eval x < 0 := by
5758
suffices 0 < (-P).eval x by apply neg_pos.mp; rwa [← eval_neg]
58-
refine zero_lt_eval_of_roots_lt_of_leadingCoeff_pos (fun y hy => hroots y ?_) ?_
59+
refine zero_lt_eval_of_roots_lt_of_leadingCoeff_nonneg (fun y hy => hroots y ?_) ?_
5960
· rwa [IsRoot, ← neg_zero, ← neg_eq_iff_eq_neg, ← eval_neg]
60-
· rwa [leadingCoeff_neg, neg_pos]
61+
· rwa [leadingCoeff_neg, le_neg, neg_zero]
6162

6263
theorem eval_le_zero_of_roots_le_of_leadingCoeff_nonpos
6364
(hroots : ∀ y, P.IsRoot y → y ≤ x) (hlc : P.leadingCoeff ≤ 0) : P.eval x ≤ 0 := by

0 commit comments

Comments
 (0)