HaskellForMaths-0.4.6: Combinatorics, group theory, commutative algebra, non-commutative algebra

Safe HaskellSafe-Inferred
LanguageHaskell98

Math.Algebras.TensorProduct

Description

A module defining direct sum and tensor product of vector spaces

Synopsis

Documentation

type DSum a b = Either a b Source

A type for constructing a basis for the direct sum of vector spaces. The direct sum of Vect k a and Vect k b is Vect k (DSum a b)

i1 :: Vect k a -> Vect k (DSum a b) Source

Injection of left summand into direct sum

i2 :: Vect k b -> Vect k (DSum a b) Source

Injection of right summand into direct sum

coprodf :: (Eq k, Num k, Ord t) => (Vect k a -> Vect k t) -> (Vect k b -> Vect k t) -> Vect k (DSum a b) -> Vect k t Source

The coproduct of two linear functions (with the same target). Satisfies the universal property that f == coprodf f g . i1 and g == coprodf f g . i2

p1 :: (Eq k, Num k, Ord a) => Vect k (DSum a b) -> Vect k a Source

Projection onto left summand from direct sum

p2 :: (Eq k, Num k, Ord b) => Vect k (DSum a b) -> Vect k b Source

Projection onto right summand from direct sum

prodf :: (Eq k, Num k, Ord a, Ord b) => (Vect k s -> Vect k a) -> (Vect k s -> Vect k b) -> Vect k s -> Vect k (DSum a b) Source

The product of two linear functions (with the same source). Satisfies the universal property that f == p1 . prodf f g and g == p2 . prodf f g

dsume :: (Eq k, Num k, Ord a, Ord b) => Vect k a -> Vect k b -> Vect k (DSum a b) infix 6 Source

The direct sum of two vector space elements

dsumf :: (Eq k, Num k, Ord a, Ord b, Ord a', Ord b') => (Vect k a -> Vect k a') -> (Vect k b -> Vect k b') -> Vect k (DSum a b) -> Vect k (DSum a' b') infix 6 Source

The direct sum of two linear functions. Satisfies the universal property that f == p1 . dsumf f g . i1 and g == p2 . dsumf f g . i2

type Tensor a b = (a, b) Source

A type for constructing a basis for the tensor product of vector spaces. The tensor product of Vect k a and Vect k b is Vect k (Tensor a b)

te :: Num k => Vect k a -> Vect k b -> Vect k (Tensor a b) infix 7 Source

The tensor product of two vector space elements

tf :: (Eq k, Num k, Ord a', Ord b') => (Vect k a -> Vect k a') -> (Vect k b -> Vect k b') -> Vect k (Tensor a b) -> Vect k (Tensor a' b') infix 7 Source

The tensor product of two linear functions

assocL :: Vect k (Tensor a (Tensor b c)) -> Vect k (Tensor (Tensor a b) c) Source

assocR :: Vect k (Tensor (Tensor a b) c) -> Vect k (Tensor a (Tensor b c)) Source

unitInL :: Vect k a -> Vect k (Tensor () a) Source

unitOutL :: Vect k (Tensor () a) -> Vect k a Source

unitInR :: Vect k a -> Vect k (Tensor a ()) Source

unitOutR :: Vect k (Tensor a ()) -> Vect k a Source

twist :: (Eq k, Num k, Ord a, Ord b) => Vect k (Tensor a b) -> Vect k (Tensor b a) Source

distrL :: (Eq k, Num k, Ord a, Ord b, Ord c) => Vect k (Tensor a (DSum b c)) -> Vect k (DSum (Tensor a b) (Tensor a c)) Source

undistrL :: (Eq k, Num k, Ord a, Ord b, Ord c) => Vect k (DSum (Tensor a b) (Tensor a c)) -> Vect k (Tensor a (DSum b c)) Source

distrR :: Vect k (Tensor (DSum a b) c) -> Vect k (DSum (Tensor a c) (Tensor b c)) Source

undistrR :: Vect k (DSum (Tensor a c) (Tensor b c)) -> Vect k (Tensor (DSum a b) c) Source

ev :: (Eq k, Num k, Ord b) => Vect k (Tensor (Dual b) b) -> k Source

delta :: (Num a1, Eq a) => a -> a -> a1 Source

reify :: (Eq k, Num k, Ord b) => Vect k (Dual b) -> Vect k b -> k Source