[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] 20080818.01.rhx.patch (demo Axiom type towers (Hemmeck
From: |
daly |
Subject: |
[Axiom-developer] 20080818.01.rhx.patch (demo Axiom type towers (Hemmecke)) |
Date: |
Mon, 18 Aug 2008 15:02:51 -0500 |
Demo the Axiom type towers.
=======================================================================
diff --git a/changelog b/changelog
index f2bd54b..04a4914 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20080818 tpd src/input/Makefile typetower.input added
+20080818 rhx src/input/typetower.input added
20080817 tpd src/algebra/vector.spad doc ravel from CartesianTensor
20080817 tpd src/algebra/vector.spad doc leviCivitaSymbol from CartesianTensor
20080817 tpd src/algebra/vector.spad doc * from CartesianTensor
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index a4d2218..e70b0d9 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -370,7 +370,7 @@ REGRES= algaggr.regress algbrbf.regress algfacob.regress
alist.regress \
tanhcoth.regress tanatan.regress tbagg.regress test.regress \
textfile.regress torus.regress \
triglim.regress tsetcatvermeer.regress tutchap1.regress \
- void.regress uniseg.regress
+ typetower.regress void.regress uniseg.regress
IN= ${SRC}/input
MID= ${INT}/input
@@ -664,7 +664,8 @@ FILES= ${OUT}/algaggr.input ${OUT}/algbrbf.input
${OUT}/algfacob.input \
${OUT}/triglim.input ${OUT}/tschirn.input ${OUT}/tsetcatbutcher.input \
${OUT}/tsetcatchemical.input ${OUT}/tsetcatvermeer.input \
${OUT}/tutchap1.input ${OUT}/tutchap2.input ${OUT}/tutchap3.input \
- ${OUT}/tutchap4.input ${OUT}/tutchap67.input ${OUT}/typo.input \
+ ${OUT}/tutchap4.input ${OUT}/tutchap67.input ${OUT}/typetower.input \
+ ${OUT}/typo.input \
${OUT}/uniseg.input ${OUT}/up.input \
${OUT}/vector.input ${OUT}/vectors.input ${OUT}/viewdef.input \
${OUT}/void.input ${OUT}/wiggle.input \
@@ -1011,7 +1012,8 @@ DOCFILES= \
${DOC}/tsetcatvermeer.input.dvi \
${DOC}/tutchap1.input.dvi ${DOC}/tutchap2.input.dvi \
${DOC}/tutchap3.input.dvi ${DOC}/tutchap4.input.dvi \
- ${DOC}/tutchap67.input.dvi ${DOC}/typo.input.dvi \
+ ${DOC}/tutchap67.input.dvi ${DOC}/typetower.input.dvi \
+ ${DOC}/typo.input.dvi \
${DOC}/uniseg.input.dvi ${DOC}/up.input.dvi \
${DOC}/vector.input.dvi ${DOC}/vectors.input.dvi \
${DOC}/viewdef.input.dvi ${DOC}/void.input.dvi \
diff --git a/src/input/typetower.input.pamphlet
b/src/input/typetower.input.pamphlet
new file mode 100644
index 0000000..260d206
--- /dev/null
+++ b/src/input/typetower.input.pamphlet
@@ -0,0 +1,253 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input typetower.input}
+\author{Ralf Hemmecke}
+\maketitle
+\begin{abstract}
+This page demonstrates some features of Axiom.
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+@
+Let's begin with the construction of a polynomial ring $R$ in the
+indeterminate $z$ with coefficients from the ring $S$ of square
+matrices with entries that are polynomials $P=F[x]$ where $F$ is
+the Galois field with 3 elements.
+<<*>>=
+)spool typetower.output
+)set message test on
+)set message auto off
+)clear all
+
+--S 1 of 17
+F:=PrimeField 3
+--R
+--R
+--R (1) PrimeField 3
+--R Type:
Domain
+--E 1
+
+--S 2 of 17
+P:=UnivariatePolynomial(x,F)
+--R
+--R
+--R (2) UnivariatePolynomial(x,PrimeField 3)
+--R Type:
Domain
+--E 2
+
+--S 3 of 17
+S:=SquareMatrix(2,P)
+--R
+--R
+--R (3) SquareMatrix(2,UnivariatePolynomial(x,PrimeField 3))
+--R Type:
Domain
+--E 3
+
+--S 4 of 17
+R:=UnivariatePolynomial(z,S)
+--R
+--R
+--R (4)
+--R UnivariatePolynomial(z,SquareMatrix(2,UnivariatePolynomial(x,PrimeField
3)))
+--R Type:
Domain
+--E 4
+
+@
+Ok, now we have the type $R$. Let's construct an element. We start
+with constructing some coefficients first.
+<<*>>=
+
+--S 5 of 17
+s1:S:=matrix [[2*x+1,x^2-1],[0,x-1]]
+--R
+--R
+--R + 2 +
+--R (5) |2x + 1 x + 2|
+--R | |
+--R + 0 x + 2 +
+--R Type: SquareMatrix(2,UnivariatePolynomial(x,PrimeField
3))
+--E 5
+
+--S 6 of 17
+s2:=transpose s1
+--R
+--R
+--R +2x + 1 0 +
+--R (6) | |
+--R | 2 |
+--R +x + 2 x + 2+
+--R Type: SquareMatrix(2,UnivariatePolynomial(x,PrimeField
3))
+--E 6
+
+@
+And now we build the polynomial
+<<*>>=
+
+--S 7 of 17
+r:R:=z^2+s1*z+s2
+--R
+--R
+--R 2 + 2 + +2x + 1 0 +
+--R (7) z + |2x + 1 x + 2|z + | |
+--R | | | 2 |
+--R + 0 x + 2 + +x + 2 x + 2+
+--RType:
UnivariatePolynomial(z,SquareMatrix(2,UnivariatePolynomial(x,PrimeField 3)))
+--E 7
+
+@
+Of course, since we work in characteristic 3, the following sum must be zero
+<<*>>=
+--S 8 of 17
+r+2*r
+--R
+--R
+--R (8) 0
+--RType:
UnivariatePolynomial(z,SquareMatrix(2,UnivariatePolynomial(x,PrimeField 3)))
+--E 8
+
+@
+Note that this is not the integer 0, but it is still a polynomial of type $R$.
+Asking for the degree of $r$ is no problem, because $R$ is a univariate
+polynomial ring.
+<<*>>=
+
+--S 9 of 17
+degree r
+--R
+--R
+--R (9) 2
+--R Type:
PositiveInteger
+--E 9
+
+@
+So let's see what happens if we multiply $r$ by itself.
+<<*>>=
+
+--S 10 of 17
+r2:=r*r
+--R
+--R
+--R (10)
+--R + 2 + + 4 +
+--R 4 + 2 + 3 |x + 2x 0 | 2 |x + 2x 0 |
+--R z + |x + 2 2x + 1|z + | |z + | |z
+--R | | | 2 2 | | 4 |
+--R + 0 2x + 1 + +2x + 1 x + 2+ + 0 x + 2x+
+--R +
+--R + 2 +
+--R |x + x + 1 0 |
+--R | |
+--R | 2 |
+--R + 0 x + x + 1+
+--RType:
UnivariatePolynomial(z,SquareMatrix(2,UnivariatePolynomial(x,PrimeField 3)))
+--E 10
+
+@
+Well, of course there is a common factor of $r_2$ and $r$. Can Axiom find it?
+<<*>>=
+
+--S 11 of 17
+gcd(r2,r)
+--R
+--R There are 4 exposed and 3 unexposed library operations named gcd
+--R having 2 argument(s) but none was determined to be applicable.
+--R Use HyperDoc Browse, or issue
+--R )display op gcd
+--R to learn more about the available operations. Perhaps
+--R package-calling the operation or using coercions on the arguments
+--R will allow you to apply the operation.
+--R
+--RDaly Bug
+--R Cannot find a definition or applicable library operation named gcd
+--R with argument type(s)
+--RUnivariatePolynomial(z,SquareMatrix(2,UnivariatePolynomial(x,PrimeField 3)))
+--RUnivariatePolynomial(z,SquareMatrix(2,UnivariatePolynomial(x,PrimeField 3)))
+--R
+--R Perhaps you should use "@" to indicate the required return type,
+--R or "$" to specify which version of the function you need.
+--E 11
+
+@
+Ooops. What does that say?
+\begin{verbatim}
+ Cannot find a definition or applicable library operation named gcd
+\end{verbatim}
+Ah, of course, the coefficient ring of $R$ is the matrix ring $S$ and this
+is unfortunately not a field (not even an integral domain) so we cannot
+simply apply Euclid's algorithm. Axiom simply stops by telling you
+that there is no applicable operation.
+
+Of course, Axiom can compute a gcd of univariate polynmials.
+<<*>>=
+
+--S 12 of 17
+p1:=s1(1,1)
+--R
+--R
+--R (11) 2x + 1
+--R Type: UnivariatePolynomial(x,PrimeField
3)
+--E 12
+
+--S 13 of 17
+ps:=s1(1,2)
+--R
+--R
+--R 2
+--R (12) x + 2
+--R Type: UnivariatePolynomial(x,PrimeField
3)
+--E 13
+
+--S 14 of 17
+gcd(p1,p2)
+--R
+--R
+--R (13) 1
+--R Type: UnivariatePolynomial(p2,UnivariatePolynomial(x,PrimeField
3))
+--E 14
+
+@
+Ok, let us do that again
+<<*>>=
+
+--S 15 of 17
+q1:UP(x,INT):=2*x+1
+--R
+--R
+--R (14) 2x + 1
+--R Type:
UnivariatePolynomial(x,Integer)
+--E 15
+
+--S 16 of 17
+q2:UP(x,INT):=x^2+2
+--R
+--R
+--R 2
+--R (15) x + 2
+--R Type:
UnivariatePolynomial(x,Integer)
+--E 16
+
+--S 17 of 17
+gcd(q1,q2)
+--R
+--R
+--R (16) 1
+--R Type:
UnivariatePolynomial(x,Integer)
+--E 17
+
+@
+Nice! Depending on where I compute these polynomials either they have
+a common factor or are coprime. Well, it all depends on the underlying
+ring, of course.
+<<*>>=
+
+)spool
+)lisp (bye)
+
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] 20080818.01.rhx.patch (demo Axiom type towers (Hemmecke)),
daly <=