Per this chat discussion and this previous question where I encountered the strange behaviour:
Simplify[1] ==> 1
And[0, 1] ==> 0 && 1
Simplify[And[2, 3]] ==> 2 && 3
Simplify[Not[0]] ==> !0
FullSimplify[Not[0]] ==> True (* expected !0, thanks Jens *)
Simplify[And[0, 1]] ==> False (* expected 0 && 1 *)
Simplify[And[1, 2]] ==> 2 (* expected 1 && 2 *)
Simplify[Or[0, 1]] ==> True (* expected 0 || 1 *)
Simplify
and Fullsimplify
assume 0 -> False, 1 -> True
in some logical expressions. Only Or
and And
are affected but not Not
. This is certainly undocumented (or underdocumented), and I would say rather inconsistent. Please decide on whether it is a bug or not.
Present in versions 8 and 9 but not in version 7 (or before).
1 == True
,0 == False
, but the rest of the integers are just numbers. It's not like in C where2
would be interpreted as "true" too. This is why1 && 2 --> 2
and notTrue
. It's likeTrue && 2
orTrue && expr
. $\endgroup$