<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Cadabra Q&amp;A - Recent questions without answers</title>
<link>https://cadabra.science/qa/unanswered</link>
<description>Powered by Question2Answer</description>
<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>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>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>convert other format to cadabra2 format</title>
<link>https://cadabra.science/qa/2833/convert-other-format-to-cadabra2-format</link>
<description>&lt;p&gt;From &lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/notebooks/scalar_manipulations.html&quot;&gt;Using Cadabra and Sympy together&lt;/a&gt;, I learn how to convert cadabra2 format to sympy format, but how to do the reverse operation? I.e. How to convert other formals, e.g. sympy format, to cadabra2 format?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2833/convert-other-format-to-cadabra2-format</guid>
<pubDate>Wed, 24 Apr 2024 13:31:05 +0000</pubDate>
</item>
<item>
<title>bug of stop evaluation</title>
<link>https://cadabra.science/qa/2821/bug-of-stop-evaluation</link>
<description>&lt;p&gt;When I use &lt;code&gt;stop evaluation&lt;/code&gt; to stop evaluation, but it never works.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2821/bug-of-stop-evaluation</guid>
<pubDate>Sun, 21 Apr 2024 11:50:54 +0000</pubDate>
</item>
<item>
<title>question about keep_weight</title>
<link>https://cadabra.science/qa/2814/question-about-keep_weight</link>
<description>&lt;p&gt;In the following code,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{u,v,x}::Coordinate.
f::Coordinate.
{a,b,c,d,e,g,h,p,r#}::Indices(full,values={u,v,x},position=independent).
\partial{#}::PartialDerivative.
\nabla{#}::Derivative.
g_{a b}::Metric.
g^{a b}::InverseMetric.
g_a^b::KroneckerDelta.
g^a_b::KroneckerDelta.
g^{a b}::Symmetric.
g_{a b}::Symmetric.
{n_u,n_v,\gamma,w,\alpha,\lambda,A,B,C}::Depends({u,v,f,x}).

{u,v}::Weight(label=field,value=1);
{f}::Weight(label=field,value=2);

metric:={g_{u v}=1,
         g_{v u}=1,g_{v v}=-u**2\alpha,g_{v x}=u w,
         g_{x v}=u w,g_{x x}=\gamma};   
complete(_,$g^{a b}$);

from cdb.sympy.calculus import *

lamb:=(g^{a b}\partial_a{u v}\partial_b{u v})**{-1/2} ;
evaluate(_,metric,rhsonly=True);
substitute(_,$v-&amp;gt;f/u$)
simplify(_);
substitute(_,$\alpha-&amp;gt;a,w**2\gamma**{-1}-&amp;gt;b$);
series(_,$f$,0,5/2);
substitute(_,$\bigO(A??)-&amp;gt;0$)
keep_weight(_,$field=1$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The final result is not right. There seems to be something wrong here.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2814/question-about-keep_weight</guid>
<pubDate>Fri, 19 Apr 2024 03:46:06 +0000</pubDate>
</item>
<item>
<title>Setting Python version in cmake</title>
<link>https://cadabra.science/qa/2803/setting-python-version-in-cmake</link>
<description>&lt;p&gt;I'm the cadabra2 port maintainer for MacPorts. The update to version 2.4.5.6 has caused an issue:
Rather than picking up the MacPorts version of Python (it was set to 3.11 for the previous release, but should be updated to version 3.12, as that's now default), the cmake script picks up the macOS version instead (on my Ventura system, that would be 3.9.6). I can properly set &lt;code&gt;-DPYTHON_LIBRARIES&lt;/code&gt; and &lt;code&gt;-DPYTHON_SITE_PATH&lt;/code&gt;, but I don't see a way of choosing the path to the python binary.&lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/2803/setting-python-version-in-cmake</guid>
<pubDate>Thu, 18 Apr 2024 13:39:33 +0000</pubDate>
</item>
<item>
<title>bug of function keep_weight</title>
<link>https://cadabra.science/qa/2788/bug-of-function-keep_weight</link>
<description>&lt;p&gt;The following code: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{u,v}::Weight(label=field,value=1);
ex:=(u v)**{1/2};
keep_weight(_,$field=1$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get the wrong result $0$, while the following code &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{u,v}::Weight(label=field,value=1);
ex:=(u v)**{1/2}+u u;
keep_weight(_,$field=1$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;work fine. It seems a bug.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2788/bug-of-function-keep_weight</guid>
<pubDate>Wed, 17 Apr 2024 09:38:20 +0000</pubDate>
</item>
<item>
<title>Question about Gaussian normal coordinate</title>
<link>https://cadabra.science/qa/2774/question-about-gaussian-normal-coordinate</link>
<description>&lt;p&gt;When I do calculation under Gaussian normal coordinate:&lt;/p&gt;
&lt;p&gt;$$
d s^2=-2 d u d v-u^2\alpha(x) d v^2-2u w_i(x) dv dx^i+\gamma_{ij}(x) d x^i d x^j\,\quad x=(uv\,,x^i)
$$&lt;/p&gt;
&lt;p&gt;How to get inverse metric and others directly? I don't know how to deal with $w_i$ and $\gamma_{ij}$.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2774/question-about-gaussian-normal-coordinate</guid>
<pubDate>Thu, 11 Apr 2024 07:20:30 +0000</pubDate>
</item>
<item>
<title>Output not displaying as rendered latex</title>
<link>https://cadabra.science/qa/2739/output-not-displaying-as-rendered-latex</link>
<description>&lt;p&gt;I am not sure when this started as far as what was upgraded.  In Jupyterlab all output is showing as latex statements inside $$s and not rendering.   &lt;/p&gt;
&lt;p&gt;If I copy the output and paste it into a markdown cell it renders correctly.  &lt;/p&gt;
&lt;p&gt;I.E. 
{\mu,\nu,\rho}::Indices(position=free).
x::Coordinate.
\partial{#}::Derivative.&lt;/p&gt;
&lt;p&gt;F&lt;em&gt;{\mu\nu}::AntiSymmetric;
F&lt;/em&gt;{\mu\nu}::Depends(x).
A_{\mu}::Depends(x,\partial{#}).
\delta{#}::Accent;&lt;/p&gt;
&lt;p&gt;Output: 
${}\text{Property Accent attached to}\delta{#}.$&lt;/p&gt;
&lt;p&gt;Input:
S:= -1/4 \int{ F_{\mu\nu} F^{\mu\nu} }{x};&lt;/p&gt;
&lt;p&gt;Output:
${} - \frac{1}{4}\int F^{\mu \nu} F_{\mu \nu}\,\,{\rm d}x$&lt;/p&gt;
&lt;p&gt;If I view the file in Jupyter notebook the code renders correctly.&lt;/p&gt;
&lt;p&gt;?? Thanks,
ChuckW&lt;/p&gt;
&lt;p&gt;When I posted this the 2nd example output rendered correctly in the post but not in Jupyterlab?&lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/2739/output-not-displaying-as-rendered-latex</guid>
<pubDate>Thu, 15 Feb 2024 18:26:19 +0000</pubDate>
</item>
<item>
<title>How to create derivatives of coordinates with indices?</title>
<link>https://cadabra.science/qa/2738/how-to-create-derivatives-of-coordinates-with-indices</link>
<description>&lt;p&gt;I have two sets of coordinates, and two partial derivatives which can act on these coordinates. These should work in a way such that:&lt;/p&gt;
&lt;p&gt;$$ 
\partial_{x^{\mu}} x^{\nu} = \delta_{\mu}^{\nu} = \partial_{a&lt;em&gt;{\nu}} a\&lt;/em&gt;{\mu}. 
$$&lt;/p&gt;
&lt;p&gt;How would I go about implementing this in Cadabra? I've tried defining partial derivatives of corresponding coordinates directly, I've tried using notation like DX and DA to differentiate between the two and then using LaTeXform to make it more tidy but I inadvertently run into a stop of some sort. &lt;/p&gt;
&lt;p&gt;Any and all help will be greatly appreciated!&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2738/how-to-create-derivatives-of-coordinates-with-indices</guid>
<pubDate>Thu, 15 Feb 2024 17:28:42 +0000</pubDate>
</item>
<item>
<title>Efficiency in python vs cadabra for long substitution rules</title>
<link>https://cadabra.science/qa/2643/efficiency-in-python-vs-cadabra-for-long-substitution-rules</link>
<description>&lt;p&gt;I am applying a list of complicated substitution rules in cadabra. Schematically, these rules look like A_{i} -&amp;gt; (long expression) for some number (say 100) of the A_i. But the expression is very long.&lt;/p&gt;
&lt;p&gt;I find that there is a surprising amount of time communicating with the Cadabra server in trying to apply these rules, versus looking for the rule myself.&lt;/p&gt;
&lt;p&gt;Here is a sample code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;megasum := x+y.
for i in range(10000):
   megasum.top().append_child(Ex( r'B'+str(i) ))    

rules = []
for i in range(100):
   rules.append(Ex( r'A'+str(i)+'-&amp;gt; @(megasum)' ))

cdbrules = ListToExList(rules)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;All the rules in lst are of the form A_i (from A0 to A99) going to the same giant sum.  Then I use my Python function ListToExList to convert a Python list to a cadabra list.&lt;/p&gt;
&lt;p&gt;On my laptop, the command&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;substitute($A0$, cdbrules)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;requires about 600,000 us to run, and it appears independent of whether I give it A0 to act on or A99.&lt;/p&gt;
&lt;p&gt;On the other hand, if on the Python side, I manually search the list for a rule that applies, it seems to run in about 60,000 us (in the worst case) and 5,000 us (in the best case) depending on if I find the rule quickly or not. A simple implementation:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := A0.
for i in range(len(keys)):
    if keys[i].matches(ex):
        substitute(ex, rules[i])
        break
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where keys is a list of the LHS of the rules.&lt;/p&gt;
&lt;p&gt;I'm trying to understand where the hangup is. My first thought is that Python has to be communicating the entire gargantuan cdbrules, and this is the bottleneck. However, I had the sense from the code that pointers are being used (or aliases to the objects) so that no actual copying is occurring. Does anyone have any ideas?&lt;/p&gt;
&lt;p&gt;Apologies in advance for the rather ill-defined question...&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2643/efficiency-in-python-vs-cadabra-for-long-substitution-rules</guid>
<pubDate>Thu, 30 Nov 2023 19:00:07 +0000</pubDate>
</item>
<item>
<title>Hodge dual in exterior calculus</title>
<link>https://cadabra.science/qa/2637/hodge-dual-in-exterior-calculus</link>
<description>&lt;p&gt;I am new to Cadabra and want to derive the Maxwell equations using exterior calculus. I've looked at the tutorials and searched the reference manual but I cannot figure out how to express the Hodge dual.&lt;/p&gt;
&lt;p&gt;-erik&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2637/hodge-dual-in-exterior-calculus</guid>
<pubDate>Wed, 29 Nov 2023 18:40:35 +0000</pubDate>
</item>
<item>
<title>Complex scalar field (Klein-Gordon, Schrodinger, Higgs...)</title>
<link>https://cadabra.science/qa/2557/complex-scalar-field-klein-gordon-schrodinger-higgs</link>
<description>&lt;p&gt;Hello! One of the simplest (if not the simplest) examples of classical field theory is the complex scalar Klein-Gordon field, the relativistic version of the classical Schrodinger field. 
Now, Cadabra seems great for General Relativity, the DIrac field, the elecgtromagnetic field... but I see no clear treatment of complex scalars. 
It would be amazing if the tutorial would include a simple example with the Klein-Gordon field (i.e. how to find the Klein-Gordon equation given the action). This is done in the tutorial for the free classical Maxwell field, having another example would be great.&lt;/p&gt;</description>
<category>Feature requests</category>
<guid isPermaLink="true">https://cadabra.science/qa/2557/complex-scalar-field-klein-gordon-schrodinger-higgs</guid>
<pubDate>Fri, 20 Oct 2023 15:56:27 +0000</pubDate>
</item>
<item>
<title>Lie derivative in Cadabra</title>
<link>https://cadabra.science/qa/2533/lie-derivative-in-cadabra</link>
<description>&lt;p&gt;Hi,
I couldn't find any mention of the Lie derivative in any documentation of Cadabra (this website, github, additional literature).
I'm trying to write a method that expands the expression Lie_V{\&amp;lt;tensor-with_free_indices&amp;gt;} into the formula of the &lt;a rel=&quot;nofollow&quot; href=&quot;https://en.wikipedia.org/wiki/Lie_derivative#Coordinate_expressions&quot;&gt;Lie derivative with partial derivatives&lt;/a&gt;. The method will be something like
expand_Lie(ex,$V$,$m$)
The first argument is some expression that has inside &quot;L{...}&quot;, the second argument is the vector, and the third argument is for a dummy index.&lt;/p&gt;
&lt;p&gt;I started working with the code in p.36 of &quot;The Cadabra Book.pdf&quot; (by Peeters) - this implements expansion of the covariant derivative (nabla).&lt;/p&gt;
&lt;p&gt;I need help to add a dummy index to the first term (replacing &quot;L{..}&quot;) and multiplying it by the vector. My code currently changes the name &quot;L&quot; into the &quot;v^{p} \partial_{p}&quot; but I think this is incorrect.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def expand_Lie(ex,v,dummy):
    for Lie in ex[&quot;L&quot;]:
        Lie.name=r&quot;v^{p} \partial_{p}&quot;
        #Lie.indices().add(@(dummy)})
        #Lie *= v^{@(dummy)}
        for arg in Lie.args():
            ret:=0;
            for index in arg.free_indices():
                t2:= @(arg);
                if index.parent_rel==sub:
                    t1:= \partial_{@(index)}{v^{@(dummy)}};
                    t2[index]:= _{@(dummy)};
                else:
                    t1:= -\partial_{@(dummy)}{v^{@(index)}};
                    t2[index]:= ^{@(dummy)};
                ret += Ex(str(Lie.multiplier)) * t1 * t2
            Lie += ret
    return ex&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;`&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2533/lie-derivative-in-cadabra</guid>
<pubDate>Tue, 22 Aug 2023 20:29:20 +0000</pubDate>
</item>
<item>
<title>Windows 11 source install</title>
<link>https://cadabra.science/qa/2516/windows-11-source-install</link>
<description>&lt;p&gt;I've been following the instructions in the git release's readme.rst and setting up to build cababra on windows, but I ran into an issue at the step:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
    cmake -DCMAKE_TOOLCHAIN_FILE=C:/Users/chris/vcpkg/scripts/buildsystems/vcpkg.cmake
          -DCMAKE_BUILD_TYPE=RelWithDebInfo 
          -DVCPKG_TARGET_TRIPLET=x64-windows 
          -DCMAKE_INSTALL_PREFIX=C:\Cadabra
          -G &quot;Visual Studio 17 2022&quot; -A x64 ..&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It runs fine until I get the error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;-------------------------------------------
  Configuring packages
-------------------------------------------
-- Storing algorithm C++ module as core
-- Storing algorithm C++ module as utils
CMake Error at cmake/functions.cmake:11 (install):
  Syntax error in cmake code at

    C:/Users/chris/cadabra2/cmake/functions.cmake:12

  when parsing string

    C:\Users\chris\anaconda3

  Invalid character escape '\U'.
Call Stack (most recent call first):
  core/CMakeLists.txt:428 (install_directory_permissions)


-- Configuring incomplete, errors occurred!&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not sure how to get around this, looking online suggests it is some forward slash and backslash confusion between windows and cmake when specifying directories.&lt;/p&gt;
&lt;p&gt;Any help would be great!&lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/2516/windows-11-source-install</guid>
<pubDate>Tue, 06 Jun 2023 13:36:55 +0000</pubDate>
</item>
<item>
<title>Autocomplete on Jupyter Notebook acting weird</title>
<link>https://cadabra.science/qa/2499/autocomplete-on-jupyter-notebook-acting-weird</link>
<description>&lt;p&gt;Whenever I try to use autocompletion on Jupyter notebooks it always autocompletes with &quot;a.echo1&quot; or by appending &quot;ho1&quot; to the last &quot;a.echo1&quot; it autocompleted. Has autcomplete been integrated in the Jupyter kernel yet or is there something wrong with my setup? Thank you&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2499/autocomplete-on-jupyter-notebook-acting-weird</guid>
<pubDate>Tue, 25 Apr 2023 11:04:30 +0000</pubDate>
</item>
<item>
<title>Partial derviative indices issues</title>
<link>https://cadabra.science/qa/2459/partial-derviative-indices-issues</link>
<description>&lt;p&gt;As a new user of Cadabra I am a bit confused what is going on with the following code.  I am trying to repeat the steps done in Schutz's GR book for equations 6.63 - 6.67 as shown below.&lt;/p&gt;
&lt;p&gt;Note I have edited my original post and added print outputs for when I substitute Gammpd into the equation for R.  Cut and paste of my outputs produced garbage.  &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u#}::Indices(name=fixed,position=fixed).
{\alpha,\beta,\nu,\mu,\sigma}::Indices(name=fixed,position=fixed);
{\rho,\delta,\kappa,\theta}::Indices(name=fixed,position=fixed);

\partial{#}::PartialDerivative.

\Gamma^{a}_{b c}::TableauSymmetry(shape={2}, indices={1,2});

g_{a b}::Metric.



;::Symbol;
            # see https://cadabra.science/qa/473/is-this-legal-syntax
            # this code works with and without this trick&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;R := R^{\alpha}_{\beta \mu \nu} -&amp;gt; \partial_{\mu}{\Gamma^{\alpha}_{\beta \nu}}  
                                -\partial_{\nu}{\Gamma^{\alpha}_{\beta \mu}}  
                                +\Gamma^{\alpha}_{\sigma \mu} \Gamma^{\sigma}_{\beta \nu}  
                                -\Gamma^{\alpha}_{\sigma \nu} \Gamma^{\sigma}_{\beta \mu};

 exp := R^{\alpha}_{\beta \mu \nu};

 substitute(exp,R);

 Gammapd := \partial_{\sigma}{\Gamma^{\alpha}_{\mu \nu}} -&amp;gt; (1/2) g^{\alpha \beta}  
            (\partial_{\nu \sigma}{g_{\beta \mu}} + \partial_{\mu \sigma}{g_{\beta \nu}}  
            -\partial_{\beta \sigma}{g_{\mu \nu}});

 substitute(exp,Gammapd);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Doing the above results in :&lt;/p&gt;
&lt;p&gt;1/2 g^{α β}(\partial&lt;em&gt;{ν μ}(g&lt;/em&gt;{β β})) -  1/2 g^{α β}(\partial&lt;em&gt;{μ ν}(g&lt;/em&gt;{β β})) + Γ^{α}&lt;em&gt;{σ μ} Γ^{σ}&lt;/em&gt;{β ν}-Γ^{α}&lt;em&gt;{σ ν} Γ^{σ}&lt;/em&gt;{β μ}&lt;/p&gt;
&lt;p&gt;Using the following for Gammapd I get what I think is correct.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Gammapd := \partial_{\sigma}{\Gamma^{\alpha}_{\mu \nu}} -&amp;gt; (1/2) g^{\alpha a}  
            (\partial_{\nu \sigma}{g_{a \mu}} + \partial_{\mu \sigma}{g_{a \nu}}  
            -\partial_{a \sigma}{g_{\mu \nu}});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;1/2 g^{α a}(\partial&lt;em&gt;{ν μ}(g&lt;/em&gt;{a β}) + \partial&lt;em&gt;{β μ}(g&lt;/em&gt;{a ν})-\partial&lt;em&gt;{a μ}(g&lt;/em&gt;{β ν})) -  1/2 g^{α a}(\partial&lt;em&gt;{μ ν}(g&lt;/em&gt;{a β}) + \partial&lt;em&gt;{β ν}(g&lt;/em&gt;{a μ})-\partial&lt;em&gt;{a ν}(g&lt;/em&gt;{β μ})) + Γ^{α}&lt;em&gt;{σ μ} Γ^{σ}&lt;/em&gt;{β ν}-Γ^{α}&lt;em&gt;{σ ν} Γ^{σ}&lt;/em&gt;{β μ}&lt;/p&gt;
&lt;p&gt;Note here that that \partial&lt;em&gt;{ν μ}(g&lt;/em&gt;{a β}) should cancel out with \partial&lt;em&gt;{μ ν}(g&lt;/em&gt;{a β}. In Shutz we are considering the inertial frame so all the Gammas = 0.&lt;/p&gt;
&lt;p&gt;From Schutz: (the alpha on R is contravariant as are the metric's alpha sigma indices)&lt;/p&gt;
&lt;p&gt;Rα βμν = 12 gασ (gσβ,νμ + gσ ν,βμ − gβν,σ μ
− gσβ,μν − gσ μ,βν + gβμ,σ ν ).
(6.65)&lt;/p&gt;
&lt;p&gt;I would paste pictures of the Schutz equation and of my output but I can't seem to do that here and I'm not sure why?&lt;/p&gt;
&lt;p&gt;I have also used:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Gammapd := \partial_{\sigma}{\Gamma^{\alpha}_{\mu \nu}} -&amp;gt; (1/2) g^{a b}  
            (\partial_{c d}{g_{b e}} + \partial_{e d}{g_{b c}}  
            -\partial_{b d}{g_{e c}});&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;for my substitution and for that I get:
Γ^{α}&lt;em&gt;{σ μ} Γ^{σ}&lt;/em&gt;{β ν}-Γ^{α}&lt;em&gt;{σ ν} Γ^{σ}&lt;/em&gt;{β μ} &lt;/p&gt;
&lt;p&gt;only the Gamma terms?  &lt;/p&gt;
&lt;p&gt;Do I somehow have to use Depends or something to get this to work.  Why are the terms with the double partial derivatives not canceling when the indices are symmetric?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2459/partial-derviative-indices-issues</guid>
<pubDate>Mon, 20 Feb 2023 20:14:18 +0000</pubDate>
</item>
<item>
<title>How to add new properties: &quot;Normal&quot; and &quot;Othogonal&quot;</title>
<link>https://cadabra.science/qa/2327/how-to-add-new-properties-normal-and-othogonal</link>
<description>&lt;p&gt;Hi, I want to know how to code properly for Cadabra. I read the section on programming in &quot;The Cadabra Book&quot; pdf but I need a little more explanation on programming new properties (like &quot;::Coordinate&quot;)&lt;/p&gt;
&lt;p&gt;I want to generate two new properties&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;Normal&quot; can be applied to a 1D tensor (vector or covector)&lt;/li&gt;
&lt;li&gt;&quot;Orthogonal&quot; can be applied to any tensor (that is not a scalar)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then if I have an expression with contraction of two tensors then I will write a function such that&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;if the two tensors are normal vectors then their contraction is -1&lt;/li&gt;
&lt;li&gt;if one tensor is orthogonal and the other is a normal (co)vector then their contraction is 0&lt;/li&gt;
&lt;/ol&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2327/how-to-add-new-properties-normal-and-othogonal</guid>
<pubDate>Fri, 23 Sep 2022 09:51:43 +0000</pubDate>
</item>
<item>
<title>Questions about KroneckerDelta</title>
<link>https://cadabra.science/qa/2326/questions-about-kroneckerdelta</link>
<description>&lt;p&gt;The following codes &lt;/p&gt;
&lt;p&gt;&lt;code&gt;{t,x,y,z,r}::Coordinate; \delta{#}::KroneckerDelta. {i,j,k,l,m,n,o,p,q,s#}::Indices(fourD,values={t,x,y,z},position=independent); {i,j,k,l,m,n,o,p,q,s#}::Integer(range=0..3) xx:=\delta^1_1^2_2; evaluate(_); &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;give me the ouput :
&lt;code&gt;0&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;But, in my opinion I should get the value &lt;code&gt;1/2&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Further, I run &lt;/p&gt;
&lt;p&gt;&lt;code&gt;xx2:=\delta^1_1^2_2; expand_delta(_); eliminate_kronecker(_); evaluate(_); &lt;/code&gt;
at last, I get&lt;/p&gt;
&lt;p&gt;&lt;code&gt;RuntimeError: evaluate: Index 1 does not have an Indices property. At: Notebook Cell (Line 1): _ = evaluate(_); display(_) &lt;/code&gt;&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2326/questions-about-kroneckerdelta</guid>
<pubDate>Tue, 13 Sep 2022 06:31:33 +0000</pubDate>
</item>
<item>
<title>Issue in sort_product() with AntiCommuting indices.</title>
<link>https://cadabra.science/qa/2325/issue-in-sort_product-with-anticommuting-indices</link>
<description>&lt;p&gt;I have the need for anti-commuting derivatives and objects so am trying to use anti-commuting indices instead of making the objects/derivatives themselves anti-commuting. product_rule() works as expected\, but I've found issues in sort_product() with this approach.&lt;/p&gt;
&lt;p&gt;For example see the following code where I try sorting with various combinations of anti-commuting spinor indices and commuting vector indices.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\alpha, \beta, \rho, \lambda}::Indices(spinor, position=independent).
{\alpha, \beta, \rho, \lambda}::AntiCommuting.
{a, b, c}::Indices(vector, position=free).
\nabla{#}::Derivative.
{X{#}}::Depends(\nabla{#}).

zeroDer := X^{\alpha} X^{\beta} + X^{\beta} X^{\alpha};
sort_product(_);

oneDerSpinor := \nabla_{\alpha}(X^{\beta}) X^{\rho} + X^{\rho}\nabla_{\alpha}(X^{\beta});
sort_product(_);

oneDerVector := \nabla_{a}(X^{\beta}) X^{\rho} + X^{\rho}\nabla_{a}(X^{\beta});
sort_product(_);

twoDerSpinor := \nabla_{\lambda}(\nabla_{\alpha}(X^{\beta})) X^{\rho} + X^{\rho}\nabla_{\lambda}(\nabla_{\alpha}(X^{\beta}));
sort_product(_);

twoDerVector:= \nabla_{a}(\nabla_{b}(X^{\beta})) X^{\rho} + X^{\rho}\nabla_{a}(\nabla_{b}(X^{\beta}));
sort_product(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You'll find that some of these combine correctly while some do not. If I attach AntiCommuting to X, it fixes some while breaking others. If my approach is incorrect, I'd greatly appreciate any other suggestions on how to handle AntiCommuting derivatives. I'm on macOs using Cadabra 2.3.8.&lt;/p&gt;
&lt;p&gt;Thank you!
Greg&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2325/issue-in-sort_product-with-anticommuting-indices</guid>
<pubDate>Fri, 19 Aug 2022 08:16:23 +0000</pubDate>
</item>
<item>
<title>Cadabra 2 notebooks and REPL more responsive than script interpreter</title>
<link>https://cadabra.science/qa/2288/cadabra-notebooks-repl-more-responsive-script-interpreter</link>
<description>&lt;p&gt;I am having some trouble using the &lt;code&gt;diff&lt;/code&gt; command. If run Cadabra2 REPL with &lt;code&gt;cadabra2&lt;/code&gt; it works just fine:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; ex:= A*A + B + C;
A A + B + C
&amp;gt; diff(ex, $A$);
2*A&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Same with the GTK GUI. I would expect it to do the same if I put my commands into a &lt;code&gt;.cdb&lt;/code&gt; file and ran &lt;code&gt;cadabra2 file.cdb&lt;/code&gt;. File contents are&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:= A*A + B + C;
diff(ex, $A$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;so exactly the same thing, but &lt;code&gt;diff&lt;/code&gt; just spits the original expression back at me instead:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cadabra2 file.cdb
A A + B + C
A A + B + C&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It seems to just echo the last expression before the diff command; if I put some other expression in between the two,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:= A*A + B + C;
foo:= B;
diff(ex, $A$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the output is&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ cadabra2 file.cdb
A A + B + C
B
B&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Surely this is not intentional?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2288/cadabra-notebooks-repl-more-responsive-script-interpreter</guid>
<pubDate>Sun, 22 May 2022 21:11:05 +0000</pubDate>
</item>
<item>
<title>Metric after coordinate transformation</title>
<link>https://cadabra.science/qa/2043/metric-after-coordinate-transformation</link>
<description>&lt;p&gt;Hi,
I'm trying to figure out how to use Cadabra for the following:
I defined a set of coordinate variables (e.g. {t,r,\theta,\phi}) and an explicit metric replacement statement, e.g. Schwarzschild metric:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;g&lt;em&gt;schw :={g&lt;/em&gt;{t t}=-(1-R/r). g&lt;em&gt;{r r}=(1-R/r)**(-1), g&lt;/em&gt;{\theta \theta}=...}
complete(g_schw, $g^{\mu \nu}$);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have a formula for transformation from said coordinates into &lt;a rel=&quot;nofollow&quot; href=&quot;https://en.wikipedia.org/wiki/Schwarzschild_metric#Alternative_coordinates&quot;&gt;harmonic coordinates&lt;/a&gt; (Y0,Y1,Y2,Y3) 
(or Kruskal coordinates (T,X,\theta,\phi), or whatever...)
I want to calculate the metric in the new coordinates, say h_{m n} (0&amp;lt;=m,n&amp;lt;=3).&lt;/p&gt;
&lt;p&gt;The best I have so far (code below) is &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;make substitution rules for Y0(t,r,\theta,\phi)...Y3(t,r,\theta,\phi)&lt;/li&gt;
&lt;li&gt;use the substitute and evaluate method to evaluate the inverse metric
h^{m n} = g^{\mu \nu} &lt;em&gt; partial_{mu}{Y^{m}} &lt;/em&gt; partial_{nu}{Y^{n}}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;However&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Cadabra constructs the new expression for the tensor with the indices values of [t,r,\theta,\phi] instead of [0,1,2,3]&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I can't use complete to calculate h_{m n} from h^{m n}. The complete method doesn't work.&lt;/p&gt;
&lt;p&gt;{t,r,\theta,\phi}::Coordinate
{\mu,\nu,\rho,\sigma,\kappa,\xi,\zeta}::Indices(position=fixed,values=[t,r,\theta,\phi]);
{g&lt;em&gt;{\mu \nu},h&lt;/em&gt;{\mu \nu}}::Metric;
{g^{\mu \nu},h^{\mu \nu}::InverseMetric;
{g&lt;em&gt;{\mu}^{\nu},h&lt;/em&gt;{\mu}^{\nu}}::KroneckerDelta;
\partial{#}::PartialDerivative.
x_Y&lt;em&gt;schw := {X^{t}=t, X^{r}=r, X^{\theta}=\theta, X^{\phi}=\phi, Y^{t}=c t, Y^{r}=(r-R0/2) sin(\theta) cos(\phi), Y^{\theta}=(r-R0/2) sin(\theta) sin(\phi), Y^{\phi}=(r-R0/2) cos(\theta)};
{Y^{#}}::Depends(r,t,\theta,\phi);
evaluate($\partial&lt;/em&gt;{\mu}{Y^{\nu}}$, x_Y_schw);
g&lt;em&gt;schw := {g&lt;/em&gt;{t t}=-c&lt;strong&gt;2 * (1-R0/r), g&lt;em&gt;{r r}=(1-R0/r)**(-1), g&lt;/em&gt;{\theta \theta}=r&lt;strong&gt;2, g_{\phi \phi}=r&lt;/strong&gt;2 * (sin(\theta))&lt;/strong&gt;2};
complete(g_schw, $g^{\mu \nu}$);
h&lt;em&gt;harm := h^{\rho \sigma} -&amp;gt; \partial&lt;/em&gt;{\mu}{Y^{\rho}} \partial_{\nu}{Y^{\sigma}} g^{\mu \nu};
evaluate(h_harm, g_schw + x_Y_schw,rhsonly=True);
complete(h&lt;em&gt;harm, $h&lt;/em&gt;{\rho \sigma}$);&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2043/metric-after-coordinate-transformation</guid>
<pubDate>Sun, 26 Sep 2021 14:02:58 +0000</pubDate>
</item>
<item>
<title>Matching expressions with variable index ranges</title>
<link>https://cadabra.science/qa/2038/matching-expressions-with-variable-index-ranges</link>
<description>&lt;p&gt;I am trying to write a substitution that does essentially the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\gamma_{a}_{\alpha \beta} \gamma_{b}^{\beta \gamma} -&amp;gt;  X_{a b}_{\alpha}^{\gamma}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but with $a$ and $b$ allowed to be a range of vector indices, e.g. I want to also encompass&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\gamma_{a1 a2 a3}_{\alpha \beta} \gamma_{b}^{\beta \gamma} -&amp;gt;  X_{a1 a2 a3 b}_{\alpha}^{\gamma}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and so on. I can of course define this for all possible collective indices a_i and b_i, or introduce some intermediate kluge, but I suspect there ought to be a compact, elegant way of doing this. My initial instinct was to try&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\gamma_{A??}_{\alpha \beta} \gamma_{B??}^{\beta \gamma} -&amp;gt;  X_{A?? B??}_{\alpha}^{\gamma}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but this doesn't seem to work. Any ideas of a simple solution?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2038/matching-expressions-with-variable-index-ranges</guid>
<pubDate>Mon, 20 Sep 2021 15:31:47 +0000</pubDate>
</item>
<item>
<title>Problems with substitute and kronecker</title>
<link>https://cadabra.science/qa/2034/problems-with-substitute-and-kronecker</link>
<description>&lt;p&gt;Hi,
i'm having some problems with the program. Currently, i'm using it to calculate one-loop diagrams in quantum gravity. The problems are that the kronecker delta does not completely disappear and that sometimes the algorithm &quot;substitute&quot; does not work. I have installed the software following the steps in the link &quot;kpeeters/cadabra2&quot; in the section &quot;download&quot; of the site. To be more precise, let $\Gamma_{\alpha\beta}$ be the 2-scalar-1 graviton vertex and $\Gamma_{\alpha\beta\mu\nu}$ be the 2 scalar- 2 graviton vertex. In the contraction $\Gamma_{\alpha\beta}\Gamma^{\alpha\beta\mu\nu}$, the substitution of $\Gamma_{\alpha\beta\mu\nu}$ occurs (sometimes) only after the distribute algorithm. I was thinking about the length of the components but I'm not sure. I have tried the combinations indices=free or fixed but it does not change. Kronecker delta still remains in every test.
I hope in your response and I thank you in advance&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2034/problems-with-substitute-and-kronecker</guid>
<pubDate>Wed, 15 Sep 2021 09:16:11 +0000</pubDate>
</item>
<item>
<title>Getting list of arguments of functions</title>
<link>https://cadabra.science/qa/2029/getting-list-of-arguments-of-functions</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The &quot;evaluate&quot; function has several arguments, like the parameter rhsonly that appears in different manuals I read. In the official documentation 
&lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/manual/evaluate.html&quot;&gt;https://cadabra.science/manual/evaluate.html&lt;/a&gt;
it isn't listed.
I also went over the different pdf documents and didn't find a complete list of the arguments and their meaning.&lt;/p&gt;
&lt;p&gt;Is there a document with a more thorough description of all the usable functions for Cadabra?&lt;/p&gt;
&lt;p&gt;Alternatively, is there a way to get a list of arguments of an arbitrary function (like python's inspect)?&lt;/p&gt;
&lt;p&gt;Thanks in advance,
Amnon&lt;/p&gt;</description>
<category>Feature requests</category>
<guid isPermaLink="true">https://cadabra.science/qa/2029/getting-list-of-arguments-of-functions</guid>
<pubDate>Mon, 06 Sep 2021 11:39:31 +0000</pubDate>
</item>
<item>
<title>Trouble with Dummy-Index Manipulation within Index Brackets and Partial Derivatives</title>
<link>https://cadabra.science/qa/2026/trouble-manipulation-within-brackets-partial-derivatives</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am having difficulties with canonicalizing dummy indices on expressions involving index brackets. In particular, I want to canonicalize indices in a term involving a factor with no symmetries but with dummy indices shared with a gamma matrix, particularly for the purpose of combining with other terms with indices already arranged in canonical order. This works perfectly when no index brackets are present, as in the code sample below,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := \Gamma^{a b} \Psi_{b a} + \Gamma^{a b} \Psi_{a b};
canonicalise(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which gives&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Γ^{a b} Ψ_{b a} + Γ^{a b} Ψ_{a b}
0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, when index brackets are added, the expression is no longer canonicalized, and hence the terms are no longer combined, as in the code sample below,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := (\Gamma^{a b})_{\alpha \beta} (\Psi_{b a})_{\gamma \eta} + (\Gamma^{a b})_{\alpha \beta} (\Psi_{a b})_{\gamma \eta};
canonicalise(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which gives&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\indexbracket(Γ^{a b})_{α β} \indexbracket(Ψ_{b a})_{γ η} + \indexbracket(Γ^{a b})_{α β} \indexbracket(Ψ_{a b})_{γ η}
\indexbracket(Γ^{a b})_{α β} \indexbracket(Ψ_{b a})_{γ η} + \indexbracket(Γ^{a b})_{α β} \indexbracket(Ψ_{a b})_{γ η}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is there any way to fix this? I have tried to tease out a solution using an index substitution, which I know is &lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/qa/609/should-substitute-act-on-indices&quot;&gt;generally counter-recommended&lt;/a&gt; (rename_dummies() unfortunately does not help here),  as in the code below,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := (\Gamma^{a b})_{\alpha \beta} (\Psi_{b a})_{\gamma \eta};
substitute(ex, $_{a} -&amp;gt; _{b}, ^{a} -&amp;gt; ^{b}, _{b} -&amp;gt; _{a}, ^{b} -&amp;gt; ^{a}$);
canonicalise(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which successfully gives&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\indexbracket(Γ^{a b})_{α β} \indexbracket(Ψ_{b a})_{γ η}
\indexbracket(Γ^{b a})_{α β} \indexbracket(Ψ_{a b})_{γ η}
\indexbracket(-Γ^{a b})_{α β} \indexbracket(Ψ_{a b})_{γ η}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, applying this index substitution in the context of arithmetic is still a hurdle, and such an index substitution sometimes raises errors when partial derivatives are involved, as in the code below (I have removed the index brackets in order to isolate the feature that is triggering the error),&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := \Gamma_{b c} \Gamma^{b c d} \delta_{a}^{e} \partial_{e}(\Psi_{d});
substitute(ex, $_{e} -&amp;gt; _{b}, ^{e} -&amp;gt; ^{b}, _{b} -&amp;gt; _{c}, ^{b} -&amp;gt; ^{c}, _{c} -&amp;gt; _{d}, ^{c} -&amp;gt; ^{d}, _{d} -&amp;gt; _{e}, ^{d} -&amp;gt; ^{e}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which raises a triple index error. Note that the same code works with the partial derivative factor replaced, as in the code below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := \Gamma_{b c} \Gamma^{b c d} \delta_{a}^{e} \Psi_{e d};
substitute(ex, $_{e} -&amp;gt; _{b}, ^{e} -&amp;gt; ^{b}, _{b} -&amp;gt; _{c}, ^{b} -&amp;gt; ^{c}, _{c} -&amp;gt; _{d}, ^{c} -&amp;gt; ^{d}, _{d} -&amp;gt; _{e}, ^{d} -&amp;gt; ^{e}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Both the index-canonicalization issue with index brackets and the index-substitution issue with partial derivatives seem to have to do with recognizing vector indices and their symmetries within different branches of the ExNode tree structure of the expression. Am I making a mistake in my index handling? Is there any way to get around these issues?&lt;/p&gt;
&lt;p&gt;The full code for the above tests is shown below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e}::Indices(vector)
{a,b,c,d,e}::Integer(0..10)
{\alpha,\beta,\gamma,\eta}::Indices(spinor)
\partial{#}::PartialDerivative
\Psi{#}::Depends(\partial{#})
\Gamma_{#}::GammaMatrix(metric=\delta)
\delta{#}::KroneckerDelta

print('\ntest 1')
ex := \Gamma^{a b} \Psi_{b a} + \Gamma^{a b} \Psi_{a b};
canonicalise(ex);

print('\ntest 2')
ex := (\Gamma^{a b})_{\alpha \beta} (\Psi_{b a})_{\gamma \eta} + (\Gamma^{a b})_{\alpha \beta} (\Psi_{a b})_{\gamma \eta};
canonicalise(ex);

print('\ntest 3')
ex := (\Gamma^{a b})_{\alpha \beta} (\Psi_{b a})_{\gamma \eta};
substitute(ex, $_{a} -&amp;gt; _{b}, ^{a} -&amp;gt; ^{b}, _{b} -&amp;gt; _{a}, ^{b} -&amp;gt; ^{a}$);
canonicalise(ex);

print('\ntest 4')
ex := \Gamma_{b c} \Gamma^{b c d} \delta_{a}^{e} \Psi_{e d};
substitute(ex, $_{e} -&amp;gt; _{b}, ^{e} -&amp;gt; ^{b}, _{b} -&amp;gt; _{c}, ^{b} -&amp;gt; ^{c}, _{c} -&amp;gt; _{d}, ^{c} -&amp;gt; ^{d}, _{d} -&amp;gt; _{e}, ^{d} -&amp;gt; ^{e}$);

print('\ntest 5')
ex := \Gamma_{b c} \Gamma^{b c d} \delta_{a}^{e} \partial_{e}(\Psi_{d});
substitute(ex, $_{e} -&amp;gt; _{b}, ^{e} -&amp;gt; ^{b}, _{b} -&amp;gt; _{c}, ^{b} -&amp;gt; ^{c}, _{c} -&amp;gt; _{d}, ^{c} -&amp;gt; ^{d}, _{d} -&amp;gt; _{e}, ^{d} -&amp;gt; ^{e}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;-Simon&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2026/trouble-manipulation-within-brackets-partial-derivatives</guid>
<pubDate>Tue, 24 Aug 2021 04:05:58 +0000</pubDate>
</item>
<item>
<title>How to Create an Antisymmetric Metric</title>
<link>https://cadabra.science/qa/2019/how-to-create-an-antisymmetric-metric</link>
<description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Is there any way to create an antisymmetric metric in Cadabra, like the spinor metric (charge conjugation matrix with spinor indices) in 11d? That is, I am looking for a way to create an antisymmetric object that can be contracted to raise and lower indices (as with eliminate_metric()), but it seems that objects with the Metric property in Cadabra must be symmetric.&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;
&lt;p&gt;-Simon&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/2019/how-to-create-an-antisymmetric-metric</guid>
<pubDate>Sun, 08 Aug 2021 08:14:34 +0000</pubDate>
</item>
<item>
<title>Bug with isolate function</title>
<link>https://cadabra.science/qa/2007/bug-with-isolate-function</link>
<description>&lt;p&gt;Hello!
Then I try to solve linear equation like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import cdb.core.manip as man
expr:= G - 2*F * X =0;
man.isolate(expr, $F$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get something like that
&lt;img src=&quot;https://sun9-1.userapi.com/impg/N5JkB_247NPa-RQCJFUDIjZ5Dm-ZtX93oyzBjA/tEej2DE_67o.jpg?size=436x235&amp;amp;quality=96&amp;amp;sign=6f3b1c2cead815519843d9fb7cf73483&amp;amp;type=album&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt;
&lt;p&gt;I think it's not ok. It's a bug, or I'm doing something wrong?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2007/bug-with-isolate-function</guid>
<pubDate>Tue, 01 Jun 2021 17:08:34 +0000</pubDate>
</item>
<item>
<title>Accessing the Weight of an object</title>
<link>https://cadabra.science/qa/1956/accessing-the-weight-of-an-object</link>
<description>&lt;p&gt;Is there a way to access the weight of an object?&lt;/p&gt;
&lt;p&gt;I've figured out that I can do&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;X::Weight(label=dimension,value=2);
Weight.get($X$,label=dimension);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to determine that the Weight attribute has been set. But is there a way to find out that X has weight 2?&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1956/accessing-the-weight-of-an-object</guid>
<pubDate>Wed, 03 Mar 2021 21:39:32 +0000</pubDate>
</item>
<item>
<title>Taking out a common numerical factor</title>
<link>https://cadabra.science/qa/1951/taking-out-a-common-numerical-factor</link>
<description>&lt;p&gt;Is there a way to somehow conveniently take out the total numerical factor, because factor_out does not work for me. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q,r,s,u,v,w#}::Indices(full, values={t,x,y,z}, position=independent).
{t, x, y, z}::Coordinate.
ex:= -\frac{1}{4} A_{x} + -\frac{1}{4}A_{y};
factor_out(ex, $-\frac{1}{4}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;does nothing&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1951/taking-out-a-common-numerical-factor</guid>
<pubDate>Thu, 25 Feb 2021 16:34:53 +0000</pubDate>
</item>
<item>
<title>Non-Leibniz differential operators</title>
<link>https://cadabra.science/qa/1950/non-leibniz-differential-operators</link>
<description>&lt;p&gt;Hi Everyone.&lt;/p&gt;
&lt;p&gt;I am trying to use Cadabra2 with weighted tensor densities. Specifically I'd need to introduce a &quot;non-standard&quot; differential operator, i.e. an operator that does not satisfy the usual Leibniz product rule, but picks up a correction term in addition to the usual product rule.&lt;/p&gt;
&lt;p&gt;Is there a way to introduce such a &quot;differentiation&quot; operator in Cadabra?&lt;/p&gt;
&lt;p&gt;I tried to just declare dependency with&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;::Depends(D{#});&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;for the tensors, and then define the differentiation rules case-by-case, but cadabra seems to misunderstand index positions. For example&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt; := D^{A}{Y&lt;/em&gt;{A} V} = D^{A}{Y&lt;em&gt;{A}} V + Y&lt;/em&gt;{A} D^{A}{V} + N X^{A} D^{B}{Y&lt;em&gt;{A}} D&lt;/em&gt;{B}{V} ;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;produces a &quot;free indices do not match&quot; error message, but if I truncate off the last two terms,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt; := D^{A}{Y&lt;/em&gt;{A} V} = D^{A}{Y_{A}} V ;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;the error message disappears. Also, the error message disappears if I run D_#::Derivative; first.&lt;/p&gt;
&lt;p&gt;Many Thanks!&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1950/non-leibniz-differential-operators</guid>
<pubDate>Thu, 18 Feb 2021 11:38:03 +0000</pubDate>
</item>
<item>
<title>Problems in compiling Cadabra from source</title>
<link>https://cadabra.science/qa/1937/problems-in-compiling-cadabra-from-source</link>
<description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;When I was trying to build the Cadabra from the source, I did find certain errors during the build, and that I cannot open the application at all. &lt;/p&gt;
&lt;p&gt;The building process I was following is exactly from &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/kpeeters/cadabra2#windows&quot;&gt;here&lt;/a&gt;, and after I input the code
&lt;code&gt;cmake --build . --config RelWithDebInfo --target install&lt;/code&gt; , I found these errors:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;C:\Dev\cadabra2\core\DisplayTerminal.cc(18,14): error C2001: newline in constant [C:\Dev\cadabra2\build\core\cadabra2.v cxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(19,14): error C2001: newline in constant [C:\Dev\cadabra2\build\core\cadabra2.v cxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(18,14): error C2064: term does not evaluate to a function taking 1 arguments [C :\Dev\cadabra2\build\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(20,4): error C2059: syntax error: ';' [C:\Dev\cadabra2\build\core\cadabra2.vcxp roj] C:\Dev\cadabra2\core\DisplayTerminal.cc(662,2): error C2059: syntax error: 'if' [C:\Dev\cadabra2\build\core\cadabra2.vc xproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(663,20): error C2065: 'it': undeclared identifier [C:\Dev\cadabra2\build\core\c adabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(664,2): error C2059: syntax error: 'if' [C:\Dev\cadabra2\build\core\cadabra2.vc xproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(664,53): error C2143: syntax error: missing ';' before '{' [C:\Dev\cadabra2\bui ld\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(664,53): error C2447: '{': missing function header (old-style formal list?) [C: \Dev\cadabra2\build\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(672,6): error C2143: syntax error: missing ';' before '&amp;lt;&amp;lt;' [C:\Dev\cadabra2\bui ld\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(672,6): error C4430: missing type specifier - int assumed. Note: C++ does not s upport default-int [C:\Dev\cadabra2\build\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(674,2): error C2059: syntax error: 'if' [C:\Dev\cadabra2\build\core\cadabra2.vc xproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(676,22): error C2065: 'it': undeclared identifier [C:\Dev\cadabra2\build\core\c adabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(676,24): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [C:\Dev\cadabra2\build\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(676,25): error C2440: 'initializing': cannot convert from 'initializer list' to 'int' [C:\Dev\cadabra2\build\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(676,16): message : The initializer contains too many elements [C:\Dev\cadabra2\ build\core\cadabra2.vcxproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(679,2): error C2059: syntax error: 'if' [C:\Dev\cadabra2\build\core\cadabra2.vc xproj] C:\Dev\cadabra2\core\DisplayTerminal.cc(681,2): error C2059: syntax error: '}' [C:\Dev\cadabra2\build\core\cadabra2.vcx proj] C:\Dev\cadabra2\core\DisplayTerminal.cc(681,2): error C2143: syntax error: missing ';' before '}' [C:\Dev\cadabra2\buil d\core\cadabra2.vcxproj]&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And after the installation is complete, I tried to run &lt;code&gt;ctest&lt;/code&gt;, which gives that all 47 tests were failed. Therefore, I would like to know what was going on during the compilation.&lt;/p&gt;
&lt;p&gt;The OS I am using is Windows 10, with Anaconda 2020.07(Conda 4.9.2), Texlive 6.3.2, and Visual Studio 16.8.5 installed. The exact process conducted was:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Doing &lt;code&gt;git clone&lt;/code&gt; from the provided link&lt;/li&gt;
&lt;li&gt;Executing &lt;code&gt;C:\Dev\cadabra2\build&amp;gt;cmake -DCMAKE_TOOLCHAIN_FILE=C:/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_INSTALL_PREFIX=C:\Cadabra -G &quot;Visual Studio 16 2019&quot; -A x64 ..&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Executing cmake command shown in the link from very above, giving error on DisplayTerminal.cc mentioned before.&lt;/li&gt;
&lt;/ol&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/1937/problems-in-compiling-cadabra-from-source</guid>
<pubDate>Fri, 12 Feb 2021 21:27:10 +0000</pubDate>
</item>
<item>
<title>Changing the settings</title>
<link>https://cadabra.science/qa/1897/changing-the-settings</link>
<description>&lt;p&gt;Hello, I would like to know if you can change the color of the cursor, as it is almost transparent I cannot see.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1897/changing-the-settings</guid>
<pubDate>Thu, 07 Jan 2021 22:33:47 +0000</pubDate>
</item>
<item>
<title>Only write out one index summation</title>
<link>https://cadabra.science/qa/1878/only-write-out-one-index-summation</link>
<description>&lt;p&gt;I have a basic question based on &lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/qa/1851/manipulate-matrix&quot;&gt;https://cadabra.science/qa/1851/manipulate-matrix&lt;/a&gt;. I have seen that you have updated some codes related to the above question a few days ago, but I still have the following question: How to just expand the dummy indices &lt;code&gt;a,b&lt;/code&gt; and don't touch the indices $\mu,\nu$ in the following expression?&lt;/p&gt;
&lt;p&gt;$$
L:=D_{\mu} B^a D_{\nu}B^b D_{\mu} B^a D_{\nu}B^b,
$$ &lt;/p&gt;
&lt;p&gt;where &lt;code&gt;a,b&lt;/code&gt; and $\mu,\nu$ are the different index types, and $B^a$ is &lt;code&gt;SelfNonCommuting&lt;/code&gt;.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1878/only-write-out-one-index-summation</guid>
<pubDate>Fri, 18 Dec 2020 02:04:16 +0000</pubDate>
</item>
<item>
<title>Field Function</title>
<link>https://cadabra.science/qa/1852/field-function</link>
<description>&lt;p&gt;Hello everyone! 
In my computations I need to define some arbitrary field function, for example F, which dependes on field of my theory p(x). I tryed to define p like a coordinate and then set that pi depends on all other coordinates, as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{t, x, y, p}::Coordinate.
p::Depends(t,x,y).
K::Depends(t,x,y, p).&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But then I take the derivative with respect to p, I am getting a vector index so it doesn't work for me. I've tryed to define some 'special' derivative for p, but this interferes with further calculations in components. I also tryed to write something like &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;map_sympy(F, 'Function(&quot;F&quot;)(p))&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but it didn't work. It seems to me that I don't see some very simple option.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1852/field-function</guid>
<pubDate>Fri, 04 Dec 2020 20:58:06 +0000</pubDate>
</item>
<item>
<title>manipulate matrix</title>
<link>https://cadabra.science/qa/1851/manipulate-matrix</link>
<description>&lt;p&gt;I don't know how to manipulate matrix easily in Cadabra. For example, some Lagrangian like&lt;/p&gt;
&lt;p&gt;$$
L=Tr(\partial_{\mu}{A}\partial^{\mu}{A}),
$$&lt;/p&gt;
&lt;p&gt;where $A=diag(a, b)$, the right result is&lt;/p&gt;
&lt;p&gt;$$ 
L=\partial_{\mu}{a}\partial^{\mu}{a}+\partial_{\mu}{b}\partial^{\mu}{b}.
$$&lt;/p&gt;
&lt;p&gt;How to implement the above steps in Cadabra? I have a try&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\mu,\nu}::Indices(vector).
{c,d,e,f}::Indices(values={1,2}).
\partial{#}::Derivative.
g_{c d}::Metric.
g^{c d}::InverseMetric.
metric:={g_{1 1}=1,g_{2 2}=1};
complete(_,$g^{c d}$);
A:={A_{1 1}=a,A_{2 2}=b};
{a,b}::Depends(\partial{#}).
L:=g^{c d}(\partial_{\mu}{A}\partial^{\mu}{A})_{c d};
expand(_);
evaluate(_,metric+A);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but it doesn't work.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1851/manipulate-matrix</guid>
<pubDate>Fri, 27 Nov 2020 07:47:56 +0000</pubDate>
</item>
<item>
<title>meld kernel crash</title>
<link>https://cadabra.science/qa/1836/meld-kernel-crash</link>
<description>&lt;p&gt;Sometimes, then I am running meld(); it shows kernel crashed, for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e,i,k,m,n,p,q,r,s,t,u,v,w,x,y,z,m#}::Indices(position=independent);
{a,b,c,d,e,i,k,m,n,p,q,r,s,t,u,v,w,x,y,z,m#}::Integer(1..3);

\partial{#}::PartialDerivative.
h_{m? n?}::Metric.
h^{m? n?}::InverseMetric.
h_{m? n?}::Symmetric.
h^{m? n?}::Symmetric.
\delta^{m?}_{n?}::KroneckerDelta.
\delta_{m?}^{n?}::KroneckerDelta.
F_{m? n?}::AntiSymmetric.
\pi::Depends(\partial{#}).
\phi::Depends(\partial{#}).
A_{m?}::Depends(\partial{#}).
h_{m n}::Depends(\partial{#}).
h^{m n}::Depends(\partial{#}).
\psi::Depends(\partial{#}).
\Gamma^{\alpha}_{\mu\nu}::TableauSymmetry(shape={2}, indices={1,2}).
\Gamma^{m}_{n q}::TableauSymmetry(shape={2}, indices={1,2}).
ex := 1/2 h^{a b} F_{n b} \partial_{a}(\pi) \partial_{m}(\psi) (\phi)**2 +  1/2 h^{a b} F_{m b} \partial_{a}(\pi) \partial_{n}(\psi) (\phi)**2-A_{m} \partial_{a}(\phi) \partial_{b}(\pi) \partial_{n}(\psi) \phi h^{a b}-A_{n} \partial_{a}(\phi) \partial_{b}(\pi) \partial_{m}(\psi) \phi h^{a b};

rename_dummies(_);

meld(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm not sure, but may be it happens only in a case of combination rename_dummies and meld.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1836/meld-kernel-crash</guid>
<pubDate>Wed, 11 Nov 2020 13:39:45 +0000</pubDate>
</item>
<item>
<title>Eliminate symmetric Gammas in Majorana bilinears</title>
<link>https://cadabra.science/qa/1815/eliminate-symmetric-gammas-in-majorana-bilinears</link>
<description>&lt;p&gt;I am working in d=11 supergravity with the following convention for the charge-conjugation matrix:
$$C^T=-C $$&lt;/p&gt;
&lt;p&gt;$$ (C\Gamma^{m1\dots mr})^T=+C\Gamma^{m1\dots mr} \quad r=(1,2)mod4 $$&lt;/p&gt;
&lt;p&gt;and with an anticommuting Majorana spinor $\eta$.&lt;/p&gt;
&lt;p&gt;How to set automatically to zero all the expressions of the type
$$\bar \eta \Gamma^{m1\dots mr} \eta=0\qquad r=(1,2)mod4 $$
when for ex. $\Gamma^{m1\dots mr}$ is the result of a &quot;join_gamma()&quot;?   &lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1815/eliminate-symmetric-gammas-in-majorana-bilinears</guid>
<pubDate>Mon, 02 Nov 2020 17:42:11 +0000</pubDate>
</item>
<item>
<title>Question about eliminate_metric</title>
<link>https://cadabra.science/qa/1784/question-about-eliminate_metric</link>
<description>&lt;p&gt;Hello. I noticed that even when I'm writing the position = independent index properties, the eliminate_metric command can contract the expression indeces inside the partial derivative and outside, as in the following example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Indices(full, position=independent);
{m,n,p,q,r,s,t,u,v,w,x,y,z,m#}::Indices(subspace, position=independent, parent=full);
{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Integer(1..4);
{m,n,p,q,r,s,t,u,v,w,x,y,z,m#}::Integer(1..3);

\partial{#}::PartialDerivative.
\nabla{#}::Derivative.
g_{\mu\nu}::Metric.
g^{\mu\nu}::InverseMetric.
g_{\mu? \nu?}::Symmetric.
g^{\mu? \nu?}::Symmetric.
h_{m n}::Metric.
h^{m n}::InverseMetric.
\delta^{\mu?}_{\nu?}::KroneckerDelta.
\delta_{\mu?}^{\nu?}::KroneckerDelta.
\delta^{m?}_{n?}::KroneckerDelta.
\delta_{m?}^{n?}::KroneckerDelta.
\delta^{\mu?}_{n?}::KroneckerDelta.
\delta_{\mu?}^{n?}::KroneckerDelta.
F_{m n}::AntiSymmetric.
\pi::Depends(\nabla{#}).

def tidy (expr):
   converge(expr):
       distribute(expr)
       product_rule(expr)
       canonicalise(expr)
   return expr

def expand_nabla(ex):
    for nabla in ex[r'\nabla']:
        nabla.name=r'\partial'
        dindex = nabla.indices().__next__() 
        for arg in nabla.args():             
            ret:=0;
            for index in arg.free_indices():
                t2:= @(arg);
                if index.parent_rel==sub:
                    t1:= -\Gamma^{\rho}_{@(dindex) @(index)};
                    t2[index]:= _{\rho};
                else:
                    t1:=  \Gamma^{@(index)}_{@(dindex) \rho};
                    t2[index]:= ^{\rho};
                ret += Ex(str(nabla.multiplier)) * t1 * t2
            nabla += ret
    return ex

    Gtog:= \Gamma^{\lambda?}_{\mu?\nu?} -&amp;gt;
      (1/2) * g^{\lambda?\kappa} ( 
            \partial_{\nu?}{ g_{\kappa\mu?} } + \partial_{\mu?}{ g_{\kappa\nu?} } - \partial_{\kappa}{ g_{\mu?\nu?} } );

    box:= g^{\mu \nu} \nabla_{\mu}{\nabla_{\nu}{\pi}};
expand_nabla(_);
substitute(_,Gtog);
tidy(box);
split_index(_, $\mu, m1, 4$, repeat=True)
substitute(_, $\partial_{4}{A??} -&amp;gt; 0$, repeat=True)
substitute(_, $\partial_{4 m?}{A??} -&amp;gt; 0$, repeat=True)
substitute(_, $\partial_{m? 4}{A??} -&amp;gt; 0$, repeat=True)
canonicalise(_);
substitute(_, $g_{4 4} -&amp;gt; \phi**{2}$ )
substitute(_, $g_{m 4} -&amp;gt; \phi**{2} A_{m}$ )
substitute(_, $g_{4 m} -&amp;gt; \phi**{2} A_{m}$ )
substitute(_, $g_{m n} -&amp;gt; h_{m n} + \phi**{2} A_{m} A_{n}$ )
substitute(_, $g^{4 4} -&amp;gt; \phi**{-2} +  A_{m} h^{m n} A_{n}$ )
substitute(_, $g^{m 4} -&amp;gt; - h^{m n} A_{n}$ )
substitute(_, $g^{4 m} -&amp;gt; - h^{m n} A_{n}$ )
substitute(_, $g^{m n} -&amp;gt; h^{m n}$ );
tidy(box);
substitute(_, $\partial_{p}{h^{n m}} h_{q m} -&amp;gt; - \partial_{p}{h_{q m}} h^{n m}$ )
collect_factors(_)
sort_product(_)
converge(box):
    substitute(_, $h_{m1 m2} h^{m3 m2} -&amp;gt; \delta_{m1}^{m3}$, repeat=True )
    eliminate_kronecker(_)
    canonicalise(_)
;
substitute(_, $\partial_{n}{A_{m}} -&amp;gt; 1/2*\partial_{n}{A_{m}} + 1/2*F_{n m} + 1/2*\partial_{m}{A_{n}}$ )
distribute(_)
sort_product(_)
canonicalise(_)
rename_dummies(_);
meld(_);
eliminate_metric(_);
eliminate_metric(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And at the end I get:
&lt;img src=&quot;https://sun9-40.userapi.com/impg/UZghUKwfJihpLs-VuumoSxX4U3_4wWaPu1gIWw/7VFkPkc0Naw.jpg?size=984x179&amp;amp;quality=96&amp;amp;proxy=1&amp;amp;sign=dd1ae5f8bce563f35199ea74a631de96&quot; alt=&quot;result&quot;&gt;
This is all very long, but I wanted to show the whole path that leads to the error. In fact, this kind of result is obtained with almost any option when I use eliminate_metric more than once in my program. 
Is this some kind of bug or am I doing something wrong?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/1784/question-about-eliminate_metric</guid>
<pubDate>Wed, 28 Oct 2020 14:14:26 +0000</pubDate>
</item>
<item>
<title>Question about meld</title>
<link>https://cadabra.science/qa/1776/question-about-meld</link>
<description>&lt;p&gt;The following codes  seem to have encountered some problems when using algorithm 'meld':&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\mu,\nu}::Indices(vector).
tr{#}::Trace.
u^{\mu}::SelfNonCommuting.
u^{\mu}::ImplicitIndex.
ex:=A tr{u^{\mu} u^{\nu} u^{\mu} u^{\nu}}+B tr{ u^{\mu} u^{\mu} u^{\nu} u^{\nu}};
meld(_);
factor_in(_,$A,B$);&lt;/code&gt;&lt;/pre&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1776/question-about-meld</guid>
<pubDate>Sun, 11 Oct 2020 13:02:30 +0000</pubDate>
</item>
<item>
<title>evaluate and propertes</title>
<link>https://cadabra.science/qa/1769/evaluate-and-propertes</link>
<description>&lt;p&gt;Hello.
In this code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c}::Indices(values={1,2,3,4,5,6,7,8}).
f_{a b c}::AntiSymmetric.
ex:= 2 i f_{a b c} s_{c};
ru1:=f_{1 2 3}=1, f_{3 4 5}=1/2,  f_{4 5 8}= 1/2 \sqrt(3);
evaluate(ex,ru1);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;rule  &lt;code&gt;f_{3 4 5}= f_{4 5 3}&lt;/code&gt; not used (is true &lt;code&gt;[]_{45}=i \sqrt(3) s_{8} + i s_{3}&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;How to get around it?&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1769/evaluate-and-propertes</guid>
<pubDate>Mon, 05 Oct 2020 16:45:30 +0000</pubDate>
</item>
<item>
<title>Split free indices, and not just dummy indices.</title>
<link>https://cadabra.science/qa/1736/split-free-indices-and-not-just-dummy-indices</link>
<description>&lt;p&gt;It is possible to split sums based on dummy indices:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{M,N,P,Q,R}::Indices(full).
{m,n,p,q,r}::Indices(space1, parent=full).
{a,b,c,d,e}::Indices(space2, parent=full).

ex:=A_{M d Q R} B_{M p Q R};
split_index(_, $M,m,a$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Can something like this be used for free indices too?&lt;/p&gt;
&lt;p&gt;For example, I want:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := A_{m p} + A_{a p};&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This should split the tensor into two tensors. Graphically, this would split the matrix into two smaller matrices based on their columns, and missing values will be set to zero.&lt;/p&gt;
&lt;p&gt;This can be extended for more complicated splits. In this case, one would have to somehow specify splits based on subgroups of indices.&lt;/p&gt;
&lt;p&gt;For example, one might want to split a tensor based on an arbitrary set of indices. I.e. given tensor A_{x1 x2 ... xN}, get some specific indices {x1 x2 ... xN} into one tensor, and the rest in another tensor.&lt;/p&gt;</description>
<category>Feature requests</category>
<guid isPermaLink="true">https://cadabra.science/qa/1736/split-free-indices-and-not-just-dummy-indices</guid>
<pubDate>Wed, 09 Sep 2020 21:31:14 +0000</pubDate>
</item>
<item>
<title>Solution of Einstein's equations in a vacuum</title>
<link>https://cadabra.science/qa/1702/solution-of-einsteins-equations-in-a-vacuum</link>
<description>&lt;p&gt;Hello people.
I'm trying to solve Einstein's equations in vacuo for a generic line element, I can get to the equations G _ {\ alpha \ beta}, but I can't get the values for exp (\ mu) and \ exp (nu). If anyone knows thank you.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;enter code here&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;{r,t,\phi,\theta}::Coordinate;
{\mu,\nu,\rho,\sigma,\lambda,\kappa,\chi,\gamma}::Indices(values=t,r,\phi,\theta},position=fixed);&lt;/p&gt;
&lt;p&gt;\partial{#}::PartialDerivative;
g_{\mu\nu}::Metric;
g^{\mu\nu}::InverseMetric;&lt;/p&gt;
&lt;p&gt;v::Depends(r);
u::Depends(r);&lt;/p&gt;
&lt;p&gt;ss:={g&lt;em&gt;{t t} = \exp(v),
g&lt;/em&gt;{r r} =-\exp(u),
g&lt;em&gt;{\theta\theta} = r**2,
g&lt;/em&gt;{\phi\phi} = r&lt;strong&gt;2 \sin(\theta)&lt;/strong&gt;2}.
complete(ss,$g^{\mu\nu}$);&lt;/p&gt;
&lt;p&gt;ch := \Gamma^{\mu}&lt;em&gt;{\nu\rho} = 1/2 g^{\mu\sigma} (
\partial&lt;/em&gt;{\rho}{g&lt;em&gt;{\nu\sigma}}
+\partial&lt;/em&gt;{\nu}{g&lt;em&gt;{\rho\sigma}}
-\partial&lt;/em&gt;{\sigma}{g_{\nu\rho}});
evaluate(ch,ss,rhsonly=True);&lt;/p&gt;
&lt;p&gt;rm:= R^{\rho}&lt;em&gt;{\sigma\mu\nu} = \partial&lt;/em&gt;{\mu}{\Gamma^{\rho}&lt;em&gt;{\nu\sigma}}
-\partial&lt;/em&gt;{\nu}{\Gamma^{\rho}&lt;em&gt;{\mu\sigma}}
+\Gamma^{\rho}&lt;/em&gt;{\mu\lambda}\Gamma^{\lambda}&lt;em&gt;{\nu\sigma}
-\Gamma^{\rho}&lt;/em&gt;{\nu\lambda}\Gamma^{\lambda}_{\mu\sigma};
substitute(rm,ch);
evaluate(rm,ss,rhsonly=True);&lt;/p&gt;
&lt;p&gt;rc:= R&lt;em&gt;{\sigma\nu} = R^{\rho}&lt;/em&gt;{\sigma\rho\nu};
substitute(rc, rm)
evaluate(rc, ss, rhsonly=True);&lt;/p&gt;
&lt;p&gt;src:= R = g^{\sigma\nu}R_{\sigma\nu};
substitute(src,rc);
evaluate(src,ss,rhsonly=True);&lt;/p&gt;
&lt;p&gt;Eins := G&lt;em&gt;{\sigma\nu} = R&lt;/em&gt;{\sigma\nu}-1/2g_{\sigma\nu}R;
substitute(Eins,rc);
substitute(Eins,src);
evaluate(Eins,ss,rhsonly=True);&lt;/p&gt;
&lt;p&gt;from cdb.core.component import &lt;em&gt;
from cdb.core.manip import &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;gtt = get_component(Eins,$t,t$)[1];
grr = get_component(Eins,$r,r$)[1];
gth = get_component(Eins,$\theta,\theta$)[1];
gph = get_component(Eins,$\phi,\phi$)[1];&lt;/p&gt;
&lt;p&gt;from cdb.sympy.solvers import *&lt;/p&gt;
&lt;p&gt;eq1:= @(gtt)-@(grr);&lt;/p&gt;
&lt;p&gt;from sympy import *&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1702/solution-of-einsteins-equations-in-a-vacuum</guid>
<pubDate>Mon, 10 Aug 2020 00:17:10 +0000</pubDate>
</item>
<item>
<title>Problems with import cdb.core.manip as manip</title>
<link>https://cadabra.science/qa/1700/problems-with-import-cdb-core-manip-as-manip</link>
<description>&lt;p&gt;I am running win 10, and I have installed anaconda, and the package gmpy2.
The problemi is that when I try to do import cdb.core.manip as manip
I get the error &quot;dll load failed&quot;.
What can I try to fix it?&lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/1700/problems-with-import-cdb-core-manip-as-manip</guid>
<pubDate>Thu, 06 Aug 2020 23:09:51 +0000</pubDate>
</item>
<item>
<title>Windows 10 installation not working / stuck on source installation</title>
<link>https://cadabra.science/qa/1695/windows-installation-not-working-stuck-source-installation</link>
<description>&lt;p&gt;Hi there, I am attempting to install Cadabra with the source code, because neither of the Windows 10 installations are currently working (both lead to Cadabra crashing immediately upon opening).&lt;/p&gt;
&lt;p&gt;I am following the instructions, and I am stuck on the following step:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cmake -G &quot;Visual Studio 16 2019&quot; -A x64 ..&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I cannot figure out what those dots &lt;code&gt;..&lt;/code&gt; are supposed to be. If I skip this part, and just run:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;cmake --build . --config RelWithDebInfo --target install&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;then run&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ctest&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;all 46 of the tests fail. Any help with this part would be greatly appreciated!&lt;/p&gt;</description>
<category>Installation trouble</category>
<guid isPermaLink="true">https://cadabra.science/qa/1695/windows-installation-not-working-stuck-source-installation</guid>
<pubDate>Sun, 02 Aug 2020 07:49:16 +0000</pubDate>
</item>
<item>
<title>First derivative with multiple indices</title>
<link>https://cadabra.science/qa/1690/first-derivative-with-multiple-indices</link>
<description>&lt;p&gt;Is there any simple way to have multiple indices on a single derivative? If I define a derivative in the usual way&lt;/p&gt;
&lt;p&gt;\delta{#}::Derivative;&lt;/p&gt;
&lt;p&gt;then \delta&lt;em&gt;{\mu\nu} is interpreted as a second derivative. I would like \delta&lt;/em&gt;{\mu\nu} to represent a single derivative (thus satisfying the product rule) but with multiple indices. This is important for the implementation of derivatives with respect to tensors for example.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1690/first-derivative-with-multiple-indices</guid>
<pubDate>Fri, 17 Jul 2020 14:57:48 +0000</pubDate>
</item>
<item>
<title>Meld on undistributed input</title>
<link>https://cadabra.science/qa/1689/meld-on-undistributed-input</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I've found situations where &lt;code&gt;meld&lt;/code&gt; returns an incorrect 0, when applied on some undistributed sums, namely&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(w_{a} x_{b} y_{c}-w_{c} x_{b} y_{a}) f^{a c}
(w_{a} x_{b} y_{c} z_{d}-w_{c} x_{b} y_{a} z_{d}) f^{a b c}
(w_{a} x_{b} y_{c} z_{d}-w_{c} x_{b} y_{a} z_{d}) f^{a b c d}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;More precisely, the above 3 lines are the output corresponding to the following input:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e#}::Indices(Lorentz,parent=ambient).

f^{a b}::TableauSymmetry(shape=(1,1),indices=(0,1)).
f^{a b c}::TableauSymmetry(shape=(2,1),indices=(0,1,2)).
f^{a b c d}::TableauSymmetry(shape=(2,2),indices=(0,1,2,3)).

fac:=f^{a c}.
fabc:=f^{a b c}.
fabcd:=f^{a b c d};

Dwy:=(w_{a} y_{c} - w_{c} y_{a}).
Dwxy:=(w_{a} x_{b} y_{c} - w_{c} x_{b} y_{a}).
Dwyz:=(w_{a} y_{c} z_{d} - w_{c} y_{a} z_{d}).
Dwxyz:=(w_{a} x_{b} y_{c} z_{d} - w_{c} x_{b} y_{a} z_{d}).

for f in [fac,fabc,fabcd]:
    for D in [Dwy,Dwxy,Dwyz,Dwxyz]:
        fD=f*D
        meld(fD)
        if fD==0:
            print(f*D)
        Df=D*f
        meld(Df)
        if Df==0:
            print(D*f)&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/1689/meld-on-undistributed-input</guid>
<pubDate>Wed, 15 Jul 2020 16:31:01 +0000</pubDate>
</item>
<item>
<title>Defining a vector field.</title>
<link>https://cadabra.science/qa/1664/defining-a-vector-field</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am trying to define a vector fields $X=X^{\mu} \partial{x^{\mu}}$, $Y=Y^{\nu}\partial{x^{\nu}}$ and a one form $\omega=\omega_{\mu}dx^{\mu}$. I want to evaluate expressions such as $X[\omega(Y)]$. Need help/direction on how to do this.&lt;/p&gt;</description>
<category>General questions</category>
<guid isPermaLink="true">https://cadabra.science/qa/1664/defining-a-vector-field</guid>
<pubDate>Mon, 15 Jun 2020 19:01:09 +0000</pubDate>
</item>
<item>
<title>Problem with rename_dummies and sort_product</title>
<link>https://cadabra.science/qa/1649/problem-with-rename_dummies-and-sort_product</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;With the input&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c#}::Indices(&quot;a&quot;);

ex:=1/2 X_{a} B^{a b} X_{b} + K^{a} X_{a};
vary(ex,$X_{a}-&amp;gt;A_{a}$);
sort_product(ex);
rename_dummies(ex);

{\delta{#},Z{#},X{#},B{#},K{#}}::SortOrder;

ex:=1/2 X_{a} B^{a b} X_{b} + K^{a} X_{a};
vary(ex,$X_{a}-&amp;gt;Z_{a}$);
sort_product(ex);
rename_dummies(ex);

\delta{#}::Accent;

ex:=1/2 X_{a} B^{a b} X_{b} + K^{a} X_{a};
vary(ex,$X_{a}-&amp;gt;\delta{X_{a}}$);
sort_product(ex);
rename_dummies(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output I get is&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Attached property Indices(position=free) to {a, b, c#}.
 1/2 X_{a} B^{a b} X_{b} + K^{a} X_{a}
 1/2 A_{a} B^{a b} X_{b} +  1/2 X_{a} B^{a b} A_{b} + K^{a} A_{a}
 1/2 A_{a} B^{a b} X_{b} +  1/2 A_{b} B^{a b} X_{a} + A_{a} K^{a}
 1/2 A_{a} B^{a b} X_{b} +  1/2 A_{a} B^{b a} X_{b} + A_{a} K^{a}
Attached property SortOrder to {\delta(#), Z(#), X(#), B(#), K(#)}.
 1/2 X_{a} B^{a b} X_{b} + K^{a} X_{a}
 1/2 Z_{a} B^{a b} X_{b} +  1/2 X_{a} B^{a b} Z_{b} + K^{a} Z_{a}
 1/2 Z_{a} X_{b} B^{a b} +  1/2 Z_{b} X_{a} B^{a b} + Z_{a} K^{a}
 1/2 Z_{a} X_{b} B^{a b} +  1/2 Z_{b} X_{a} B^{a b} + Z_{a} K^{a}
Attached property Accent to \delta{#}.
 1/2 X_{a} B^{a b} X_{b} + K^{a} X_{a}
 1/2 \delta{X_{a}} B^{a b} X_{b} +  1/2 X_{a} B^{a b} \delta{X_{b}} + K^{a} \delta{X_{a}}
 1/2 \delta{X_{a}} X_{b} B^{a b} +  1/2 \delta{X_{b}} X_{a} B^{a b} + \delta{X_{a}} K^{a}
 1/2 \delta{X_{a}} X_{b} B^{a b} +  1/2 \delta{X_{b}} X_{a} B^{a b} + \delta{X_{a}} K^{a}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is this behaviour expected? If yes, is there a way to obtain&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 1/2 Z_{a} X_{b} B^{a b} +  1/2 Z_{a} X_{b} B^{b a} + Z_{a} K^{a}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 1/2 \delta{X_{a}} X_{b} B^{a b} +  1/2 \delta{X_{a}} X_{b} B^{b a} + \delta{X_{a}} K^{a}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;instead?&lt;/p&gt;
&lt;p&gt;In case it is really a bug, I run Cadabra 2.2.9 (built on April 7) on macOS High Sierra.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/1649/problem-with-rename_dummies-and-sort_product</guid>
<pubDate>Mon, 25 May 2020 12:02:13 +0000</pubDate>
</item>
</channel>
</rss>