Copyright | (c) Erich Gut |
---|---|
License | BSD3 |
Maintainer | zerich.gut@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
free sums with symbols in a
.
Synopsis
- newtype SumSymbol r a = SumSymbol (Sum r (R a))
- ssypsq :: Semiring r => SumSymbol r a -> PSequence a r
- ssylc :: Semiring r => SumSymbol r a -> LinearCombination r a
- sumSymbol :: (Semiring r, Commutative r, Entity a, Ord a) => [(r, a)] -> SumSymbol r a
- sy :: (Semiring r, Commutative r, Entity a, Ord a) => a -> SumSymbol r a
- ssyMap :: (Semiring r, Commutative r, Entity y, Ord y) => (x -> y) -> SumSymbol r x -> SumSymbol r y
- ssySum :: (Semiring r, Commutative r, Entity y, Ord y) => (x -> LinearCombination r y) -> SumSymbol r x -> SumSymbol r y
- ssyJoin :: (Semiring r, Commutative r, Entity x, Ord x) => SumSymbol r (SumSymbol r x) -> SumSymbol r x
- ssyprj :: (Semiring r, Commutative r, Ord a, Entity a) => Set a -> SumSymbol r a -> SumSymbol r a
- newtype R a = R a
SumSymbol
newtype SumSymbol r a Source #
free sum with symbols in a
.
Instances
ssylc :: Semiring r => SumSymbol r a -> LinearCombination r a Source #
the underlying linear combination.
sumSymbol :: (Semiring r, Commutative r, Entity a, Ord a) => [(r, a)] -> SumSymbol r a Source #
the induced free sum given by a list of scalars and symbols.
sy :: (Semiring r, Commutative r, Entity a, Ord a) => a -> SumSymbol r a Source #
the induced free sum given by the symbol.
ssyMap :: (Semiring r, Commutative r, Entity y, Ord y) => (x -> y) -> SumSymbol r x -> SumSymbol r y Source #
mapping of free sums
ssySum :: (Semiring r, Commutative r, Entity y, Ord y) => (x -> LinearCombination r y) -> SumSymbol r x -> SumSymbol r y Source #
additive homomorphism given by a mapping of a symbol in x
to a linear combination of
y
.
ssyJoin :: (Semiring r, Commutative r, Entity x, Ord x) => SumSymbol r (SumSymbol r x) -> SumSymbol r x Source #
joining a free sum of free sums to a free sum.
ssyprj :: (Semiring r, Commutative r, Ord a, Entity a) => Set a -> SumSymbol r a -> SumSymbol r a Source #
the projectin of a free sum according to the given set of symbols.
Definition Let x
be in
and SumSymbol
r as
a Set
of symbols in
a
, then x
is called representable according to s
iff all symbols of
are elements of ssylc
xs
.
Property Let s
be a set of symbols in a
and x
be representable in
according to SumSymbol
r as
, then
.ssyprj
x ==
x
Examples
>>>
ssyprj (Set [A,D,E]) (3!sy D) :: SumSymbol Z Symbol
SumSymbol[3!D]
>>>
ssyprj (Set [A,D,E]) (2!sy B) :: SumSymbol Z Symbol
SumSymbol[]
>>>
ssyprj (Set [A,D,E]) (3!sy D + sy A - 5!sy E) :: SumSymbol Z Symbol
SumSymbol[A+3!D+-5!E]
>>>
ssyprj (Set [A,D,E]) (2!sy D + 7!sy B - sy E + sy F) :: SumSymbol Z Symbol
SumSymbol[2!D+-1!E]
R
adjoining the root ()
.
R a |
Instances
Show a => Show (R a) Source # | |
Eq a => Eq (R a) Source # | |
Ord a => Ord (R a) Source # | |
Validable a => Validable (R a) Source # | |
Entity a => Entity (R a) Source # | |
Defined in OAlg.Entity.Sum.SumSymbol | |
Entity a => Fibred (R a) Source # | |
OrdRoot (R a) Source # | |
Defined in OAlg.Entity.Sum.SumSymbol | |
type Root (R a) Source # | |
Defined in OAlg.Entity.Sum.SumSymbol |