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

Safe Haskell | None
Language | Haskell98

Math.Algebra.NonCommutative.NCPoly

Description

A module providing a type for non-commutative polynomials.

Synopsis

- newtype Monomial v = M [v]
- divM :: Eq t => Monomial t -> Monomial t -> Maybe (Monomial t, Monomial t)
- newtype NPoly r v = NP [(Monomial v, r)]
- cmpTerm :: Ord a => (a, t) -> (a, t1) -> Ordering
- mergeTerms :: (Eq a1, Num a1, Ord a) => [(a, a1)] -> [(a, a1)] -> [(a, a1)]
- collect :: (Eq a, Eq a1, Num a1) => [(a, a1)] -> [(a, a1)]
- data Var
  - = X
  - | Y
  - | Z
- var :: Num k => v -> NPoly k v
- x :: NPoly Q Var
- y :: NPoly Q Var
- z :: NPoly Q Var
- lm :: NPoly t t1 -> Monomial t1
- lc :: NPoly t t1 -> t
- lt :: NPoly r v -> NPoly r v
- quotRemNP :: (Eq t1, Fractional t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> ([(NPoly t1 t, NPoly t1 t)], NPoly t1 t)
- remNP :: (Eq t1, Fractional t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t
- (%%) :: (Eq t1, Fractional t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t
- remNP2 :: (Eq t1, Num t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t
- toMonic :: (Eq r, Fractional r, Ord v, Show v) => NPoly r v -> NPoly r v
- inject :: (Eq r, Eq v, Num r, Show v) => r -> NPoly r v
- subst :: (Eq r, Eq v, Eq r1, Num r, Num r1, Ord v1, Show r, Show v, Show v1) => [(NPoly r v, NPoly r1 v1)] -> NPoly r1 v -> NPoly r1 v1
- class Invertible a where
  - inv :: a -> a
- (^-) :: (Integral b, Num a, Invertible a) => a -> b -> a

# Documentation

newtype Monomial v Source

Constructors

M [v] |

Instances

Eq v => Eq (Monomial v) Source |
(Eq v, Show v) => Num (Monomial v) Source |
Ord v => Ord (Monomial v) Source |
(Eq v, Show v) => Show (Monomial v) Source |

divM :: Eq t => Monomial t -> Monomial t -> Maybe (Monomial t, Monomial t) Source

newtype NPoly r v Source

Constructors

NP [(Monomial v, r)] |

Instances

(Eq r, Eq v) => Eq (NPoly r v) Source |
(Eq k, Fractional k, Ord v, Show v) => Fractional (NPoly k v) Source |
(Eq r, Num r, Ord v, Show v) => Num (NPoly r v) Source |
(Ord r, Ord v) => Ord (NPoly r v) Source |
(Show r, Eq v, Show v) => Show (NPoly r v) Source |
Invertible (NPoly LPQ BraidGens) Source |
Invertible (NPoly LPQ IwahoriHeckeGens) Source |

cmpTerm :: Ord a => (a, t) -> (a, t1) -> Ordering Source

mergeTerms :: (Eq a1, Num a1, Ord a) => [(a, a1)] -> [(a, a1)] -> [(a, a1)] Source

collect :: (Eq a, Eq a1, Num a1) => [(a, a1)] -> [(a, a1)] Source

data Var Source

Constructors

X |
Y |
Z |

Instances

Eq Var Source |
Ord Var Source |
Show Var Source |

var :: Num k => v -> NPoly k v Source

Create a non-commutative variable for use in forming non-commutative polynomials. For example, we could define x = var "x", y = var "y". Then x*y /= y*x.

x :: NPoly Q Var Source

y :: NPoly Q Var Source

z :: NPoly Q Var Source

lm :: NPoly t t1 -> Monomial t1 Source

lc :: NPoly t t1 -> t Source

lt :: NPoly r v -> NPoly r v Source

quotRemNP :: (Eq t1, Fractional t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> ([(NPoly t1 t, NPoly t1 t)], NPoly t1 t) Source

remNP :: (Eq t1, Fractional t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t Source

(%%) :: (Eq t1, Fractional t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t infixl 7 Source

remNP2 :: (Eq t1, Num t1, Ord t, Show t) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t Source

toMonic :: (Eq r, Fractional r, Ord v, Show v) => NPoly r v -> NPoly r v Source

inject :: (Eq r, Eq v, Num r, Show v) => r -> NPoly r v Source

subst :: (Eq r, Eq v, Eq r1, Num r, Num r1, Ord v1, Show r, Show v, Show v1) => [(NPoly r v, NPoly r1 v1)] -> NPoly r1 v -> NPoly r1 v1 Source

class Invertible a where Source

Methods

inv :: a -> a Source

Instances

Invertible (NPoly LPQ BraidGens) Source |
Invertible (NPoly LPQ IwahoriHeckeGens) Source |

(^-) :: (Integral b, Num a, Invertible a) => a -> b -> a Source