File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def weightedDegree (p : F[X][Y]) (u v : ℕ) : Option ℕ :=
4444 List.max? <|
4545 List.map (fun n => u * (p.coeff n).natDegree + v * n) (List.range p.natDegree.succ)
4646
47- def rootMultiplicity₀ : Option ℕ :=
47+ def rootMultiplicity₀ [DecidableEq F] : Option ℕ :=
4848 let deg := weightedDegree f 1 1
4949 match deg with
5050 | none => none
@@ -53,11 +53,16 @@ def rootMultiplicity₀ : Option ℕ :=
5353 (fun x => if coeff f x.1 x.2 ≠ 0 then x.1 + x.2 else 0 )
5454 (List.product (List.range deg.succ) (List.range deg.succ)))
5555
56- noncomputable def rootMultiplicity {F : Type } [CommSemiring F] (f : F[X][Y]) (x y : F) : Option ℕ :=
56+ noncomputable def rootMultiplicity
57+ {F : Type }
58+ [CommSemiring F]
59+ [DecidableEq F] (f : F[X][Y]) (x y : F) : Option ℕ :=
5760 let X := (Polynomial.X : Polynomial F)
5861 rootMultiplicity₀ (F := F) ((f.comp (Y + (C (C y)))).map (Polynomial.compRingHom (X + C x)))
5962
60- lemma rootMultiplicity_some_implies_root {F : Type } [CommSemiring F] {x y : F} (f : F[X][Y])
63+ lemma rootMultiplicity_some_implies_root {F : Type } [CommSemiring F]
64+ [DecidableEq F]
65+ {x y : F} (f : F[X][Y])
6166 (h : some 0 < (rootMultiplicity (f := f) x y))
6267 :
6368 (f.eval 0 ).eval 0 = 0
You can’t perform that action at this time.
0 commit comments