| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Math.Algebra.Polynomial.Multivariate.Infinite
Description
Multivariate polynomials where the variable set is the countably infinite
set {x_1, x_2, x_3, ...}
Synopsis
- newtype Poly (coeff :: *) (var :: Symbol) = Poly (FreeMod coeff (XInf var))
- unPoly :: Poly c v -> FreeMod c (XInf v)
- polyVar :: KnownSymbol var => Poly c var -> String
- renamePolyVar :: Poly c var1 -> Poly c var2
- type ZPoly = Poly Integer
- type QPoly = Poly Rational
- fromZPoly :: (Ring c, KnownSymbol v) => Poly Integer v -> Poly c v
- fromQPoly :: (Field c, KnownSymbol v) => Poly Rational v -> Poly c v
- truncate :: (Eq c, Num c, KnownNat n) => Poly c v -> Poly c v n
- newtype XInf (var :: Symbol) = XInf [Int]
Documentation
newtype Poly (coeff :: *) (var :: Symbol) Source #
A multivariate polynomial in with a given coefficient ring.
It is also indexed by the (shared) name of the variables and the number of
variable. For example Polyn Rational "x" 3 the type of polynomials in the
variables x1, x2, x3 with rational coefficients.
Instances
renamePolyVar :: Poly c var1 -> Poly c var2 Source #
fromZPoly :: (Ring c, KnownSymbol v) => Poly Integer v -> Poly c v Source #
Change the coefficient ring (from integers)
fromQPoly :: (Field c, KnownSymbol v) => Poly Rational v -> Poly c v Source #
Change the coefficient field (from rationals)
truncate :: (Eq c, Num c, KnownNat n) => Poly c v -> Poly c v n Source #
We can always truncate to a given number of variables, simply by substituting zero to the rest
newtype XInf (var :: Symbol) Source #
Monomials of the variables x1,x2,x3,.... The internal representation is a
list of exponents: x1^e1*x2^e2*x3^e3... is represented by [e1,e2,e3,...].
We assume that only finitely many nonzero exponents appear.
The type is indexed by the name of the variables.