algebra-0.4.0: Constructive abstract algebra

Numeric.Map.Linear

Synopsis

Documentation

newtype Map r b a Source

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.

Constructors

Map 

Fields

($#) :: (a -> r) -> b -> r
 

Instances

PFunctor Either (Map r) (Map r) 
PFunctor (,) (Map r) (Map r) 
QFunctor Either (Map r) (Map r) 
QFunctor (,) (Map r) (Map r) 
Bifunctor Either (Map r) (Map r) (Map r) 
Bifunctor (,) (Map r) (Map r) (Map r) 
MonadReader b (Map r b) 
RightModule r s => RightModule r (Map s b m) 
LeftModule r s => LeftModule r (Map s b m) 
Arrow (Map r) 
AdditiveMonoid r => ArrowZero (Map r) 
AdditiveMonoid r => ArrowPlus (Map r) 
ArrowChoice (Map r) 
ArrowApply (Map r) 
Category (Map r) 
Distributive (Map r) 
CCC (Map r) 
PreCartesian (Map r) 
PreCoCartesian (Map r) 
Semigroupoid (Map r) 
Braided (Map r) Either 
Braided (Map r) (,) 
Symmetric (Map r) Either 
Symmetric (Map r) (,) 
Monoidal (Map r) Either 
Monoidal (Map r) (,) 
Comonoidal (Map r) Either 
Comonoidal (Map r) (,) 
Associative (Map r) Either 
Associative (Map r) (,) 
Disassociative (Map r) Either 
Disassociative (Map r) (,) 
Monad (Map r b) 
Functor (Map r b) 
AdditiveMonoid r => MonadPlus (Map r b) 
Applicative (Map r b) 
AdditiveMonoid r => Alternative (Map r b) 
AdditiveMonoid r => Plus (Map r b) 
Additive r => Alt (Map r b) 
Apply (Map r b) 
Bind (Map r b) 
Additive r => Additive (Map r b a) 
Abelian s => Abelian (Map s b a) 
FreeCoalgebra r m => Semiring (Map r b m) 
FreeCoalgebra r m => Multiplicative (Map r b m) 
(Commutative m, FreeCoalgebra r m) => Commutative (Map r b m) 
AdditiveMonoid s => AdditiveMonoid (Map s b a) 
FreeCounitalCoalgebra r m => Unital (Map r b m) 
(Rig r, FreeCounitalCoalgebra r m) => Rig (Map r b m) 
AdditiveGroup s => AdditiveGroup (Map s b a) 
(Rng r, FreeCounitalCoalgebra r m) => Rng (Map r b m) 
(Ring r, FreeCounitalCoalgebra r m) => Ring (Map r a m) 
FreeCoalgebra r m => RightModule (Map r b m) (Map r b m) 
FreeCoalgebra r m => LeftModule (Map r b m) (Map r b m) 

($@) :: Map r b a -> b -> Linear r aSource

extract a linear functional from a linear map

joinMap :: FreeAlgebra r a => Map r a (a, a)Source

memoMap :: HasTrie a => Map r a aSource

Memoize the results of this linear map

cojoinMap :: FreeCoalgebra r c => Map r (c, c) 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.