Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.1K Views
|
1 Reply
|
1 Total Like
View groups...
Share
Share this post:

Equal[e] gives True?

Posted 3 years ago

The document of Equal describes the following behavior:

In[78]:= Equal[e]

Out[78]= True

However, this result seems very difficult to understand. Why is this behavior set?

Regards,
Zhao

POSTED BY: Hongyi Zhao

Equal is a logical function of an arbitrary number of arguments. Its value is False if there exists at least one pair of unequal elements. By this criterion it is true on sets with less than 2 elements. Equal[] -> True, Equal[x] -> True

Unequal evalutes to True only if there exists no equal pair

Unequal[] -> True

In both cases the "if there exists a pair" clause is false, the rest of the clause is not tested according to the rules fixed for AND by exiting with False at the first occurence of a "FALSE" argument.

Regards Roland

POSTED BY: Roland Franzius
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard