Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

1.How to make following equation have sense?


2.How to make all commutators

[a b... , c d...] or \commutaor{a b... }{ c d...]


a b... c d... - c d... a b...
in General questions by (2.1k points)

1 Answer

+2 votes
Best answer

Use fm and fp and define


To expand, use

substitute(_, $\commutator{A??}{B??} -> A?? B?? - B?? A??$);

Does that help?

by (82.0k points)
selected by

Yes, it does. I'm so sorry that I have not give more details about problems. In fact, I want make following equation have sense:


So write that with the above as

ex:= fm_{\mu\nu} + fp_{\mu\nu} + fp^{\mu\nu};

(and declare your indices with position=free to allow you to have expressions where the index positions do not match up. So in full,

ex:= fm_{\mu\nu} + fp_{\mu\nu} + fp^{\mu\nu};

to give

$$f_{-\mu\nu} + f_{+\mu\nu} + {f_{+}}^{\mu\nu}$$

Thanks a lot. It is what I want.