oalg-base-1.1.4.0: Algebraic structures on oriented entities and limits as a tool kit to solve algebraic problems.
Copyright(c) Erich Gut
LicenseBSD3
Maintainerzerich.gut@gmail.com
Safe HaskellSafe-Inferred
LanguageHaskell2010

OAlg.Entity.Matrix.Vector

Description

Vectors with coefficients, lying in a Semiring.

Synopsis

Vector

newtype Vector r Source #

vector with coefficients lying in a Semiring, indexd by N.

Definition Let v = Vector ris be in Vector r with r be a Semiring, then v is valid iff

  1. ris is valid
  2. For all (r,i) in ris holds: r is not equal to rZero.

Constructors

Vector (PSequence N r) 

Instances

Instances details
Show r => Show (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

showsPrec :: Int -> Vector r -> ShowS #

show :: Vector r -> String #

showList :: [Vector r] -> ShowS #

Eq r => Eq (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

(==) :: Vector r -> Vector r -> Bool #

(/=) :: Vector r -> Vector r -> Bool #

Ord r => Ord (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

compare :: Vector r -> Vector r -> Ordering #

(<) :: Vector r -> Vector r -> Bool #

(<=) :: Vector r -> Vector r -> Bool #

(>) :: Vector r -> Vector r -> Bool #

(>=) :: Vector r -> Vector r -> Bool #

max :: Vector r -> Vector r -> Vector r #

min :: Vector r -> Vector r -> Vector r #

Semiring r => Validable (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

valid :: Vector r -> Statement Source #

Semiring r => Entity (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Ring r => Abelian (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

negate :: Vector r -> Vector r Source #

(-) :: Vector r -> Vector r -> Vector r Source #

ztimes :: Z -> Vector r -> Vector r Source #

Semiring r => Additive (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

zero :: Root (Vector r) -> Vector r Source #

(+) :: Vector r -> Vector r -> Vector r Source #

ntimes :: N -> Vector r -> Vector r Source #

Semiring r => Fibred (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Associated Types

type Root (Vector r) Source #

Methods

root :: Vector r -> Root (Vector r) Source #

(Semiring r, Commutative r) => Euclidean (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

(<!>) :: Vector r -> Vector r -> Scalar (Vector r) Source #

(Semiring r, Commutative r) => Vectorial (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Associated Types

type Scalar (Vector r) Source #

Methods

(!) :: Scalar (Vector r) -> Vector r -> Vector r Source #

type Root (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

type Root (Vector r) = ()
type Scalar (Vector r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

type Scalar (Vector r) = r

vecpsq :: Vector r -> PSequence N r Source #

the underlying partial sequence.

cf :: Semiring r => Vector r -> N -> r Source #

the i-th coefficient of the given vector.

Example Let v = vector [(-3,2),(9,4)] :: Vector Z

>>> map (cf v) [0..8]
[0,0,-3,0,9,0,0,0,0]

cfsssy :: (Semiring r, Commutative r, Entity a, Ord a) => Set a -> Vector r -> SumSymbol r a Source #

the associated free sum of symbols according to the given set of symbols and coefficients.

Property Let s = s 0 < s 1 < .. be in Set a and r be in Vector r then holds: cfsssy s r == cf r 0 ! sy (s 0) + cf r 1 ! sy (s 1) + ...

ssycfs :: (Semiring r, Ord a) => Set a -> SumSymbol r a -> Vector r Source #

the associated coefficients of a free sum of symbols according to the given set of symbols.

Property Let s = s 0 < s 1 < .. be in Set a and x in SumSymbol r a then holds: ssyprj s x == cf r 0 ! sy (s 0) + cf r 1 ! sy (s 1) + .. where r = ssycfs s x,

vecrc :: Vector r -> Row N (Col N r) Source #

a vector as a row with one column at 0.

vecAppl :: Semiring r => Matrix r -> Vector r -> Vector r Source #

applying a matrix from the left.

Hom

data HomSymbol r x y where Source #

Constructors

HomSymbol :: (Entity x, Ord x, Entity y, Ord y) => PSequence x (LinearCombination r y) -> HomSymbol r (SumSymbol r x) (SumSymbol r y) 
Cfs :: (Entity x, Ord x) => Set x -> HomSymbol r (SumSymbol r x) (Vector r) 
Ssy :: (Entity x, Ord x) => Set x -> HomSymbol r (Vector r) (SumSymbol r x) 
HomMatrix :: Matrix r -> HomSymbol r (Vector r) (Vector r) 

Instances

Instances details
(Semiring r, Commutative r) => HomVectorial r (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => Applicative (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

amap :: HomSymbol r a b -> a -> b Source #

(Semiring r, Commutative r) => EmbeddableMorphismTyp (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => Morphism (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Associated Types

type ObjectClass (HomSymbol r) Source #

Semiring r => Eq2 (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

eq2 :: HomSymbol r x y -> HomSymbol r x y -> Bool Source #

Semiring r => Show2 (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

show2 :: HomSymbol r a b -> String Source #

Semiring r => Validable2 (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

valid2 :: HomSymbol r x y -> Statement Source #

Semiring r => Entity2 (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => HomAdditive (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => HomFibred (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

rmap :: HomSymbol r a b -> Root a -> Root b Source #

(Semiring r, Commutative r) => EmbeddableMorphism (HomSymbol r) Add Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => EmbeddableMorphism (HomSymbol r) Typ Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => EmbeddableMorphism (HomSymbol r) Fbr Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

(Semiring r, Commutative r) => EmbeddableMorphism (HomSymbol r) (Vec r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Semiring r => Show (HomSymbol r x y) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

showsPrec :: Int -> HomSymbol r x y -> ShowS #

show :: HomSymbol r x y -> String #

showList :: [HomSymbol r x y] -> ShowS #

Semiring r => Eq (HomSymbol r x y) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

(==) :: HomSymbol r x y -> HomSymbol r x y -> Bool #

(/=) :: HomSymbol r x y -> HomSymbol r x y -> Bool #

Semiring r => Validable (HomSymbol r x y) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

valid :: HomSymbol r x y -> Statement Source #

(Semiring r, Typeable x, Typeable y) => Entity (HomSymbol r x y) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

type ObjectClass (HomSymbol r) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

mtxHomSymbol :: Matrix r -> HomSymbol r (SumSymbol r N) (SumSymbol r N) Source #

the associated r-linear homomorphism.

Representation

repMatrix :: Representable r h x y -> Matrix r Source #

the associated representation matrix of the given r-homomorphism and the two symbol set.

Property Let p = Representable h xs ys be in Representable r h x y for a Commutative Semiring r, then holds: For all v in Vector r holds: Let h' = HomMatrix (repMatrix p) in

  1. For all (_,i) in h' $ v holds: i < lengthN ys.
  2. (Ssy ys $ h' $ v) == (h $ Ssy xs $ v).

data Representable r h x y where Source #

Predicate for a r-linear homomorphisms between the free sums SumSymbol r x and SumSymbol r y being representable for the given symbol sets.

Definition Let l be in LinearCombination r x and xs be a Set of symbols of x, then l is called representable in xs iff all symbols of lcs l are elements of xs.

Property Let h be a r-linear homomorphism between the free sums SumSymbol r x and SumSymbol r y, xs a Set of symbols in x and ys a Set of symbols in y, then holds: If for each symbol x in xs the associated LinearCombination of h $ x is representable in ys, then Representable h xs ys is valid.

Constructors

Representable :: (Hom (Vec r) h, Entity x, Ord x, Entity y, Ord y) => h (SumSymbol r x) (SumSymbol r y) -> Set x -> Set y -> Representable r h (SumSymbol r x) (SumSymbol r y) 

Instances

Instances details
Show (Representable r h x y) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

showsPrec :: Int -> Representable r h x y -> ShowS #

show :: Representable r h x y -> String #

showList :: [Representable r h x y] -> ShowS #

Validable (Representable r h x y) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Vector

Methods

valid :: Representable r h x y -> Statement Source #

mtxRepresentable :: (Semiring r, Commutative r) => Matrix r -> Representable r (HomSymbol r) (SumSymbol r N) (SumSymbol r N) Source #

the associated representation of a matrix.

Propostion

prpRepMatrix :: (Semiring r, Commutative r) => Representable r h x y -> Vector r -> Statement Source #

validity of repMatrix for the given vector.

prpRepMatrixZ :: N -> N -> Statement Source #

validity of repMatrix for Z-matrices with the given row and column numbers.

X

xVecN :: Semiring r => N -> X r -> X (Vector r) Source #

random variable of Vector r where all indices are strict smaller then the given bound.

Property Let n be in N and xr be in X r then holds: For all (_,i) in the range of xVecN n xr holds: i < n.