MathGroup Archive 2008

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

Search the Archive

Re: Inequality to LessEqual

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94526] Re: [mg94465] Inequality to LessEqual
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Mon, 15 Dec 2008 07:48:10 -0500 (EST)
  • References: <200812141237.HAA10202@smc.vnet.net>


On 14 Dec 2008, at 21:37, Raffy wrote:

> Lets say I have the following expression: ie. a result from Reduce,
>
> expr0 = Inequality[ 0., LessEqual, x, LessEqual, 1. ]
>
> I want to reduce this expression to:
>
> expr1 = LessEqual[ 0., x, 1. ]
>
> The only automatic method I've found to make the above transformation,
> is the silly:
>
> expr1 == ToExpression[ToString[expr0]]
>
> Is there a more elegant solution?  It needs to work in the general
> case, ie. that expr0 may be far more complicated than just a basic
> Inequality, and the Inequality may contain different comparators.
>

You can get rid of Inequality (at the price of getting a more complex  
looking expression) by applying LogicalExpand.
Look at:

FullForm[LogicalExpand[Inequality[a, LessEqual, b, LessEqual, c]]]

Andrzej Kozlowski



  • Prev by Date: Re: what am i doing wrong?
  • Next by Date: Re: "The requested evaluator is not currently defined"
  • Previous by thread: Inequality to LessEqual
  • Next by thread: Re: Inequality to LessEqual