[Om3] binary vs n-ary relations

Peter Horn hornp at mathematik.uni-kassel.de
Thu Sep 25 15:41:18 CEST 2008


Hi Chris!

> An empirical question: do any CA/programming systems make such  
> 'expressions' legal
> and what then is the semantics?


===== MuPAD isn't very graceful: =====

 >> 1<2<3
(1 < 2) < 3

 >> bool(%)
Error: Can't evaluate to boolean [_less]

 >> (1=1=1)
(1 = 1) = 1

 >> bool(1=1=1)
FALSE

(which is somewhat OK, since it is rewritten associatively, and the  
2nd question is "TRUE = 1", but still I think they should change the  
behaviour there, anyway, the relations are only documented to be binary)

===== Maple: =====

 > 1<2<3
Error, `<` unexpected

===== Mathematica accepts it even the hard way: =====

In[5]:= 1 < 4 > 3 > 1 < 2
Out[5]= True

Best, Peter



--
Peter   Horn,   University  of  Kassel          *
Computational    Mathematics     Group      *       *
Heinrich Plett Str. 40,  34132  Kassel    *  [S] [C] [I] [E] [n] [c] [e]
Phone: + 4 9 - 5 6 1 - 8 0 4 - 4 1 9 2   *   http://www.symcomp.org
Fax:   + 4 9 - 5 6 1 - 8 0 4 - 4 6 4 6    *
E-Mail: hornp at mathematik.uni-kassel.de      *       *
             http://kassel.symcomp.org/          *






More information about the Om3 mailing list