A matrix is a binary function mapping pairs of integers (its indices) to some value. It is total for integers from 1 to some constant bound, for its row and column indices. Each matrix has a row and a column dimension
(<=> (Matrix ?M) (And (Function ?M) (= (Arity ?M) 3) (Value-Type ?M Row-Dimension Positive-Integer) (Value-Cardinality ?M Row-Dimension 1) (Value-Type ?M Column-Dimension Positive-Integer) (Value-Cardinality ?M Column-Dimension 1) (=> (And (Positive-Integer ?I) (Positive-Integer ?J) (=< ?I (Row-Dimension ?M)) (=< ?J (Column-Dimension ?M))) (Defined (Value ?M ?I ?J)))))