On Mon, 12 Jul 2010 08:46:16 -0700 (PDT)
David Sanders <[email protected]> wrote:

> > > I also note that after reading the documentation, I am still left
> > > without an answer to my original question, which is how to do
> > > pattern matching in Sage (or if it's even possible) for something
> > > of the form
> > > f(i) !
> >
> > I don't think this is supported by GiNaC expressions at the moment.
> > If using wildcards for functions is available in GiNaC, we can wrap
> > it easily. Implementing it would take more time though. Can you ask
> > the GiNaC list if this is possible purely using GiNaC (from C++)?
> 
> Actually, from browsing the documentation, I can't even find symbolic
> functions in GiNaC like
> f = function('f')
> in Sage.
> Does this exist in GiNaC?  Does the above Sage statement reference
> something in GiNaC? If so, what?

Ginac doesn't support creating new symbolic functions at runtime. This
was one of the first things we worked on when we started integrating
GiNaC in Sage.

> (I tried to answer this question myself using
> function?
> function??
> 
> in Sage, but this just said that it was a built-in function, and gave
> me neither the name of a file, nor the source code.
> Is there another way  of getting information about this?)

This is also helpful sometimes:

sage: function.__module__
'sage.calculus.var'

After chasing things around a little, you'll see that the relevant code
is in sage/symbolic/function.pyx.


Cheers,
Burcin

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to