Hi!

(1) There is no reasonable representation for matrices.
   (We developed a 'matrix1' CD, if you are interested, we'd love to
moot it.)
David Carlisle commented on this, but I'd like to see your matrix1 to see
what sort of functionality you thought was wanted.

Ooooops! I just discovered that the matrix1.html-file I sent yesterday was a pretty outdated preliminary version. Please apologize and find the correct version attached.

Best regards, Peter
--
Peter   Horn,   University  of  Kassel          *
Computational    Mathematics     Group      *       *
Heinrich Plett Str. 40,  34132  Kassel    *  [S] [C] [I] [E] [n] [c] [e]
Phone: + 4 9 - 5 6 1 - 8 0 4 - 4 1 9 2   *   http://www.symcomp.org
Fax:   + 4 9 - 5 6 1 - 8 0 4 - 4 6 4 6    *
E-Mail: [EMAIL PROTECTED]      *       *
            http://kassel.symcomp.org/          *



Title: matrix1

OpenMath Content Dictionary: matrix1

Canonical URL:
http://www.symcomp.org/cd/matrix1.ocd
CD File:
matrix1.ocd
CD as XML Encoded OpenMath:
matrix1.omcd
Defines:
banded, block, column_dimension, dense, diagonal, entry_domain, lower_band, matrix, matrix_domain, row_dimension, sparse, sparse_entry, upper_band
Date:
2008-04-10
Version:
0
Review Date:
2008-04-10
Status:
experimental
Uses CD:
alg1, ringname1, linalg2, linalg3

This CD holds a collection of matrix constructors over arbitrary rings.

entry_domain

This symbol is a unary function, whose argument should be a ring r. When applied to r, it represents the matrix-algebra ground domain (MAD).
Example:
<OMOBJ>
	<OMA>
	  <OMS name="entry_domain" cd="matrix1"/>
	  <OMS name="Z" cd="ringname1"/>
	</OMA>
      </OMOBJ>

entry_domain (Z)


[Next: matrix_domain] [Last: lower_band] [Top]

matrix_domain

