singular-factory-0.1: Multivariate polynomial factorization via bindings to Singular-factory

Safe HaskellNone
LanguageHaskell2010

Math.Singular.Factory.Polynomial

Contents

Description

High-level bindings to singular-factory

Synopsis

Polynomials

newtype Polynomial varset domain Source #

A multivariate polynomial over a base domain.

Typically, you want to fix your variable set (see the module Math.Singular.Factory.Variables), make a type synonym, and use that; for example:

type Poly domain = Polynomial (VarN "x") domain

Constructors

Poly 

Fields

Instances
Eq (Polynomial vars domain) Source # 
Instance details

Defined in Math.Singular.Factory.Polynomial

Methods

(==) :: Polynomial vars domain -> Polynomial vars domain -> Bool #

(/=) :: Polynomial vars domain -> Polynomial vars domain -> Bool #

BaseDomain domain => Num (Polynomial vars domain) Source # 
Instance details

Defined in Math.Singular.Factory.Polynomial

Methods

(+) :: Polynomial vars domain -> Polynomial vars domain -> Polynomial vars domain #

(-) :: Polynomial vars domain -> Polynomial vars domain -> Polynomial vars domain #

(*) :: Polynomial vars domain -> Polynomial vars domain -> Polynomial vars domain #

negate :: Polynomial vars domain -> Polynomial vars domain #

abs :: Polynomial vars domain -> Polynomial vars domain #

signum :: Polynomial vars domain -> Polynomial vars domain #

fromInteger :: Integer -> Polynomial vars domain #

VariableSet vars => Show (Polynomial vars domain) Source # 
Instance details

Defined in Math.Singular.Factory.Polynomial

Methods

showsPrec :: Int -> Polynomial vars domain -> ShowS #

show :: Polynomial vars domain -> String #

showList :: [Polynomial vars domain] -> ShowS #

polyIsZero :: Polynomial vars domain -> Bool Source #

polyIsOne :: Polynomial vars domain -> Bool Source #

inBaseDomain :: Polynomial vars domain -> Bool Source #

Returns true if the polynomial is a constant

mbConstant :: BaseDomain domain => Polynomial vars domain -> Maybe domain Source #

If it is a constant, returns the value

konst :: BaseDomain domain => domain -> Polynomial vars domain Source #

A constant polynomial

var :: VarIdx -> Polynomial vars domain Source #

A variable as a polynomial

varPow :: VarIdx -> Int -> Polynomial vars domain Source #

A power of a variable

Operations on polynomials

mapIntoDomain :: forall domain1 domain2 vars. (BaseDomain domain1, BaseDomain domain2) => Polynomial vars domain1 -> Polynomial vars domain2 Source #

pow :: BaseDomain domain => Polynomial vars domain -> Int -> Polynomial vars domain Source #

polyGCD :: BaseDomain domain => Polynomial vars domain -> Polynomial vars domain -> Polynomial vars domain Source #

Polynomial GCD

polyReduce :: BaseDomain domain => Polynomial vars domain -> Polynomial vars domain -> Polynomial vars domain Source #

Polynomial reduction

factorize :: BaseDomain domain => Polynomial vars domain -> [(Polynomial vars domain, Int)] Source #

Polynomial factorization

substitute1 :: BaseDomain domain => VarIdx -> Polynomial vars domain -> Polynomial vars domain -> Polynomial vars domain Source #

Substitution

evaluate :: BaseDomain domain => (VarIdx -> domain) -> Polynomial vars domain -> domain Source #

Evaluate a polynomial at the given point

Parsing

parsePolynomial :: forall vars. VariableSet vars => Text -> Maybe (Polynomial vars Integer) Source #

Parse a polynomial in expanded form

parsePolyExpr :: forall vars. VariableSet vars => Text -> Maybe (Polynomial vars Integer) Source #

Parse a polynomial expression (for example the product of two polynomials)