MathGroup Archive 1995

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

Search the Archive

Re: Operator Definition

  • To: mathgroup at christensen.cybernetics.net
  • Subject: [mg985] Re: Operator Definition
  • From: wagner at bullwinkle.cs.Colorado.EDU (Dave Wagner)
  • Date: Thu, 4 May 1995 07:34:42 -0400
  • Organization: University of Colorado, Boulder

In article <3nv9j4$9g8 at news0.cybernetics.net>,
Todd Pitts <pitts at mayo.EDU> wrote:
>I would like to define a shift operator similar to the derivative 
>for continuous time that is already built into Mma. i.e. 
>
>Shift[ how far ][ expression head ] [ variable(s) to which shift should be applied ]
>
>I would also like to have it enjoy a relationship to something called S sort of
>like D[] and Derivative[][][].  Any ideas on how to define it or where I could
>go to learn how to do it right?  I have the standard Mma reference book by
>Wolfram but haven't (as of yet) been able to extract the proper way to get 
>what I need.
>
>Thanks in Advance,
>Todd Pitts

You can make definitions like thes in a straightforward way:

In[3]:=
    f[a_][b_][c__] := a[b[c]]

In[4]:=
    f[q][r][s,t,u]
Out[4]=
    q[r[s, t, u]]

Definitions such as these are called SubValues. SubValues[f] returns a
list of such definitions, much like UpValues or DownValues (except that
it's undocumented):

In[5]:=
    SubValues[f]
Out[5]=
    {Literal[f[a_][b_][c__]] :> a[b[c]]}

		Dave Wagner
		Principia Consulting
		(303) 786-8371
		princon at csn.net
		http://www.csn.net/princon


  • Prev by Date: Mathematica Programming Reference Recommendation
  • Next by Date: Summer Mathematica Courses at UIUC!!!
  • Previous by thread: Operator Definition
  • Next by thread: Re: Operator Definition