MathGroup Archive 1997

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

Search the Archive

Re: Assume() similar to Maple?

  • To: mathgroup at
  • Subject: [mg6846] Re: [mg6799] Assume() similar to Maple?
  • From: jpk at
  • Date: Thu, 24 Apr 1997 02:44:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

> In a program I am writing using MMA3.0, the function Max[] is used
> extensively.  Is there any way to tell MMA that 
> a>1; 
> s>0;
> Such that 
> Max[s, s*a]
> would return
> a*s

Hi Hossein

here is the solution
At first define:

     Max[a_,b_.a_/; b>=1]:= b*a

It works with numbers as b

In[2]:= Max[a,3a]
Out[2]=  3 a

Now lets give the symbol b the property b>1 with:

In[3]:= b /:b>=1 :=True;


In[4]= Max[a,b*a]
Out[6]= a b


Hope that helps 

  • Prev by Date: Re: Plot Question
  • Next by Date: possible bug in Cases/pattern matching??
  • Previous by thread: Assume() similar to Maple?
  • Next by thread: Re: MLINK32.DLL