Safe Haskell | Safe |
---|---|
Language | Haskell98 |
A module defining direct sum and tensor product of vector spaces
Synopsis
- type DSum a b = Either a b
- i1 :: Vect k a -> Vect k (DSum a b)
- i2 :: Vect k b -> Vect k (DSum a b)
- 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
- p1 :: (Eq k, Num k, Ord a) => Vect k (DSum a b) -> Vect k a
- p2 :: (Eq k, Num k, Ord b) => Vect k (DSum a b) -> Vect k b
- 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)
- dsume :: (Eq k, Num k, Ord a, Ord b) => Vect k a -> Vect k b -> Vect k (DSum a b)
- 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')
- type Tensor a b = (a, b)
- te :: Num k => Vect k a -> Vect k b -> Vect k (Tensor a b)
- 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')
- assocL :: Vect k (Tensor a (Tensor b c)) -> Vect k (Tensor (Tensor a b) c)
- assocR :: Vect k (Tensor (Tensor a b) c) -> Vect k (Tensor a (Tensor b c))
- unitInL :: Vect k a -> Vect k (Tensor () a)
- unitOutL :: Vect k (Tensor () a) -> Vect k a
- unitInR :: Vect k a -> Vect k (Tensor a ())
- unitOutR :: Vect k (Tensor a ()) -> Vect k a
- twist :: (Eq k, Num k, Ord a, Ord b) => Vect k (Tensor a b) -> Vect k (Tensor b a)
- 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))
- 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))
- distrR :: Vect k (Tensor (DSum a b) c) -> Vect k (DSum (Tensor a c) (Tensor b c))
- undistrR :: Vect k (DSum (Tensor a c) (Tensor b c)) -> Vect k (Tensor (DSum a b) c)
- ev :: (Eq k, Num k, Ord b) => Vect k (Tensor (Dual b) b) -> k
- delta :: (Eq a, Num p) => a -> a -> p
- reify :: (Eq k, Num k, Ord b) => Vect k (Dual b) -> Vect k b -> k
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)
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
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 #