[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] 20080107.01.tpd.patch (7089/343)
From: |
daly |
Subject: |
[Axiom-developer] 20080107.01.tpd.patch (7089/343) |
Date: |
Sun, 6 Jan 2008 23:50:59 -0600 |
This patch by Martin Rubey fixes the ordering of symbols in a
free abelian group. There also is a regression test file. So
a:=a::FreeAbelianGroup Symbol
b:=b::FreeAbelianGroup Symbol
z:=0::FreeAbelianGroup Symbol
a < -b ==> false
-b < z ==> true
z < a ==> true
Tim
=======================================================================
diff --git a/changelog b/changelog
index a4b3797..9c87000 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20080107 tpd src/input/Makefile add free to test bug 7089/343
+20080107 tpd src/input/free.input added to test bug 7089/343
+20080107 mxr src/input/free.spad fix FreeAbelianGroup bug 7089/343
20080106 tpd src/algebra/combfunc.spad \mathbb -> \bf
20080106 tpd src/algebra/op.spad revert dgamma change, reject patch
20080106 tpd src/scripts/tex/axiom.sty add binom for combfunc
diff --git a/src/algebra/free.spad.pamphlet b/src/algebra/free.spad.pamphlet
index 95e1771..8300350 100644
--- a/src/algebra/free.spad.pamphlet
+++ b/src/algebra/free.spad.pamphlet
@@ -531,21 +531,21 @@ FreeAbelianGroup(S:SetCategory): Exports ==
Implementation where
inmax l ==
mx := first l
for t in rest l repeat
- if t.gen > mx.gen then mx := t
+ if mx.gen < t.gen then mx := t
mx
+ -- lexicographic order
a < b ==
zero? a =>
zero? b => false
- (inmax terms b).exp > 0
+ 0 < (inmax terms b).exp
ta := inmax terms a
zero? b => ta.exp < 0
- ta := inmax terms a
tb := inmax terms b
- ta.gen < tb.gen => true
- ta.gen > tb.gen => false
+ ta.gen < tb.gen => 0 < tb.exp
+ tb.gen < ta.gen => ta.exp < 0
ta.exp < tb.exp => true
- ta.exp > tb.exp => false
+ tb.exp < ta.exp => false
lc := ta.exp * ta.gen
(a - lc) < (b - lc)
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index df8457c..f533ad3 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -312,8 +312,8 @@ REGRES= algaggr.regress algbrbf.regress algfacob.regress
alist.regress \
fib.regress file.regress float1.regress float2.regress \
float.regress fname1.regress fname.regress fnla.regress \
fns.regress fparfrac.regress fparfrc.regress fr1.regress \
- fr2.regress frac.regress fr.regress galois.regress \
- gamma.regress \
+ fr2.regress frac.regress fr.regress free.regress \
+ galois.regress gamma.regress \
gbf.regress genups.regress gonshor.regress grpthry.regress \
gstbl.regress heap.regress heat.regress help.regress \
herm.regress hexadec.regress ico.regress ideal.regress \
@@ -649,7 +649,8 @@ FILES2=${OUT}/arith.input ${OUT}/bugs.input \
${OUT}/exlimit.input \
${OUT}/expr.input ${OUT}/exprode.input ${OUT}/exseries.input \
${OUT}/exsum.input ${OUT}/fns.input \
- ${OUT}/function.input ${OUT}/galois.input ${OUT}/gamma.input \
+ ${OUT}/function.input ${OUT}/free.input \
+ ${OUT}/galois.input ${OUT}/gamma.input \
${OUT}/grpthry.input \
${OUT}/help.input ${OUT}/intef2.input \
${OUT}/intmix2.input ${OUT}/knot2.input ${OUT}/linalg.input \
@@ -806,6 +807,7 @@ DOCFILES= \
${DOC}/fparfrac.input.dvi ${DOC}/fparfrc.input.dvi \
${DOC}/fr1.input.dvi ${DOC}/fr2.input.dvi \
${DOC}/frac.input.dvi ${DOC}/fr.input.dvi \
+ ${DOC}/free.input.dvi \
${DOC}/function.input.dvi ${DOC}/galois.input.dvi \
${DOC}/gamma.input.dvi \
${DOC}/gary1.input.dvi ${DOC}/gbf.input.dvi \
diff --git a/src/input/free.input.pamphlet b/src/input/free.input.pamphlet
new file mode 100644
index 0000000..a65daf6
--- /dev/null
+++ b/src/input/free.input.pamphlet
@@ -0,0 +1,83 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input free.input}
+\author{Timothy Daly}
+\maketitle
+\begin{abstract}
+We expect that $-b < z < a < b$
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+<<*>>=
+)spool free.output
+)set message test on
+)set message auto off
+)clear all
+
+--S 1 of 8
+Z2:=FreeAbelianGroup Symbol
+--R
+--R (1) FreeAbelianGroup Symbol
+--R Type:
Domain
+--E 1
+
+--S 2 of 8
+a:=a::FreeAbelianGroup Symbol
+--R
+--R (2) a
+--R Type: FreeAbelianGroup
Symbol
+--E 2
+
+--S 3 of 8
+b:=b::FreeAbelianGroup Symbol
+--R
+--R (3) b
+--R Type: FreeAbelianGroup
Symbol
+--E 3
+
+--S 4 of 8
+z:=0::FreeAbelianGroup Symbol
+--R
+--R (4) 0
+--R Type: FreeAbelianGroup
Symbol
+--E 4
+
+--S 5 of 8
+a < -b
+--R
+--R (5) false
+--R Type:
Boolean
+--E 5
+
+--S 6 of 8
+-b < z
+--R
+--R (6) true
+--R Type:
Boolean
+--E 6
+
+--S 7 of 8
+z < a
+--R
+--R (7) true
+--R Type:
Boolean
+--E 7
+
+--S 8 of 8
+a < b
+--R
+--R (8) true
+--R Type:
Boolean
+--E 8
+
+)spool
+)lisp (bye)
+
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}
- [Axiom-developer] 20080107.01.tpd.patch (7089/343),
daly <=