This definition is demonstrated in #177 . A (multivariate) polynomial is a linear combination of (multivariate) monomials. (Ord var, Ring coeff) => Poly var Natural coeff is the free commutative algebra generated by var over coeff.
newtype Mono var pow = UnsafeMono {fromMono :: Map var pow}
newtype Combo var coef = UnsafeCombo {fromCombo :: Map var coef}
type Poly var pow = Combo (Mono var pow)
This definition is demonstrated in #177 . A (multivariate) polynomial is a linear combination of (multivariate) monomials.
(Ord var, Ring coeff) => Poly var Natural coeff
is the free commutative algebra generated byvar
overcoeff
.