I am pretty sure that Syed figured out the question by now, but for future visitors I thought it a good idea to write something.
- Why does
Or[]
return False
?
From the docs
we read
It evaluates its arguments in order, giving True immediately if any of them are True, and False if they are all False.
which is another way of saying that it returns True
if any or all of its arguments is true and False
otherwise.
- Why does
Nor[]
return True
?
The easiest way to realize this -I think- is again to have a look at the documentation
where we find that it is equivalent to Not[Or[]]
. So, Not[False]
is True
.
- Why does
And[]
return True
?
Well, again this can be seen directly from the docs
and also from the comment by @Sjoerd Smit.
It evaluates to False
if any of its arguments are false, and to True
otherwise.
- Why does
Nand[]
return False
?
Similar to the explanation of Nor
in this case. Nand[]
is equivalent to Not[And[]]
and hence Not[True]
which is False
.
- Why does
Xor[]
return False
?
Well, it has to evaluate all of its argument and yields True
if an odd number of them is True
and False
otherwise. Since, we do not have an odd number of True
statements, it returns False
- Why does
Xnor[]
return True
?
Xnor[]
is equivalent to Not[Xor[]]
False
. reference.wolfram.com/language/ref/Or.html $\endgroup$And
, for example, isTrue
unless one of it's arguments isFalse
. The zero-argument case is just an extension of that. $\endgroup$Plus
andTimes
(where it might be more obviously plausible). Symbols with theOneIdentity
attribute will, when given an empty argument list, evaluate to their respective identity elements. $\endgroup$