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

Math.Algebras.VectorSpace

Description

A module defining the type and operations of free k-vector spaces over a basis b (for a field k)

Synopsis

# Documentation

newtype Vect k b Source

Given a field type k (ie a Fractional instance), Vect k b is the type of the free k-vector space over the basis type b. Elements of Vect k b consist of k-linear combinations of elements of b.

Constructors

 V [(b, k)]

Instances

 Fractional k => Fractional (LaurentPoly k) Num k => Monad (Vect k) Functor (Vect k) HopfAlgebra (LaurentPoly Q) (SL2q String) Bialgebra (LaurentPoly Q) (SL2q String) Bialgebra (LaurentPoly Q) (M2q String) Coalgebra (LaurentPoly Q) (SL2q String) Coalgebra (LaurentPoly Q) (M2q String) Algebra (LaurentPoly Q) (SL2q String) Algebra (LaurentPoly Q) (M2q String) Algebra (LaurentPoly Q) (Aq02 String) Algebra (LaurentPoly Q) (Aq20 String) Comodule (LaurentPoly Q) (M2q String) (Aq20 String) (Eq k, Eq b) => Eq (Vect k b) (Num k, Eq b, Ord b, Show b, Algebra k b) => Num (Vect k b) (Ord k, Ord b) => Ord (Vect k b) (Num k, Show b) => Show (Vect k b)

zero :: Vect k bSource

The zero vector

add :: (Ord b, Num k) => Vect k b -> Vect k b -> Vect k bSource

(<+>) :: (Ord b, Num k) => Vect k b -> Vect k b -> Vect k bSource

neg :: Num k => Vect k b -> Vect k bSource

Negation of vector

smultL :: Num k => k -> Vect k b -> Vect k bSource

Scalar multiplication (on the left)

(*>) :: Num k => k -> Vect k b -> Vect k bSource

Same as smultL. Mnemonic is multiply through (from the left)

smultR :: Num k => Vect k b -> k -> Vect k bSource

Scalar multiplication on the right

(<*) :: Num k => Vect k b -> k -> Vect k bSource

Same as smultR. Mnemonic is multiply through (from the right)

nf :: (Ord b, Num k) => Vect k b -> Vect k bSource

Convert an element of Vect k b into normal form. Normal form consists in having the basis elements in ascending order, with no duplicates, and all coefficients non-zero

linear :: (Ord b, Num k) => (a -> Vect k b) -> Vect k a -> Vect k bSource

newtype EBasis Source

Constructors

 E Int

Instances

 Eq EBasis Ord EBasis Show EBasis Num k => Module k Mat2 EBasis