Re: Signing with Inequality Constraints
- To: mathgroup at smc.vnet.net
- Subject: [mg22490] Re: [mg22479] Signing with Inequality Constraints
- From: "Vazzana" <vazzana at kyblue.com>
- Date: Wed, 8 Mar 2000 02:22:30 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Bob,
I tried what you suggested and it seems to work. However, if I want to
continue to assume a>b and ask mathematica b-1>a or Sign[a-b] it is unable
to evaluate that.
In[1]:=
Unprotect[Greater, Less]; Clear[a, b, Greater, Less];
a /: (a > b) = True;
a /: (b < a) = True;
(b-a < 0) = True;
(0 > b-a) = True;
Protect[Greater, Less];
{b-a < 0, 0 > b-a, a > b, b < a}
Out[7]=
{True,True,True,True}
In[8]:=
b-1<a
Out[8]=
-1+b<a
In[9]:=
Sign[b-a]
Out[9]=
Sign[-a+b]
Actually my real problem is a little more complex, and perhaps my attempt
to keep it simple was faulty. I am trying to determine whether the
following is positive
((a b^3 + 3 b^3 c - a b^2 g + b^2 c g - a b^2 r + a b g r - 2 b c g r + a
b^2 t - b^2 c t + a b g t + b c g t - a b r t + 2 b c r t - a g r t -
2 a b t^2 - 4 b c t^2 + 2 a r t^2 - 4 b^3 w + b^2 r w + b g r w - 2 b g t
w - b r t w + g r t w + 6 b t^2 w - 2 r t^2 w))/ ((2 b ((3 b^2 - g r +
g t + r t - 4 t^2))))
given
b>t>0
b>r>0
g>t
a>c>w>0
----------
> From: BobHanlon at aol.com
To: mathgroup at smc.vnet.net
> To: vazzana at kyblue.com; mathgroup at smc.vnet.net
> Subject: [mg22490] Re: [mg22479] Signing with Inequality Constraints
> Date: Saturday, March 04, 2000 12:55 PM
>
> Using 3.0:
>
> Unprotect[Greater, Less]; Clear[a, b, Greater, Less];
>
> a /: (a > b) = True;
> a /: (b < a) = True;
> (b-a < 0) = True;
> (0 > b-a) = True;
>
> Protect[Greater, Less];
>
> {b-a < 0, 0 > b-a, a > b, b < a}
>
> {True, True, True, True}
>
> Bob Hanlon
>
> In a message dated 3/4/2000 3:46:17 AM, vazzana at kyblue.com writes:
>
> >Using 3.0, I know that I can define
> >In:= a :/ Sign[a]=-1
> >in order to say a<0. .
> >
> >Is there an analogous way to tell Mathematica that b-a<0.
> >