diff --git a/changelog b/changelog index f1c3370..c55104d 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20140524 tpd src/axiom-website/patches.html 20140524.02.tpd.patch +20140524 src/input/Makefile +20140524 src/input/inputform.input 20140524 tpd src/axiom-website/patches.html 20140524.01.tpd.patch 20140524 tpd books/bookvolbib.pamphlet add gruntz, knuth refs 20140523 tpd src/axiom-website/patches.html 20140523.01.tpd.patch diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index b9955b1..8953dad 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -4352,6 +4352,8 @@ src/axiom-website/documentation.html book/*.txt email cleanup 20140524.01.tpd.patch books/bookvolbib.pamphlet add gruntz, knuth refs +20140524.02.tpd.patch +src/input/Makefile add inputform diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet index 17ba9e2..dbaa5ee 100644 --- a/src/input/Makefile.pamphlet +++ b/src/input/Makefile.pamphlet @@ -231,7 +231,8 @@ SKIP= as-eg1.output as-eg2.output \ images1a.output images1.output images2a.output images2.output \ images3a.output images3.output images5a.output images5.output \ images6a.output images6.output images7a.output images7.output \ - images8a.output images8.output knot.output knownbugs.output \ + images8a.output images8.output inputform.output \ + knot.output knownbugs.output \ liss1.output liss2.output lump.output matrox.output \ mountain.output mult2d.output mult3d.output multknot.output \ ntube.output palette.output parpcurv.output parscurv.output \ @@ -767,7 +768,7 @@ FILES= ${OUT}/ackermann.input \ ${OUT}/images1.input ${OUT}/images1a.input ${OUT}/images3a.input \ ${OUT}/images3.input ${OUT}/images6.input ${OUT}/images6a.input \ ${OUT}/images7.input ${OUT}/images7a.input ${OUT}/infprod.input \ - ${OUT}/intaf.input ${OUT}/intbypart.input \ + ${OUT}/inputform.input ${OUT}/intaf.input ${OUT}/intbypart.input \ ${OUT}/intdeq.input ${OUT}/intef.input \ ${OUT}/intg0.input ${OUT}/intheory.input ${OUT}/int.input \ ${OUT}/intlf.input ${OUT}/intmix.input ${OUT}/intrf.input \ @@ -1188,8 +1189,8 @@ DOCFILES= \ ${DOC}/images6a.input.dvi ${DOC}/images6.input.dvi \ ${DOC}/images7a.input.dvi ${DOC}/images7.input.dvi \ ${DOC}/images8a.input.dvi ${DOC}/images8.input.dvi \ - ${DOC}/infprod.input.dvi ${DOC}/intaf.input.dvi \ - ${DOC}/intbypart.input.dvi \ + ${DOC}/infprod.input.dvi ${DOC}/inputform.input.dvi \ + ${DOC}/intaf.input.dvi ${DOC}/intbypart.input.dvi \ ${DOC}/intdeq.input.dvi ${DOC}/intef2.input.dvi \ ${DOC}/intef.input.dvi ${DOC}/intg0.input.dvi \ ${DOC}/intheory.input.dvi ${DOC}/int.input.dvi \ diff --git a/src/input/inputform.input.pamphlet b/src/input/inputform.input.pamphlet new file mode 100644 index 0000000..cfdf3fd --- /dev/null +++ b/src/input/inputform.input.pamphlet @@ -0,0 +1,225 @@ +\documentclass{article} +\usepackage{axiom} +\setlength{\textwidth}{400pt} +\begin{document} +\title{\$SPAD/src/input inputform.input} +\author{Timothy Daly} +\maketitle +\begin{abstract} +\end{abstract} +\eject +\tableofcontents +\eject +\begin{chunk}{*} +)set break resume +)sys rm -f inputform.output +)spool inputform.output +)set message test on +)set message auto off +)clear all + +\end{chunk} + +Consider the three strings: + +\begin{chunk}{*} + +--S 1 of 18 +a1:="(a/x)+(a/y)" +--R +--R +--R (1) "(a/x)+(a/y)" +--R Type: String +--E 1 + +--S 2 of 18 +a2:="(a/x) + (a/y)" +--R +--R +--R (2) "(a/x) + (a/y)" +--R Type: String +--E 2 + +--S 3 of 18 +a3:="(a*x+a*y)/(x*y)" +--R +--R +--R (3) "(a*x+a*y)/(x*y)" +--R Type: String +--E 3 + +\end{chunk} + +Of course as members of the Domain String these are all different. + +\begin{chunk}{*} + +--S 4 of 18 +(a1=a2)::Boolean +--R +--R +--R (4) false +--R Type: Boolean +--E 4 + +--S 5 of 18 +(a1=a3)::Boolean +--R +--R +--R (5) false +--R Type: Boolean +--E 5 + +--S 6 of 18 +(a2=a3)::Boolean +--R +--R +--R (6) false +--R Type: Boolean +--E 6 + +\end{chunk} + +While as members of the Domain Expression Integer these are equal. + +\begin{chunk}{*} + +--S 7 of 18 +interpretString(a1."=".a2)::Boolean +--R +--R +--R (7) true +--R Type: Boolean +--E 7 + +--S 8 of 18 +interpretString(a1."=".a3)::Boolean +--R +--R +--R (8) true +--R Type: Boolean +--E 8 + +--S 9 of 18 +interpretString(a2."=".a3)::Boolean +--R +--R +--R (9) true +--R Type: Boolean +--E 9 + +\end{chunk} + +But when we evaluate them as symbolic expressions in the domain +InputForm: + +\begin{chunk}{*} + +--S 10 of 18 +x:INFORM:=x +--R +--R +--R (10) x +--R Type: InputForm +--E 10 + +--S 11 of 18 +y:INFORM:=y +--R +--R +--R (11) y +--R Type: InputForm +--E 11 + +--S 12 of 18 +a:INFORM:=a +--R +--R +--R (12) a +--R Type: InputForm +--E 12 + +\end{chunk} + +The first two are equal but the third is something different! + +\begin{chunk}{*} + +--S 13 of 18 +interpretString(a1."=".a2)::Boolean +--R +--R +--R (13) true +--R Type: Boolean +--E 13 + +--S 14 of 18 +interpretString(a1."=".a3)::Boolean +--R +--R +--R (14) false +--R Type: Boolean +--E 14 + +--S 15 of 18 +interpretString(a2."=".a3)::Boolean +--R +--R +--R (15) false +--R Type: Boolean +--E 15 + +\end{chunk} + +So equality of these "algebraic" objects in Expression Integer +is not the same as equality in a purely symbolic domain like +InputForm. + +In fact, after completing this exercise I realized that the +original Axiom developers actually did already anticipate the +need for an OutputForm for InputForm that is equivalent the +actual input to the Axiom interpreter. The function that I was +looking for is called 'expr' in the domain InputForm. + +\begin{chunk}{*} + +--S 16 of 18 +map(expr,map(interpretString,a1=a2)::Equation(INFORM)) +--R +--R +--R a a a a +--R (16) - + -= - + - +--R x y x y +--R Type: Equation(OutputForm) +--E 16 + +--S 17 of 18 +map(expr,map(interpretString,a2=a3)::Equation(INFORM)) +--R +--R +--R a a a x + a y +--R (17) - + -= --------- +--R x y x y +--R Type: Equation(OutputForm) +--E 17 + +--S 18 of 18 +map(expr,map(interpretString,a1=a3)::Equation(INFORM)) +--R +--R +--R a a a x + a y +--R (18) - + -= --------- +--R x y x y +--R Type: Equation(OutputForm) +--E 18 + +)spool +)lisp (bye) + +\end{chunk} +\eject +\begin{thebibliography}{99} +\bibitem{1} nothing +\end{thebibliography} +\end{document} +