Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to Assign value to a symbolic function?

I have the little program:

P = function('P') 
x,y = var('x y')
def S(x): 
    return sum(P(x,y),y,0,1)
S(x)

It returns:

P(x, 1) + P(x, 0)

Now, any idea on how to assign particular values to P(x,y) and return S(x) accordingly?