Loading [MathJax]/jax/output/HTML-CSS/jax.js

Sunday, June 14, 2020

Cadabra SW: Applying to some exercises in Nakahara



Tests on differential forms:


Test 1: If ω is a differential form of odd dimension - say 3, then ωω=0. This is the attempt to let Cadbra solve this wedge form.


Nakahara eqn 5.67a


Cadabra code:
-----------------

{a,b,c,l,m,n}::Indices.

{e^{a}, \omega^{a}_{b}}::DifferentialForm(degree=3);



Attached property DifferentialForm to [ea,ωab].


eq1 := \omega^{a}_{b} ^ \omega^{a}_{b};

0


Nice! Solves this. Test 2: Now we want to show explicitly - that is using numeric indices for q,r the following expression:

ην=(1)qrνη.


Cadabra code:
-----------------
def post_process(ex):

sort_product(ex)

canonicalise(ex)

collect_terms(ex)

{ \eta^{a}_{b}}::DifferentialForm(degree=3);

{ \nu^{a}_{b}}::DifferentialForm(degree=5);

Attached property DifferentialForm to ηab.
Attached property DifferentialForm to νab.

eq2 := \eta^{a}_{b} ^ \nu^{a}_{b}; eq3 := \nu^{a}_{b} ^ \eta^{a}_{b};


ηabνab

\eta^{a}_{b} ^ \nu^{a}_{b}

ηabνab

-\eta^{a}_{b} ^ \nu^{a}_{b}

Cadabra code:
---------------

eq2 + eq3;
combine(_);


ηabνabηabνab
\eta^{a}_{b} ^ \nu^{a}_{b}-\eta^{a}_{b} ^ \nu^{a}_{b}
0

0





Exercise 5.15: Let ξΩq(M) and ωΩr(M).

Show that d(ξω)=dξω+(1)qrξdω.

For simplicity, we shall set q=3 and r=5 - thus inducing a negative in the expression.
Using the following link is nice: https://cadabra.science/notebooks/exterior.html


Cadabra code:
-----------------

\xi::DifferentialForm(degree=3);
\omega::DifferentialForm(degree=5);

Attached property DifferentialForm to ξ.
Attached property DifferentialForm to ω.


Add definition of exterior derivative.


Cadabra code:
-----------------

d{#}::ExteriorDerivative;

d{#}::LaTeXForm("{\rm d}").


Attached property ExteriorDerivative to d#.
ext1 := d{ \xi ^ \omega };
d(ξω)


Cadabra code:
-----------------

d(\xi ^ \omega)
product_rule(_);


dξωξdω
d(\xi) ^ \omega-\xi ^ d(\omega)


This demonstrates equation 5.69 in Nakahra for even and odd indices.

No comments:

Post a Comment

Chain complexes on Hilbert spaces

 Chain complexes are mathematical structures used extensively in algebraic topology, homological algebra, and other areas of mathematics. Th...