Synopsis

# Documentation

type Polynomial a = Polynomial_ a a Source

The type of polynomials over an arbitrary ring.

See wikipedia for more detail.

data Polynomial_ a b where Source

FIXME: Polynomial_ takes two type parameters in order to be compatible with the Category hierarchy of classes. But currently, both types must match each other. Can/Should we generalize this to allow polynomials between types?

Constructors

 Polynomial_ :: (ValidLogic a, Ring a, a ~ b) => ![a] -> Polynomial_ a b

Instances

 Source (Eq r, Show r) => Show (Polynomial_ r r) Source IsMutable (Polynomial_ a b) Source IsScalar r => FreeModule (Polynomial_ r r) Source IsScalar r => Module (Polynomial_ r r) Source (ValidLogic r, Ring r) => Ring (Polynomial_ r r) Source (ValidLogic r, Ring r) => Rig (Polynomial_ r r) Source (ValidLogic r, Ring r) => Rg (Polynomial_ r r) Source (Ring r, Abelian r) => Abelian (Polynomial_ r r) Source (ValidLogic r, Ring r) => Group (Polynomial_ r r) Source (ValidLogic r, Ring r) => Cancellative (Polynomial_ r r) Source (ValidLogic r, Ring r) => Monoid (Polynomial_ r r) Source Ring r => Semigroup (Polynomial_ r r) Source Eq b => Eq_ (Polynomial_ a b) Source (<:) (* -> * -> *) Polynomial_ Hask Source Sup (* -> * -> *) Hask Polynomial_ Hask Source Sup (* -> * -> *) Polynomial_ Hask Hask Source Source (ValidLogic a, Ring a) => Ring (ProofOf * Polynomial_ a) Source (ValidLogic a, Ring a) => Rig (ProofOf * Polynomial_ a) Source (ValidLogic a, Ring a) => Rg (ProofOf * Polynomial_ a) Source (Ring a, Abelian a) => Abelian (ProofOf * Polynomial_ a) Source (ValidLogic a, Ring a) => Group (ProofOf * Polynomial_ a) Source (ValidLogic a, Ring a) => Cancellative (ProofOf * Polynomial_ a) Source (ValidLogic a, Ring a) => Monoid (ProofOf * Polynomial_ a) Source Ring a => Semigroup (ProofOf * Polynomial_ a) Source data ProofOf * Polynomial_ = ProofOf {unProofOf :: Polynomial_ a a} Source type ValidCategory * Polynomial_ a = (ValidLogic a, Ring a) Source type (><) * * (Polynomial_ r r) r = Polynomial_ r r Source Source Source type Scalar (Polynomial_ a b) = Scalar b Source type Logic (Polynomial_ a b) = Logic b Source

sumList :: (t -> t -> t) -> [t] -> [t] -> [t] Source

pow :: Rig r => r -> Int -> r Source