pkaMatrix
functor
signature pkaMATRIX
functor pkaMatrix
(pKA) : pkaMATRIX
This functor generates the matrices over a given (polymorphic) Kleenean algebra.
structure Ring : pKA
type 'a t
val dimension : 'a t -> int * int
val tabulate : int * int
-> (int * int -> 'a Ring.t) -> 'a t
val sub : 'a t * (int * int) -> 'a Ring.t
val map : ('a Ring.t -> 'a Ring.t) -> 'a t -> 'a t
val zero : int * int -> 'a t
val unit : int * int -> 'a t
val sum : ''a t * ''a t -> ''a t
val prod : ''a t * ''a t -> ''a t
val star : ''a t -> ''a t
val transpose : ''a t -> ''a t
structure Ring : pKA
type 'a t
dimension A
tabulate (i, j) f
sub (A, (i, j))
map f A
zero (i, j)
unit (i, j)
sum (A, B)
prod (A, B)
star A
transpose A
Reg, RegEqns, RegEqnsFm
The matrix algebra over the free Kleenean algebra is useful in solving systems of regular recursion equations. To use this method in RegEqnsFm, we define the matrix algebra over Reg by:
structure RegMat : pkaMATRIX = pkaMatrix(Reg).
Since the dimension of matrices in RegMat varies, we have a family of unit matrices, val Un = unit (n,n), for example. The matrix operations raise an exception Size, if the dimensions of the argument matrices do not fit.