part of equation as function



On 03/13/2012 07:53 AM, Jan Hendrik M?ller wrote:
> Hi all,
> how can I use parts of an equation as a function, e.g.
> o% z = x*y
> and I would like to define f(x,y):=x*y by using the output. 
> f(x,y):=rhs(eq) doesn't work if I want to evaluate e.g. f(1,2)
Use:

define (f(x,y), rhs(eq));

for mathematical functions use always define() instead of :=. Think of 
:= as a way to define a small program, rather than defining a function.
Cheers,
Jaime