You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: a = M.vector_field(1, 2, name='a')
sage: b = M.vector_field(-y, x, name='b')
sage: c = -(a + b)
sage: c.display()
-a+b = (y - 1) ∂/∂x + (-x - 2) ∂/∂y
The left-hand side should be -(a+b), not -a+b.
The culprit is FreeModuleTensor.__neg__, as defined in line 2022 of src/sage/tensor/modules/free_module_tensor.py: it should invoke sage.tensor.modules.format_utilities.format_unop_txt to set up the output name.
In Sage 9.7.beta1, we have
The left-hand side should be
-(a+b)
, not-a+b
.The culprit is
FreeModuleTensor.__neg__
, as defined in line 2022 ofsrc/sage/tensor/modules/free_module_tensor.py
: it should invokesage.tensor.modules.format_utilities.format_unop_txt
to set up the output name.Component: manifolds
Keywords: tensor, unary negation
Issue created by migration from https://trac.sagemath.org/ticket/33938
The text was updated successfully, but these errors were encountered: