PatternMatchPolynomialCategory(S, E, V, R, P)ΒΆ
patmatch1.spad line 725 [edit on github]
S: SetCategory
V: OrderedSet
R: Join(Ring, Comparable, PatternMatchable S)
P: Join(PolynomialCategory(R, E, V), ConvertibleTo Pattern S)
This package provides pattern matching functions on polynomials.
- patternMatch: (P, Pattern S, PatternMatchResult(S, P)) -> PatternMatchResult(S, P) if V has PatternMatchable S
patternMatch(p, pat, res)
matches the patternpat
to the polynomialp
; res contains the variables ofpat
which are already matched and their matches.
- patternMatch: (P, Pattern S, PatternMatchResult(S, P), (V, Pattern S, PatternMatchResult(S, P)) -> PatternMatchResult(S, P)) -> PatternMatchResult(S, P)
patternMatch(p, pat, res, vmatch)
matches the patternpat
to the polynomialp
.res
contains the variables ofpat
which are already matched and their matches; vmatch is the matching function to use on the variables.