Dominique Pavot

5 Reputation

One Badge

1 years, 74 days

MaplePrimes Activity


These are replies submitted by Dominique Pavot

Thanks, and sorry : I should have read the doc.

I extracted minimal notebook to reproduce the behavior.
As predicted by 'acer 30047' the add operator returns correct result, but sum does not !!!
 

restart;

e[1] := (t,x,y,z)-> vector(4,[1,0,0,0]);
e[2] := (t,x,y,z)-> vector(4,[0,1,0,-6*z^4*(1-z)^3*(1-x^2)^2*(1-y^2)^3*x]);
e[3] := (t,x,y,z)-> vector(4,[0,0,1,-6*z^4*(1-z)^3*(1-x^2)^3*(1-y^2)^2*y]);
e[4] := (t,x,y,z)-> vector(4,[0,0,0,1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3]);

proc (t, x, y, z) options operator, arrow; vector(4, [1, 0, 0, 0]) end proc

 

proc (t, x, y, z) options operator, arrow; vector(4, [0, 1, 0, -6*z^4*(1-z)^3*(1-x^2)^2*(1-y^2)^3*x]) end proc

 

proc (t, x, y, z) options operator, arrow; vector(4, [0, 0, 1, -6*z^4*(1-z)^3*(1-x^2)^3*(1-y^2)^2*y]) end proc

 

proc (t, x, y, z) options operator, arrow; vector(4, [0, 0, 0, 1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3]) end proc

(1)

lie := (j,u,v)-> u[1]*diff(v[j],t)-v[1]*diff(u[j],t)+u[2]*diff(v[j],x)-v[2]*diff(u[j],x)
+u[3]*diff(v[j],y)-v[3]*diff(u[j],y)+u[4]*diff(v[j],z)-v[4]*diff(u[j],z);

proc (j, u, v) options operator, arrow; u[1]*(diff(v[j], t))-v[1]*(diff(u[j], t))+u[2]*(diff(v[j], x))-v[2]*(diff(u[j], x))+u[3]*(diff(v[j], y))-v[3]*(diff(u[j], y))+u[4]*(diff(v[j], z))-v[4]*(diff(u[j], z)) end proc

(2)

G:=(t,x,y,z)->matrix(4,4,[
[1,0,0,0],
[0,1+36*z^8*(1-z)^6*(1-x^2)^4*(1-y^2)^6*x^2,36*z^8*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)^2*y*(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)), ( 4, 2 ) = (-6*z^4*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x*(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)), ( 1, 1 ) = (1), ( 4, 3 ) = (-6*z^4*(1-z)^3*(-x^2+1)^3*(-y^2+1)^2*y*(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)), ( 1, 2 ) = (0)  ] ))

(3)

cf:=(k,l,m,t,x,y,z) -> seq(lie(p,e[k](t,x,y,z),e[l](t,x,y,z))*G(t,x,y,z)[p,m],p=1..4);
cf(2,4,2,t,x,y,z);

Warning, (in cf) `p` is implicitly declared local

 

proc (k, l, m, t, x, y, z) local p; options operator, arrow; seq(lie(p, e[k](t, x, y, z), e[l](t, x, y, z))*G(t, x, y, z)[p, m], p = 1 .. 4) end proc

 

0, 0, 0, -6*(-6*z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^2*x-6*z^4*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x*(-3*z^2*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3-7*z^3*(z-1)^2*(y^2-1)^3*(x^2-1)^3-2*z^3*(7*z-4)*(z-1)*(y^2-1)^3*(x^2-1)^3)-(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)*(-24*z^3*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x+18*z^4*(1-z)^2*(-x^2+1)^2*(-y^2+1)^3*x))*z^4*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x*(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)

(4)

cf1:=(k,l,m,t,x,y,z) -> sum(lie(p,e[k](t,x,y,z),e[l](t,x,y,z))*G(t,x,y,z)[p,m],p=1..4);
cf1(2,4,2,t,x,y,z);

proc (k, l, m, t, x, y, z) options operator, arrow; sum(lie(p, e[k](t, x, y, z), e[l](t, x, y, z))*G(t, x, y, z)[p, m], p = 1 .. 4) end proc

 

0

(5)

cf2:=(k,l,m,t,x,y,z) -> add(lie(p,e[k](t,x,y,z),e[l](t,x,y,z))*G(t,x,y,z)[p,m],p=1..4);
cf2(2,4,2,t,x,y,z);

Warning, (in cf2) `p` is implicitly declared local

 

proc (k, l, m, t, x, y, z) local p; options operator, arrow; add(lie(p, e[k](t, x, y, z), e[l](t, x, y, z))*G(t, x, y, z)[p, m], p = 1 .. 4) end proc

 

-6*(-6*z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^2*x-6*z^4*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x*(-3*z^2*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3-7*z^3*(z-1)^2*(y^2-1)^3*(x^2-1)^3-2*z^3*(7*z-4)*(z-1)*(y^2-1)^3*(x^2-1)^3)-(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)*(-24*z^3*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x+18*z^4*(1-z)^2*(-x^2+1)^2*(-y^2+1)^3*x))*z^4*(1-z)^3*(-x^2+1)^2*(-y^2+1)^3*x*(1-z^3*(7*z-4)*(z-1)^2*(y^2-1)^3*(x^2-1)^3)

(6)

NULL


 

Download bug_sum.mw

Page 1 of 1