<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Cadabra Q&amp;A - Recent questions and answers</title>
<link>https://cadabra.science/qa/qa</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: declare a mapping with previous expression</title>
<link>https://cadabra.science/qa/3077/declare-a-mapping-with-previous-expression?show=3078#a3078</link>
<description>&lt;p&gt;For some reason, the syntax @[something] or @(something) does not like underscores, so if you remove it from the variable name, the construction will work. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;M_mapping := M_{\mu} -&amp;gt; @(M_expr); &amp;lt;--- error&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;M_mapping := M_{\mu} -&amp;gt; @(Mexpr); &amp;lt;--- works&lt;/code&gt;&lt;/pre&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/3077/declare-a-mapping-with-previous-expression?show=3078#a3078</guid>
<pubDate>Mon, 02 Feb 2026 14:25:23 +0000</pubDate>
</item>
<item>
<title>Answered: canonicalise gets stuck on swapped indices</title>
<link>https://cadabra.science/qa/3069/canonicalise-gets-stuck-on-swapped-indices?show=3070#a3070</link>
<description>&lt;p&gt;Make sure to reset your kernel if you change properties like this. For me, the following works:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\mu,\nu,\alpha,\beta}::Indices(position=fixed);
\nabla{#}::Derivative;
expr_test := \nabla_{\mu}{ A_{\alpha } } * \nabla^{\mu}{ A_{\beta} } 
           + \nabla^{\mu}{ A_{\alpha } } * \nabla_{\mu}{ A_{\beta} };
canonicalise(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and returns $2\nabla^{\mu} A_{\alpha} \nabla_{\mu} A_{\beta}$.&lt;/p&gt;
&lt;p&gt;The logic is that with &lt;code&gt;position=independent&lt;/code&gt;, the &lt;code&gt;canonicalise&lt;/code&gt; algorithm is not allowed to raise/lower the $\mu$ indices in pairs. With &lt;code&gt;position=fixed&lt;/code&gt;, this is allowed.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/3069/canonicalise-gets-stuck-on-swapped-indices?show=3070#a3070</guid>
<pubDate>Wed, 21 Jan 2026 19:42:01 +0000</pubDate>
</item>
<item>
<title>Answered: Rename specific dummy indices in expressions</title>
<link>https://cadabra.science/qa/3063/rename-specific-dummy-indices-in-expressions?show=3067#a3067</link>
<description>&lt;p&gt;Ok I ended up implementing something in line with the pseudo-code I was thinking:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from cdb.utils.indices import replace_index

def unify_variations_inplace(ex, symbol_name, target_indices):
    # 1. Helper to find the sum node (integrand)
    def find_sum_node(node):
        if node.name == r'\sum': return node
        for child in node.children():
            res = find_sum_node(child)
            if res: return res
        return None

    # Locate the node inside the original expression (ex)
    sum_node = find_sum_node(ex.top())
    if not sum_node: 
        return ex

    # 2. Build the unified integrand as a new Ex
    new_sum = Ex('0')
    for term_node in sum_node.children():
        t_ex = term_node.ex()
        matches = list(t_ex[symbol_name])

        if matches:
            current_indices = [str(idx.name) for idx in matches[0].indices()]
            for i in range(min(len(current_indices), len(target_indices))):
                old_idx, new_idx = current_indices[i], target_indices[i]
                if old_idx != new_idx:
                    t_ex = replace_index(t_ex, &quot;&quot;, old_idx, new_idx)

        # We skip canonicalise here to prevent index shuffling
        new_sum += t_ex

    # 3. REINSERT the result into the original expression tree
    # This physically overwrites the sum inside the integral context
    sum_node.replace(new_sum)

    return ex&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then I use this like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dg{#}::LaTeXForm(&quot;\delta{g}&quot;).
action_test := \int{ W^{\mu}_{\nu \rho} g_{\mu \alpha} D^{\alpha} dg^{\rho \nu} + C_{\beta \mu} dg^{\beta \mu}}{x};
unify_variations_inplace(action_test, &quot;dg&quot;, ['\psi', '\chi']);
factor_out(_, $dg^{\psi \chi}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The only shortcoming of this function is that as it is, it doesn't check if the &lt;code&gt;target_indices&lt;/code&gt; are being already used inside the expression, but it shouldn't be too difficult to add&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/3063/rename-specific-dummy-indices-in-expressions?show=3067#a3067</guid>
<pubDate>Tue, 20 Jan 2026 15:18:31 +0000</pubDate>
</item>
<item>
<title>Issue with split_index and dummy index</title>
<link>https://cadabra.science/qa/3062/issue-with-split_index-and-dummy-index</link>
<description>&lt;p&gt;I am new to Cadabra and have a couple of beginner questions that I haven’t been able to resolve on my own. I would greatly appreciate any help or clarification you can offer. I have the following Cadabra Code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{M,N,P,Q,R#}::Indices(full, position=fixed).
{a,b,c,d,e#}::Indices(space1, position=fixed).
{a,b,c,d,e}::Integer(1..2).
{m,n,p,q,r#}::Indices(space2, position=fixed).&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;\partial{#}::PartialDerivative.
g_{M N}::Metric.
g^{M N}::InverseMetric.
g_{M?N?}::Symmetric.
g^{M?N?}::Symmetric.&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Gtog:=\Gamma^{P?}_{M? N?}-&amp;gt;(1/2)*g^{P? Q}(\partial_{N?}{g_{Q M?}}
+\partial_{M?}{g_{Q N?}}-\partial_{Q}{g_{M? N?}});&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;ex:=\Gamma^{2}_{1 2};
substitute(_, Gtog);
split_index(_, $M, a, m$);&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;todo:=\Gamma^{R}_{q m}\Gamma^{p}_{n R};
substitute(_, Gtog);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Question1: I tried using split index to split an index in my expression, but it doesn’t seem to do anything -- it simply returns the answer without performing the split. What might be the issue?&lt;/p&gt;
&lt;p&gt;Question2: For the expression \Gamma^{R}&lt;em&gt;{q m}\Gamma^{p}&lt;/em&gt;{n R} I am getting the same index Q repeated four times in the output. How can I prevent this and get the correct index contractions without the same dummy index appearing too many times?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/3062/issue-with-split_index-and-dummy-index</guid>
<pubDate>Tue, 13 Jan 2026 11:06:33 +0000</pubDate>
</item>
<item>
<title>Answered: absolute value in Cadabra expression</title>
<link>https://cadabra.science/qa/3058/absolute-value-in-cadabra-expression?show=3060#a3060</link>
<description>&lt;p&gt;No algorithms in cadabra are currently aware of absolute values, so you can give it any name you want. But because &lt;code&gt;\abs&lt;/code&gt; will not get converted to &lt;code&gt;abs&lt;/code&gt; by the sympy bridge , it is probably best to simply use &lt;code&gt;abs&lt;/code&gt;. In order to make it print as you want, use something like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;abs{A??}::LaTeXForm(&quot;\left|&quot;, A??, &quot;\right|&quot;);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above will make the following work and print correctly:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := abs( -3 );
simplify(ex);&lt;/code&gt;&lt;/pre&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/3058/absolute-value-in-cadabra-expression?show=3060#a3060</guid>
<pubDate>Mon, 22 Dec 2025 20:47:26 +0000</pubDate>
</item>
<item>
<title>Answered: The mystery of meld</title>
<link>https://cadabra.science/qa/3056/the-mystery-of-meld?show=3057#a3057</link>
<description>&lt;p&gt;The first issue is now fixed on the &lt;code&gt;devel&lt;/code&gt; branch.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3056/the-mystery-of-meld?show=3057#a3057</guid>
<pubDate>Thu, 04 Dec 2025 21:09:24 +0000</pubDate>
</item>
<item>
<title>Strange behavior young_project_product with zoom</title>
<link>https://cadabra.science/qa/3055/strange-behavior-young_project_product-with-zoom</link>
<description>&lt;p&gt;Hello, I found a peculiar effect of Young's projection when applied to part of an expression after using zoom. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,f,e, m,n,k,l,q,r,s,t,u,v,w,x,y,z,m#, n#}::Indices(values={0..3}, position=independent);

\nabla{#}::Derivative.
h_{m? n?}::Metric.
h^{m? n?}::InverseMetric.
h_{m? n?}::Symmetric.
h^{m? n?}::Symmetric.
F_{a? b?}::AntiSymmetric.
F^{a? b?}::AntiSymmetric.
\nabla_{a}{F_{b c}}::TableauSymmetry(shape={2,1}, indices={0,1,2});
\nabla_{a}{\nabla_{b}{p}}::Symmetric;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and I have some long expression:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;expr := 1/2 F_{a b} F_{c d} R \nabla_{e}(p) \nabla_{f}(p) h^{a c} h^{b e} h^{d f}
-F_{a b} F_{c d} \nabla_{e}(\nabla_{f}(p)) \nabla_{m}(\nabla_{n}(p)) h^{a c} h^{b e} h^{d f} h^{m n} 
+ F_{a b} F_{c d} \nabla_{e}(\nabla_{f}(p)) \nabla_{m}(\nabla_{n}(p)) h^{a c} h^{b e} h^{d m} h^{f n}
-F_{a b} F_{c d} R_{e f} \nabla_{m}(p) \nabla_{n}(p) h^{a e} h^{b m} h^{c f} h^{d n}
-2F_{a b} \nabla_{c}(F_{d e}) \nabla_{f}(\nabla_{m}(p)) \nabla_{n}(p) h^{a f} h^{b n} h^{c d} h^{e m} 
+ F_{a b} F_{c d} \nabla_{e}(\nabla_{f}(p)) \nabla_{m}(\nabla_{n}(p)) h^{a e} h^{b m} h^{c f} h^{d n} 
+ F_{a b} \nabla_{c}(F_{d e}) \nabla_{f}(\nabla_{m}(p)) \nabla_{n}(p) h^{a c} h^{b d} h^{e f} h^{m n};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And I want to simplify terms with \nabla&lt;em&gt;{a}{F&lt;/em&gt;{b c}}:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;zoom(expr, $Q?? \nabla_{a}{F_{b c}}$);
expr2 = take_match($@[expr2]$, $Q?? \nabla_{a}{F_{b c}}$);
canonicalise(young_project_product(expr2));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For expr I get 
&lt;code&gt;-  4/3 F_{a b} \nabla_{c}(F_{d e}) \nabla_{f}(\nabla_{m}(p)) \nabla_{n}(p) h^{a f} h^{b n} h^{c d} h^{e m}&lt;/code&gt;
but for expr2 I get &lt;/p&gt;
&lt;p&gt;&lt;code&gt;-  8/9 F_{a b} \nabla_{c}(F_{d e}) \nabla_{f}(\nabla_{m}(p)) \nabla_{n}(p) h^{a f} h^{b n} h^{c d} h^{e m}&lt;/code&gt;&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3055/strange-behavior-young_project_product-with-zoom</guid>
<pubDate>Wed, 22 Oct 2025 16:56:49 +0000</pubDate>
</item>
<item>
<title>Answered: vary behaves in an odd way</title>
<link>https://cadabra.science/qa/3053/vary-behaves-in-an-odd-way?show=3054#a3054</link>
<description>&lt;p&gt;The trivial cases always slip the net somehow... Now fixed on the devel branch, will go into 2.5.16. Thanks for reporting.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3053/vary-behaves-in-an-odd-way?show=3054#a3054</guid>
<pubDate>Mon, 06 Oct 2025 20:34:44 +0000</pubDate>
</item>
<item>
<title>Answered: plot example on p. 51 of The Cadabra Book require range</title>
<link>https://cadabra.science/qa/3048/plot-example-on-p-51-of-the-cadabra-book-require-range?show=3049#a3049</link>
<description>&lt;p&gt;For the range deduction to work you need to use the &lt;code&gt;devel&lt;/code&gt; branch; this has not made it to the &lt;code&gt;master&lt;/code&gt; branch yet but slipped into the docs inadvertedly.&lt;/p&gt;
&lt;p&gt;You are correct about the samples parameter not being fed through correctly; I have opened &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kpeeters/cadabra2/issues/371&quot;&gt;https://github.com/kpeeters/cadabra2/issues/371&lt;/a&gt; to keep track of this. Thanks.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3048/plot-example-on-p-51-of-the-cadabra-book-require-range?show=3049#a3049</guid>
<pubDate>Mon, 21 Jul 2025 17:05:48 +0000</pubDate>
</item>
<item>
<title>Answered: \dot command not displayed correctly</title>
<link>https://cadabra.science/qa/3043/dot-command-not-displayed-correctly?show=3045#a3045</link>
<description>&lt;p&gt;Maybe I don't write it correctly but it's not working for me&lt;/p&gt;
&lt;p&gt;can you show me the complete line ?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3043/dot-command-not-displayed-correctly?show=3045#a3045</guid>
<pubDate>Tue, 15 Jul 2025 11:10:52 +0000</pubDate>
</item>
<item>
<title>Answered: How to remove/unset properties</title>
<link>https://cadabra.science/qa/3034/how-to-remove-unset-properties?show=3042#a3042</link>
<description>&lt;p&gt;Thanks.&lt;/p&gt;
&lt;p&gt;I clear command will be nice but probably not easy to implement.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/3034/how-to-remove-unset-properties?show=3042#a3042</guid>
<pubDate>Sun, 13 Jul 2025 20:57:37 +0000</pubDate>
</item>
<item>
<title>Answered: Regex not working</title>
<link>https://cadabra.science/qa/3035/regex-not-working?show=3038#a3038</link>
<description>&lt;p&gt;If you have a fix please open an issue in github and attach a fix (or open a pull request).&lt;/p&gt;
&lt;p&gt;(Regex is a feature I almost never use anymore, and was written before I started introducing rigid tests, so this does not surprise me at all).&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3035/regex-not-working?show=3038#a3038</guid>
<pubDate>Sun, 13 Jul 2025 20:15:49 +0000</pubDate>
</item>
<item>
<title>Answered: How to collect similar terms?</title>
<link>https://cadabra.science/qa/1476/how-to-collect-similar-terms?show=3033#a3033</link>
<description>&lt;p&gt;Version 2.5.13 (currently in the &lt;code&gt;devel&lt;/code&gt; branch on github) supports TeXmacs again. You need to put the &lt;code&gt;config/init-cadabra2.scm&lt;/code&gt; file in the appropriate TeXmacs folder. Feedback is welcome.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1476/how-to-collect-similar-terms?show=3033#a3033</guid>
<pubDate>Mon, 12 May 2025 16:30:12 +0000</pubDate>
</item>
<item>
<title>Answered: execution problems</title>
<link>https://cadabra.science/qa/3015/execution-problems?show=3017#a3017</link>
<description>&lt;p&gt;I don't think that we can make this work again, and I actually don't think this worked as you thought before. The python packaging logic is so terribly convoluted and broken that it is probably not a good idea to try to install Cadabra in CMAKE_INSTALL_PREFIX that does not also have the python stuff. Previously, it would just install half in &lt;code&gt;/Users/leo/tmp2/bin/&lt;/code&gt; and the python stuff elsewhere in &lt;code&gt;/opt/homebrew/&lt;/code&gt;, I think.&lt;/p&gt;
&lt;p&gt;Just sorting this out has probably already taken at least 30% of the Cadabra development time (with packaging for Windows the remaining 70%...) so it is unlikely that I wlll find the energy to give this another attempt soon.&lt;/p&gt;
&lt;p&gt;If you just want to test, create a Python virtual environment and install Cadabra while you have that active.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3015/execution-problems?show=3017#a3017</guid>
<pubDate>Tue, 08 Apr 2025 13:33:19 +0000</pubDate>
</item>
<item>
<title>Answered: cadabra2python seg fault</title>
<link>https://cadabra.science/qa/3012/cadabra2python-seg-fault?show=3016#a3016</link>
<description>&lt;p&gt;Now fixed in the &lt;code&gt;devel&lt;/code&gt; branch.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3012/cadabra2python-seg-fault?show=3016#a3016</guid>
<pubDate>Tue, 08 Apr 2025 09:39:48 +0000</pubDate>
</item>
<item>
<title>Answered: curly-braces and lost indices</title>
<link>https://cadabra.science/qa/3010/curly-braces-and-lost-indices?show=3014#a3014</link>
<description>&lt;p&gt;Yes, the general advice is to not sprinkle curly braces around if you don't need them. I agree though that this is unexpected and should at least throw an error. I have added this to the issue tracker so it doesn't get lost, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kpeeters/cadabra2/issues/355&quot;&gt;https://github.com/kpeeters/cadabra2/issues/355&lt;/a&gt;.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3010/curly-braces-and-lost-indices?show=3014#a3014</guid>
<pubDate>Tue, 08 Apr 2025 07:34:53 +0000</pubDate>
</item>
<item>
<title>Answered: simple substitute hits wrong target</title>
<link>https://cadabra.science/qa/3011/simple-substitute-hits-wrong-target?show=3013#a3013</link>
<description>&lt;p&gt;You smash a bug and it appears somewhere else... This one was caused by fixing a related issue just after X-mas (I blame Santa). Hopefully it is now finally gone. Pushed a fix to the &lt;code&gt;devel&lt;/code&gt; branch. Thanks for reporting this!&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3011/simple-substitute-hits-wrong-target?show=3013#a3013</guid>
<pubDate>Tue, 08 Apr 2025 07:28:47 +0000</pubDate>
</item>
<item>
<title>Answered: Evaluate does not respect NonCommuting</title>
<link>https://cadabra.science/qa/2996/evaluate-does-not-respect-noncommuting?show=2997#a2997</link>
<description>&lt;p&gt;Evaluate calls simplify under the hood. You can turn this off by using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;evaluate(_, simplify=False);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, I think you probably want &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;product_rule(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead (evaluate is for evaluating components of a tensor expression, but yours is a scalar, so it is already 'evaluated' for that purpose; see the docs for more detail and ask again if it's not clear).&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2996/evaluate-does-not-respect-noncommuting?show=2997#a2997</guid>
<pubDate>Fri, 14 Mar 2025 07:31:34 +0000</pubDate>
</item>
<item>
<title>Answered: How to manage two projects in their own folders which import .cnb's with the same names</title>
<link>https://cadabra.science/qa/2994/manage-projects-their-folders-which-import-cnbs-with-names?show=2995#a2995</link>
<description>&lt;p&gt;The version of Cadabra in the &lt;code&gt;devel&lt;/code&gt; branch on github contains code which avoids multiple identically-named notebooks mapping to the same converted &lt;code&gt;.py&lt;/code&gt; file. You can build this from source or wait a little until this gets released as 2.5.12. &lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2994/manage-projects-their-folders-which-import-cnbs-with-names?show=2995#a2995</guid>
<pubDate>Mon, 17 Feb 2025 14:23:38 +0000</pubDate>
</item>
<item>
<title>Answered: No GUI after compiling from the source (manjaro)</title>
<link>https://cadabra.science/qa/2989/no-gui-after-compiling-from-the-source-manjaro?show=2990#a2990</link>
<description>&lt;p&gt;That sounds you either have some old version of &lt;code&gt;cadabra-server&lt;/code&gt; floating around, or there is a mixture of different python versions on your system which are not picked up consistently. Can you email me the output of the &lt;code&gt;cmake&lt;/code&gt; stage (with a clean build folder)?&lt;/p&gt;
&lt;p&gt;The theme warning errors probably have something to do with customisations you (or some manjaro package) has made to the gtk theme. &lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/2989/no-gui-after-compiling-from-the-source-manjaro?show=2990#a2990</guid>
<pubDate>Thu, 02 Jan 2025 15:11:47 +0000</pubDate>
</item>
<item>
<title>Answered: evaluate() returns RuntimeError when using the explicit value of an index</title>
<link>https://cadabra.science/qa/2710/evaluate-returns-runtimeerror-using-explicit-value-index?show=2988#a2988</link>
<description>&lt;p&gt;This is now fixed on the &lt;code&gt;devel&lt;/code&gt; branch which will become 2.5.12 eventually. &lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2710/evaluate-returns-runtimeerror-using-explicit-value-index?show=2988#a2988</guid>
<pubDate>Fri, 27 Dec 2024 23:06:02 +0000</pubDate>
</item>
<item>
<title>Answered: Canonicalise Kernel crash</title>
<link>https://cadabra.science/qa/2962/canonicalise-kernel-crash?show=2987#a2987</link>
<description>&lt;p&gt;The presence of those squares (e.g. &lt;code&gt;(\partial_{t}{p})**2&lt;/code&gt; trips &lt;code&gt;canonicalise&lt;/code&gt;. In general, this algorithm cannot deal with powers; you have to write them out first with &lt;code&gt;expand_power&lt;/code&gt; if you want this to work. I will add a test to &lt;code&gt;canonicalise&lt;/code&gt; to prevent it from attempting to canonicalise these expressions.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2962/canonicalise-kernel-crash?show=2987#a2987</guid>
<pubDate>Fri, 27 Dec 2024 11:57:57 +0000</pubDate>
</item>
<item>
<title>Answered: derivatives are not evaluated in evaluation of components</title>
<link>https://cadabra.science/qa/2978/derivatives-are-not-evaluated-in-evaluation-of-components?show=2984#a2984</link>
<description>&lt;p&gt;After your &lt;code&gt;substitute(ex2, cc)&lt;/code&gt;, you should simply be able to do&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;evaluate(ex2, join(metricRdp2, global2));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This evaluates the components of the expression &lt;code&gt;ex2&lt;/code&gt; using the rules in &lt;code&gt;metricRdp2&lt;/code&gt; and &lt;code&gt;global2&lt;/code&gt;.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2978/derivatives-are-not-evaluated-in-evaluation-of-components?show=2984#a2984</guid>
<pubDate>Thu, 26 Dec 2024 19:57:32 +0000</pubDate>
</item>
<item>
<title>Answered: compile failed using boost 1.87</title>
<link>https://cadabra.science/qa/2975/compile-failed-using-boost-1-87?show=2979#a2979</link>
<description>&lt;p&gt;2.5.10 is now available via homebrew; please try and let me know if there are any more issues.&lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/2975/compile-failed-using-boost-1-87?show=2979#a2979</guid>
<pubDate>Tue, 24 Dec 2024 11:18:24 +0000</pubDate>
</item>
<item>
<title>Answered: c++lib fails to compile</title>
<link>https://cadabra.science/qa/2970/c-lib-fails-to-compile?show=2972#a2972</link>
<description>&lt;p&gt;Thanks! I have pushed changes for this to the &lt;code&gt;devel&lt;/code&gt; branch, and have also added it to the CI pipeline so the c++lib build process is tested on every commit; hopefully that will prevent this from getting out of sync again.&lt;/p&gt;
&lt;p&gt;There are not many people that I am aware of who use Cadabra's c++lib. Care to say a few words about what you are trying to do with it?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2970/c-lib-fails-to-compile?show=2972#a2972</guid>
<pubDate>Wed, 11 Dec 2024 08:45:09 +0000</pubDate>
</item>
<item>
<title>Answered: Kronecker delta wrong output in 2D</title>
<link>https://cadabra.science/qa/2969/kronecker-delta-wrong-output-in-2d?show=2971#a2971</link>
<description>&lt;p&gt;Ouch. The code responsible for this bug was about 10 years old, did not have the appropriate tests, and indeed produced nonsense when the range of the integer was symbolic. Thanks for reporting this.&lt;/p&gt;
&lt;p&gt;I have pushed a fix to the &lt;code&gt;devel&lt;/code&gt; branch on github; this will go into 2.5.10 to be released soon.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2969/kronecker-delta-wrong-output-in-2d?show=2971#a2971</guid>
<pubDate>Tue, 10 Dec 2024 21:05:35 +0000</pubDate>
</item>
<item>
<title>Answered: How to handle metric on submanifold?</title>
<link>https://cadabra.science/qa/2963/how-to-handle-metric-on-submanifold?show=2964#a2964</link>
<description>&lt;p&gt;I can't reproduce that; are you sure that with a fresh kernel start the above minimal example does the wrong thing? If so, have you tried with the current version (2.5.8 or the upcoming 2.5.10 which is available as 2.5.10-rc1)?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2963/how-to-handle-metric-on-submanifold?show=2964#a2964</guid>
<pubDate>Sat, 07 Dec 2024 15:21:13 +0000</pubDate>
</item>
<item>
<title>Answered: collect_factors / simplify with AntiCommuting objects</title>
<link>https://cadabra.science/qa/2958/collect_factors-simplify-with-anticommuting-objects?show=2959#a2959</link>
<description>&lt;p&gt;That &lt;code&gt;simplify&lt;/code&gt; butchers the expression is expected, as no info about (anti-)commutativity currently gets passed through the sympy bridge. However, &lt;code&gt;collect_factors&lt;/code&gt; does not use sympy and should know better. I have opened an issue on github to keep track of this, &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kpeeters/cadabra2/issues/324&quot;&gt;https://github.com/kpeeters/cadabra2/issues/324&lt;/a&gt; .&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2958/collect_factors-simplify-with-anticommuting-objects?show=2959#a2959</guid>
<pubDate>Thu, 21 Nov 2024 20:39:59 +0000</pubDate>
</item>
<item>
<title>Cadabra in Jupyter notebook - how to store?</title>
<link>https://cadabra.science/qa/2956/cadabra-in-jupyter-notebook-how-to-store</link>
<description>&lt;p&gt;Hello,
I'm working with Cadabra on Jupyter notebooks, specifically via JupyterHub running on a linux system.
I save my work and shuts down the computer until my next session, but then when I open the notbook again I see that the results are fonw, only the code is saved.
I think only once I managed to somehow save a notebook with all of the results still showing when I re-open it. I don't know how I did it.&lt;/p&gt;
&lt;p&gt;So my questio nis how to save a Cadabra-notebook (on a jupyterhub) with all the data still in the cache, and saved even after the computer is shut down?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2956/cadabra-in-jupyter-notebook-how-to-store</guid>
<pubDate>Sun, 20 Oct 2024 12:59:00 +0000</pubDate>
</item>
<item>
<title>Answered: sympy(?) errors parsing nested derivatives?</title>
<link>https://cadabra.science/qa/2949/sympy-errors-parsing-nested-derivatives?show=2950#a2950</link>
<description>&lt;p&gt;That problem comes from the fact that you wrote &lt;code&gt;\sin\phi&lt;/code&gt;, instead of &lt;code&gt;\sin(\phi)&lt;/code&gt;. In Cadabra you &lt;em&gt;have&lt;/em&gt; to group function arguments. (Of course I agree the error is useless and this should be caught earlier).&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2949/sympy-errors-parsing-nested-derivatives?show=2950#a2950</guid>
<pubDate>Tue, 01 Oct 2024 07:23:06 +0000</pubDate>
</item>
<item>
<title>Answered: \partial_\theta causes infinite loop(?) in server</title>
<link>https://cadabra.science/qa/2945/partial_-theta-causes-infinite-loop-in-server?show=2948#a2948</link>
<description>&lt;p&gt;I guess you have your answer there: add braces. In general, Cadabra is less forgiving about not wrapping arguments in braces, so just do it always. &lt;/p&gt;
&lt;p&gt;Cadabra should not hang of course, will investigate. I have opened an issue at &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kpeeters/cadabra2/issues/312&quot;&gt;https://github.com/kpeeters/cadabra2/issues/312&lt;/a&gt;.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2945/partial_-theta-causes-infinite-loop-in-server?show=2948#a2948</guid>
<pubDate>Mon, 30 Sep 2024 09:58:40 +0000</pubDate>
</item>
<item>
<title>Answered: Custom display symbols for variables?</title>
<link>https://cadabra.science/qa/2940/custom-display-symbols-for-variables?show=2944#a2944</link>
<description>&lt;p&gt;Yes, use &lt;code&gt;LaTeXForm&lt;/code&gt;, as in&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;vr::LaTeXForm(&quot;\dot{r}&quot;).
vtheta::LaTeXForm(&quot;\dot{\theta}&quot;).

ex:= vr + vtheta;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;gives $\dot{r}+\dot{\theta}$.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2940/custom-display-symbols-for-variables?show=2944#a2944</guid>
<pubDate>Mon, 30 Sep 2024 07:19:15 +0000</pubDate>
</item>
<item>
<title>Answered: Gtk error messages on startup.</title>
<link>https://cadabra.science/qa/2941/gtk-error-messages-on-startup?show=2943#a2943</link>
<description>&lt;p&gt;I may need to see if those gtk modules should be included in the AppImage too (I have not done a lot of testing with the AppImage on systems that are truly bare, without an existing gtk installation).&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;connection to server failed&lt;/code&gt; message happens when you restart the kernel or load a new notebook (which restarts the kernel too). This kills the existing &lt;code&gt;cadabra-server&lt;/code&gt; first, and the client then reports that. I could probably remove that error as it sounds more alarming than it is.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2941/gtk-error-messages-on-startup?show=2943#a2943</guid>
<pubDate>Mon, 30 Sep 2024 07:15:18 +0000</pubDate>
</item>
<item>
<title>Answered: Simple derivative evaluation not working for me.</title>
<link>https://cadabra.science/qa/2939/simple-derivative-evaluation-not-working-for-me?show=2942#a2942</link>
<description>&lt;p&gt;The &lt;code&gt;evaluate&lt;/code&gt; does not substitute scalar functions, only component values (which is arguably misleading, and will possibly change in the future). But you can easily work around this by first substituting and then evaluating:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;substitute(exfr, exf);
evaluate(exfr);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In fact the 2nd line then only really calls &lt;code&gt;simplify&lt;/code&gt;, so you may as well use that.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2939/simple-derivative-evaluation-not-working-for-me?show=2942#a2942</guid>
<pubDate>Mon, 30 Sep 2024 07:12:55 +0000</pubDate>
</item>
<item>
<title>Answered: Another &quot;No module named 'sympy' &quot; question.</title>
<link>https://cadabra.science/qa/2934/another-no-module-named-sympy-question?show=2936#a2936</link>
<description>&lt;p&gt;I have just released 2.5.6, which fixes this issue, and also includes plotting support in the AppImage version. You can find the updated AppImage in the github release assets for this release. &lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/2934/another-no-module-named-sympy-question?show=2936#a2936</guid>
<pubDate>Sun, 29 Sep 2024 20:58:15 +0000</pubDate>
</item>
<item>
<title>Answered: Cycle freeze</title>
<link>https://cadabra.science/qa/2929/cycle-freeze?show=2930#a2930</link>
<description>&lt;p&gt;I cannot reproduce this. Which &quot;today's update&quot; are you talking about? I did not make any new release. What is the version and build number? (start the command-line &lt;code&gt;cadabra2&lt;/code&gt; and look at the first line of output).&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2929/cycle-freeze?show=2930#a2930</guid>
<pubDate>Thu, 26 Sep 2024 17:01:38 +0000</pubDate>
</item>
<item>
<title>Answered: Expanding sum into time and purely space components.</title>
<link>https://cadabra.science/qa/2927/expanding-sum-into-time-and-purely-space-components?show=2928#a2928</link>
<description>&lt;p&gt;Hi Heckfy.&lt;/p&gt;
&lt;p&gt;This &quot;anwser&quot; is more a comment, but it might transform onto an answer after some discussion.&lt;/p&gt;
&lt;h1&gt;First contact&lt;/h1&gt;
&lt;p&gt;I understand what you are trying to achieve, but not your question specifically. Let me comment further.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There are typographic in your code blocks, and missing components in your substitution rules (non-diagonal inverse components of the background metric).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think that the right substitution rule should be&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;back := gb_{t t}=-1, 
  gb_{r r}=a**2/(1-k*r**2), 
  gb_{\theta \theta}=a**2*r**2, 
  gb_{\varphi \varphi}=a**2*r**2*\sin{\theta}**2, 
  gb_{t r}=0, 
  gb_{t \theta}=0, 
  gb_{t \varphi}=0, 
  gb_{r \theta}=0, 
  gb_{r \varphi}=0, 
  gb_{\theta \varphi}=0,
  gb_{r t}=0, 
  gb_{\theta t}=0,
  gb_{\varphi t}=0,
  gb_{\theta r}=0,
  gb_{\varphi r}=0, 
  gb_{\varphi \theta}=0
  gb^{t t}=-1, 
  gb^{r r}=(1-k*r**2)/(a**2), 
  gb^{\theta \theta}=1/(r**2 * a**2), 
  gb^{\varphi \varphi}=1/(a**2 * r**2 *\sin{\theta}**2), 
  gb^{t r}=0, 
  gb^{t \theta}=0, 
  gb^{t \varphi}=0, 
  gb^{r \theta}=0, 
  gb^{r \varphi}=0, 
  gb^{\theta \varphi}=0,
  gb^{r t}=0, 
  gb^{\theta t}=0,
  gb^{\varphi t}=0,
  gb^{\theta r}=0,
  gb^{\varphi r}=0, 
  gb^{\varphi \theta}=0;&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;In your question you talk about the connection and Ricci tensor, but there is nothing in the presented code referring to those objects. Could you please update the post to include a more complete notebook?&lt;/li&gt;
&lt;li&gt;The second code block in your post does not compute anything!  Remind that &lt;code&gt;cadabra&lt;/code&gt; is not a calculation software, but a &lt;strong&gt;manipulation&lt;/strong&gt; software. That means that you have to tell it explicitly what to do. So far (at least in what you showed), it is doing nothing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Well, in short, could you improve the quality of your post: improve the statement of your question, and provide a more complete version of your code.&lt;/p&gt;
&lt;p&gt;Cheers,
Dox.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2927/expanding-sum-into-time-and-purely-space-components?show=2928#a2928</guid>
<pubDate>Mon, 12 Aug 2024 09:46:46 +0000</pubDate>
</item>
<item>
<title>Answered: question about eliminate_metric</title>
<link>https://cadabra.science/qa/2920/question-about-eliminate_metric?show=2923#a2923</link>
<description>&lt;p&gt;Hi Eureka and Kasper.&lt;/p&gt;
&lt;p&gt;Thank you K for the suggestions in solving the issue. I used your point to evaluate the code by Eureka. &lt;/p&gt;
&lt;p&gt;I noted that the accent desappear when the &lt;code&gt;ex&lt;/code&gt; got evaluated, unless the accent surround just the symbol &lt;code&gt;g&lt;/code&gt; (wihtout the indices).&lt;/p&gt;
&lt;p&gt;Here my code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\mu,\nu,\rho}::Indices(vector, position=fixed).
g^{\mu\nu}::InverseMetric.
g_\mu^\nu::KroneckerDelta.
g^\mu_\nu::KroneckerDelta.
\delta{#}::Accent.

ex:=\delta{g}_{\mu\nu} g^{\nu\rho};
eliminate_metric(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Best wishes,
Dox&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2920/question-about-eliminate_metric?show=2923#a2923</guid>
<pubDate>Mon, 05 Aug 2024 14:26:20 +0000</pubDate>
</item>
<item>
<title>Answered: A bug of Accent</title>
<link>https://cadabra.science/qa/2912/a-bug-of-accent?show=2913#a2913</link>
<description>&lt;p&gt;Hi Eureka.&lt;/p&gt;
&lt;p&gt;Firstly, let me point that a semi-colon is missing at the en d of the third line. So, the correct &lt;em&gt;code&lt;/em&gt; should be &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b}::Indices(vector).
\delta{#}::Accent.
ex := \delta{A^{a b}+B^{a b}};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then, let me clarify that (to my understanding) accents are a way to differentiate symbols, i.e. it has no further properties. Why is this important? Perhaps your expression should be written as &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := \delta{A}^{a b} + \delta{B}^{a b};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you are expect your &lt;em&gt;accent&lt;/em&gt; to have linearity property, give assign the property of &lt;code&gt;Derivative&lt;/code&gt;, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\delta{#}::Derivative.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you use the &lt;code&gt;Derivative&lt;/code&gt; property instead of the &lt;code&gt;Accent&lt;/code&gt;, you could apply the &lt;code&gt;distribute&lt;/code&gt; algorithm in your original expression&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b}::Indices(vector).
\delta{#}::Derivative.
ex:=\delta{A^{a b}+B^{a b}};
distribute(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cheers,
Dox.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2912/a-bug-of-accent?show=2913#a2913</guid>
<pubDate>Thu, 01 Aug 2024 08:51:17 +0000</pubDate>
</item>
<item>
<title>Answered: Factor out of numerical coefficient</title>
<link>https://cadabra.science/qa/2899/factor-out-of-numerical-coefficient?show=2911#a2911</link>
<description>&lt;p&gt;The main reason why you cannot factor out &lt;em&gt;only&lt;/em&gt; a numerical factor is that Cadabra stores rational pre-factors in a special location (the 'multiplier') inside each node in the expression tree. &lt;/p&gt;
&lt;p&gt;Cadabra will always rewrite expressions so that a &lt;code&gt;\sum&lt;/code&gt; node will have a unit multiplier. So all multipliers are associated to the summands. This is a canonicalisation choice which many algorithms in Cadabra rely on, so it's not easy to change that. Similarly, all child nodes of a &lt;code&gt;\prod&lt;/code&gt; node will have unit multiplier.&lt;/p&gt;
&lt;p&gt;As soon as you have a product in your expression node, like in &lt;code&gt;6 A (B + C)&lt;/code&gt;, the multiplier is associated to the &lt;code&gt;\prod&lt;/code&gt; node. So you still have &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\prod{A}{ \sum{B}{C} }&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;with a unit multiplier for the &lt;code&gt;\sum&lt;/code&gt;, 
but now the &lt;code&gt;\prod&lt;/code&gt; node has multiplier 6.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2899/factor-out-of-numerical-coefficient?show=2911#a2911</guid>
<pubDate>Thu, 18 Jul 2024 13:30:43 +0000</pubDate>
</item>
<item>
<title>Answered: I'm trying to reproduce equation 4.6 from 4.5 in Carrolls Spacettime ;and Geometry</title>
<link>https://cadabra.science/qa/2901/trying-reproduce-equation-from-carrolls-spacettime-geometry?show=2902#a2902</link>
<description>&lt;p&gt;Hi ChuckW.&lt;/p&gt;
&lt;p&gt;I ran your code, compared the output with the result reported in the book,  and it seems that the result is correct.&lt;/p&gt;
&lt;p&gt;The last piece of the puzzle is the use of the chain rule. I complemented your code with the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;chain_rule := \partial_{\lambda}{x^{\nu}} \partial_{\nu}{A??} -&amp;gt; \partial_{\lambda}{A??};

substitute(expr, chain_rule);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hope this suggestions works to complete your task.&lt;/p&gt;
&lt;p&gt;Cheers,
Dox.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2901/trying-reproduce-equation-from-carrolls-spacettime-geometry?show=2902#a2902</guid>
<pubDate>Fri, 28 Jun 2024 08:24:56 +0000</pubDate>
</item>
<item>
<title>Answered: how to deal with lovelock gravity?</title>
<link>https://cadabra.science/qa/2898/how-to-deal-with-lovelock-gravity?show=2900#a2900</link>
<description>&lt;p&gt;Hi Eureka.&lt;/p&gt;
&lt;p&gt;In the article &lt;a rel=&quot;nofollow&quot; href=&quot;https://arxiv.org/pdf/2210.00005&quot;&gt;here&lt;/a&gt;, we provide an algorithm to find the Lagrangian and field equations of the Lanczos--Lovelock models.&lt;/p&gt;
&lt;p&gt;At the time we wrote the article going beyond $m=4$ would take a virtually infinite amount of time.&lt;/p&gt;
&lt;p&gt;I invite you (or any person interested) to go through our algorithm, and we could discuss ways to improve its performance.&lt;/p&gt;
&lt;p&gt;Cheers,
Dox (aka Oscar)&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2898/how-to-deal-with-lovelock-gravity?show=2900#a2900</guid>
<pubDate>Mon, 24 Jun 2024 17:34:46 +0000</pubDate>
</item>
<item>
<title>Answered: substitute gives incorrect value on scalar expression</title>
<link>https://cadabra.science/qa/2892/substitute-gives-incorrect-value-on-scalar-expression?show=2895#a2895</link>
<description>&lt;p&gt;Good catch, stupid error, now fixed.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2892/substitute-gives-incorrect-value-on-scalar-expression?show=2895#a2895</guid>
<pubDate>Tue, 18 Jun 2024 06:21:38 +0000</pubDate>
</item>
<item>
<title>Answered: LaTeXForm fails in version 2.5.2</title>
<link>https://cadabra.science/qa/2893/latexform-fails-in-version-2-5-2?show=2894#a2894</link>
<description>&lt;p&gt;Properties use round brackets for their arguments, no matter how much recent C++ committees may have confused your brain with that.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Dx{#}::LaTeXForm(&quot;Dx&quot;).&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;works. The error message could probably be nicer, I agree.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2893/latexform-fails-in-version-2-5-2?show=2894#a2894</guid>
<pubDate>Tue, 18 Jun 2024 05:46:42 +0000</pubDate>
</item>
<item>
<title>Answered: Cadabra 2.5.x released</title>
<link>https://cadabra.science/qa/2887/cadabra-2-5-x-released?show=2888#a2888</link>
<description>&lt;p&gt;On Slackware 15, I can't compile 2.5.2 because it requires python 3.10, and I can't run AppImage because it requires glibc 2.34. Is it possible to relax the glibc requirement to at least 2.33?&lt;/p&gt;</description>
<category>Announcements</category>
<guid isPermaLink="true">https://cadabra.science/qa/2887/cadabra-2-5-x-released?show=2888#a2888</guid>
<pubDate>Sat, 15 Jun 2024 21:21:24 +0000</pubDate>
</item>
<item>
<title>Answered: location of bracket blocks distribute</title>
<link>https://cadabra.science/qa/2876/location-of-bracket-blocks-distribute?show=2882#a2882</link>
<description>&lt;p&gt;This has been reported a number of times now, so it's time to do something about it. Now fixed in github (2.4.5.9): a newline will act as a single whitespace character and hence turn your &lt;code&gt;bah&lt;/code&gt; into &lt;code&gt;bah: = A (B+C)&lt;/code&gt;.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2876/location-of-bracket-blocks-distribute?show=2882#a2882</guid>
<pubDate>Tue, 11 Jun 2024 14:24:28 +0000</pubDate>
</item>
<item>
<title>leading scalar expression blocks canonicalise</title>
<link>https://cadabra.science/qa/2875/leading-scalar-expression-blocks-canonicalise</link>
<description>&lt;p&gt;Hi Troops,&lt;/p&gt;
&lt;p&gt;Here is s short Cadabra code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e,f#}::Indices(position=independent).

R_{a b c d}::RiemannTensor.

# this should give zero
foo := (1+s) R_{a b c d} p^{a} p^{b} p^{c} p^{d}.
canonicalise (foo);

# this gives the expected result
bah := s R_{a b c d} p^{a} p^{b} p^{c} p^{d}.
canonicalise (bah);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There are two ouputs &lt;code&gt;foo&lt;/code&gt; and &lt;code&gt;bah&lt;/code&gt;. Both should be zero (beacuse of the symmetries of the Riemann tensor). But only &lt;code&gt;bah&lt;/code&gt; is correctly given as zero. This seems like a bug to me.&lt;/p&gt;
&lt;p&gt;Cheers,
Leo&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2875/leading-scalar-expression-blocks-canonicalise</guid>
<pubDate>Tue, 11 Jun 2024 05:35:33 +0000</pubDate>
</item>
<item>
<title>How to copy output as tex format in jupyter notebook?</title>
<link>https://cadabra.science/qa/2871/how-to-copy-output-as-tex-format-in-jupyter-notebook</link>
<description>&lt;p&gt;Today, I try cadabra2 in jupyter, and it's very nice, but I don't know how to do copy output as tex format. &lt;/p&gt;
&lt;p&gt;Update: When I right-click the mouse, I can see &lt;code&gt;mathjax copy latex&lt;/code&gt;, but this just works when I run cell, and it just can copy the final result.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2871/how-to-copy-output-as-tex-format-in-jupyter-notebook</guid>
<pubDate>Mon, 27 May 2024 16:38:47 +0000</pubDate>
</item>
<item>
<title>imp package was removed from python 3.12</title>
<link>https://cadabra.science/qa/2863/imp-package-was-removed-from-python-3-12</link>
<description>&lt;p&gt;Hi!
I've find out that imp package was removed from python 3.12, and I can't import cdb.core.manip any more because the following error appears:
&lt;code&gt;ModuleNotFoundError: No module named 'imp'&lt;/code&gt;
imp module is deprecated in favour of importlib. &lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2863/imp-package-was-removed-from-python-3-12</guid>
<pubDate>Sat, 18 May 2024 18:30:19 +0000</pubDate>
</item>
<item>
<title>Why does evaluate of metric eating vector shows only non-zero components.</title>
<link>https://cadabra.science/qa/2855/does-evaluate-metric-eating-vector-shows-only-zero-components</link>
<description>&lt;p&gt;I do not understand why g(.,v) only shows non-zero components after evaluation.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{m,n,a,b,c,r,s}::Indices(values={0,1,2,3}).
#
g_{a b}::Metric.
g^{a b}::InverseMetric.
#
g:=[g_{0 0}=-1, g_{0 1}=0, g_{0 2}=1, g_{0 3}=0, g_{1 0}=0,  g_{1 1}=1, g_{1 2}=0, g_{1 3}=0, g_{2 0}=1, g_{2 1}=0, g_{2 2}=1, g_{2 3}=0, g_{3 0}=0, g_{3 1}=0, g_{3 2}=0, g_{3 3}=1].
v:=[v^{0}=1, v^{1}=1, v^{2}=1, v^{3}=1];
display(v)
ex:=g_{a b} v^{a};
evaluate(ex,join(g,v), rhsonly=True);&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;OUTPUT gives
□_{b}
    {1} = 1
    {2} = 2
    {3} = 1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Setting g00=1 (tather than -1 above) gives &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;□_{b}
    {0} = 2
    {1} = 1
    {2} = 2
    {3} = 1&lt;/code&gt;&lt;/pre&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2855/does-evaluate-metric-eating-vector-shows-only-zero-components</guid>
<pubDate>Tue, 14 May 2024 20:17:56 +0000</pubDate>
</item>
</channel>
</rss>