Re: Information about subscripted function

*To*: mathgroup at smc.vnet.net*Subject*: [mg53077] Re: Information about subscripted function*From*: Paul Abbott <paul at physics.uwa.edu.au>*Date*: Wed, 22 Dec 2004 04:53:23 -0500 (EST)*Organization*: The University of Western Australia*References*: <cq8tj5$h18$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

In article <cq8tj5$h18$1 at smc.vnet.net>, seb at magda.ifj.edu.pl wrote: > when I define a function with a subscript in its > name: (cell content below) > > In[1]:= \!\(f\_1[x_] := x^2\) > > I can't see it by use of information operator: > > In[2]:= \!\(\(?\ f\_1\)\) > > Information::ssym > > Out[2]:= \!\(Information[f\_1, LongForm -> False]\) > > of course I may ask: > > In[3]:= ? Subscript > > but then I get ALL functions which have subscripts in their names! > > so, how to ask about the defintions of subscripted functions ? By default, the definition is associated with Subscript, not with f. In InputForm, your first input reads Subscript[f, 1][x_] := x^2 and so you can see why this is so. You could use Symbolize in the <<Utilities`Notation` package to symbolize Subscript[f, 1] and then it will work. Alternatively, you could use association. However, you cannot associate the definition with f using f /: Subscript[f, 1][x_] := x^2 However, you can achieve what you want using pure functions: f /: Subscript[f, 1] := Function[x, x^2] ?f Cheers, Paul -- Paul Abbott Phone: +61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) 35 Stirling Highway Crawley WA 6009 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul