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, t1) -> (a, t) -> Ordering
- mergeTerms :: (Eq t, Num t, Ord t1) => [(t1, t)] -> [(t1, t)] -> [(t1, t)]
- collect :: (Eq a, Eq t, Num a) => [(t, a)] -> [(t, a)]
- 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 t1 t -> t1
- lt :: NPoly r v -> NPoly r v
- quotRemNP :: (Fractional t1, Show t, Ord t, Eq t1) => NPoly t1 t -> [NPoly t1 t] -> ([(NPoly t1 t, NPoly t1 t)], NPoly t1 t)
- remNP :: (Fractional t1, Show t, Ord t, Eq t1) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t
- (%%) :: (Eq t1, Ord t, Show t, Fractional t1) => NPoly t1 t -> [NPoly t1 t] -> NPoly t1 t
- remNP2 :: (Show v, Ord v, Num t, Eq t) => NPoly t v -> [NPoly t v] -> NPoly t v
- toMonic :: (Fractional r, Show v, Ord v, Eq r) => NPoly r v -> NPoly r v
- inject :: (Show v, Eq v, Eq r, Num r) => r -> NPoly r v
- subst :: (Num r1, Num r, Show t, Show r1, Show v, Eq t, Eq r1, Eq r, Ord v) => [(NPoly r1 t, NPoly r v)] -> NPoly r t -> NPoly r v
- class Invertible a where
- (^-) :: (Num a, Invertible a, Integral b) => a -> b -> a

# Documentation

newtype Monomial v Source #

Constructors

M [v] |

Instances

Eq v => Eq (Monomial v) Source # |
Methods (==) :: Monomial v -> Monomial v -> Bool # (/=) :: Monomial v -> Monomial v -> Bool #
(Eq v, Show v) => Num (Monomial v) Source # |
Methods (+) :: Monomial v -> Monomial v -> Monomial v # (-) :: Monomial v -> Monomial v -> Monomial v # (*) :: Monomial v -> Monomial v -> Monomial v # negate :: Monomial v -> Monomial v # abs :: Monomial v -> Monomial v # signum :: Monomial v -> Monomial v # fromInteger :: Integer -> Monomial v #
Ord v => Ord (Monomial v) Source # |
Methods compare :: Monomial v -> Monomial v -> Ordering # (<) :: Monomial v -> Monomial v -> Bool # (<=) :: Monomial v -> Monomial v -> Bool # (>) :: Monomial v -> Monomial v -> Bool # (>=) :: Monomial v -> Monomial v -> Bool # max :: Monomial v -> Monomial v -> Monomial v # min :: Monomial v -> Monomial v -> Monomial v #
(Eq v, Show v) => Show (Monomial v) Source # |
Methods showsPrec :: Int -> Monomial v -> ShowS # show :: Monomial v -> String # showList :: [Monomial v] -> ShowS #

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 # |
Methods (==) :: NPoly r v -> NPoly r v -> Bool # (/=) :: NPoly r v -> NPoly r v -> Bool #
(Eq k, Fractional k, Ord v, Show v) => Fractional (NPoly k v) Source # |
Methods (/) :: NPoly k v -> NPoly k v -> NPoly k v # recip :: NPoly k v -> NPoly k v # fromRational :: Rational -> NPoly k v #
(Eq r, Num r, Ord v, Show v) => Num (NPoly r v) Source # |
Methods (+) :: NPoly r v -> NPoly r v -> NPoly r v # (-) :: NPoly r v -> NPoly r v -> NPoly r v # (*) :: NPoly r v -> NPoly r v -> NPoly r v # negate :: NPoly r v -> NPoly r v # abs :: NPoly r v -> NPoly r v # signum :: NPoly r v -> NPoly r v # fromInteger :: Integer -> NPoly r v #
(Ord r, Ord v) => Ord (NPoly r v) Source # |
Methods compare :: NPoly r v -> NPoly r v -> Ordering # (<) :: NPoly r v -> NPoly r v -> Bool # (<=) :: NPoly r v -> NPoly r v -> Bool # (>) :: NPoly r v -> NPoly r v -> Bool # (>=) :: NPoly r v -> NPoly r v -> Bool # max :: NPoly r v -> NPoly r v -> NPoly r v # min :: NPoly r v -> NPoly r v -> NPoly r v #
(Show r, Eq v, Show v) => Show (NPoly r v) Source # |
Methods showsPrec :: Int -> NPoly r v -> ShowS # show :: NPoly r v -> String # showList :: [NPoly r v] -> ShowS #
Invertible (NPoly LPQ BraidGens) Source # |
Methods inv :: NPoly LPQ BraidGens -> NPoly LPQ BraidGens Source #
Invertible (NPoly LPQ IwahoriHeckeGens) Source # |
Methods inv :: NPoly LPQ IwahoriHeckeGens -> NPoly LPQ IwahoriHeckeGens Source #

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

mergeTerms :: (Eq t, Num t, Ord t1) => [(t1, t)] -> [(t1, t)] -> [(t1, t)] Source #

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

data Var Source #

Constructors

X |
Y |
Z |

Instances

Eq Var Source # |
Methods (==) :: Var -> Var -> Bool # (/=) :: Var -> Var -> Bool #
Ord Var Source # |
Methods compare :: Var -> Var -> Ordering # (<) :: Var -> Var -> Bool # (<=) :: Var -> Var -> Bool # (>) :: Var -> Var -> Bool # (>=) :: Var -> Var -> Bool # max :: Var -> Var -> Var # min :: Var -> Var -> Var #
Show Var Source # |
Methods showsPrec :: Int -> Var -> ShowS # show :: Var -> String # showList :: [Var] -> ShowS #

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 t1 t -> t1 Source #

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

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

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

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

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

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

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

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

class Invertible a where Source #

Minimal complete definition

inv

Methods

inv :: a -> a Source #

Instances

Invertible (NPoly LPQ BraidGens) Source # |
Methods inv :: NPoly LPQ BraidGens -> NPoly LPQ BraidGens Source #
Invertible (NPoly LPQ IwahoriHeckeGens) Source # |
Methods inv :: NPoly LPQ IwahoriHeckeGens -> NPoly LPQ IwahoriHeckeGens Source #

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