Hi,

Thanks for the help!

Now all I need it to tell Sage that j^3=1 and that i^4=1 and i^2=-1, so that 
Sage knows for example that
(1+j+j^2) * j = (1+j+j^2)


sage: var('j')
sage: function('V',x)
V(x)
sage: V_2(p,e)=-V(p-e)-e
sage: V_2
(p, e) |-->  -e - V(-e + p)
sage: V_3(p,e)=j/(3)*(V_2(p,e)+V_2(p,e*j)+V_2(p,e*j^2))
sage: V_3(p,1)
-1/3*(j^2 + j + V(p - 1) + V(-j + p) + V(-j^2 + p) + 1)*j
sage: var('i')
i
sage: V_4(p,e)=i/(4)*(V_3(p,e)+V_3(p,e*i)) - (1/2 * V_3(p,e*(1+i)))
sage: V_4(p,1)
-1/12*((j^2 + j + V(p - 1) + V(-j + p) + V(-j^2 + p) + 1)*j + (i*j^2 + i*j + i 
+ V(-i + p) + V(-i*j + p)
+ V(-i*j^2 + p))*j)*i + 1/6*((i + 1)*j^2 + (i + 1)*j + i + V(-i + p - 1) + 
V(-(i + 1)*j + p)
+ V(-(i + 1)*j^2 + p) + 1)*j

var('h')
V_5(p,e)=h/(5)*(V_4(p,e)+V_4(p,e*h)+V_4(p,e*h^2)+V_4(p,e*h^3)+V_4(p,e*h^4))
V_6(p,e)=-j/6*(V_5(p,e*(1+i))+V_5(p,e*(j+i*j)) + V_5(p,e*(j^2+i*j^2))) - 1/2 * 
V_5(p,e*(1+j+j^2+i+i*j+i*j^2))

If you copy-paste these definitions you'll see my problem.

 Bestest Regards,

Christian

On 14/10/2011 14:59, kcrisman wrote:

On Oct 14, 8:41 am, Christian Burisch<[email protected]>  wrote:
Sorry to bug you again. Is there a kind soul who would get me started on this?
Thanks.


I don't think we have native functionality for this.  Could you just
use completely symbolic variables and functions for now?   The
expanding and simplification methods are reasonably powerful, though I
can't say whether they would do precisely the simplifications you are
looking for.

Why don't you try a "toy" case with something like

sage: var('j')
j
sage: function('V',x)
V(x)
sage: V_2(p,e)=-V(p-e)-e
sage: V_2
(p, e) |-->  -e - V(-e + p)
sage: V_3(p,e)=j/(3)*(V_2(p,e)+V_2(p,e*j)+V_2(p,e*j^2))
sage: V_3(p,1)
-1/3*(j^2 + j + V(p - 1) + V(-j + p) + V(-j^2 + p) + 1)*j

Your syntax wasn't entirely clear, but I think this is what you
intended?

- kcrisman


--
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