| 1 | initial version |
Make the following modification:
%display latex
M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')
X.<t,x,y,z> = M.chart()
F = M.scalar_field(1/(-t^2 + x^2 + y^2 + z^2))
dF = diff(F)
dF.apply_map(factor)
xm = var('xm', latex_name=r"x_\mu")
dF.apply_map(lambda u: u.substitute({t^2-x^2-y^2-z^2:xm}))
dF.disp()
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.