Re: Problem defining assumptions on a set of variables
- To: mathgroup at smc.vnet.net
- Subject: [mg58060] Re: Problem defining assumptions on a set of variables
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Fri, 17 Jun 2005 05:19:23 -0400 (EDT)
- Organization: The Open University, Milton Keynes, England
- References: <d8riof$ihp$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Koffijberg, H. wrote: > Hi all, > > I have encountered two problems using Mathematica v5.0 with parameters > for which no value is defined but for which some assumptions are defined. > I do not understand why each of the following statements return -1. > > Assuming[q\[Element]Reals&&q>0&&q<1, If[q > 3, 1, 0, -1]] > Refine[If[q > 3, 1, 0, -1],q\[Element]Reals&&q>0&&q<1] > Hi Erik, No problem here; Mathematica behaves has expected. As an example, let examine your first statement: In[1]:= Assuming[q â?? Reals && q > 0 && q < 1, If[q > 3, 1, 0, -1]] Out[1]= -1 Part of this statement is equivalent to the logical combination of the following two inequalities In[2]:= 0 < q < 1 && q > 3 Out[2]= 0 < q < 1 && q > 3 In this case, Mathematica returns the expression itself since it cannot decide whether it is right or wrong: each inequality is true by itself but when combined they become a contradictory or undecidable proposition about q. Your original statement does not assign any value or range of values to q, so the test is inconclusive and the *If* statement returns -1. A similar reasoning apply to the next statement In[3]:= Refine[If[q > 3, 1, 0, -1], 0 < q < 1] Hope this helps, /J.M.