OpenMath Content Dictionary: linalgpoly1
Canonical URL:
http://www.openmath.org/cd/linalgpoly1.ocd
CD Base:
http://www.openmath.org/cd
CD File:
linalgpoly1.ocd
CD as XML Encoded OpenMath:
linalgpoly1.omcd
Defines:
characteristic_poly , minimum_poly , substitute
Date:
2004-11-30
Version:
4
(Revision 1)
Review Date:
2006-03-30
Status:
experimental
This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The copyright holder grants you permission to redistribute this
document freely as a verbatim copy. Furthermore, the copyright
holder permits you to develop any derived work from this document
provided that the following conditions are met.
a) The derived work acknowledges the fact that it is derived from
this document, and maintains a prominent reference in the
work to the original source.
b) The fact that the derived work is not the original OpenMath
document is stated prominently in the derived work. Moreover if
both this document and the derived work are Content Dictionaries
then the derived work must include a different CDName element,
chosen so that it cannot be confused with any works adopted by
the OpenMath Society. In particular, if there is a Content
Dictionary Group whose name is, for example, `math' containing
Content Dictionaries named `math1', `math2' etc., then you should
not name a derived Content Dictionary `mathN' where N is an integer.
However you are free to name it `private_mathN' or some such. This
is because the names `mathN' may be used by the OpenMath Society
for future extensions.
c) The derived work is distributed under terms that allow the
compilation of derived works, but keep paragraphs a) and b)
intact. The simplest way to do this is to distribute the derived
work under the OpenMath license, but this is not a requirement.
If you have questions about this license please contact the OpenMath
society at http://www.openmath.org .
This CD defines the following symbols for polynomials related to basic
linear algebra over a field:
the characteristic and the minimum polynomial, as well as a substitution
of a square matrix in a polynomial.
Role:
application
Description:
This symbol represents a binary function. This first argument should be a
square matrix A defined over a field F, the second argument a variable X.
When applied to A and X, it represents the characteristic polynomial
of A in the variable X over the field F.
(The output should be semantically equivalent to an object obtained by
the poly_ring_d_named constructor of the CD polyd1.)
Example:
The characteristic polynomial of the matrix
[[0,1],[-1,-1]] is equal to X^2+X+1.
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0">
<OMA><OMS cd="relation1" name="eq"/>
<OMA><OMS cd="linalgpoly1" name="characteristic_poly"/>
<OMA><OMS cd="linalg2" name="matrix"/>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>0</OMI> <OMI>1</OMI>
</OMA>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>-1</OMI> <OMI>-1</OMI>
</OMA>
</OMA>
<OMV name="X"/>
</OMA>
<OMA><OMS cd="ring1" name="expression"/>
<OMA><OMS cd="polyd1" name="poly_ring_d_named"/>
<OMS cd="fieldname1" name="Q"/>
<OMV name="X"/>
</OMA>
<OMA><OMS cd="arith1" name="plus"/>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="X"/>
<OMI>2</OMI>
</OMA>
<OMV name="X"/>
<OMI>1</OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalgpoly1">characteristic_poly</csymbol>
<apply><csymbol cd="linalg2">matrix</csymbol>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">-1</cn>
<cn type="integer">-1</cn>
</apply>
</apply>
<ci>X</ci>
</apply>
<apply><csymbol cd="ring1">expression</csymbol>
<apply><csymbol cd="polyd1">poly_ring_d_named</csymbol><csymbol cd="fieldname1">Q</csymbol><ci>X</ci></apply>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>X</ci><cn type="integer">2</cn></apply>
<ci>X</ci>
<cn type="integer">1</cn>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
characteristic_poly
(
matrix
(
matrixrow
(0, 1)
,
matrixrow
(-1, -1)
)
,
X )
,
expression
(
poly_ring_d_named
(
Q ,
X )
,
plus
(
power
(
X , 2)
,
X , 1)
)
)
Popcorn
linalgpoly1.characteristic_poly(linalg2.matrix(linalg2.matrixrow(0, 1), linalg2.matrixrow(-1, -1)), $X) = ring1.expression(polyd1.poly_ring_d_named(fieldname1.Q, $X), $X ^ 2 + $X + 1)
Rendered Presentation MathML
characteristic_poly
(
0
1
-1
-1
,
X
)
=
expression
(
poly_ring_d_named
(
Q
,
X
)
,
X
2
+
X
+
1
)
Commented Mathematical property (CMP):
The characteristic
polynomial with variable X is the determinant of the matrix A - X identity(columcount(A)).
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA><OMS cd="relation1" name="eq"/>
<OMA><OMS cd="linalgpoly1" name="characteristic_poly"/>
<OMV name="A"/> <OMV name="X"/>
</OMA>
<OMA><OMS cd="linalg1" name="determinant"/>
<OMA><OMS cd="arith1" name="minus"/>
<OMV name="A"/>
<OMA><OMS cd="arith1" name="times"/>
<OMV name="X"/>
<OMA><OMS cd="linalg4mat" name="identity"/>
<OMA><OMS cd="linalg3" name="rowcount"/>
<OMV name="A"/>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalgpoly1">characteristic_poly</csymbol><ci>A</ci><ci>X</ci></apply>
<apply><csymbol cd="linalg1">determinant</csymbol>
<apply><csymbol cd="arith1">minus</csymbol>
<ci>A</ci>
<apply><csymbol cd="arith1">times</csymbol>
<ci>X</ci>
<apply><csymbol cd="linalg4mat">identity</csymbol>
<apply><csymbol cd="linalg3">rowcount</csymbol><ci>A</ci></apply>
</apply>
</apply>
</apply>
</apply>
</apply>
</math>
Prefix
Popcorn
linalgpoly1.characteristic_poly($A, $X) = linalg1.determinant($A - $X * linalg4mat.identity(linalg3.rowcount($A)))
Rendered Presentation MathML
characteristic_poly
(
A
,
X
)
=
det
A
-
X
identity
(
rowcount
(
A
)
)
Signatures:
sts
Role:
application
Description:
This symbol represents a binary function. This first argument should be a
square matrix A defined over a field F, the second argument a variable X.
When applied to A and X, it represents the minimum polynomial
of A in the variable X over the field F.
(The output should be semantically equivalent to an object obtained by
the poly_ring_d_named constructor of the CD polyd1.)
Example:
The minimum polynomial of the matrix
[[0,1,0,0],
[-1,-1,0,0],
[0,0,0,1],
[0,0,-1,-1]
] is equal to X^2+X+1.
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0">
<OMA><OMS cd="relation1" name="eq"/>
<OMA><OMS cd="linalgpoly1" name="minimum_poly"/>
<OMA><OMS cd="linalg2" name="matrix"/>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>0</OMI> <OMI>1</OMI> <OMI>0</OMI> <OMI>0</OMI>
</OMA>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>-1</OMI> <OMI>-1</OMI><OMI>0</OMI> <OMI>0</OMI>
</OMA>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>0</OMI> <OMI>0</OMI><OMI>0</OMI> <OMI>1</OMI>
</OMA>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>0</OMI> <OMI>0</OMI><OMI>-1</OMI> <OMI>-1</OMI>
</OMA>
</OMA>
<OMV name="X"/>
</OMA>
<OMA><OMS cd="ring1" name="expression"/>
<OMA><OMS cd="polyd1" name="poly_ring_d_named"/>
<OMS cd="fieldname1" name="Q"/>
<OMV name="X"/>
</OMA>
<OMA><OMS cd="arith1" name="plus"/>
<OMA><OMS cd="arith1" name="power"/>
<OMV name="X"/>
<OMI>2</OMI>
</OMA>
<OMV name="X"/>
<OMI>1</OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalgpoly1">minimum_poly</csymbol>
<apply><csymbol cd="linalg2">matrix</csymbol>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">1</cn>
<cn type="integer">0</cn>
<cn type="integer">0</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">-1</cn>
<cn type="integer">-1</cn>
<cn type="integer">0</cn>
<cn type="integer">0</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">0</cn>
<cn type="integer">0</cn>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">0</cn>
<cn type="integer">0</cn>
<cn type="integer">-1</cn>
<cn type="integer">-1</cn>
</apply>
</apply>
<ci>X</ci>
</apply>
<apply><csymbol cd="ring1">expression</csymbol>
<apply><csymbol cd="polyd1">poly_ring_d_named</csymbol><csymbol cd="fieldname1">Q</csymbol><ci>X</ci></apply>
<apply><csymbol cd="arith1">plus</csymbol>
<apply><csymbol cd="arith1">power</csymbol><ci>X</ci><cn type="integer">2</cn></apply>
<ci>X</ci>
<cn type="integer">1</cn>
</apply>
</apply>
</apply>
</math>
Prefix
eq
(
minimum_poly
(
matrix
(
matrixrow
(0, 1, 0, 0)
,
matrixrow
(-1, -1, 0, 0)
,
matrixrow
(0, 0, 0, 1)
,
matrixrow
(0, 0, -1, -1)
)
,
X )
,
expression
(
poly_ring_d_named
(
Q ,
X )
,
plus
(
power
(
X , 2)
,
X , 1)
)
)
Popcorn
linalgpoly1.minimum_poly(linalg2.matrix(linalg2.matrixrow(0, 1, 0, 0), linalg2.matrixrow(-1, -1, 0, 0), linalg2.matrixrow(0, 0, 0, 1), linalg2.matrixrow(0, 0, -1, -1)), $X) = ring1.expression(polyd1.poly_ring_d_named(fieldname1.Q, $X), $X ^ 2 + $X + 1)
Rendered Presentation MathML
minimum_poly
(
0
1
0
0
-1
-1
0
0
0
0
0
1
0
0
-1
-1
,
X
)
=
expression
(
poly_ring_d_named
(
Q
,
X
)
,
X
2
+
X
+
1
)
Commented Mathematical property (CMP):
The minimum
polynomial is the polynomial f of minimal degree such that f(A) = 0.
Formal Mathematical property (FMP):
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA><OMS cd="logic1" name="implies"/>
<OMA><OMS cd="relation1" name="eq"/>
<OMV name="f_poly"/>
<OMA><OMS cd="linalgpoly1" name="characteristic_poly"/>
<OMV name="A"/> <OMV name="X"/>
</OMA>
</OMA>
<OMA><OMS cd="logic1" name="and"/>
<OMA><OMS cd="relation1" name="eq"/>
<OMA><OMS cd="linalgpoly1" name="substitute"/>
<OMV name="f"/><OMV name="A"/>
</OMA>
<OMA><OMS cd="linalg4mat" name="zero"/>
<OMA><OMS cd="linalg3" name="rowcount"/>
<OMV name="A"/>
</OMA>
<OMA><OMS cd="linalg3" name="rowcount"/>
<OMV name="A"/>
</OMA>
</OMA>
</OMA>
<OMBIND><OMS cd="quant1" name="forall"/>
<OMBVAR><OMV name="g"/></OMBVAR>
<OMA><OMS cd="logic1" name="implies"/>
<OMA><OMS cd="logic1" name="and"/>
<OMA><OMS cd="relation1" name="neq"/>
<OMV name="g"/><OMS cd="alg1" name="zero"/>
</OMA>
<OMA><OMS cd="arith1" name="eq"/>
<OMA><OMS cd="linalgpoly1" name="substitute"/>
<OMV name="g"/><OMV name="A"/>
</OMA>
<OMA><OMS cd="linalg4mat" name="zero"/>
<OMA><OMS cd="linalg3" name="rowcount"/>
<OMV name="A"/>
</OMA>
<OMA><OMS cd="linalg3" name="rowcount"/>
<OMV name="A"/>
</OMA>
</OMA>
</OMA>
</OMA>
<OMA><OMS cd="relation1" name="geq"/>
<OMA><OMS cd="poly" name="degree"/>
<OMV name="g"/><OMV name="f"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="relation1">eq</csymbol>
<ci>f_poly</ci>
<apply><csymbol cd="linalgpoly1">characteristic_poly</csymbol><ci>A</ci><ci>X</ci></apply>
</apply>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalgpoly1">substitute</csymbol><ci>f</ci><ci>A</ci></apply>
<apply><csymbol cd="linalg4mat">zero</csymbol>
<apply><csymbol cd="linalg3">rowcount</csymbol><ci>A</ci></apply>
<apply><csymbol cd="linalg3">rowcount</csymbol><ci>A</ci></apply>
</apply>
</apply>
<bind><csymbol cd="quant1">forall</csymbol>
<bvar><ci>g</ci></bvar>
<apply><csymbol cd="logic1">implies</csymbol>
<apply><csymbol cd="logic1">and</csymbol>
<apply><csymbol cd="relation1">neq</csymbol><ci>g</ci><csymbol cd="alg1">zero</csymbol></apply>
<apply><csymbol cd="arith1">eq</csymbol>
<apply><csymbol cd="linalgpoly1">substitute</csymbol><ci>g</ci><ci>A</ci></apply>
<apply><csymbol cd="linalg4mat">zero</csymbol>
<apply><csymbol cd="linalg3">rowcount</csymbol><ci>A</ci></apply>
<apply><csymbol cd="linalg3">rowcount</csymbol><ci>A</ci></apply>
</apply>
</apply>
</apply>
<apply><csymbol cd="relation1">geq</csymbol>
<apply><csymbol cd="poly">degree</csymbol><ci>g</ci><ci>f</ci></apply>
</apply>
</apply>
</bind>
</apply>
</apply>
</math>
Prefix
implies
(
eq
(
f_poly ,
characteristic_poly
(
A ,
X )
)
,
and
(
eq
(
substitute
(
f ,
A )
,
zero
(
rowcount
(
A )
,
rowcount
(
A )
)
)
,
forall
[
g ] .
(
implies
(
and
(
neq
(
g ,
zero )
,
eq
(
substitute
(
g ,
A )
,
zero
(
rowcount
(
A )
,
rowcount
(
A )
)
)
)
,
geq
(
degree
(
g ,
f )
)
)
)
)
)
Popcorn
$f_poly = linalgpoly1.characteristic_poly($A, $X) ==> linalgpoly1.substitute($f, $A) = linalg4mat.zero(linalg3.rowcount($A), linalg3.rowcount($A)) and quant1.forall[$g -> $g != alg1.zero and arith1.eq(linalgpoly1.substitute($g, $A), linalg4mat.zero(linalg3.rowcount($A), linalg3.rowcount($A))) ==> poly.degree($g, $f)]
Rendered Presentation MathML
f_poly
=
characteristic_poly
(
A
,
X
)
⇒
substitute
(
f
,
A
)
=
zero
(
rowcount
(
A
)
,
rowcount
(
A
)
)
∧
∀
g
.
g
≠
0
∧
eq
(
substitute
(
g
,
A
)
,
zero
(
rowcount
(
A
)
,
rowcount
(
A
)
)
)
⇒
degree
(
g
,
f
)
Signatures:
sts
Role:
application
Description:
This symbol represents a binary function. This first argument should be a
polynomial f in a single variable X, the second should be a square matrix A defined over a field F.
When applied to f and A, it represents the matrix obtained by
replacing X by A and the constant term by the corresponding scalar matrix.
Example:
The minimum polynomial of the matrix
Substituting
[[0,1],
[-1,-1],
]
in the polynomial X + 1 gives the matrix
[[1,1],
[-1,0],
]
OpenMath XML (source)
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0">
<OMA><OMS cd="relation1" name="eq"/>
<OMA><OMS cd="linalgpoly1" name="substitute"/>
<OMA><OMS cd="ring1" name="expression"/>
<OMA><OMS cd="polyd1" name="poly_ring_d_named"/>
<OMS cd="fieldname1" name="Q"/>
<OMV name="X"/>
</OMA>
<OMA><OMS cd="arith1" name="plus"/>
<OMV name="X"/> <OMI>1</OMI>
</OMA>
</OMA>
<OMA><OMS cd="linalg2" name="matrix"/>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>1</OMI> <OMI>1</OMI>
</OMA>
<OMA><OMS cd="linalg2" name="matrixrow"/>
<OMI>-1</OMI> <OMI>0</OMI>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
Strict Content MathML
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><csymbol cd="relation1">eq</csymbol>
<apply><csymbol cd="linalgpoly1">substitute</csymbol>
<apply><csymbol cd="ring1">expression</csymbol>
<apply><csymbol cd="polyd1">poly_ring_d_named</csymbol><csymbol cd="fieldname1">Q</csymbol><ci>X</ci></apply>
<apply><csymbol cd="arith1">plus</csymbol><ci>X</ci><cn type="integer">1</cn></apply>
</apply>
<apply><csymbol cd="linalg2">matrix</csymbol>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">1</cn>
<cn type="integer">1</cn>
</apply>
<apply><csymbol cd="linalg2">matrixrow</csymbol>
<cn type="integer">-1</cn>
<cn type="integer">0</cn>
</apply>
</apply>
</apply>
</apply>
</math>
Prefix
Popcorn
linalgpoly1.substitute(ring1.expression(polyd1.poly_ring_d_named(fieldname1.Q, $X), $X + 1), linalg2.matrix(linalg2.matrixrow(1, 1), linalg2.matrixrow(-1, 0)))
Rendered Presentation MathML
substitute
(
expression
(
poly_ring_d_named
(
Q
,
X
)
,
X
+
1
)
,
1
1
-1
0
)
Signatures:
sts