#398 MAX(a+b,c) is NOT equal to MAX(c,a+b)

closed
nobody
Lisp Core (471)
5
2006-03-27
2003-09-05
Anonymous
No

-------------------------------------------------------------

Maxima version: 5.9.0
Maxima build date: 19:1 8/5/2003
host type: i586-pc-linux-gnu
lisp-implementation-type: CLISP
lisp-implementation-version: 2.27 (released 2001-07-17) (built 3223390905) (memory 3269088151)

-------------------------------------------------------------

(C1) assume(a+b>c)$
(C2) MAX(a+b,c); MAX(c,a+b);
(D2) b + a
(C3)
(D3) MAX(c, b + a) #why it is not simplified ?
(C4) is(MAX(a+b,c)=MAX(c,a+b));
(D4) FALSE #why FALSE if must be TRUE ?

P.S. Appreciate if you exclude javascripts from the site.

Alexander VIDYBIDA
vidybida@bitp.kiev.ua

Discussion

  • Bob McElrath

    Bob McElrath - 2003-11-10

    Logged In: YES
    user_id=10643

    It seems this is due to:
    (C1) assume(a+b>c)$
    (C2) is(a+b>c);
    (D2) TRUE
    (C3) is(a+b<=c);

    MACSYMA was unable to evaluate the predicate:
    b + a <= C
    -- an error. Quitting. To debug this try DEBUGMODE(TRUE);)

    Maxima should be able to figure out that a>b implies
    !(b<=a), but it doesn't...

    looks like the relevant file is compar.lisp.

     
  • Robert Dodier

    Robert Dodier - 2006-03-27
    • labels: --> Lisp Core
     
  • Robert Dodier

    Robert Dodier - 2006-03-27

    Logged In: YES
    user_id=501686

    The noncommutative behavior is still present in maxima
    5.9.3, which is strange because min/max have been completely
    rewritten.

    (%i4) assume (aa + bb > cc);
    (%o4) [- cc + bb + aa > 0]
    (%i5) max (aa + bb, cc);
    (%o5) max(cc, bb + aa)
    (%i6) max (cc, aa + bb);
    (%o6) bb + aa

    About the other things mentioned here -- is (foo = bar) is
    usually false (since = means structural equality). Maybe
    examples involving is (equal (foo, bar)) were intended.

     
  • Robert Dodier

    Robert Dodier - 2006-03-27

    Logged In: YES
    user_id=501686

    This report is a duplicate of 801231, closing it as such.

     
  • Robert Dodier

    Robert Dodier - 2006-03-27
    • status: open --> closed
     

Log in to post a comment.