polynomial-algebra-0.1.0.1: Multivariate polynomial rings

Safe HaskellNone
LanguageHaskell2010

Math.Algebra.Polynomial.Multivariate.Generic

Description

Multivariate polynomial algebra where the set of variables is given by the inhabitants of a type

Synopsis

Documentation

newtype Poly (coeff :: *) (var :: *) Source #

Constructors

Poly (FreeMod coeff (Monom var)) 
Instances
(Eq var, Eq coeff) => Eq (Poly coeff var) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

(==) :: Poly coeff var -> Poly coeff var -> Bool #

(/=) :: Poly coeff var -> Poly coeff var -> Bool #

(Ring c, Ord v, Pretty v) => Num (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

(+) :: Poly c v -> Poly c v -> Poly c v #

(-) :: Poly c v -> Poly c v -> Poly c v #

(*) :: Poly c v -> Poly c v -> Poly c v #

negate :: Poly c v -> Poly c v #

abs :: Poly c v -> Poly c v #

signum :: Poly c v -> Poly c v #

fromInteger :: Integer -> Poly c v #

(Ord var, Ord coeff) => Ord (Poly coeff var) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

compare :: Poly coeff var -> Poly coeff var -> Ordering #

(<) :: Poly coeff var -> Poly coeff var -> Bool #

(<=) :: Poly coeff var -> Poly coeff var -> Bool #

(>) :: Poly coeff var -> Poly coeff var -> Bool #

(>=) :: Poly coeff var -> Poly coeff var -> Bool #

max :: Poly coeff var -> Poly coeff var -> Poly coeff var #

min :: Poly coeff var -> Poly coeff var -> Poly coeff var #

(Show var, Show coeff) => Show (Poly coeff var) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

showsPrec :: Int -> Poly coeff var -> ShowS #

show :: Poly coeff var -> String #

showList :: [Poly coeff var] -> ShowS #

Ord v => FreeModule (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Associated Types

type BaseF (Poly c v) :: Type Source #

type CoeffF (Poly c v) :: Type Source #

Methods

toFreeModule :: Poly c v -> FreeMod (CoeffF (Poly c v)) (BaseF (Poly c v)) Source #

fromFreeModule :: FreeMod (CoeffF (Poly c v)) (BaseF (Poly c v)) -> Poly c v Source #

IsSigned (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

signOf :: Poly c v -> Maybe Sign Source #

(Ring c, Ord v, Pretty v, Pretty (Monom v)) => Pretty (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

(Ring c, Ord v, Pretty v) => Polynomial (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

evalP :: Num d => (CoeffP (Poly c v) -> d) -> (VarP (Poly c v) -> d) -> Poly c v -> d Source #

varSubsP :: (VarP (Poly c v) -> VarP (Poly c v)) -> Poly c v -> Poly c v Source #

coeffSubsP :: (VarP (Poly c v) -> Maybe (CoeffP (Poly c v))) -> Poly c v -> Poly c v Source #

subsP :: (VarP (Poly c v) -> Poly c v) -> Poly c v -> Poly c v Source #

(Ring c, Ord v, Pretty v) => AlmostPolynomial (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Associated Types

type CoeffP (Poly c v) :: Type Source #

type MonomP (Poly c v) :: Type Source #

type VarP (Poly c v) :: Type Source #

Methods

fromListP :: [(MonomP (Poly c v), CoeffP (Poly c v))] -> Poly c v Source #

toListP :: Poly c v -> [(MonomP (Poly c v), CoeffP (Poly c v))] Source #

zeroP :: Poly c v Source #

isZeroP :: Poly c v -> Bool Source #

oneP :: Poly c v Source #

variableP :: VarP (Poly c v) -> Poly c v Source #

singletonP :: VarP (Poly c v) -> Int -> Poly c v Source #

monomP :: MonomP (Poly c v) -> Poly c v Source #

monomP' :: MonomP (Poly c v) -> CoeffP (Poly c v) -> Poly c v Source #

scalarP :: CoeffP (Poly c v) -> Poly c v Source #

addP :: Poly c v -> Poly c v -> Poly c v Source #

subP :: Poly c v -> Poly c v -> Poly c v Source #

negP :: Poly c v -> Poly c v Source #

sumP :: [Poly c v] -> Poly c v Source #

mulP :: Poly c v -> Poly c v -> Poly c v Source #

productP :: [Poly c v] -> Poly c v Source #

coeffOfP :: MonomP (Poly c v) -> Poly c v -> CoeffP (Poly c v) Source #

mulByMonomP :: MonomP (Poly c v) -> Poly c v -> Poly c v Source #

scaleP :: CoeffP (Poly c v) -> Poly c v -> Poly c v Source #

(Ring c, Variable v) => Ring (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

Methods

isZeroR :: Poly c v -> Bool Source #

signumR :: Poly c v -> Maybe Sign Source #

absR :: Poly c v -> Poly c v Source #

isSignedR :: Proxy (Poly c v) -> Bool Source #

isAtomicR :: Proxy (Poly c v) -> Bool Source #

type BaseF (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

type BaseF (Poly c v) = Monom v
type CoeffF (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

type CoeffF (Poly c v) = c
type CoeffP (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

type CoeffP (Poly c v) = c
type MonomP (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

type MonomP (Poly c v) = Monom v
type VarP (Poly c v) Source # 
Instance details

Defined in Math.Algebra.Polynomial.Multivariate.Generic

type VarP (Poly c v) = v

unPoly :: Poly c v -> FreeMod c (Monom v) Source #

fromZPoly :: (Ring c, Variable v) => Poly Integer v -> Poly c v Source #

Change the coefficient ring (from integers)

fromQPoly :: (Field c, Variable v) => Poly Rational v -> Poly c v Source #

Change the coefficient ring (from rationals)