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

Description

defintion of matrices over Distributive structures.

Synopsis

Matrix

data Matrix x Source #

matrix over Distributive structures.

Property Let Matrix rw cl xijs be in Matrix a for a Distributive structure a, then holds:

  1. rw and cl are valid.
  2. xijs is valid.
  3. For all (x,i,j) in xijs holds:

    1. x is not zero.
    2. orientation x == (cl ? j) :> (rw ? i).

Constructors

Matrix (Dim' x) (Dim' x) (Entries N N x) 

Instances

Instances details
HomDistributive h => Applicative1 h Matrix Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

amap1 :: h a b -> Matrix a -> Matrix b Source #

XStandardOrtSite 'From (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

XStandardOrtSite 'To (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Oriented x => Show (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

showsPrec :: Int -> Matrix x -> ShowS #

show :: Matrix x -> String #

showList :: [Matrix x] -> ShowS #

Oriented x => Eq (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

(==) :: Matrix x -> Matrix x -> Bool #

(/=) :: Matrix x -> Matrix x -> Bool #

(Oriented x, Ord x, OrdPoint x) => Ord (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

compare :: Matrix x -> Matrix x -> Ordering #

(<) :: Matrix x -> Matrix x -> Bool #

(<=) :: Matrix x -> Matrix x -> Bool #

(>) :: Matrix x -> Matrix x -> Bool #

(>=) :: Matrix x -> Matrix x -> Bool #

max :: Matrix x -> Matrix x -> Matrix x #

min :: Matrix x -> Matrix x -> Matrix x #

EntityPoint x => Dualisable (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

toDual :: Matrix x -> Dual (Matrix x) Source #

fromDual :: Dual (Matrix x) -> Matrix x Source #

(Distributive x, TransposableDistributive x) => Transposable (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

transpose :: Matrix x -> Matrix x Source #

(Additive x, FibredOriented x) => Validable (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

valid :: Matrix x -> Statement Source #

(Additive x, FibredOriented x) => Entity (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(Abelian x, FibredOriented x) => Abelian (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

negate :: Matrix x -> Matrix x Source #

(-) :: Matrix x -> Matrix x -> Matrix x Source #

ztimes :: Z -> Matrix x -> Matrix x Source #

(Additive x, FibredOriented x) => Additive (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

zero :: Root (Matrix x) -> Matrix x Source #

(+) :: Matrix x -> Matrix x -> Matrix x Source #

ntimes :: N -> Matrix x -> Matrix x Source #

Algebraic x => Algebraic (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Distributive x => Distributive (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(Distributive x, TransposableDistributive x) => TransposableDistributive (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(Additive x, FibredOriented x) => Fibred (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Associated Types

type Root (Matrix x) Source #

Methods

root :: Matrix x -> Root (Matrix x) Source #

(Additive x, FibredOriented x) => FibredOriented (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Distributive x => Multiplicative (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

one :: Point (Matrix x) -> Matrix x Source #

(*) :: Matrix x -> Matrix x -> Matrix x Source #

npower :: Matrix x -> N -> Matrix x Source #

(Distributive x, TransposableDistributive x) => TransposableMultiplicative (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(Additive x, FibredOriented x) => Oriented (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Associated Types

type Point (Matrix x) Source #

(Distributive x, TransposableDistributive x) => TransposableOriented (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(Additive x, FibredOriented x, XStandardOrtOrientation x, XStandardOrientationMatrix x) => XStandardOrtOrientation (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

XStandardOrtSiteFrom (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

XStandardPoint (Matrix Z) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(Vectorial x, FibredOriented x) => Vectorial (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Associated Types

type Scalar (Matrix x) Source #

Methods

(!) :: Scalar (Matrix x) -> Matrix x -> Matrix x Source #

Oriented x => Opl (RowTrafo x) (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Transformation

Methods

(*>) :: RowTrafo x -> Matrix x -> Matrix x Source #

Oriented x => Opr (ColTrafo x) (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Transformation

Methods

(<*) :: Matrix x -> ColTrafo x -> Matrix x Source #

Distributive x => OrientedOpl (RowTrafo x) (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Transformation

Distributive x => OrientedOpr (ColTrafo x) (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Transformation

ForgetfulDst s => Applicative (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

amap :: IsoOpMap Matrix s a b -> a -> b Source #

ForgetfulDst s => Applicative (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

amap :: OpMap Matrix s a b -> a -> b Source #

ForgetfulDst s => Functorial (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomAdditive (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomAdditive (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomDistributive (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomDistributive (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomFibred (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

rmap :: IsoOpMap Matrix s a b -> Root a -> Root b Source #

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomFibred (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

rmap :: OpMap Matrix s a b -> Root a -> Root b Source #

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomFibredOriented (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomFibredOriented (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomMultiplicative (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomMultiplicative (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => FunctorialHomOriented (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomOriented (IsoOpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

pmap :: IsoOpMap Matrix s a b -> Point a -> Point b Source #

(TransformableOp s, ForgetfulDst s, ForgetfulTyp s, Typeable s) => HomOriented (OpMap Matrix s) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

Methods

pmap :: OpMap Matrix s a b -> Point a -> Point b Source #

type Dual (Matrix x :: Type) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

type Dual (Matrix x :: Type) = Matrix (Op x)
type Root (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

type Root (Matrix x) = Orientation (Dim' x)
type Point (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

type Point (Matrix x) = Dim' x
type Scalar (Matrix x) Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

type Scalar (Matrix x) = Scalar x

rows :: Matrix x -> Dim' x Source #

row dimension.

cols :: Matrix x -> Dim' x Source #

column dimension.

mtxxs :: Matrix x -> Entries N N x Source #

the entries.

mtxRowCol :: Matrix x -> Row N (Col N x) Source #

viewing as a row of columns.

mtxColRow :: Matrix x -> Col N (Row N x) Source #

viewing as a column of rows.

mtxMap :: Hom Dst h => h x y -> Matrix x -> Matrix y Source #

mapping of a matrix.

Group

mtxGroupRow :: Distributive x => Matrix x -> Matrix (Matrix x) Source #

groups the rows with same row dimensions into a matrix of matrices with one column and n rows accordingly.

mtxGroupDim :: Distributive x => Dim' x -> Dim' (Matrix x) Source #

groups a formal product of points p 0 ^ r 0 * .. * p n ^ r n into a formal product of dimensions (dim [p 0] ^ r o) * .. * (dim [p n] ^ r n).

mtxJoin :: Oriented x => Matrix (Matrix x) -> Matrix x Source #

joining block matrices, i.e. matrices of matrices.

mtxJoinDim :: Oriented x => Dim' (Matrix x) -> Dim' x Source #

joining the dimension of matrices over x.

Construction

matrix :: (Additive x, p ~ Point x) => Dim x p -> Dim x p -> [(x, N, N)] -> Matrix x Source #

matrix with the given row and column number and the given entries for a Distributive structure.

Property Let m = matrix rw cl xis then holds

Pre
For all (x,i,j) in xijs holds: start x == cl ? j and end x == rw ? i.
Post
m is valid.

Note The given entries will be sorted, aggregated and zeros eliminated.

matrixTtl :: (Additive x, FibredOriented x, Total x) => N -> N -> [(x, N, N)] -> Matrix x Source #

matrix with the given row and column number and the given entries for a Total Distributive structure.

Property Let m = matrixTtl rws cls xis then holds

Pre
For all (_,i,j) in xijs holds: i < rws and j < cls.
Post
m is valid.

Note The given entries will be sorted, aggregated and zeros eliminated.

matrixBlc :: (Additive x, FibredOriented x) => [Dim' x] -> [Dim' x] -> [(Matrix x, N, N)] -> Matrix (Matrix x) Source #

block matrices as matrix of matrices.

diagonal :: Additive x => Dim' x -> Dim' x -> [x] -> Matrix x Source #

diagonal matrix with entries starting at the index 0 (see diagonal').

diagonal' :: Additive x => N -> Dim' x -> Dim' x -> [x] -> Matrix x Source #

diagonal matrix with entries starting at the given index offset.

Duality

coMatrix :: Entity (Point x) => Matrix x -> Dual (Matrix x) Source #

the dual matrix, with inverse coMatrixInv.

coMatrixInv :: Entity (Point x) => Dual (Matrix x) -> Matrix x Source #

from the dual matrix, with inverse coMatrix.

mtxFromOpOp :: Entity (Point x) => Matrix (Op (Op x)) -> Matrix x Source #

from the bidual.

Homomorphisms

isoCoMatrixDst :: Distributive x => IsoOpMap Matrix Dst (Op (Matrix x)) (Matrix (Op x)) Source #

the contravariant isomorphism from Matrix x to Matrix (Op x).

X

class XStandardOrientationMatrix x where Source #

standard random variable for the orientations of matrices over x.

Instances

Instances details
XStandardOrientationMatrix Z Source # 
Instance details

Defined in OAlg.Entity.Matrix.Definition

xMatrix :: Additive x => Q -> XOrtOrientation x -> X (Orientation (Point (Matrix x))) -> XOrtOrientation (Matrix x) Source #

random variable of matrices with the given maximal dimension and density.

xMatrixTtl :: (Distributive x, Total x) => N -> Q -> X x -> XOrtOrientation (Matrix x) Source #

random variable of matrices with the given maximal dimension and the given density.

Direction

xodZ :: XOrtOrientation (Matrix Z) Source #

a random variable of Z-matrices.

xodZZ :: XOrtOrientation (Matrix (Matrix Z)) Source #

a random variable of Z-bolck-matrices.