Skip to content

Instantly share code, notes, and snippets.

@donaldmunro
donaldmunro / euclidean_forms.md
Last active August 3, 2021 22:44
Differential Forms on simple Euclidean manifolds using SageMath Manifolds package
clear_vars
reset()
%display latex
R3 = Manifold(3, 'R^3', start_index=1)
X.<x,y,z> = R3.chart()
g = R3.metric('g')
g[1,1], g[2,2], g[3,3] = 1, 1, 1

#R2 = Manifold(2, 'R^2', ambient=R3, start_index=1)
clear_vars
reset()
%display latex

u,v,w,T = SR.var('x y z t')
E_x,E_y,E_z  = function('Ex'),function('Ey'), function('Ez')
B_x,B_y,B_z  = function('Bx'),function('By'), function('Bz')
M.<t, x, y, z> = manifolds.Minkowski(positive_spacelike=False)
F = M.diff_form(2, name='F')