changed: -A short demonstration of Axiom - - An important thing: all objects in Axiom have a <em>type</em>. This enables us to give a simple demonstration of the Cayley-Hamilton theorem. - -Let n equal 4. The semicolon at the end of the input tells Axiom not to display the result. Thus, only its type is shown: A short demonstration An important thing: all objects in FriCAS have a <em>type</em>. This enables us to give a simple demonstration of the Cayley-Hamilton theorem. Let n equal 4. The semicolon at the end of the input tells FriCAS not to display the result. Thus, only its type is shown: changed: -Finally we evaluate this polynomial with the original matrix as argument. In Axiom you do not need to use parenthesis if the function takes only one argument: Finally we evaluate this polynomial with the original matrix as argument. In FriCAS you do not need to use parenthesis if the function takes only one argument: changed: -Some matrix computations under <a href="http://texmacs.org/">OldTeXmacs</a>. Some matrix computations under <a href="http://texmacs.org/">TeXmacs</a> (this is old screenshot from Axiom era). changed: -Notice the hierarchical editing capabilities of OldTeXmacs. Notice the hierarchical editing capabilities of TeXmacs (again this is old screenshot from Axiom era). added: changed: -Word := OrderedFreeMonoid(Symbol) Word := FreeMonoid(Symbol)
An important thing: all objects in FriCAS have a type. This enables us to give a simple demonstration of the Cayley-Hamilton theorem.
Let n equal 4. The semicolon at the end of the input tells FriCAS not to display the result. Thus, only its type is shown:
(1) -> n := 4;
We define an abbreviation: let SM be the ring of quadratic n\times n matrices with rational functions as entries:
SM ==> SquareMatrix(n,FRAC POLY INT)
Let M be a generic 4 \times 4 matrix:
M: SM := matrix [[a[i,j] for j in 1..n] for i in 1..n]
Compute the characteristis polynomial of 'M':
P := determinant (M - x * 1);
We now interpret P as univariate polynomial in x, coefficients being from the 4 \times 4 matrices. The double colon performs this coercion:
Q := P::UP(x,SM);
Finally we evaluate this polynomial with the original matrix as argument. In FriCAS you do not need to use parenthesis if the function takes only one argument:
Q M
Some matrix computations under TeXmacs (this is old screenshot from Axiom era).
Notice the hierarchical editing capabilities of TeXmacs (again this is old screenshot from Axiom era).
Some more complicated computations:
)cl all
All user variables and function definitions have been cleared. Word := FreeMonoid(Symbol)
poly:= XPR(Integer,Word)
p:poly := 2 * x - 3 * y + 1
q:poly := 2 * x + 1
p + q
p * q
(p +q)^2 -p^2 -q^2 - 2*p*q
M := SquareMatrix(2,Fraction Integer)
poly1:= XPR(M,Word)
m1:M := matrix [[i*j^2 for i in 1..2] for j in 1..2]
m2:M := m1 - 5/4
m3: M := m2^2
pm:poly1 := m1*x + m2*y + m3*z - 2/3
qm:poly1 := pm - m1*x
qm^3