HaskellForMaths-0.4.8: Combinatorics, group theory, commutative algebra, non-commutative algebra

Safe HaskellNone
LanguageHaskell98

Math.Algebras.Commutative

Description

A module defining the algebra of commutative polynomials over a field k.

Most users should probably use Math.CommutativeAlgebra.Polynomial instead, which is basically the same thing but more fully-featured. This module will probably be deprecated at some point, but remains for now because it has a simpler implementation which may be more helpful for people wanting to understand the code.

Synopsis

Documentation

data GlexMonomial v Source #

Constructors

Glex Int [(v, Int)] 

type GlexPoly k v = Vect k (GlexMonomial v) Source #

glexVar :: Num k => v -> GlexPoly k v Source #

glexVar creates a variable in the algebra of commutative polynomials with Glex term ordering. For example, the following code creates variables called x, y and z:

[x,y,z] = map glexVar ["x","y","z"] :: GlexPoly Q String

class Monomial m where Source #

Minimal complete definition

var, powers

Methods

var :: v -> Vect Q (m v) Source #

powers :: m v -> [(v, Int)] Source #

Instances

Monomial GlexMonomial Source # 

Methods

var :: v -> Vect Q (GlexMonomial v) Source #

powers :: GlexMonomial v -> [(v, Int)] Source #

Monomial SL2 Source # 

Methods

var :: v -> Vect Q (SL2 v) Source #

powers :: SL2 v -> [(v, Int)] Source #

bind :: (Monomial m, Eq k, Num k, Ord b, Show b, Algebra k b) => Vect k (m v) -> (v -> Vect k b) -> Vect k b Source #

In effect, we have (Num k, Monomial m) => Monad (v -> Vect k (m v)), with return = var, and (>>=) = bind. However, we can't express this directly in Haskell, firstly because of the Ord b constraint, secondly because Haskell doesn't support type functions.

lt :: Vect t1 t -> (t, t1) Source #

class DivisionBasis b where Source #

Minimal complete definition

dividesB, divB

Methods

dividesB :: b -> b -> Bool Source #

divB :: b -> b -> b Source #

dividesT :: DivisionBasis b => (b, t1) -> (b, t) -> Bool Source #

divT :: (Fractional t, DivisionBasis t1) => (t1, t) -> (t1, t) -> (t1, t) Source #

quotRemMP :: (Fractional t, DivisionBasis b, Algebra t b, Show b, Ord b, Eq t) => Vect t b -> [Vect t b] -> ([Vect t b], Vect t b) Source #

(%%) :: (Eq k, Fractional k, Ord b, Show b, Algebra k b, DivisionBasis b) => Vect k b -> [Vect k b] -> Vect k b infixl 7 Source #

(%%) reduces a polynomial with respect to a list of polynomials.