On 2017-08-11, Richard_L <[email protected]> wrote: > That's a bit puzzling. In the Sage code, line 36 defines the manifold over > the real field. That is supposed to be inherited by the chart in line 39: > > M = Manifold(1*3,'R^3',field='real',start_index=1) > U = M.open_subset('U') > > Rho.<r12,r13,r23> = U.chart("r12:(0,+oo) r13:(0,+oo) r23:(0,+oo)") > > One therefore expects r12, etc. to be real.
Yes, the key point appears to be that domain:complex inhibits a simplification and that causes 'sign' to fail. The simplest example I found is this: (%i2) domain:complex; (%o2) complex (%i3) declare([a,b,c], real); (%o3) done (%i4) assume(a>0, b>0, c>0); (%o4) [a > 0,b > 0,c > 0] (%i5) sign(c - b^(1/3)*c^(1/3)); (%o5) pnz (%i6) sign(c - (b*c)^(1/3)); [stack overflow here] Note that (b*c)^(1/3) --> b^(1/3)*c^(1/3) when domain = real but not domain = complex. I guess this could be considered a bug in either 'sign' or simplification. Since b and c are real, the simplification should be allowed, and then sign can succeed. But sign should be able to handle the expression even without simplification. Probably it's easier to fix the simplification, but fixing sign might fix a wider range of problems. best, Robert Dodier -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
