MathGroup Archive 1998

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

Search the Archive

Re: How to declare Integers?

  • To: mathgroup at
  • Subject: [mg13464] Re: How to declare Integers?
  • From: Paul Abbott <paul at>
  • Date: Sun, 26 Jul 1998 02:33:29 -0400
  • Organization: University of Western Australia
  • References: <000001bda94e$c10efc90$> <6ocuh1$>
  • Sender: owner-wri-mathgroup at

Sean Ross wrote:

> No, what we are after is something like this:
> Declare[symbol,Integer];
> Sin[symbol Pi x]
> and have it return zero for all x even with no explicit value assigned
> to symbol.
> I want to be able to tell mathematica that a certain symbol is Real,
> Complex, Imaginary, greater than 2, Integer etc. and have every single
> function in the language react appropriately taking that declaration as
> an assumption.  I want Integrals to be appropriate to Real only or
> Integer only arguments etc.  In essence I want global assumptions or
> conditions on symbols with every built-in function looking at those
> restrictions or assumptions and responding appropriately.

To indicate how difficult this can be in general, consider the following

	Sum[(j^n y^j)/j!, {j, 0, Infinity}]

If n is an Integer, n >=0, then this sum reduces to

	E^y Sum[StirlingS2[n, m] y^m, {m, 0, n}]

Is this the sort of thing you expect to happen automatically?  You might
feel that the second form is more complicated than the first -- but it
is actually much more useful.  

Another example is, how would you like BesselJ[n+1/2,x] to be


Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at  AUSTRALIA                   

            God IS a weakly left-handed dice player

  • Prev by Date: Packages Search Path: how to set it?
  • Next by Date: ReplaceList Use
  • Previous by thread: Re: Re: How to declare Integers?
  • Next by thread: ReplacePart question