Skip to content

Commit d0d9aeb

Browse files
committed
Fix error
1 parent 812ab35 commit d0d9aeb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Mathlib/Analysis/Polynomial/Order.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ theorem zero_lt_negOnePow_mul_eval_of_lt_roots_of_leadingCoeff_nonneg
8787
have hroots' y (hy : (P.comp (-X)).IsRoot y) : y < -x := by
8888
grind [show P.IsRoot (-y) by rwa [IsRoot.def, eval_comp, eval_neg, eval_X, ← IsRoot.def] at hy]
8989
have hlc' : 0 ≤ Int.negOnePow (P.comp (-X)).natDegree * (P.comp (-X)).leadingCoeff := by
90-
simpa [natDegree_comp, Int.negOnePow_def, ← mul_assoc]
90+
rw [show (P.comp (-X)).leadingCoeff = P.leadingCoeff * Int.negOnePow P.natDegree by simp; ring,
91+
show (P.comp (-X)).natDegree = P.natDegree by simp [natDegree_comp], mul_comm, mul_assoc]
92+
simpa [Int.cast_negOnePow_natCast, pow_right_comm]
9193
cases P.natDegree.even_or_odd
9294
case inl h =>
9395
rw [Int.negOnePow_even] at hlc' ⊢

0 commit comments

Comments
 (0)