Re: Why doesn't TrueQ return True here?
- To: mathgroup at smc.vnet.net
- Subject: [mg119739] Re: Why doesn't TrueQ return True here?
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Mon, 20 Jun 2011 08:04:01 -0400 (EDT)
- References: <itm0p5$14k$1@smc.vnet.net>
- Reply-to: nma at 12000.org
On 6/19/2011 4:29 PM, Jacare Omoplata wrote:
> Here's the output.
> -------------------------------------------------------
> In[29]:= Element[{t1, t2}, Reals]
>
> Out[29]= (t1 | t2) \[Element] Reals
>
> In[30]:= $Assumptions = t2> t1
>
> Out[30]= t2> t1
>
> In[31]:= TrueQ[(t2 - t1)> 0]
>
> Out[31]= False
> ------------------------------------------------------
>
> I would expect TrueQ to return True, not False. Why does it return False?
>
> And how can I test whether t2-t1 is positive?
>
> Thanks.
>
From help:
"TrueQ will return True only if the input is explicitly True"
Note the word,"explicitly".
Try Simplify or Refine on it:
Clear[t1,t2]
Assuming[Element[{t1,t2},Reals]&& t2>t1,Simplify[t2-t1>0]]
True
--Nasser