oalg-base-3.0.0.0: Algebraic structures on oriented entities and limits as a tool kit to solve algebraic problems.
Copyright(c) Erich Gut
LicenseBSD3
Maintainerzerich.gut@gmail.com
Safe HaskellNone
LanguageHaskell2010

OAlg.Entity.Product.ProductSymbol

Description

free products of symbols in x with index type N.

Synopsis

ProductSymbol

newtype ProductSymbol x Source #

free product of symbols in x with index type N.

Example

The expression sy 'a' constructs a free product of exactly one symbol in Char consisting just of the character 'a'.

>>> sy 'a'
ProductSymbol['a']

they are Total Multiplicative

>>> sy 'a' * sy 'b' * sy 'c'
ProductSymbol['a'*'b'*'c']

and admit a listing

>>> list (Proxy :: Proxy N) (sy 'a' * sy 'b' * sy 'c')
[('a',0),('b',1),('c',2)]

they have a compact representation for repetitions

>>> sy 'a' * sy 'b' * sy 'b' * sy 'a' * sy 'c'
ProductSymbol['a'*'b'^2*'a'*'c']
>>> sy 'a' * sy 'b' * sy 'b' * sy 'a' * sy 'c' == sy 'a' * sy 'b' ^ 2 * sy 'a' * sy 'c'
True

but they are not Commutative

>>> sy 'a' * sy 'b' ^ 2 * sy 'a' * sy 'c' == sy 'a' ^ 2 * sy 'b' ^ 2 * sy 'c'
False

and they admit a total right operation <* of Permutation N

>>> (sy 'a' * sy 'b' ^ 2 * sy 'a' * sy 'c') <* (pmtSwap 1 3 :: Permutation N)
ProductSymbol['a'^2*'b'^2*'c']

Note

  1. Free products of symbols are finite complete sequences and allow a compact representation for repetitions and serve merely as dimensions for matrices (see OAlg.Entity.Matrix.Dim).
  2. Possibly infinite complete sequences are represented by [x].

Constructors

ProductSymbol (Product N (U x)) 

Instances

Instances details
Foldable ProductSymbol Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

fold :: Monoid m => ProductSymbol m -> m #

foldMap :: Monoid m => (a -> m) -> ProductSymbol a -> m #

foldMap' :: Monoid m => (a -> m) -> ProductSymbol a -> m #

foldr :: (a -> b -> b) -> b -> ProductSymbol a -> b #

foldr' :: (a -> b -> b) -> b -> ProductSymbol a -> b #

foldl :: (b -> a -> b) -> b -> ProductSymbol a -> b #

foldl' :: (b -> a -> b) -> b -> ProductSymbol a -> b #

foldr1 :: (a -> a -> a) -> ProductSymbol a -> a #

foldl1 :: (a -> a -> a) -> ProductSymbol a -> a #

toList :: ProductSymbol a -> [a] #

null :: ProductSymbol a -> Bool #

length :: ProductSymbol a -> Int #

elem :: Eq a => a -> ProductSymbol a -> Bool #

maximum :: Ord a => ProductSymbol a -> a #

minimum :: Ord a => ProductSymbol a -> a #

sum :: Num a => ProductSymbol a -> a #

product :: Num a => ProductSymbol a -> a #

Entity x => ConstructableSequence ProductSymbol N x Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Sequence ProductSymbol N x Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

graph :: p N -> ProductSymbol x -> Graph N x Source #

list :: p N -> ProductSymbol x -> [(x, N)] Source #

(??) :: ProductSymbol x -> N -> Maybe x Source #

Entity x => PermutableSequence CSequence N x Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Methods

permuteBy :: p N -> (w -> w -> Ordering) -> (x -> w) -> CSequence x -> (CSequence x, Permutation N) Source #

Entity x => Show (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

(Show x, Validable x, Eq x, Typeable x) => Eq (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

(Show x, Validable x, Typeable x, Ord x) => Ord (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Entity x => Constructable (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Exposable (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Associated Types

type Form (ProductSymbol x) 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

LengthN (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

lengthN :: ProductSymbol x -> N Source #

(Show x, Validable x, Eq x, Typeable x) => Validable (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Entity x => Exponential (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Associated Types

type Exponent (ProductSymbol x) 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

(Show x, Validable x, Eq x, Typeable x) => Multiplicative (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Entity x => Oriented (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

EqPoint (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

ShowPoint (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

TypeablePoint (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

ValidablePoint (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Entity x => Projectible (ProductSymbol x) [x] Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

prj :: [x] -> ProductSymbol x Source #

Entity x => Opr (Permutation N) (CSequence x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Entity x => TotalOpr (Permutation N) (CSequence x) Source # 
Instance details

Defined in OAlg.Entity.Sequence.Permutation

Entity x => Projectible (ProductSymbol x) (Word N x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

prj :: Word N x -> ProductSymbol x Source #

type Form (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

type Exponent (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

type Point (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

type Point (ProductSymbol x) = ()

sy :: Entity x => x -> ProductSymbol x Source #

symbol of an entity, i.e. the complete sequence of psyLength one consisting just of it.

Example

>>> sy 'a'
ProductSymbol['a']
>>> sy 'a' * sy 'b' * sy 'b' ^ 5 * sy 'c'
ProductSymbol['a'*'b'^6*'c']

psyShow :: Entity x => ProductSymbol x -> String Source #

showing as a product of symbols.

psyxs :: ProductSymbol x -> [(x, N)] Source #

the indexed listing of the symbols.

psywrd :: Entity x => ProductSymbol x -> Word N x Source #

the underlying word.

wrdpsy :: Entity x => Word N x -> ProductSymbol x Source #

from word.

nProxy :: Proxy N Source #

proxy for N.

psyJoin :: Entity x => ProductSymbol (ProductSymbol x) -> ProductSymbol x Source #

joining complete sequences.

productSymbol :: Entity x => [x] -> ProductSymbol x Source #

the induced product of symbols.

psyLength :: ProductSymbol x -> N Source #

the length of a complete sequence.

psyFactor :: ProductSymbol x -> N -> x Source #

the symbol for the given index.

psyMap :: Entity y => (x -> y) -> ProductSymbol x -> ProductSymbol y Source #

mapping free products of symbols.

X

xProductSymbol :: Entity x => N -> X x -> X (ProductSymbol x) Source #

random variable of complete sequences with the given maximal length.