MathGroup Archive 2008

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

Search the Archive

Re: Inequality to LessEqual

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94545] Re: Inequality to LessEqual
  • From: dh <dh at metrohm.com>
  • Date: Tue, 16 Dec 2008 02:32:39 -0500 (EST)
  • References: <gi2ulo$9ul$1@smc.vnet.net>


Hi Raffy,

you may e.g. define a rule:

Inequality[a_,LessEqual,b_,LessEqual,c_]:=LessEqual[a,b,c]

or, if you want tthis rule to be applied automatically, you may choose 

the more dangerous way:

Unprotect[Inequality]

Inequality[a_,LessEqual,b_,LessEqual,c_]:=LessEqual[a,b,c]

This is not recommended, because by changing the inner working of Mathematica, 

one never knows what side effects it will have.

hope this helps, Daniel



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.

> 




  • Prev by Date: Re: branch of (-1)^(1/3)
  • Next by Date: Re: Manipulate question
  • Previous by thread: Re: Inequality to LessEqual
  • Next by thread: Find Selection Function (Spotlight) does not function