Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

latex_name and derivatives in sagemanifolds

Hi,

I think there is a small bug on displaying derivatives of tensors w.r.t a parameter with a latex_name.

For symbolic expressions,

from sage.manifolds.utilities import ExpressionNice
var('t')
dq1 = function('dq_1', latex_name=r'\dot{q}_1')(t)
L = function('L')(dq1)
ExpressionNice(diff(L,t))

works nicely. However, when I display the same L as a scalar field (or any tensor),

M = manifolds.Minkowski()
L1 = M.scalar_field(L)
L1.derivative().display()

the latex_name is ignored and dq_1 is used instead. The problem does not occur when there is no index in dq.

latex_name and derivatives in sagemanifolds

Hi,

I think there is a small bug on displaying derivatives of tensors w.r.t a parameter with a latex_name.

For symbolic expressions,

from sage.manifolds.utilities import ExpressionNice
var('t')
dq1 = function('dq_1', latex_name=r'\dot{q}_1')(t)
L = function('L')(dq1)
ExpressionNice(diff(L,t))

works nicely. However, when I display define the same L as a scalar field (or any tensor),

M = manifolds.Minkowski()
L1 = M.scalar_field(L)
L1.derivative().display()

the latex_name is ignored and dq_1 is used instead. The problem does not occur when there is no index in dq.

latex_name and derivatives in sagemanifolds

Hi,

I think there is a small bug on displaying derivatives of tensors w.r.t a parameter with a latex_name.

For symbolic expressions,

from sage.manifolds.utilities import ExpressionNice
var('t')
dq1 = function('dq_1', latex_name=r'\dot{q}_1')(t)
L = function('L')(dq1)
ExpressionNice(diff(L,t))

works nicely. However, when I define the same L as a scalar field (or any tensor),

M = manifolds.Minkowski()
L1 = M.scalar_field(L)
L1.derivative().display()

the latex_name is ignored and dq_1 is used instead. The problem does not occur when there is no index in dq.