Rather subtle problem with ordergreat+letsimp



Hi all.  I have attempted to use ordergreat to get Maxima to display
units  at the end of an expression, but it turns out there is a problem
with this.  In the user session, it manifests itself as an apparent
refusal to apply letsimp rules to user input:

(%i10) allunitslist[1];
(%o10)                              webers
(%i11) letsimp(allunitslist[1],quanttoone);
(%o11)                                 1
(%i12) letsimp(webers,quanttoone);
(%o12)                              webers
(%i13) allunitslist[1]-webers;
(%o13)                          webers - webers

The real reason is apparent when you use save to look at the lisp form:

;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- 
(in-package "MAXIMA")
(DSKSETQ $ALLUNITSLIST '((MLIST SIMP) $WEBERS $WEBER |$Wb| {snip})) 
(ADD2LNC '$ALLUNITSLIST $VALUES) 
(DSKSETQ $TESTLIST '((MLIST SIMP) _917WEBERS _916WEBER)) 
(ADD2LNC '$TESTLIST $VALUES) 
(DSKSETQ $TESTLIST1 '((MLIST SIMP) _570KG |_645M| |_900S|)) 
(ADD2LNC '$TESTLIST1 $VALUES) 
(DSKSETQ $TESTLIST2 '((MLIST SIMP) $A1)) 
(ADD2LNC '$TESTLIST2 $VALUES)

This is a rather tricky problem.  I personally would consider this
behavior a bug - from the user's standpoint it's sheer nonsense.  The
only reason I can see for this is if the ordering set by great somehow
has implications other than those associated with display - i.e., some
mathematical consequence.  If this isn't the case, I think there needs
to be some logic internally which recognizes that _917WEBERS and
$WEBERS are the same thing for all purposes of computation and
simplification.

This problem manifested itself when I tried to add ordering -
processunits fails because suddenly all the incoming unit forms no
longer look like units.

Anybody have any good ideas on this one?

Thanks,
CY

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com