- newtype Map r b a = Map {
- ($#) :: (a -> r) -> b -> r
- ($@) :: Map r b a -> b -> Linear r a
- joinMap :: FreeAlgebra r a => Map r a (a, a)
- unitMap :: FreeUnitalAlgebra r a => Map r a ()
- memoMap :: HasTrie a => Map r a a
- cojoinMap :: FreeCoalgebra r c => Map r (c, c) c
- counitMap :: FreeCounitalCoalgebra r c => Map r () c
- antipodeMap :: Hopf r h => Map r h h
- convolveMap :: (FreeAlgebra r a, FreeCoalgebra r c) => Map r a c -> Map r a c -> Map r a c
- embedMap :: (Unital m, FreeCounitalCoalgebra r m) => (b -> r) -> Map r b m
- augmentMap :: Unital s => Map s b m -> b -> s
- arrMap :: (AdditiveMonoid r, Semiring r) => (b -> [(r, a)]) -> Map r b a
Documentation
linear maps from elements of a free module to another free module over r
f $# x + y = (f $# x) + (f $# y) f $# (r .* x) = r .* (f $# x)
Map r b a
represents a linear mapping from a free module with basis a
over r
to a free module with basis b
over r
.
Note well the change of direction, due to the contravariance of change of basis!
This way enables we can employ arbitrary pure functions as linear maps by lifting them using arr
, or build them
by using the monad instance for Map r b. As a consequence Map is an instance of, well, almost everything.
joinMap :: FreeAlgebra r a => Map r a (a, a)Source
unitMap :: FreeUnitalAlgebra r a => Map r a ()Source
cojoinMap :: FreeCoalgebra r c => Map r (c, c) cSource
counitMap :: FreeCounitalCoalgebra r c => Map r () cSource
antipodeMap :: Hopf r h => Map r h hSource
convolveMap :: (FreeAlgebra r a, FreeCoalgebra r c) => Map r a c -> Map r a c -> Map r a cSource
convolution given an associative algebra and coassociative coalgebra
embedMap :: (Unital m, FreeCounitalCoalgebra r m) => (b -> r) -> Map r b mSource
augmentMap :: Unital s => Map s b m -> b -> sSource
The augmentation ring homomorphism from r^a -> r
arrMap :: (AdditiveMonoid r, Semiring r) => (b -> [(r, a)]) -> Map r b aSource
(inefficiently) combine a linear combination of basis vectors to make a map.