This symbol is a ternary function, whose first argument should be a matrix1.entry_domain application. The second and third arguments must be matrix1.row_dimension and matrix1.column_dimension. When applied to these arguments this `creates' the domain of linear mappings between modules of specified dimensions over a common ground domain, conveniently represented by matrices.
Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix_domain" cd="matrix1"/>
	  <OMA>
	    <OMS name="entry_domain" cd="matrix1"/>
	    <OMS name="Z" cd="ringname1"/>
	  </OMA>
	  <OMA>
	    <OMS name="row_dimension" cd="matrix1"/>
	    <OMI>12</OMI>
	  </OMA>
	  <OMA>
	    <OMS name="column_dimension" cd="matrix1"/>
	    <OMI>10</OMI>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix_domain (entry_domain (Z) , row_dimension (12) , column_dimension (10) )


[Next: row_dimension] [Previous: entry_domain] [Top]

row_dimension

This symbol is a unary function whose first argument must be either a non-negative OpenMath integer or nums1.infinity. When applied this creates an object that denotes the dimension of the codomain of the linear mapping represented by the matrix.


[Next: column_dimension] [Previous: matrix_domain] [Top]

column_dimension

This symbol is a unary function whose first argument must be either a non-negative OpenMath integer or nums1.infinity. When applied this creates an object that denotes the dimension of the domain of the linear mapping represented by the matrix.


[Next: matrix] [Previous: row_dimension] [Top]

matrix

This symbol is a binary function whose first argument must be a matrix algebra constructor and the second argument can be any of the below matrix entry constructors. Additionally it is possible to use the matrix constructors of the linalg2 or linalg3 CDs.
Example:
<OMOBJ>
	  <OMSTRING>Todo</OMSTRING>
	  </OMOBJ>

Todo


[Next: dense] [Previous: column_dimension] [Top]

dense

This symbol is an $(m \cdot n)$-ary function whose arguments specify the entries of the matrix, where $m$ is the dimension of the codomain and $n$ is the dimension of the domain. The matrix (or block) must be filled row-wise, that is the first argument denotes the entry in row 1, column 1 of the matrix (or block), the second argument denotes the entry at row 1, column 2, and so forth. The number of arguments MUST match the dimensions of either the matrix algebra or the surrounding block (see below).
Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix" cd="matrix1"/>
	  <OMA>
	    <OMS name="matrix_domain" cd="matrix1"/>
	    <OMA><OMS name="entry_domain" cd="matrix1"/>
	      <OMS name="Z" cd="ringname1"/>
	    </OMA>
	    <OMA><OMS name="row_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	    <OMA><OMS name="column_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	  </OMA>
	  <OMA>
	    <OMS cd="matrix1" name="dense"/>
	    <OMI>1</OMI><OMI>2</OMI><OMI>3</OMI>
	    <OMI>4</OMI><OMI>5</OMI><OMI>6</OMI>
	    <OMI>7</OMI><OMI>8</OMI><OMI>9</OMI>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix (matrix_domain (entry_domain (Z) , row_dimension (3) , column_dimension (3) ) , dense (1, 2, 3, 4, 5, 6, 7, 8, 9) )


[Next: sparse] [Previous: matrix] [Top]

sparse

The constructor for sparse matrices without any indication of dimension or domain for the coefficients. Its arguments are just matrix1.sparse_entrys. Attention: No two matrix1.sparse_entrys must specify the same location, it is however as of yet unspecified what happens in such a case. A separate Content Dictionary for errors of this kind (e.g. matrix_error) might be a suitable solution.


[Next: sparse_entry] [Previous: dense] [Top]

sparse_entry

This symbol denotes a ternary function whose first two arguments specify the location of an entry inside the matrix, and whose final argument is the entry itself. The entry MUST be either from the specified ground domain directly, or be a diagonal constructor as described below or be a block constructor as described below. In the block case, the dimensions of the block MUST NOT exceed the total dimensions of the matrix algebra. In the diagonal case, the dimension of the diagonal MUST NOT exceed the total dimensions of the matrix algebra.
Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix" cd="matrix1"/>
	  <OMA>
	    <OMS name="matrix_domain" cd="matrix1"/>
	    <OMA><OMS name="entry_domain" cd="matrix1"/>
	      <OMS name="Q" cd="fieldname1"/>
	    </OMA>
	    <OMA><OMS name="row_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	    <OMA><OMS name="column_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	  </OMA>
	  <OMA>
	    <OMS cd="matrix1" name="sparse"/>
	    <OMA>
	      <OMS cd="matrix1" name="sparse_entry"/>
	      <OMI>1</OMI><OMI>2</OMI>
	      <OMI>12</OMI>
	    </OMA>
	    <OMA>
	      <OMS cd="matrix1" name="sparse_entry"/>
	      <OMI>2</OMI><OMI>1</OMI>
	      <OMI>21</OMI>
	    </OMA>
	    <OMA>
	      <OMS cd="matrix1" name="sparse_entry"/>
	      <OMI>3</OMI><OMI>3</OMI>
	      <OMI>33</OMI>
	    </OMA>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix (matrix_domain (entry_domain (Q) , row_dimension (3) , column_dimension (3) ) , sparse (sparse_entry (1, 2, 12) , sparse_entry (2, 1, 21) , sparse_entry (3, 3, 33) ) )


[Next: diagonal] [Previous: sparse] [Top]

diagonal

This symbol is an $m$-ary function whose arguments specify the entries of a (generalised) matrix diagonal. The diagonal must be filled from top-left to bottom-right. That is: the first argument represents the entry in row 1, column 1 of the matrix, the second argument denotes the entry at row 2, column 2, and so forth. If used inside a sparse_entry object at location $(i, j)$, the first entry is offset accordingly. If not used inside a sparse_entry object, the number of arguments MUST match the dimensions of either the matrix algebra (the smaller of $m$ and $n$). If used inside a sparse_entry object, the number of entries MUST NOT exceed the total matrix dimensions.
Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix" cd="matrix1"/>
	  <OMA>
	    <OMS name="matrix_domain" cd="matrix1"/>
	    <OMA><OMS name="entry_domain" cd="matrix1"/>
	      <OMS name="C" cd="fieldname1"/>
	    </OMA>
	    <OMA><OMS name="row_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	    <OMA><OMS name="column_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	  </OMA>
	  <OMA>
	    <OMS cd="matrix1" name="diagonal"/>
	    <OMA>
	      <OMS cd="complex1" name="complex_cartesian"/>
	      <OMI>1</OMI><OMI>1</OMI>
	    </OMA>
	    <OMA>
	      <OMS cd="complex1" name="complex_cartesian"/>
	      <OMI>2</OMI><OMI>2</OMI>
	    </OMA>
	    <OMA>
	      <OMS cd="complex1" name="complex_cartesian"/>
	      <OMI>3</OMI><OMI>3</OMI>
	    </OMA>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix (matrix_domain (entry_domain (C) , row_dimension (3) , column_dimension (3) ) , diagonal (complex_cartesian (1, 1) , complex_cartesian (2, 2) , complex_cartesian (3, 3) ) )


[Next: block] [Previous: sparse_entry] [Top]

block

This symbol is like the matrix constructor as described above, but intended for use inside matrix to form ``submatrices''. The symbol takes at least two arguments: a column_dimension and a row_dimension object which denote the total extent of the block.
Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix" cd="matrix1"/>
	  <OMA>
	    <OMS name="matrix_domain" cd="matrix1"/>
	    <OMA><OMS name="entry_domain" cd="matrix1"/>
	      <OMS name="Q" cd="fieldname1"/>
	    </OMA>
	    <OMA><OMS name="row_dimension" cd="matrix1"/><OMI>30</OMI></OMA>
	    <OMA><OMS name="column_dimension" cd="matrix1"/><OMI>30</OMI></OMA>
	  </OMA>
	  <OMA>
	    <OMS cd="matrix1" name="sparse"/>
	    <OMA>
	      <OMS cd="matrix1" name="sparse_entry"/>
	      <!-- something starts in row 10, column 20 -->
	      <OMI>10</OMI><OMI>20</OMI>
	      <OMA>
		<!-- It's a block of rectangle shape -->
		<OMS cd="matrix1" name="block"/>
		<!-- of dimensions 2 by 2 -->
		<OMA><OMS name="row_dimension" cd="matrix1"/><OMI>2</OMI></OMA>
		<OMA><OMS name="column_dimension" cd="matrix1"/><OMI>2</OMI></OMA>
		<!-- and it's got dense entries -->
		<OMA>
		  <OMS cd="matrix1" name="dense"/>
		  <OMI>11</OMI><OMI>12</OMI>
		  <OMI>21</OMI><OMI>22</OMI>
		</OMA>
	      </OMA>
	    </OMA>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix (matrix_domain (entry_domain (Q) , row_dimension (30) , column_dimension (30) ) , sparse (sparse_entry (10, 20, block (row_dimension (2) , column_dimension (2) , dense (11, 12, 21, 22) ) ) ) )

Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix" cd="matrix1"/>
	  <OMA>
	    <OMS name="matrix_domain" cd="matrix1"/>
	    <OMA><OMS name="entry_domain" cd="matrix1"/>
	      <OMS name="Z" cd="ringname1"/>
	    </OMA>
	    <OMA>
	      <OMS name="row_dimension" cd="matrix1"/>
	      <OMA>
		<OMS cd="stupid1" name="busy_beaver"/>
		<OMI>12000</OMI>
	      </OMA>
	      <OMA>
		<OMS name="column_dimension" cd="matrix1"/>
		<OMA>
		  <OMS cd="stupid1" name="ackermann"/>
		  <OMI>499</OMI>
		  <OMI>12000</OMI>
		</OMA>
	      </OMA>
	    </OMA>
	  </OMA>
	  <OMA>
	    <OMS cd="matrix1" name="sparse"/>
	    <OMA>
	      <OMS cd="matrix1" name="sparse_entry"/>
	      <!-- something starts in row 24800, column 26133 -->
	      <OMI>24800</OMI><OMI>26133</OMI>
	      <OMA>
		<!-- again, it's a block -->
		<OMS cd="matrix1" name="block"/>
		<!-- dimensions 99999 by 99999 -->
		<OMA><OMS name="row_dimension" cd="matrix1"/><OMI>99999</OMI></OMA>
		<OMA><OMS name="column_dimension" cd="matrix1"/><OMI>99999</OMI></OMA>
		<!-- and it's got sparse entries. -->
		<!-- Yes, it IS redundant, but this is an example after all -->
		<OMA>
		  <OMS cd="matrix1" name="sparse"/>
		  <OMA>
		    <OMS cd="matrix1" name="sparse_entry"/>
		    <!-- position is relative to the top-left of block -->
		    <OMI>4</OMI><OMI>15</OMI>
		    <!-- more redundancy: we put a zero here -->
		    <OMI>0</OMI>
		  </OMA>
		</OMA>
	      </OMA>
	    </OMA>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix (matrix_domain (entry_domain (Z) , row_dimension (busy_beaver (12000) , column_dimension (ackermann (499, 12000) ) ) ) , sparse (sparse_entry (24800, 26133, block (row_dimension (99999) , column_dimension (99999) , sparse (sparse_entry (4, 15, 0) ) ) ) ) )


[Next: banded] [Previous: diagonal] [Top]

banded

This symbol is a constructor for banded matrices. It takes at least 2 arguments, the first of which being the number of upper bands and the second being the number of lower bands. Amongst the further arguments you can specify AT MOST one diagonal object. You MUST exactly as many upper_band objects as you specified upper bands, and you MUST specify as many lower_band objects as you specified lower bands. FYI: This symbol facilitates the use of blas based systems which expect to know the bands structure upfront.
Example:
<OMOBJ>
	<OMA>
	  <OMS name="matrix" cd="matrix1"/>
	  <OMA>
	    <OMS name="matrix_domain" cd="matrix1"/>
	    <OMA><OMS name="entry_domain" cd="matrix1"/>
	      <OMA><OMS name="Zm" cd="ringname1"/><OMI>7</OMI></OMA>
	    </OMA>
	    <OMA><OMS name="row_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	    <OMA><OMS name="column_dimension" cd="matrix1"/><OMI>3</OMI></OMA>
	  </OMA>
	  <OMA><OMS cd="matrix1" name="banded"/>
	    <OMI>1</OMI><!-- number of upper bands -->
	    <OMI>1</OMI><!-- number of lower bands -->
	    <OMA><OMS cd="matrix1" name="diagonal"/>
	      <!-- takes 3 args -->
	      <OMI>111</OMI><OMI>222</OMI><OMI>333</OMI>
	    </OMA>
	    <OMA><OMS cd="matrix1" name="upper_band"/>
	      <!-- first upper band -->
	      <OMI>1</OMI>
	      <OMA><OMS cd="matrix1" name="diagonal"/>
		    <!-- takes 2 args -->
		    <OMI>4</OMI><OMI>5</OMI>
	      </OMA>
	    </OMA>
	    <OMA><OMS cd="matrix1" name="lower_band"/>
	      <!-- first lower band -->
	      <OMI>1</OMI>
	      <OMA><OMS cd="matrix1" name="diagonal"/>
		    <!-- takes 2 args -->
		    <OMI>1</OMI><OMI>2</OMI>
	      </OMA>
	    </OMA>
	  </OMA>
	</OMA>
      </OMOBJ>

matrix (matrix_domain (entry_domain (Zm (7) ) , row_dimension (3) , column_dimension (3) ) , banded (1, 1, diagonal (111, 222, 333) , upper_band (1, diagonal (4, 5) ) , lower_band (1, diagonal (1, 2) ) ) )


[Next: upper_band] [Previous: block] [Top]

upper_band

This symbol is a binary function whose first argument is a non-negative OpenMath integer which denotes the index of the upper band which is specified in the second argument. Hereby the first upper band is the one immediately above the main (generalised) diagonal, its starting coordinates relative to the top-left of the matrix thus are (1, 2).


[Next: lower_band] [Previous: banded] [Top]

lower_band

This symbol is a binary function whose first argument is a non-negative OpenMath integer which denotes the index of the lower band which is specified in the second argument. Hereby the first lower band is the one immediately below the main (generalised) diagonal, its starting coordinates relative to the top-left of the matrix thus are (2, 1).


[First: entry_domain] [Previous: upper_band] [Top]
_______________________________________________
Om3 mailing list
[email protected]
http://openmath.org/mailman/listinfo/om3

Reply via email to