# Using dz /\ dx convention in SageManifolds

Several books on Differential Forms in Electrodynamics use the convention that the dx,dz basis is defined as $dz \wedge dx$ and not $dx \wedge dz$, for example the Faraday two-form expressed in this way

$$F = -E_x\, dt \wedge dx - E_y\, dt \wedge dy - E_z\, dt \wedge dz + B_x\, dy \wedge dz + B_y\, dz \wedge dx + B_z\, dx \wedge dy$$

I can't seem to find anything in the SageManifolds documentation on defining either a manifold or a form to use this convention. Is it possible to directly use this convention in SageManifolds ?

I suppose you already knows that $dz\wedge dx=- dx\wedge dz$ as far $dx$ and $dz$ are 1-forms. With this in mind the only difference is a change in a sign.

Yes I'm aware that they are alternating products, however:

1 Its less error prone if you don't have to remember to swap signs and

2 the exterior derivative seems to be incorrect in $dt \wedge dz \wedge dx$ term

Eg the correct term is $\left(\frac{\partial E_x}{\partial z}-\frac{\partial E_z}{\partial x}+\frac{\partial B_y}{\partial t}\right)dt \wedge dz \wedge dx$ [1] but Sage gives

$(\frac{\partial\,By}{\partial t}-\frac{\partial\,Ex}{\partial z}+\frac{\partial\,Ez}{\partial x})dt \wedge dx \wedge dz=$ $(\frac{\partial\,Ex}{\partial z}-\frac{\partial\,Ez}{\partial x}-\frac{\partial\,By}{\partial t}) dt \wedge dz \wedge dx$

See next comment for the code as I'm running out of chars

[1] A Visual Introduction to Differential Forms and Calculus on Manifolds, Fortney, J.P, Springer 20

Sorry, I could not the editor to do a markdown code display with4 tilde's. The code is at: link texthttps://gist.github.com/donaldmunro/6...

SageMath is correct in computing the exterior derivative, simply your initialization of $F$ is not: the

`F[1,3]`

term should be`F[1,3] = - B_y(u,v,w, T)`

instead of`F[1,3] = B_y(u,v,w, T)`

.