MathGroup Archive 2010

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

Search the Archive

Re: should Positive[ complexNumber ] return undefined instead of False?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112631] Re: should Positive[ complexNumber ] return undefined instead of False?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 23 Sep 2010 04:41:07 -0400 (EDT)
  • References: <201009210604.CAA25100@smc.vnet.net>

On 21 Sep 2010, at 08:04, Nasser M. Abbasi wrote:

>
> math experts:
>
> x = 3*I;
> Positive[x]
>
> Out[59]= False
>
> Should this be undefined or unevaluated?
>
> If it is False, when there must be an case when it is True, right? but
> there is not such case, positive and negative are not defined on the
> complex numbers, or Am I missing something?

Note that

Through[{Positive, Negative}[I]]

 {False,False}

In other words, I is neither positive nor negative.

>
> I know the above works as documented:
>
> "Positive[x] gives False if x is manifestly a negative numerical
> quantity, a complex numerical quantity, or zero. Otherwise, it remains
> unevaluated"
>
> So, my question is just wanting to know why when Mathematica was
> designed, the complexes were not added to the case where they remains
> unevaluated in this case?


Well, I think the "philosophy" is to return an expression of the form Positive[x] unevaluated so that it can later return a value when x is assigned a value. I.e.

Positive[x] /. x -> 2

True

But obviously this makes no sense in this case of I since you can't =
assign values to I and even:

Unevaluated[Positive[I]] /. I -> 2

False


So the answer, in my opinion, is that, wether logically justified or =
not,  returning Positive[I] unevaluated would have no practical use =
hence it is not done.

Andrzej Kozlowski




  • Prev by Date: Re: Question on defaults in positional arguments
  • Next by Date: Re: Using Mathematica remotely (installed on Mac, to be accessed
  • Previous by thread: should Positive[ complexNumber ] return undefined instead of False?
  • Next by thread: Summing above diagonal in a tensor