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

Safe Haskell | None
Language | Haskell98

Math.Algebras.TensorAlgebra

Description

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 ⊕ ...

Constructors

TA Int [a] |

Instances

(Eq k, Num k, Ord a) => Algebra k (TensorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods unit :: k -> Vect k (TensorAlgebra a) Source # mult :: Vect k (Tensor (TensorAlgebra a) (TensorAlgebra a)) -> Vect k (TensorAlgebra a) Source #
Eq a => Eq (TensorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods (==) :: TensorAlgebra a -> TensorAlgebra a -> Bool Source # (/=) :: TensorAlgebra a -> TensorAlgebra a -> Bool Source #
Ord a => Ord (TensorAlgebra a) Source # |

Instance details

Defined in Math.Algebras.TensorAlgebra

Methods

compare :: TensorAlgebra a -> TensorAlgebra a -> Ordering Source #

(<) :: TensorAlgebra a -> TensorAlgebra a -> Bool Source #

(<=) :: TensorAlgebra a -> TensorAlgebra a -> Bool Source #

(>) :: TensorAlgebra a -> TensorAlgebra a -> Bool Source #

(>=) :: TensorAlgebra a -> TensorAlgebra a -> Bool Source #

max :: TensorAlgebra a -> TensorAlgebra a -> TensorAlgebra a Source #

min :: TensorAlgebra a -> TensorAlgebra a -> TensorAlgebra a Source #

Show a => Show (TensorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods showsPrec :: Int -> TensorAlgebra a -> ShowS Source # show :: TensorAlgebra a -> String Source # showList :: [TensorAlgebra a] -> ShowS Source #
Mon (TensorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods munit :: TensorAlgebra a Source # mmult :: TensorAlgebra a -> TensorAlgebra a -> TensorAlgebra a Source #

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.

Constructors

Sym Int [a] |

Instances

(Eq k, Num k, Ord a) => Algebra k (SymmetricAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods unit :: k -> Vect k (SymmetricAlgebra a) Source # mult :: Vect k (Tensor (SymmetricAlgebra a) (SymmetricAlgebra a)) -> Vect k (SymmetricAlgebra a) Source #
Eq a => Eq (SymmetricAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods (==) :: SymmetricAlgebra a -> SymmetricAlgebra a -> Bool Source # (/=) :: SymmetricAlgebra a -> SymmetricAlgebra a -> Bool Source #
Ord a => Ord (SymmetricAlgebra a) Source # |

Instance details

Defined in Math.Algebras.TensorAlgebra

Methods

compare :: SymmetricAlgebra a -> SymmetricAlgebra a -> Ordering Source #

(<) :: SymmetricAlgebra a -> SymmetricAlgebra a -> Bool Source #

(<=) :: SymmetricAlgebra a -> SymmetricAlgebra a -> Bool Source #

(>) :: SymmetricAlgebra a -> SymmetricAlgebra a -> Bool Source #

(>=) :: SymmetricAlgebra a -> SymmetricAlgebra a -> Bool Source #

max :: SymmetricAlgebra a -> SymmetricAlgebra a -> SymmetricAlgebra a Source #

min :: SymmetricAlgebra a -> SymmetricAlgebra a -> SymmetricAlgebra a Source #

Show a => Show (SymmetricAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods showsPrec :: Int -> SymmetricAlgebra a -> ShowS Source # show :: SymmetricAlgebra a -> String Source # showList :: [SymmetricAlgebra a] -> ShowS Source #
Ord a => Mon (SymmetricAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods munit :: SymmetricAlgebra a Source # mmult :: SymmetricAlgebra a -> SymmetricAlgebra a -> SymmetricAlgebra a Source #

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 => Vect k a -> Vect k (SymmetricAlgebra a) Source #

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

Constructors

Ext Int [a] |

Instances

(Eq k, Num k, Ord a) => Algebra k (ExteriorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods unit :: k -> Vect k (ExteriorAlgebra a) Source # mult :: Vect k (Tensor (ExteriorAlgebra a) (ExteriorAlgebra a)) -> Vect k (ExteriorAlgebra a) Source #
Eq a => Eq (ExteriorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods (==) :: ExteriorAlgebra a -> ExteriorAlgebra a -> Bool Source # (/=) :: ExteriorAlgebra a -> ExteriorAlgebra a -> Bool Source #
Ord a => Ord (ExteriorAlgebra a) Source # |

Instance details

Defined in Math.Algebras.TensorAlgebra

Methods

compare :: ExteriorAlgebra a -> ExteriorAlgebra a -> Ordering Source #

(<) :: ExteriorAlgebra a -> ExteriorAlgebra a -> Bool Source #

(<=) :: ExteriorAlgebra a -> ExteriorAlgebra a -> Bool Source #

(>) :: ExteriorAlgebra a -> ExteriorAlgebra a -> Bool Source #

(>=) :: ExteriorAlgebra a -> ExteriorAlgebra a -> Bool Source #

max :: ExteriorAlgebra a -> ExteriorAlgebra a -> ExteriorAlgebra a Source #

min :: ExteriorAlgebra a -> ExteriorAlgebra a -> ExteriorAlgebra a Source #

Show a => Show (ExteriorAlgebra a) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods showsPrec :: Int -> ExteriorAlgebra a -> ShowS Source # show :: ExteriorAlgebra a -> String Source # showList :: [ExteriorAlgebra a] -> ShowS Source #

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

signedSort :: (Ord a1, Num a2) => a2 -> Bool -> [a1] -> [a1] -> (a2, [a1]) Source #

injectExt :: Num k => Vect k a -> Vect k (ExteriorAlgebra a) Source #

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 #

Constructors

TC Int [c] |

Instances

(Eq k, Num k, Ord c) => Coalgebra k (TensorCoalgebra c) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods counit :: Vect k (TensorCoalgebra c) -> k Source # comult :: Vect k (TensorCoalgebra c) -> Vect k (Tensor (TensorCoalgebra c) (TensorCoalgebra c)) Source #
Eq c => Eq (TensorCoalgebra c) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods (==) :: TensorCoalgebra c -> TensorCoalgebra c -> Bool Source # (/=) :: TensorCoalgebra c -> TensorCoalgebra c -> Bool Source #
Ord c => Ord (TensorCoalgebra c) Source # |

Instance details

Defined in Math.Algebras.TensorAlgebra

Methods

compare :: TensorCoalgebra c -> TensorCoalgebra c -> Ordering Source #

(<) :: TensorCoalgebra c -> TensorCoalgebra c -> Bool Source #

(<=) :: TensorCoalgebra c -> TensorCoalgebra c -> Bool Source #

(>) :: TensorCoalgebra c -> TensorCoalgebra c -> Bool Source #

(>=) :: TensorCoalgebra c -> TensorCoalgebra c -> Bool Source #

max :: TensorCoalgebra c -> TensorCoalgebra c -> TensorCoalgebra c Source #

min :: TensorCoalgebra c -> TensorCoalgebra c -> TensorCoalgebra c Source #

Show c => Show (TensorCoalgebra c) Source # |
Instance details Defined in Math.Algebras.TensorAlgebra Methods showsPrec :: Int -> TensorCoalgebra c -> ShowS Source # show :: TensorCoalgebra c -> String Source # showList :: [TensorCoalgebra c] -> ShowS Source #

projectTC :: (Eq k, Num k, Ord b) => Vect k (TensorCoalgebra b) -> Vect k b Source #

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 #