Cadabra Q&A - Recent questions and answers
http://cadabra.science/qa/qa
Powered by Question2AnswerDifferential forms --- on a subspace???
http://cadabra.science/qa/1271/differential-forms-on-a-subspace
<p>Dear developers and community in general.</p>
<p>So far, there is a tutorial about the use of differential forms within <code>cadabra</code>, but there is no manual for their related properties.</p>
<p>I've like to know whether it is possible to define forms on a space (or subspace).</p>
<h3>Example <em>of desired behaviour</em></h3>
<pre><code>{a,b,c}::Indices(space);
{e^{a}, \omega^{a}_{b}}::DifferentialForm(degree=1, space);
</code></pre>
<p>or possibly something like</p>
<pre><code>{a,b,c}::Indices.
{x,y}::Coordinate(space);
{e^{a}, \omega^{a}_{b}}::DifferentialForm(degree=1, space);
</code></pre>
<p>to denote that $$e^a = e^a<em>x dx + e^a</em>y dy,$$ despite the possible values of the indices.</p>
<h3>Question</h3>
<p>Is something like this implemented? </p>
General questionshttp://cadabra.science/qa/1271/differential-forms-on-a-subspaceThu, 22 Aug 2019 08:39:12 +0000Answered: Build fails on Ubuntu 19.04, unspecified reference to boost::system::generic_category().
http://cadabra.science/qa/1268/fails-ubuntu-unspecified-reference-system-generic_category?show=1269#a1269
<p>I have just pushed a change to github related to boost. Can you give that another shot and let me know?</p>
Installation troublehttp://cadabra.science/qa/1268/fails-ubuntu-unspecified-reference-system-generic_category?show=1269#a1269Tue, 20 Aug 2019 15:55:25 +0000Answered: Failure of running cadabra on windows.
http://cadabra.science/qa/1259/failure-of-running-cadabra-on-windows?show=1267#a1267
<p>We are aware of this issue. What <em>may</em> help is to make sure that your <code>PYTHONPATH</code> and <code>PYTHONHOME</code> environment variables are pointing to Anaconda's installation directory. So if you installed Anaconda in <code>C:\Users\Marie\Anaconda3</code>, then set both of these variables to that path. On Windows10, click 'start', search for and start 'Advanced System Settings', click the 'Environment Variables' somewhere near the bottom.</p>
<p>A future update will do this for you automatically, but at the moment an issue with Microsoft's packaging system 'vcpkg' prevents us from generating a new installer.</p>
Bug reportshttp://cadabra.science/qa/1259/failure-of-running-cadabra-on-windows?show=1267#a1267Tue, 20 Aug 2019 10:44:06 +0000Problems with combine(_)
http://cadabra.science/qa/1264/problems-with-combine-_
<p>I found two problems in the 'combine(_)' algorithm.</p>
<p>The first is that it does not take into account the commuting rules of the objects:</p>
<pre><code>{m,n,o,p}::Indices.
{x,y,w,z}::Indices.
a::ImplicitIndex(a^{m}).
b::ImplicitIndex(b_{m}).
{a{#},b{#}}::AntiCommuting.
ex:= a b;
explicit_indices(_);
combine(_);
</code></pre>
<p>The output for this code is the following.</p>
<blockquote>
<p>a b<br>
a^{m} b_{m}<br>
(b a)</p>
</blockquote>
<hr>
<p>The second problem is that it seems that it is not possibile to make some indices implicit, unless they are in the order lower-upper position, respectively. For example:</p>
<pre><code>{\alpha, \beta, \gamma, \delta}::Indices.
a::ImplicitIndex(a^{\alpha}).
M::ImplicitIndex(M_{\alpha \beta}).
ex:= a M a;
explicit_indices(_);
combine(_);
</code></pre>
<p>The output in this case is:</p>
<blockquote>
<p>a M a<br>
a^{\alpha} M<em>{\alpha \beta} a^{\beta}<br>
a^{\alpha} M</em>{\alpha \beta} a^{\beta}</p>
</blockquote>
<p>combine(_) does not do anything to the expression.</p>
<hr>
<p>Thanks for your help in advance.</p>
Bug reportshttp://cadabra.science/qa/1264/problems-with-combine-_Mon, 19 Aug 2019 13:09:30 +0000Answered: canonicalise with calagraphic font
http://cadabra.science/qa/1254/canonicalise-with-calagraphic-font?show=1255#a1255
<p>Cadabra has considerable flexibility in defining symbols, but <code>{\cal F}</code> goes a bit too far. What happens here is that this expression gets interpreted as the product of <code>\cal</code> and <code>F</code>, and then this gets indices added to it. Then all hell breaks loose... Granted, some kind of error message would probably have helped you here.</p>
<p>The easiest way around this is to do</p>
<pre><code>calF_{a b}::AntiSymmetric;
calF_{a b}::LaTeXForm("{\cal F}").
</code></pre>
<p>and then</p>
<pre><code>example2:= calF_{a b} calF_{c d} - calF_{a c} calF_{b d} ;
</code></pre>
<p>This will display the way you want because of the <code>LaTeXForm</code> property, and saves some typing as well.</p>
Bug reportshttp://cadabra.science/qa/1254/canonicalise-with-calagraphic-font?show=1255#a1255Fri, 16 Aug 2019 17:08:28 +0000Answered: Substitution of tensors - Einstein equations
http://cadabra.science/qa/1251/substitution-of-tensors-einstein-equations?show=1252#a1252
<p>That 'weird' equation does look ok, but it's perhaps a bit of an unusual notation. Can you run <code>collect_components</code> after that, and let me know if that makes more sense? </p>
<p>The logic behind all this is that Cadabra has the concept of an 'anonymous component tensor', which is what you get when you substitute values for components. Such a tensor is displayed as a 'box' with the indices of the original tensor, and then a list of all components following the large bracket. In this way you can have expressions which are 'half evaluated' (as you noticed in your first picture, where the metric has not yet been substituted).</p>
<p>We are working on making this somewhat less scary to look at, but until that work is done, it usually helps to 'collect all anonymous tensors in a sum', which is what <code>collect_components</code> does.</p>
General questionshttp://cadabra.science/qa/1251/substitution-of-tensors-einstein-equations?show=1252#a1252Fri, 16 Aug 2019 15:30:25 +0000Derivatives depend on index position
http://cadabra.science/qa/1250/derivatives-depend-on-index-position
<p>Hi,</p>
<p>I noticed recently that <br>
- the dependence of an object only includes the given position of the index<br>
and also that<br>
- objects with derivatives cannot change their index-position<br>
if the index position is given as fixed.</p>
<p>For example, the Exp in the following gives zero, because only A with an upper index depends on the derivative:</p>
<pre><code>{\mu,\nu}::Indices(position=fixed);
{\mu,\nu}::Integer(0..3);
\partial{#}::PartialDerivative;
A^\mu::Depends(\partial{#});
Exp:= \partial^{\mu}{A_\nu};
unwrap(_);
</code></pre>
<p>Of course I could just make A dependent on \partial for lowercase indices as well or just for every index position via </p>
<pre><code>A{#}::Depends(...);
</code></pre>
<p>but it still strikes me as odd.</p>
<p>Secondly, once I have defined objects with derivatives, the index position does not change through the use of canonicalise. So for example</p>
<pre><code>Exp:= \partial_{\mu}{A^\mu} - \partial^{\mu}{A_\mu};
canonicalise(_);
</code></pre>
<p>gives not zero as expected. And even if I derive a scalar, its index is fixed, so</p>
<pre><code>Exp:= A^\mu \partial_{\mu}{B} - A_\mu \partial^{\mu}{B};
canonicalise(_);
</code></pre>
<p>does not give zero.</p>
<p>I usually don't want to think about the position of dummy indices. So if it would be possible to give the index positions of derivatives a bit more freedom I would be very grateful!</p>
<p>Cheers,<br>
Karim</p>
Bug reportshttp://cadabra.science/qa/1250/derivatives-depend-on-index-positionFri, 16 Aug 2019 08:29:19 +0000Answered: How will I get the number of terms in an object in Cadabra 2?
http://cadabra.science/qa/1248/how-will-i-get-the-number-of-terms-in-an-object-in-cadabra-2?show=1249#a1249
<p>First of all, you cannot use <code>Ex</code> (with a capital <code>E</code>) as a name for an expression, because <code>Ex</code> is the name of the Cadabra expression object. Secondly, you cannot add pre-fix superscripts like this; the best you can do there is to use the <code>LaTeXForm</code> property. So you can do</p>
<pre><code>R1{#}::LaTeXForm("{}^{1}R").
ex:= R1_{\mu\nu};
</code></pre>
<p>Now what do you wan to do next? This expression clearly only contains one term. Did you want to compute it for a particular metric and then determine the number of non-zero components?</p>
General questionshttp://cadabra.science/qa/1248/how-will-i-get-the-number-of-terms-in-an-object-in-cadabra-2?show=1249#a1249Wed, 14 Aug 2019 10:50:46 +0000Answered: Assigning the result of `get_component`
http://cadabra.science/qa/1243/assigning-the-result-of-get_component?show=1244#a1244
<p>The <code>get_component</code> function returns a Python object, which you can directly assign to another symbol, e.g. <code>A00</code>. So a complete example would be</p>
<pre><code>from cdb.core.component import *
{t,x}::Coordinate;
{i,j}::Indices(values={t,x});
ex:= a_{i};
evaluate(ex, $a_{t}=1, a_{x}=2$);
A00=get_component(ex, $x$)
</code></pre>
<p>and then <code>A00</code> is a cadabra <code>Ex</code> object as usual.</p>
General questionshttp://cadabra.science/qa/1243/assigning-the-result-of-get_component?show=1244#a1244Tue, 13 Aug 2019 13:05:03 +0000A documentation bug
http://cadabra.science/qa/1242/a-documentation-bug
<p>In the documentation page <a rel="nofollow" href="https://cadabra.science/manual/cdb/core/component.html">component</a>, there is no mention to the fact that one have to import the function</p>
<pre><code>from cdb.core.component import get_component
</code></pre>
<p>At least I have to do it.</p>
Bug reportshttp://cadabra.science/qa/1242/a-documentation-bugTue, 13 Aug 2019 11:02:22 +0000Kronecker $\delta$ for Indices of different dimensions
http://cadabra.science/qa/1240/kronecker-%24-delta%24-for-indices-of-different-dimensions
<p>Hi,<br>
I have $\delta$-symbols involving a color index $a$ that runs from 1 to 3 and a Euclidian index $\mu$ from 1 to 4.</p>
<pre><code>{\mu,\nu}::Indices(Euklid, position=free).
{\mu,\nu}::Integer(1..4).
{a,b}::Indices(Color, position=independent).
{a,b}::Integer(1..3).
\delta_{#}::KroneckerDelta.
</code></pre>
<p>But when I try to contract them like in</p>
<pre><code>ex := \delta_{a \mu} \delta_{a \mu} ;
eliminate_kronecker(ex);
</code></pre>
<p>I get 4 but it should be 3. When I reverse the order of the indices I get the correct number:</p>
<pre><code>ex2 := \delta_{\mu a} \delta_{\mu a} ;
eliminate_kronecker(ex2);
</code></pre>
<p>This gives 3.</p>
<p>I suppose cadabra contracts the first two indices first so in the first case we get</p>
<p>$\delta<em>{a \mu} \delta^{a \mu} = \delta</em>{\mu}^{\mu} = 4$</p>
<p>and in the second it becomes </p>
<p>$\delta<em>{\mu a} \delta^{\mu a} = \delta</em>{a}^{a} = 3$.</p>
<p>Maybe this behavior could be avoided by always first contracting the indices of higher dimension? In the meantime, can somebody think of a workaround? </p>
<p>In the interest of completeness:</p>
<pre><code>ex3 := \delta_{\mu a} \delta_{a \mu} ;
eliminate_kronecker(ex3);
</code></pre>
<p>gives 4 and </p>
<pre><code>ex4 := \delta_{a \mu} \delta_{\mu a} ;
eliminate_kronecker(ex4);
</code></pre>
<p>returns 3.</p>
<p>Thank you</p>
<p>EDIT: Directly after asking I think I found a workaround by adding a substitution to the post_process function that sorts the indices such that the Euclidian one gets contracted first. </p>
<pre><code>def post_process(ex):
substitute( ex, $\delta_{a \mu} = \delta_{\mu a}$ )
</code></pre>
Bug reportshttp://cadabra.science/qa/1240/kronecker-%24-delta%24-for-indices-of-different-dimensionsMon, 12 Aug 2019 08:07:36 +0000Answered: Fierz identities with Majorana fermions in dim=4 and chirality
http://cadabra.science/qa/1211/fierz-identities-with-majorana-fermions-dim-and-chirality?show=1239#a1239
<p>The chiral matrix $\gamma^5$ can be defined using the epsilon tensor. See my answer to <a rel="nofollow" href="https://cadabra.science/qa/783/gamma_5-matrix">this post</a></p>
Feature requestshttp://cadabra.science/qa/1211/fierz-identities-with-majorana-fermions-dim-and-chirality?show=1239#a1239Fri, 09 Aug 2019 17:30:10 +0000Answered: the command asym does not work online.
http://cadabra.science/qa/1235/the-command-asym-does-not-work-online?show=1236#a1236
<p>It does if you write the product <code>A B C</code> with spaces, and add the required dollar signs, so</p>
<pre><code>ex:= A B C;
asym(_, $A, B, C$);
</code></pre>
<p>Ditto for indices; do not write <code>A_{ab}</code> but use <code>A_{a b}</code>:</p>
<pre><code>ex:= A_{a b} C_{d};
asym(_, $_{a}, _{b}, _{d}$);
</code></pre>
General questionshttp://cadabra.science/qa/1235/the-command-asym-does-not-work-online?show=1236#a1236Wed, 07 Aug 2019 20:53:04 +0000Variation of \sqrt terms (bug)
http://cadabra.science/qa/1234/variation-of-sqrt-terms-bug
<p>Hello, I think I have found a bug as shown below;</p>
<p><img src="https://cdn.mathpix.com/snip/images/0FVJQdDBXr-NmbkWn8GXJ59yaXLez_tJ3_K-raMqN2Y.original.fullsize.png" alt="enter image description here"></p>
<p>Have a nice day.</p>
Bug reportshttp://cadabra.science/qa/1234/variation-of-sqrt-terms-bugWed, 07 Aug 2019 09:20:47 +0000Answered: How can I define complex scalar field in Cadabra?
http://cadabra.science/qa/1225/how-can-i-define-complex-scalar-field-in-cadabra?show=1230#a1230
<p>I have solved the problem by taking \phi and \chi (for \phi*), varying the action wrt \phi and \chi. Thanks to my supervisor who suggested me this, which is working perfectly fine , please let me know if there is any other way. <br>
Thanks for your concern.</p>
General questionshttp://cadabra.science/qa/1225/how-can-i-define-complex-scalar-field-in-cadabra?show=1230#a1230Mon, 05 Aug 2019 08:52:35 +0000Supergravity calculation
http://cadabra.science/qa/1222/supergravity-calculation
<p>Hi everyone, here I tried to make some supergravity calculations for N=1, D=4. I needed to use the "substitute" command a lot. Any suggestions to make it more neat and tidy are very welcome. Also is there any other way than using the substitute command to make the cubic expressions vanish?</p>
<pre><code>D{#}::Derivative;
\bar{D{#}}::Derivative;
\bar{#}::DiracBar;
{m,n,p,q,r,s,t,u,m#}::Indices(flat);
{m,n,p,q,r,s,t,u,m#}::Integer(0..3);
{\mu,\nu,\rho,\sigma,\kappa,\lambda,\alpha,\beta}::Indices(curved,position=fixed);
{\mu,\nu,\rho,\sigma,\kappa,\lambda,\alpha,\beta}::Integer(0..3);
e^{m \mu}::Vielbein;
e^{m}_{\mu}::Vielbein;
e_{m \mu}::InverseVielbein;
e_{m}^{\mu}::InverseVielbein;
e::Determinant(e_{m \mu});
e::Determinant(e_{m}^{\mu});
e::Determinant(e^{m}_{\mu});
e::Determinant(e^{m \mu});
g^{\mu\nu}::InverseMetric;
g_{\mu\nu}::Metric;
R_{\mu \nu \rho \sigma}::RiemannTensor;
{ \epsilon,\psi_{\mu} }::Spinor(dimension=4, type=Majorana);
\Gamma_{#{m}}::GammaMatrix(metric=\delta);
{ \psi_{\mu},\epsilon }::AntiCommuting;
{ \psi_{\mu}}::SelfAntiCommuting;
{ \epsilon, \psi_{\mu}}::SortOrder;
\Gamma_{#}::Depends(\bar{#});
{ \psi_{\mu}, \epsilon ,\bar{\epsilon}}::Depends(D{#});
</code></pre>
<p>First, we write our action as two parts:</p>
<pre><code>S32:= \int{- 1/2 e \bar{\psi_\mu} \Gamma^{\mu\nu\rho} D_{\nu}{\psi_{\rho}}}{x};
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/WBO0XVmZ957Ck23XshriFYPw8sk_IavaPRfTe6xjs_8.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/WBO0XVmZ957Ck23XshriFYPw8sk_IavaPRfTe6xjs_8.original.fullsize.png"></p>
<pre><code>S2:= \int{ 1/2 e e_{m}^{\mu} e_{n}^{\nu} R_{\mu \nu}^{ m n}}{x};
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/h2dYl0E3jVqvItigciHp8umJUvShdq038IhN7YwrvXU.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/h2dYl0E3jVqvItigciHp8umJUvShdq038IhN7YwrvXU.original.fullsize.png"></p>
<p>Now we define our SUSY rules. (I did not include the variation of $e_{m}^{\mu}$, because it only leads to cubic expressions (for the action S32) and they vanish.) </p>
<pre><code>susy32:= {e -> 1/2 e {\bar{\epsilon} \Gamma^\sigma \psi_\sigma} , \psi_\mu -> D_{\mu}{\epsilon}};
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/3ENSGl5lXEnFkG0CbxXkqF9jkBDdVHQapmZqSFW-Vik.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/3ENSGl5lXEnFkG0CbxXkqF9jkBDdVHQapmZqSFW-Vik.original.fullsize.png"></p>
<pre><code>susy2:= {e -> 1/2 e {\bar{\epsilon} \Gamma^\sigma \psi_\sigma}, e_{m}^{\mu} -> -1/2 {\bar{\epsilon}} \Gamma^{\mu} \psi_m };
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/Pm5hCnqkWUHJ8Ot0ZuBwxa0dLr9R35F8YNUOm_YZ61M.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/Pm5hCnqkWUHJ8Ot0ZuBwxa0dLr9R35F8YNUOm_YZ61M.original.fullsize.png"></p>
<p>Let us start to our calculations with the S32 part. First we take the<br>
variation of it, according to the rules we defined above.</p>
<pre><code>vS32= vary(S32, susy32);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/IpcXrXB4kdonmOLFBnn2i-Fjmw7ErAjddfBdpB8YF0E.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/IpcXrXB4kdonmOLFBnn2i-Fjmw7ErAjddfBdpB8YF0E.original.fullsize.png"></p>
<p>Here, I need to erase the bar above the $D_{\mu}$ term because the<br>
integrate by parts command does not work properly with the bar.</p>
<pre><code>substitute(_,$\bar{D_{#??}{\epsilon}} -> D_{#??}{\bar{\epsilon}} $);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/7Fp8dBqCXObH5ycAe5MYH6eKEns8V7GdEcQejeteBy4.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/7Fp8dBqCXObH5ycAe5MYH6eKEns8V7GdEcQejeteBy4.original.fullsize.png"></p>
<p>The first term here, is a cubic expression therefore it must be<br>
vanish.</p>
<pre><code>substitute(_, $\bar{\epsilon}*A?? -> 0$);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/Eg3hn2L1mcsnQIy40RGuf63usfY1k1u9EwomtVAefAA.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/Eg3hn2L1mcsnQIy40RGuf63usfY1k1u9EwomtVAefAA.original.fullsize.png"></p>
<p>Manipulating the equations a little bit leads us to use "Clifford<br>
algebra".</p>
<pre><code>integrate_by_parts(_, $\bar{\epsilon}$);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/p0dif7ueLp5tvuVwcjpAxFWaXQp77FcvxAQfw9HRxX4.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/p0dif7ueLp5tvuVwcjpAxFWaXQp77FcvxAQfw9HRxX4.original.fullsize.png"></p>
<pre><code>product_rule(_);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/MUbbrVzWRRx8H51ZgdY4NghEezUL5G2yIh_DggPV2-s.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/MUbbrVzWRRx8H51ZgdY4NghEezUL5G2yIh_DggPV2-s.original.fullsize.png"></p>
<p>We know that <br>
$D<em>{\mu} e = 0$<br>
and $D</em>{\mu}{\Gamma^{\mu\nu\rho}} = 0$ so<br>
we substitute it by hand.</p>
<pre><code>substitute(_,$D_{#??}{e}*A?? -> 0$);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/53iGZQ0DOe8JtNoFyp2P8QfhRTPF1CSMBj24OYZLYZo.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/53iGZQ0DOe8JtNoFyp2P8QfhRTPF1CSMBj24OYZLYZo.original.fullsize.png"></p>
<pre><code>substitute(_, $ D_{#??}{\Gamma^{\mu\nu\rho}}*A?? -> 0 $);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/3nQr0LoTJwqJQGP3dg779Oytnvxx5I8GCd1k0etIk5A.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/3nQr0LoTJwqJQGP3dg779Oytnvxx5I8GCd1k0etIk5A.original.fullsize.png"></p>
<p>Using the Clifford algebra, we can substitute the equations below;</p>
<pre><code>substitute(_, $D_{\mu}{D_{\nu}{A??} } -> 1/8 R_{\mu \nu m n} \Gamma^{m n} A??$ )
sort_spinors(_)
rename_dummies(_);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/2eVwLOHgFvlpqdakNsXG9YUQEnpcxAotaPOmldpfFKc.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/2eVwLOHgFvlpqdakNsXG9YUQEnpcxAotaPOmldpfFKc.original.fullsize.png"></p>
<pre><code>substitute(_, $\Gamma^{\mu \nu \rho}R_{\mu \nu m n}\Gamma^{m n} -> 4 \Gamma^{\mu}R_{\mu \nu}^{\rho \nu} + 2 \Gamma^{\rho} R_{\mu \nu}^{\nu \mu}$);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/NF5k5oDX-GFkrvmIT78pojyFFBbi9dhm8AvqAZDlwdQ.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/NF5k5oDX-GFkrvmIT78pojyFFBbi9dhm8AvqAZDlwdQ.original.fullsize.png"></p>
<pre><code>substitute(_, $\Gamma^{\rho \mu \nu}R_{\mu \nu m n}\Gamma^{m n} -> 4 \Gamma^{\mu}R_{\mu \nu}^{\rho \nu} + 2 \Gamma^{\rho} R_{\mu \nu}^{\nu \mu}$);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/Em1EQFVpOJhXYOKHp3NNaQj1m5IrtGPfBZDO3TlAFwo.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/Em1EQFVpOJhXYOKHp3NNaQj1m5IrtGPfBZDO3TlAFwo.original.fullsize.png"></p>
<p>Now, we can start to play with the S2 part of the action. Here we will<br>
take the variation and re-organize the result as shown below:</p>
<pre><code>vS2= vary(S2, susy2);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/TeQtL3JlNZBTOHJcRYfzibPWxWb2TIOcxKDhPrLIZVI.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/TeQtL3JlNZBTOHJcRYfzibPWxWb2TIOcxKDhPrLIZVI.original.fullsize.png"></p>
<pre><code>eliminate_vielbein(_, repeat=True)
rename_dummies(_);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/MS_ZCKSF21-_l-lhkUYHlsLt-kubzPesvVDgE5Qj37g.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/MS_ZCKSF21-_l-lhkUYHlsLt-kubzPesvVDgE5Qj37g.original.fullsize.png"></p>
<p>We now need to use a property of the Riemann tensor such as below;</p>
<pre><code>substitute(_, $ R_{\mu \nu}^{\mu m} -> R_{\nu \mu}^{m \mu}$);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/L4kDSf8gsz48rFRVMWZwBBLEqZJiK-DWZZiiwNmxoFM.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/L4kDSf8gsz48rFRVMWZwBBLEqZJiK-DWZZiiwNmxoFM.original.fullsize.png"></p>
<pre><code>canonicalise(_);
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/am8tG1GtbFxGBoGHcYwe92Lud2XuheAjk02n05Al--I.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/am8tG1GtbFxGBoGHcYwe92Lud2XuheAjk02n05Al--I.original.fullsize.png"></p>
<pre><code>Stotal=vS32+vS2;
</code></pre>
<p><img src="https://cdn.mathpix.com/snip/images/XaHuxqwvbLzRq0RkzNhr-IQ4XVeDCuX4vBPXoPEJja0.original.fullsize.png" alt="https://cdn.mathpix.com/snip/images/XaHuxqwvbLzRq0RkzNhr-IQ4XVeDCuX4vBPXoPEJja0.original.fullsize.png"></p>
<p>This final sum must be equal to $0$, yet I couldn't accomplish to sum<br>
the integrals to show it with cadabra.</p>
<p>Thanks.</p>
General questionshttp://cadabra.science/qa/1222/supergravity-calculationTue, 30 Jul 2019 10:57:16 +0000Answered: Sigma Matrix
http://cadabra.science/qa/1217/sigma-matrix?show=1220#a1220
<p>That property never really had much use, as none of the algorithms made use of it. In other words, you still had to write out manual substitution rules for sigma products and so on. You can do the same thing in 2.x; just declare <code>\sigma^{m}</code> to be SelfNonCommuting as a starting point, then use <code>substitute</code> to work out sigma products and the like. You may want to look at the ImplicitIndices property documentation to help you convert sigma expressions with and without spinor indices.</p>
<p>We are working on a revamped spinor functionality which will include a lot more in a special package, but it's not yet done and kinda tricky to get right given all the different things people want to do with it.</p>
<p>And as always, feel free to ask here with concrete questions about how to do certain manipulations.</p>
General questionshttp://cadabra.science/qa/1217/sigma-matrix?show=1220#a1220Fri, 26 Jul 2019 09:10:56 +0000Answered: Installing Cadabra on mint 18.3 does not work
http://cadabra.science/qa/1213/installing-cadabra-on-mint-18-3-does-not-work?show=1214#a1214
<p>A recent change uses some features of gtkmm-3.20 or higher. </p>
<p>I have pushed a fix which disables this change if your system is on a lower version of gtkmm. Can you pull again from github, try to build, and let me know the result?</p>
Installation troublehttp://cadabra.science/qa/1213/installing-cadabra-on-mint-18-3-does-not-work?show=1214#a1214Mon, 22 Jul 2019 14:35:54 +0000eliminate_kronecker() with index hierarchy
http://cadabra.science/qa/1212/eliminate_kronecker-with-index-hierarchy
<p>Hello,</p>
<p>I have a problem contracting Kronecker symbols where I have parent indices and child indices. A minimal example:</p>
<pre><code>{a,b,c,d,e}::Indices(fourD, position=independent)
{a,b,c,d,e}::Integer(0..4)
{\alpha,\beta,\gamma,\delta,\epsilon}::Indices(threeD, position=independent, parent=fourD)
{\alpha,\beta,\gamma,\delta,\epsilon}::Integer(1..3)
\delta{#}::KroneckerDelta()
> ex := \gamma^{\alpha \beta} \delta^{0}_{p} \delta^{p}_{\alpha};
γ^{α β} δ^{0}_{p} δ^{p}_{α}
> eliminate_kronecker(ex);
γ^{0 β}
</code></pre>
<p>The result should be zero -- well, it actually were, if I replaced the 0 \beta part of \gamma with zero, but I have many tensors and this would be quite tedious. Also I could define manual substitution rules for contractions of deltas with different indices an then substitute a delta with mixed indices with zero. Also very tedious. Is there anything I can do so that I can just work with eliminate_kronecker()?</p>
<p>Thanks a lot!</p>
General questionshttp://cadabra.science/qa/1212/eliminate_kronecker-with-index-hierarchySat, 20 Jul 2019 20:15:17 +0000Answered: Vanishing Self-Contracted Metric
http://cadabra.science/qa/1207/vanishing-self-contracted-metric?show=1208#a1208
<p>Be careful with index positions. If you want upper and lower indices to mean something different, declare your indices with the <code>position=fixed</code> attribute. So</p>
<pre><code>{\alpha,\beta,\mu,\nu}::Indices(position=fixed);
{\alpha,\beta,\mu,\nu}::Integer(0..3);
\eta^{\mu\nu}::Metric;
\eta_{\mu\nu}::InverseMetric;
\eta_\mu^\nu::KroneckerDelta;
\eta^\mu_\nu::KroneckerDelta;
Exp:= \eta^\mu_\mu \eta^\alpha_\beta A^\beta;
eliminate_metric(_);
eliminate_kronecker(_);
</code></pre>
<p>This gives the expected answer.</p>
Bug reportshttp://cadabra.science/qa/1207/vanishing-self-contracted-metric?show=1208#a1208Mon, 15 Jul 2019 08:45:38 +0000Answered: Define a post_process to apply an operator to an equation
http://cadabra.science/qa/1205/define-a-post_process-to-apply-an-operator-to-an-equation?show=1206#a1206
<p>First of all, don't call this <code>post_process</code>; that's a reserved function which Cadabra will call after every manipulation step. </p>
<p>To do this, you need to somehow indicate where you want the 'argument' of the operator to go, otherwise a <code>\partial_{\mu\nu}</code> not acting on anything will be replaced with zero before it even makes it to the function. Try something like the code below:</p>
<pre><code>import cdb.core.manip as manip
\partial{#}::PartialDerivative;
def appop(ex, op):
t1=manip.get_lhs(ex)
t2=manip.get_rhs(ex)
o1:= @(op);
o2:= @(op);
for arg in o1:
if arg.name=='#':
arg.replace(t1)
for arg in o2:
if arg.name=='#':
arg.replace(t2)
ex.top().replace( $@(o1) = @(o2)$ )
return ex
</code></pre>
<p>You can then do</p>
<pre><code>ex:= A = B;
appop(ex, $\partial_{\mu\nu}{#}$);
</code></pre>
<p>to get the result</p>
<p>$$\partial_{\mu\nu}{A} = \partial_{\mu\nu}{B}$$</p>
<p>You may want to add some error checking code for when you feed it a single expression, not an equation.</p>
General questionshttp://cadabra.science/qa/1205/define-a-post_process-to-apply-an-operator-to-an-equation?show=1206#a1206Sat, 06 Jul 2019 19:03:17 +0000Answered: Exchange indices
http://cadabra.science/qa/1198/exchange-indices?show=1199#a1199
<p>That won't work, you can't declare <code>{a,b,c}</code> to be index set 'one' and then declare that same index set to be also called 'two', but with indices re-ordered. The order of indices in a set does not mean anything.</p>
<p>It does work with</p>
<pre><code>{k,l,m}::Indices("two");
</code></pre>
<p>as the 2nd line, but I assume that that's not what you want.</p>
<p>If your computation relies on the explicit names of dummy indices, you are probably doing something 'wrong' (in the sense of: there is a much better way to do it with Cadabra). Can you say a little bit more about what you are aiming to do?</p>
General questionshttp://cadabra.science/qa/1198/exchange-indices?show=1199#a1199Fri, 28 Jun 2019 12:10:23 +0000Answered: Apply an operator to an equation
http://cadabra.science/qa/1195/apply-an-operator-to-an-equation?show=1196#a1196
<p>Cool one. There is a subtle bug in the parser which fails on these Python names with underscores. If you replace <code>lhs_scL</code> with <code>lhsscL</code> and ditto for the rhs version, things work. Will fix, hopefully the workaround above can keep you going in the meantime.</p>
General questionshttp://cadabra.science/qa/1195/apply-an-operator-to-an-equation?show=1196#a1196Wed, 26 Jun 2019 06:38:46 +0000Answered: Graded partial differential
http://cadabra.science/qa/1188/graded-partial-differential?show=1189#a1189
<p>Assign the <code>AntiCommuting</code> property to the indices, not to the derivatives. So</p>
<pre><code>{a, b, c, d, e, f, g, h, i, j, k, l, m, n ,o, r,s,t,u,v,w,x,y,z#}::Indices(T, position=free, parent=double);
D{#}::PartialDerivative;
\xi{#}::Depends(D{#});
{a, b, c, d, e, f, g, h, i, j, k, l, m, n ,o, r,s,t,u,v,w,x,y,z#}::AntiCommuting;
</code></pre>
<p>and then</p>
<pre><code>Exp:=D_{a}{D_{b}{\xi_{c}}*\xi_{d}};
product_rule(_);
</code></pre>
<p>produces</p>
<p>$$D_{a b}{\xi_{c}} \xi_{d} + D_{b}{\xi_{c}} D_{a}{\xi_{d}}$$</p>
General questionshttp://cadabra.science/qa/1188/graded-partial-differential?show=1189#a1189Thu, 20 Jun 2019 08:18:04 +0000Answered: Poincare example evaluated twice
http://cadabra.science/qa/1186/poincare-example-evaluated-twice?show=1187#a1187
<p>What happens here is that the <code>post_process</code> function converts the <code>\commutator{#}</code> argument in the line</p>
<pre><code>{J_{\mu\nu}, P_{\mu}, W_{\mu} }::Depends(\commutator{#}).
</code></pre>
<p>to a <code>0</code>, so that that line becomes</p>
<pre><code>{J_{\mu\nu}, P_{\mu}, W_{\mu} }::Depends(0).
</code></pre>
<p>This does not happen on first run, because in that case the function <code>post_process</code> is not defined yet when the above line is encountered.</p>
<p>The problem is that <code>unwrap</code> (which is used in <code>post_process</code>) should have left <code>\commutator{#}</code> untouched. </p>
<p>Thanks for reporting this; will fix in a future update.</p>
General questionshttp://cadabra.science/qa/1186/poincare-example-evaluated-twice?show=1187#a1187Wed, 12 Jun 2019 11:47:30 +0000Answered: Using multiple notebooks
http://cadabra.science/qa/1184/using-multiple-notebooks?show=1185#a1185
<p>Just stick it anywhere in your PYTHONPATH; the import works just like any regular Python import process.</p>
General questionshttp://cadabra.science/qa/1184/using-multiple-notebooks?show=1185#a1185Wed, 12 Jun 2019 08:56:06 +0000Answered: Kernel crashing
http://cadabra.science/qa/1170/kernel-crashing?show=1182#a1182
<p>You probably either did not terminate an expression line with <code>;</code> or <code>:</code>, or you tried to wrap a Cadabra expression over multiple lines by using <code>\</code>. If it's the latter, just remove that <code>\</code>; Cadabra expressions can wrap over multiple lines without Python's line continuation character.</p>
Bug reportshttp://cadabra.science/qa/1170/kernel-crashing?show=1182#a1182Mon, 10 Jun 2019 09:01:41 +0000definitions in cadabra
http://cadabra.science/qa/1176/definitions-in-cadabra
<p>can you combine letters with numbers to name definitions in cadabra? Like as follows</p>
General questionshttp://cadabra.science/qa/1176/definitions-in-cadabraFri, 07 Jun 2019 06:44:48 +0000Functional dependence
http://cadabra.science/qa/1167/functional-dependence
<p>Hi friends,</p>
<p>I would like to know if is there any possibility of defining a functional dependence for an object. For example, in the below code the Cadabra throws an error</p>
<pre><code>x::Coordinate;
\partial{#}::PartialDerivative;
\bar{#}::DiracBar;
{\phi,J, j, \eta}::Depends(x, \partial{#});
S::Depends(\phi,\bar{\eta},\eta);
</code></pre>
<p>Regards</p>
General questionshttp://cadabra.science/qa/1167/functional-dependenceTue, 04 Jun 2019 23:17:50 +0000Action of sort_product depends on the choice of index
http://cadabra.science/qa/1164/action-of-sort_product-depends-on-the-choice-of-index
<p>Hi everyone, </p>
<p>I encountered the following surprising example while trying to simplify the expression </p>
<pre><code>F^{d}_{a e}* F^{f}_{b f} - F^{f}_{b f}* F^{d}_{a e}
</code></pre>
<p>to zero using the following code</p>
<pre><code>{a, b, c, d, e, f, g#}::Indices(T, position= independent, parent=double);
{F^{d}_{a e}, F^{f}_{b f}}::SortOrder.
Exp:= F^{d}_{a e}* F^{f}_{b f} - F^{f}_{b f}* F^{d}_{a e};
sort_product(_);
sort_sum(_);
canonicalise(_);
rename_dummies(_);
collect_terms(_);
</code></pre>
<p>Strangely, the obtained result is </p>
<pre><code>F^{d}_{a e} F^{c}_{b c}-F^{c}_{b c} F^{d}_{a e}
</code></pre>
<p>i.e. sort_product failed to order the products. </p>
<p>Even stranger, if I replace the index <code>f</code> in the first term by <code>c</code> i.e. if use the code: </p>
<pre><code>{a, b, c, d, e, f, g#}::Indices(T, position= independent, parent=double);
{F^{d}_{a e}, F^{f}_{b f}}::SortOrder.
Exp:= F^{d}_{a e}* F^{c}_{b c} - F^{f}_{b f}* F^{d}_{a e};
sort_product(_);
sort_sum(_);
canonicalise(_);
rename_dummies(_);
collect_terms(_);
</code></pre>
<p>then everything works fine and the output is zero, as it should. </p>
<p>I tested this on both Mac and Ubuntu and the result is the same. </p>
<p>Does anyone have an idea where the bug came from and how to fix it?</p>
<p>Thank you already for any information, </p>
<p>Kevin</p>
Bug reportshttp://cadabra.science/qa/1164/action-of-sort_product-depends-on-the-choice-of-indexThu, 16 May 2019 01:30:28 +0000Answered: `eliminate_vielbein` and the `KroneckerDelta`
http://cadabra.science/qa/1155/eliminate_vielbein-and-the-kroneckerdelta?show=1163#a1163
<p>The bonus question is already possible, just</p>
<pre><code>\delta{#}::KroneckerDelta;
</code></pre>
<p>works.</p>
<p>The other one is more tricky. I usually do</p>
<pre><code>E^{\mu}_{\nu}::KroneckerDelta;
E^{\mu}_{\nu}::LaTeXForm("\delta").
</code></pre>
<p>to get the display correct. In order to auto-convert to an actual <code>\delta</code> object, not just something that prints as $\delta$, <code>eliminate_vielbein</code> would need to know that you want to use the <code>\delta^{\mu}_{\nu}</code> as the Kronecker delta for the $\mu, \nu$ indices. That's possible (there is a way for algorithms to look up such properties) but I haven't implemented that yet. Have opened an issue on github to track this ( <a rel="nofollow" href="https://github.com/kpeeters/cadabra2/issues/153">https://github.com/kpeeters/cadabra2/issues/153</a> ).</p>
Feature requestshttp://cadabra.science/qa/1155/eliminate_vielbein-and-the-kroneckerdelta?show=1163#a1163Thu, 09 May 2019 14:52:53 +0000Answered: Exportaing to LaTeX a Cadabra2 notebook
http://cadabra.science/qa/1152/exportaing-to-latex-a-cadabra2-notebook?show=1161#a1161
<p>Now fixed on github, thanks.</p>
Bug reportshttp://cadabra.science/qa/1152/exportaing-to-latex-a-cadabra2-notebook?show=1161#a1161Wed, 08 May 2019 11:32:56 +0000Answered: import cdb.sympy.solvers hangs the kernel
http://cadabra.science/qa/1142/import-cdb-sympy-solvers-hangs-the-kernel?show=1160#a1160
<p>The new UTF8 parser barfed on a double backslash. Still not quite sure why, but I have corrected that in the <code>core/packages/cdb/sympy/solvers.cnb</code> file and this package should work now again. Update on github master.</p>
Bug reportshttp://cadabra.science/qa/1142/import-cdb-sympy-solvers-hangs-the-kernel?show=1160#a1160Wed, 08 May 2019 11:02:43 +0000Defining a non-nilpotent `ExteriorDerivative`
http://cadabra.science/qa/1159/defining-a-non-nilpotent-exteriorderivative
<p>Hello!</p>
<p>I'm creating a Cadabra notebook showing how the Bianchi identities are obtained, using the structural equations.</p>
<p>Although I achieve the goal, it is useful to show the results introducing an exterior covariant derivative, $D$. Such derivative is not nilpotent, i.e. $D^2 \neq 0$.</p>
<p>I tried the following</p>
<pre><code>D{#}::Derivative.
D{#}::LaTeXForm("{\rm D}").
D{#}::DifferentialForm(degree=1);
</code></pre>
<p>but I think that the last declaration spoils the super-commutativity of the differential forms.</p>
<p><strong>Question</strong></p>
<p>How could I possible define a non-nilpotent exterior derivative?</p>
General questionshttp://cadabra.science/qa/1159/defining-a-non-nilpotent-exteriorderivativeTue, 07 May 2019 16:01:20 +0000Answered: Vielbein, inverse and their elimination. Documentation
http://cadabra.science/qa/1153/vielbein-inverse-and-their-elimination-documentation?show=1154#a1154
<p>Have merged your initial docs and the actual algorithm now. There's room for improvement of course.</p>
Feature requestshttp://cadabra.science/qa/1153/vielbein-inverse-and-their-elimination-documentation?show=1154#a1154Fri, 03 May 2019 18:26:02 +0000Answered: A general covariant derivative
http://cadabra.science/qa/68/a-general-covariant-derivative?show=1151#a1151
<p>Have a look at the example at the bottom of <a rel="nofollow" href="https://cadabra.science/notebooks/ref_programming.html">https://cadabra.science/notebooks/ref_programming.html</a> for a way to handle operators whose expansion depends on the object they act on. </p>
General questionshttp://cadabra.science/qa/68/a-general-covariant-derivative?show=1151#a1151Fri, 26 Apr 2019 12:13:43 +0000Answered: Cadabra QA page: functionality
http://cadabra.science/qa/1148/cadabra-qa-page-functionality?show=1150#a1150
<p>I rely on the Q2A software for all of this; you may be better off making these suggestions on their support forum.</p>
Feature requestshttp://cadabra.science/qa/1148/cadabra-qa-page-functionality?show=1150#a1150Fri, 26 Apr 2019 11:48:41 +0000Answered: Dimensional reduction of a three form
http://cadabra.science/qa/1143/dimensional-reduction-of-a-three-form?show=1144#a1144
<p>The line</p>
<pre><code>C_{\Sigma \Pi \Theta}::AntiSymmetric;
</code></pre>
<p>makes the tensor antisymmetric in the 'full' indices, and it would be natural for Cadabra to infer that this implies that the anti-symmetry is also present when these indices are replaced with either '4' or one of the <code>space1</code> indices, but it doesn't do that (yet). If it does not clash with other tensors, you can do</p>
<pre><code>C_{A? B? C?}::AntiSymmetric;
</code></pre>
<p>which makes the tensor antisymmetric regardless of what you stick in the index slots. Of course this will then also yield antisymmetry for a C-tensor with indices from yet another set (which you probably won't have).</p>
<p>Unfortunately there are no logical operators in conditional substitution yet; it's fairly limited at the moment.</p>
General questionshttp://cadabra.science/qa/1143/dimensional-reduction-of-a-three-form?show=1144#a1144Thu, 25 Apr 2019 16:07:32 +0000Sorting indices of tensors
http://cadabra.science/qa/1141/sorting-indices-of-tensors
<p>Hi. I've been working on a Kaluza-Klein dimensional reduction. In the reduced model there are terms like $g<em>{a 5}$ and $g</em>{5 a}$. Is the a command that sort the indices, and allows to write everything in terms of a single component? </p>
General questionshttp://cadabra.science/qa/1141/sorting-indices-of-tensorsWed, 24 Apr 2019 13:18:28 +0000Dependence on a subspace - Possible???
http://cadabra.science/qa/1139/dependence-on-a-subspace-possible
<p>Going through the Kaluza-Klein examples, I noticed that it is possible to define subspaces (e.g. <code>split_index</code>). There is also a <code>Depends</code> property.</p>
<p>I've defined</p>
<pre><code>{\Lambda,\Theta,\Sigma,\Xi,\Gamma,\Delta,\Pi,\Omega}::Indices(full,position=independent);
{\mu,\nu,\rho,\sigma,\gamma,\lambda}::Indices(space1,position=independent);
\partial{#}::PartialDerivative;
{\phi, A_{\mu?}, h_{\mu? \nu?}}::Depends(\partial{#});
</code></pre>
<p>Is it possible to restrict the dependence of the fields to the subspace <code>space1</code>?</p>
General questionshttp://cadabra.science/qa/1139/dependence-on-a-subspace-possibleTue, 23 Apr 2019 19:53:08 +0000Answered: Problem with substitution
http://cadabra.science/qa/1134/problem-with-substitution?show=1135#a1135
<p>Should probably go in a FAQ: if you write <code>e^{a}</code> this gets interpreted as a tensor <code>e</code> with one contravariant index <code>a</code>. To write exponentials, use <code>\exp{...}</code> instead, or <code>e**{...}</code> if you really want the <code>e</code>.</p>
General questionshttp://cadabra.science/qa/1134/problem-with-substitution?show=1135#a1135Tue, 23 Apr 2019 16:39:48 +0000Answered: unexpected crash
http://cadabra.science/qa/390/unexpected-crash?show=1133#a1133
<p>In case anyone is still following this thread, this is now fixed on github master (version 2.2.7 or later).</p>
Bug reportshttp://cadabra.science/qa/390/unexpected-crash?show=1133#a1133Thu, 18 Apr 2019 11:56:11 +0000Answered: Inconsistencies in factor_out and factor_in
http://cadabra.science/qa/1126/inconsistencies-in-factor_out-and-factor_in?show=1130#a1130
<p>Let me first address the case which does work with the current version (at least for me):</p>
<pre><code>ex2:= (a + b - c) d + (-a -b + c) d
factor_out(_,$d$);
</code></pre>
<p>correctly factors out $d$. Factoring out composite expressions (like the $a+b-c$) is currently not supported, unfortunately.</p>
<p>All the other cases have to do with factoring out tensors. In general, for that to work, you need to have the indices on the expression you want to factor out be the same on all terms (so sort the expression and <code>rename_dummies</code> first), and it needs to be un-ambiguous (your last example isn't, because the <code>factor_out(_, $g_{a b}$)</code> means 'factor out the g-tensor with two indices', not 'factor out the g-tensor with one index 'a' and one 'b'').</p>
<p>Fixing this has been on the TODO list for some time, but there are only 25 hours in each day unfortunately.</p>
Bug reportshttp://cadabra.science/qa/1126/inconsistencies-in-factor_out-and-factor_in?show=1130#a1130Thu, 18 Apr 2019 09:53:06 +0000Answered: Cadabra crashes on non-ASCII input
http://cadabra.science/qa/1127/cadabra-crashes-on-non-ascii-input?show=1129#a1129
<p>This should now be fixed with the current version on github. There are still a few issues with actually using non-ascii symbols in Cadabra expressions, but the crashes are gone.</p>
Bug reportshttp://cadabra.science/qa/1127/cadabra-crashes-on-non-ascii-input?show=1129#a1129Thu, 18 Apr 2019 09:37:54 +0000Answered: How define a general tensor symmetry
http://cadabra.science/qa/1098/how-define-a-general-tensor-symmetry?show=1125#a1125
<p>With the provided information, you cannot determine an irrep under which your tensor transform. That's why you cannot use <code>TableauSymmetry</code></p>
<p>Notice however that, your tensor could lie on the <code>{2,2,2}</code> Young tableau. Perhaps that can help!</p>
<p>Cheers.</p>
General questionshttp://cadabra.science/qa/1098/how-define-a-general-tensor-symmetry?show=1125#a1125Tue, 16 Apr 2019 15:45:47 +0000Answered: Symmetrise pairs of indices
http://cadabra.science/qa/1111/symmetrise-pairs-of-indices?show=1124#a1124
<p>As shown in the manual, <a rel="nofollow" href="https://cadabra.science/manual/TableauSymmetry.html,">https://cadabra.science/manual/TableauSymmetry.html,</a> you could use the property <code>TableauSymmetry</code></p>
<pre><code>A_{a b c d}::TableauSymmetry( shape={2,2}, indices={0,2,1,3} );
</code></pre>
<p>Cheers.</p>
General questionshttp://cadabra.science/qa/1111/symmetrise-pairs-of-indices?show=1124#a1124Tue, 16 Apr 2019 15:32:38 +0000Answered: what is the use of question mark postindices, how it changes contractions and symmetry properties of indices?
http://cadabra.science/qa/1117/question-postindices-changes-contractions-symmetry-properties?show=1118#a1118
<p>A single question mark indicates a pattern (or wildcard), so that should only be used in e.g. <code>substitute</code>. Under most circumstances you don't need them for normal indices. Two question marks indicate an <code>object wildcard</code>, that is, a wildcard which matches an entire tensor. Have a look at</p>
<p><a rel="nofollow" href="https://cadabra.science/notebooks/ref_patterns.html">https://cadabra.science/notebooks/ref_patterns.html</a></p>
<p>in the reference guide, and then reply to this answer in case it is still not clear.</p>
General questionshttp://cadabra.science/qa/1117/question-postindices-changes-contractions-symmetry-properties?show=1118#a1118Mon, 08 Apr 2019 08:15:50 +0000Answered: nested zoom/unzoom
http://cadabra.science/qa/1112/nested-zoom-unzoom?show=1115#a1115
<p>The easter bunny is early this year: the version now on github does <code>unzoom</code> step by step, except when you give it the <code>repeat=True</code> parameter, in which it unzooms all the way to the original expression. Let me know if you run into any issues.</p>
General questionshttp://cadabra.science/qa/1112/nested-zoom-unzoom?show=1115#a1115Sat, 06 Apr 2019 13:16:19 +0000Answered: glob pattern in rules
http://cadabra.science/qa/1105/glob-pattern-in-rules?show=1106#a1106
<p>Try</p>
<pre><code>foo := t0 A + t2 B + t13 C;
substitute(foo, $t? | \regex{t?}{"t[0-9]*"} -> 1$);
</code></pre>
<p>The structure of this replacement rule is described in the reference guide chapter on <a rel="nofollow" href="https://cadabra.science/notebooks/ref_patterns.html">patterns</a>.</p>
General questionshttp://cadabra.science/qa/1105/glob-pattern-in-rules?show=1106#a1106Sun, 31 Mar 2019 11:28:21 +0000Answered: to_lhs produces Python syntax error
http://cadabra.science/qa/1101/to_lhs-produces-python-syntax-error?show=1102#a1102
<p>Thanks for reporting this, you are number 2 today ;-) It's now fixed on github, or if you want to patch it locally: just replace that line with <code>to_rhs(ex, *parts)</code>.</p>
Bug reportshttp://cadabra.science/qa/1101/to_lhs-produces-python-syntax-error?show=1102#a1102Wed, 27 Mar 2019 12:09:34 +0000