oalg-base-1.1.4.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 HaskellSafe-Inferred
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

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

Defined in OAlg.Entity.Product.ProductSymbol

(Entity 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) Source #

LengthN (ProductSymbol x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

lengthN :: ProductSymbol x -> N Source #

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

Defined in OAlg.Entity.Product.ProductSymbol

Entity x => Entity (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) Source #

Entity 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

Associated Types

type Point (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

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.

U

newtype U x Source #

adjoins the point () to an entity.

Note Serves to build sums or products over symbols in x.

Constructors

U x 

Instances

Instances details
Foldable U Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

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

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

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

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

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

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

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

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

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

toList :: U a -> [a] #

null :: U a -> Bool #

length :: U a -> Int #

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

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

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

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

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

Functor U Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

fmap :: (a -> b) -> U a -> U b #

(<$) :: a -> U b -> U a #

Show x => Show (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

showsPrec :: Int -> U x -> ShowS #

show :: U x -> String #

showList :: [U x] -> ShowS #

Eq x => Eq (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

(==) :: U x -> U x -> Bool #

(/=) :: U x -> U x -> Bool #

Ord x => Ord (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

compare :: U x -> U x -> Ordering #

(<) :: U x -> U x -> Bool #

(<=) :: U x -> U x -> Bool #

(>) :: U x -> U x -> Bool #

(>=) :: U x -> U x -> Bool #

max :: U x -> U x -> U x #

min :: U x -> U x -> U x #

Validable x => Validable (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

Methods

valid :: U x -> Statement Source #

Entity x => Entity (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

OrdPoint (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

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

Defined in OAlg.Entity.Product.ProductSymbol

Associated Types

type Point (U x) Source #

Methods

orientation :: U x -> Orientation (Point (U x)) Source #

start :: U x -> Point (U x) Source #

end :: U x -> Point (U x) Source #

type Point (U x) Source # 
Instance details

Defined in OAlg.Entity.Product.ProductSymbol

type Point (U x) = ()

fromU :: U x -> x Source #

deconstructor.

X

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

random variable of complete sequences with the given maximal length.