Skip to content

Commit 043f26d

Browse files
committed
After rebase
1 parent 28fb534 commit 043f26d

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

ArkLib/Data/Polynomial/Bivariate.lean

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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.20 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

0 commit comments

Comments
 (0)