MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: To be or not to be...


On Wed, 9 Nov 2005, Ingolf Dahl wrote:

> Try the following commands in order:
>
> b = Sequence[]
>
> b == Sequence[]
>
> b != Sequence[]
>
> b === Sequence[]
>
> b =!= Sequence[]
>
> The four last lines all evaluate to "True" for me. Quite amazing!

There is really nothing mysterious. The FullForm of e.g.

b==Sequence[]

would be

Equal[b, Sequence[]].

As an empty sequence is spliced into the argument list of Equal, the
expression is equivalent to Equal[b] that is _defined_ to be True (check
the Help). Similarly for != or UnEqual. Try

a==Sequence[]

for an undefined a, and it evaluates to True as well.

Kristjan Kannike
<http://www.physic.ut.ee/~kkannike/>


  • Prev by Date: Re: ((a&&b)||c)==((a||c)&&(b||c))
  • Next by Date: Re: Write, Put,..
  • Previous by thread: To be or not to be...
  • Next by thread: Re: To be or not to be...