Re: How do I define a range of a symbol?

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg977] Re: How do I define a range of a symbol?*From*: Richard J Fateman <fateman at CS.Berkeley.EDU>*Date*: Thu, 4 May 1995 06:14:35 -0400

> In article <3nkcqm$n02 at news0.cybernetics.net>, > Paul A. Rubin <rubin at msu.edu> wrote: > >In article <3nhu1f$7m2 at news0.cybernetics.net>, hsvrt at uunet.uu.net wrote: > >->Can anyone help me with the following (probably elementary) problem: > >-> > >->Is it possible to specify a range of a constant, e.g. > >-> > >->0 < k < Infinity, or > >->0 < k < 100, or > >->k not equal to 0 > >-> > > > >In general, I do not think this is possible. You can use upvalues to give > >Mathematica this sort of information. For instance, to specify 0 < k < 100 > >you could use > > > > k /: Greater[ k, 0 ] = True > > k /: Less[ k, 100 ] = True > > > >There are two fundamental problems with this. ... > Paul correctly points out that Mathematica can't do it. It is not a trivial problem to solve, and the importance of solving it was, I suspect, not apparent to the designers of Mathematica at the time the program was being put together. There are some bits and scraps of ranges PRODUCED by programs like Integrate, but since the rest of the Mathematica program can't handle them, it is not clear that one can do more than print them out for the human user to see. -- Richard J. Fateman fateman at cs.berkeley.edu 510 642-1879