Safe Haskell | None |
---|---|
Language | Haskell98 |
A module defining the tensor algebra, symmetric algebra, exterior (or alternating) algebra, and tensor coalgebra
Synopsis
- data TensorAlgebra a = TA Int [a]
- injectTA :: Num k => Vect k a -> Vect k (TensorAlgebra a)
- injectTA' :: (Eq k, Num k) => a -> Vect k (TensorAlgebra a)
- liftTA :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (Vect k a -> Vect k b) -> Vect k (TensorAlgebra a) -> Vect k b
- liftTA' :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (a -> Vect k b) -> Vect k (TensorAlgebra a) -> Vect k b
- fmapTA :: (Eq k, Num k, Ord b, Show b) => (Vect k a -> Vect k b) -> Vect k (TensorAlgebra a) -> Vect k (TensorAlgebra b)
- fmapTA' :: (Eq k, Num k, Ord b, Show b) => (a -> b) -> Vect k (TensorAlgebra a) -> Vect k (TensorAlgebra b)
- bindTA :: (Eq k, Num k, Ord b, Show b) => Vect k (TensorAlgebra a) -> (Vect k a -> Vect k (TensorAlgebra b)) -> Vect k (TensorAlgebra b)
- bindTA' :: (Eq k, Num k, Ord b, Show b) => Vect k (TensorAlgebra a) -> (a -> Vect k (TensorAlgebra b)) -> Vect k (TensorAlgebra b)
- data SymmetricAlgebra a = Sym Int [a]
- toSym :: (Eq k, Num k, Ord a) => Vect k (TensorAlgebra a) -> Vect k (SymmetricAlgebra a)
- injectSym :: Num k => Vect k a -> Vect k (SymmetricAlgebra a)
- injectSym' :: Num k => a -> Vect k (SymmetricAlgebra a)
- liftSym :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (Vect k a -> Vect k b) -> Vect k (SymmetricAlgebra a) -> Vect k b
- liftSym' :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (a -> Vect k b) -> Vect k (SymmetricAlgebra a) -> Vect k b
- fmapSym :: (Eq k, Num k, Ord b, Show b) => (Vect k a -> Vect k b) -> Vect k (SymmetricAlgebra a) -> Vect k (SymmetricAlgebra b)
- fmapSym' :: (Eq k, Num k, Ord b, Show b) => (a -> b) -> Vect k (SymmetricAlgebra a) -> Vect k (SymmetricAlgebra b)
- bindSym :: (Eq k, Num k, Ord b, Show b) => Vect k (SymmetricAlgebra a) -> (Vect k a -> Vect k (SymmetricAlgebra b)) -> Vect k (SymmetricAlgebra b)
- bindSym' :: (Eq k, Num k, Ord b, Show b) => Vect k (SymmetricAlgebra a) -> (a -> Vect k (SymmetricAlgebra b)) -> Vect k (SymmetricAlgebra b)
- data ExteriorAlgebra a = Ext Int [a]
- toExt :: (Eq k, Num k, Ord a) => Vect k (TensorAlgebra a) -> Vect k (ExteriorAlgebra a)
- signedSort :: (Ord a1, Num a2) => a2 -> Bool -> [a1] -> [a1] -> (a2, [a1])
- injectExt :: Num k => Vect k a -> Vect k (ExteriorAlgebra a)
- injectExt' :: Num k => a -> Vect k (ExteriorAlgebra a)
- liftExt :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (Vect k a -> Vect k b) -> Vect k (ExteriorAlgebra a) -> Vect k b
- liftExt' :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (a -> Vect k b) -> Vect k (ExteriorAlgebra a) -> Vect k b
- fmapExt :: (Eq k, Num k, Ord b, Show b) => (Vect k a -> Vect k b) -> Vect k (ExteriorAlgebra a) -> Vect k (ExteriorAlgebra b)
- fmapExt' :: (Eq k, Num k, Ord b, Show b) => (a -> b) -> Vect k (ExteriorAlgebra a) -> Vect k (ExteriorAlgebra b)
- bindExt :: (Eq k, Num k, Ord b, Show b) => Vect k (ExteriorAlgebra a) -> (Vect k a -> Vect k (ExteriorAlgebra b)) -> Vect k (ExteriorAlgebra b)
- bindExt' :: (Eq k, Num k, Ord b, Show b) => Vect k (ExteriorAlgebra a) -> (a -> Vect k (ExteriorAlgebra b)) -> Vect k (ExteriorAlgebra b)
- data TensorCoalgebra c = TC Int [c]
- projectTC :: (Eq k, Num k, Ord b) => Vect k (TensorCoalgebra b) -> Vect k b
- coliftTC :: (Eq k, Num k, Coalgebra k c, Ord d) => (Vect k c -> Vect k d) -> Vect k c -> Vect k (TensorCoalgebra d)
- coliftTC' :: (Monad m, Num k, Ord c, Coalgebra k b, Eq k) => Int -> (m b -> Vect k c) -> Vect k b -> Vect k (TensorCoalgebra c)
- cobindTC :: (Eq k, Num k, Ord c, Ord d) => (Vect k (TensorCoalgebra c) -> Vect k d) -> Vect k (TensorCoalgebra c) -> Vect k (TensorCoalgebra d)
Documentation
data TensorAlgebra a Source #
A data type representing basis elements of the tensor algebra over a set/type. Elements of the tensor algebra are linear combinations of iterated tensor products of elements of the set/type. If V = Vect k a is the free vector space over a, then the tensor algebra T(V) = Vect k (TensorAlgebra a) is isomorphic to the infinite direct sum:
T(V) = k ⊕ V ⊕ V⊗V ⊕ V⊗V⊗V ⊕ ...
Instances
injectTA :: Num k => Vect k a -> Vect k (TensorAlgebra a) Source #
Inject an element of the free vector space V = Vect k a into the tensor algebra T(V) = Vect k (TensorAlgebra a)
injectTA' :: (Eq k, Num k) => a -> Vect k (TensorAlgebra a) Source #
Inject an element of the set/type A/a into the tensor algebra T(A) = Vect k (TensorAlgebra a).
liftTA :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (Vect k a -> Vect k b) -> Vect k (TensorAlgebra a) -> Vect k b Source #
Given vector spaces A = Vect k a, B = Vect k b, where B is also an algebra, lift a linear map f: A -> B to an algebra morphism f': T(A) -> B, where T(A) is the tensor algebra Vect k (TensorAlgebra a). f' will agree with f on A itself (considered as a subspace of T(A)). In other words, f = f' . injectTA
liftTA' :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (a -> Vect k b) -> Vect k (TensorAlgebra a) -> Vect k b Source #
Given a set/type A/a, and a vector space B = Vect k b, where B is also an algebra, lift a function f: A -> B to an algebra morphism f': T(A) -> B. f' will agree with f on A itself. In other words, f = f' . injectTA'
fmapTA :: (Eq k, Num k, Ord b, Show b) => (Vect k a -> Vect k b) -> Vect k (TensorAlgebra a) -> Vect k (TensorAlgebra b) Source #
Tensor algebra is a functor from k-Vect to k-Alg. The action on objects is Vect k a -> Vect k (TensorAlgebra a). The action on arrows is f -> fmapTA f.
fmapTA' :: (Eq k, Num k, Ord b, Show b) => (a -> b) -> Vect k (TensorAlgebra a) -> Vect k (TensorAlgebra b) Source #
If we compose the free vector space functor Set -> k-Vect with the tensor algebra functor k-Vect -> k-Alg, we obtain a functor Set -> k-Alg, the free algebra functor. The action on objects is a -> Vect k (TensorAlgebra a). The action on arrows is f -> fmapTA' f.
bindTA :: (Eq k, Num k, Ord b, Show b) => Vect k (TensorAlgebra a) -> (Vect k a -> Vect k (TensorAlgebra b)) -> Vect k (TensorAlgebra b) Source #
bindTA' :: (Eq k, Num k, Ord b, Show b) => Vect k (TensorAlgebra a) -> (a -> Vect k (TensorAlgebra b)) -> Vect k (TensorAlgebra b) Source #
data SymmetricAlgebra a Source #
A data type representing basis elements of the symmetric algebra over a set/type. The symmetric algebra is the quotient of the tensor algebra by the ideal generated by all differences of products u⊗v - v⊗u.
Instances
toSym :: (Eq k, Num k, Ord a) => Vect k (TensorAlgebra a) -> Vect k (SymmetricAlgebra a) Source #
Algebra morphism from tensor algebra to symmetric algebra. The kernel of the morphism is the ideal generated by all differences of products u⊗v - v⊗u.
injectSym' :: Num k => a -> Vect k (SymmetricAlgebra a) Source #
liftSym :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (Vect k a -> Vect k b) -> Vect k (SymmetricAlgebra a) -> Vect k b Source #
liftSym' :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (a -> Vect k b) -> Vect k (SymmetricAlgebra a) -> Vect k b Source #
fmapSym :: (Eq k, Num k, Ord b, Show b) => (Vect k a -> Vect k b) -> Vect k (SymmetricAlgebra a) -> Vect k (SymmetricAlgebra b) Source #
fmapSym' :: (Eq k, Num k, Ord b, Show b) => (a -> b) -> Vect k (SymmetricAlgebra a) -> Vect k (SymmetricAlgebra b) Source #
bindSym :: (Eq k, Num k, Ord b, Show b) => Vect k (SymmetricAlgebra a) -> (Vect k a -> Vect k (SymmetricAlgebra b)) -> Vect k (SymmetricAlgebra b) Source #
bindSym' :: (Eq k, Num k, Ord b, Show b) => Vect k (SymmetricAlgebra a) -> (a -> Vect k (SymmetricAlgebra b)) -> Vect k (SymmetricAlgebra b) Source #
data ExteriorAlgebra a Source #
A data type representing basis elements of the exterior algebra over a set/type. The exterior algebra is the quotient of the tensor algebra by the ideal generated by all self-products u⊗u and sums of products u⊗v + v⊗u
Instances
toExt :: (Eq k, Num k, Ord a) => Vect k (TensorAlgebra a) -> Vect k (ExteriorAlgebra a) Source #
Algebra morphism from tensor algebra to exterior algebra. The kernel of the morphism is the ideal generated by all self-products u⊗u and sums of products u⊗v + v⊗u
injectExt' :: Num k => a -> Vect k (ExteriorAlgebra a) Source #
liftExt :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (Vect k a -> Vect k b) -> Vect k (ExteriorAlgebra a) -> Vect k b Source #
liftExt' :: (Eq k, Num k, Ord b, Show b, Algebra k b) => (a -> Vect k b) -> Vect k (ExteriorAlgebra a) -> Vect k b Source #
fmapExt :: (Eq k, Num k, Ord b, Show b) => (Vect k a -> Vect k b) -> Vect k (ExteriorAlgebra a) -> Vect k (ExteriorAlgebra b) Source #
fmapExt' :: (Eq k, Num k, Ord b, Show b) => (a -> b) -> Vect k (ExteriorAlgebra a) -> Vect k (ExteriorAlgebra b) Source #
bindExt :: (Eq k, Num k, Ord b, Show b) => Vect k (ExteriorAlgebra a) -> (Vect k a -> Vect k (ExteriorAlgebra b)) -> Vect k (ExteriorAlgebra b) Source #
bindExt' :: (Eq k, Num k, Ord b, Show b) => Vect k (ExteriorAlgebra a) -> (a -> Vect k (ExteriorAlgebra b)) -> Vect k (ExteriorAlgebra b) Source #
data TensorCoalgebra c Source #
Instances
coliftTC :: (Eq k, Num k, Coalgebra k c, Ord d) => (Vect k c -> Vect k d) -> Vect k c -> Vect k (TensorCoalgebra d) Source #
coliftTC' :: (Monad m, Num k, Ord c, Coalgebra k b, Eq k) => Int -> (m b -> Vect k c) -> Vect k b -> Vect k (TensorCoalgebra c) Source #
cobindTC :: (Eq k, Num k, Ord c, Ord d) => (Vect k (TensorCoalgebra c) -> Vect k d) -> Vect k (TensorCoalgebra c) -> Vect k (TensorCoalgebra d) Source #