<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Cadabra Q&amp;A - Recent questions in Bug reports</title>
<link>https://cadabra.science/qa/questions/bug-reports</link>
<description>Powered by Question2Answer</description>
<item>
<title>The mystery of meld</title>
<link>https://cadabra.science/qa/3056/the-mystery-of-meld</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thanks a lot for Cadabra. This is very useful! 
But I found strange behavior of the algorithm meld.&lt;/p&gt;
&lt;p&gt;First, a bug related to prefactor. 
Consider:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:= B^{i} B^{j} S^{m n} D_{i j} D_{m n} + B^{i} B^{j} S^{m n} D_{m n} D_{i j};
S^{i j}::Symmetric;
D_{i j}::Symmetric;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And then if I evaluate meld for the ex, I get prefactor 3/2 instead of 2. &lt;/p&gt;
&lt;p&gt;Moreover, if I do not specify the symmetries of S^{i j} and D_{i j} separately, then the algorithm works correctly.&lt;/p&gt;
&lt;p&gt;Second, an incorrect interpretation of an index convolution:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\partial{#}::PartialDerivative.
ex1:=  G^{m j} \partial_{i}{A} \partial_{m}{F_{j}} +  G^{m j} \partial_{m}{A} \partial_{i}{F_{j}};
ex2:= D^{m n} \partial_{i}{C} \partial_{m}{Q_{n j}} + D^{m n} \partial_{m}{C} \partial_{i}{Q_{n j}};
meld(ex1);
meld(ex2);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Meld interprets expressions as two identical terms in both cases, although I did not specify any symmetries of objects.&lt;/p&gt;
&lt;p&gt;Thanks,
Maksim&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3056/the-mystery-of-meld</guid>
<pubDate>Wed, 19 Nov 2025 15:20:16 +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>vary behaves in an odd way</title>
<link>https://cadabra.science/qa/3053/vary-behaves-in-an-odd-way</link>
<description>&lt;p&gt;Here is a short example of what I found weird:&lt;/p&gt;
&lt;p&gt;ex:= 2(r)**(-2) - B(r);
vary(_, $B(r) -&amp;gt; \delta{B}$);&lt;/p&gt;
&lt;p&gt;from which I get&lt;/p&gt;
&lt;p&gt;2 {r}^{-2} - \delta\left(B\left(r\right)\right)&lt;/p&gt;
&lt;p&gt;I tought that it was due to my older version of cadabra, but I just installed the latest version and the answer is the same. If I had in the first term just r, without an exponent, the answer woud be correct.&lt;/p&gt;
&lt;p&gt;Thanks,
Andrei&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3053/vary-behaves-in-an-odd-way</guid>
<pubDate>Mon, 06 Oct 2025 10:29:17 +0000</pubDate>
</item>
<item>
<title>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</link>
<description>&lt;p&gt;A note on p. 52 tell the range is optional. But the example don't work without it.&lt;/p&gt;
&lt;p&gt;Also, increasing the number of samples have no effect.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;plot(sol, range_=($tau$, 0, 10),samples=5000, title=&quot;Damped coupled oscillators&quot;);&lt;/code&gt;&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</guid>
<pubDate>Mon, 21 Jul 2025 15:05:29 +0000</pubDate>
</item>
<item>
<title>\dot command not displayed correctly</title>
<link>https://cadabra.science/qa/3043/dot-command-not-displayed-correctly</link>
<description>&lt;p&gt;I'm trying to reproduce the first example on page 37 of The Cadabra Book.&lt;/p&gt;
&lt;p&gt;I tried in cadabra2-gtk and jupyter kernel but I got a strange result. Instead of a dot in between I got a comma and a dot over.&lt;/p&gt;
&lt;p&gt;In cadabra2-cli this is the output : \dot(A , D) \dot(B , C) which when entered in notebook give me the same wrong result.&lt;/p&gt;
&lt;p&gt;Here is the code I'm running :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
&amp;gt; {\mu, \nu, \rho, \sigma}::Indices(vector);

&amp;gt; ex:= A\\_\\{\mu\\} B\\_\\{\nu\\} C\\_\\{\nu\\} D\\_\\{\mu\\};

&amp;gt; substitute\(\_\, $A?\_\{\rho\} B?\_\{\rho\} \-\&amp;gt; \dot\{A?\}\{B?\}$\, repeat=True\);&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3043/dot-command-not-displayed-correctly</guid>
<pubDate>Mon, 14 Jul 2025 23:37:35 +0000</pubDate>
</item>
<item>
<title>Regex not working</title>
<link>https://cadabra.science/qa/3035/regex-not-working</link>
<description>&lt;p&gt;I tried the example on page 37 of the Cadabra Book&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:= A + B3 + C7;
substitute(_, $A + M? + N? | \regex{M?}{&quot;[A-Z]7&quot;} -&amp;gt; \sin(M? N?\)/N?$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In jupyter I got this error :&lt;/p&gt;
&lt;p&gt;&lt;br&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Traceback (most recent call last):
  File &quot;/usr/local/lib/python3.12/dist-packages/cadabra2_jupyter/kernel.py&quot;, line 57, in do_execute
    self._execute_python(pycode)
  File &quot;/usr/local/lib/python3.12/dist-packages/cadabra2_jupyter/kernel.py&quot;, line 111, in _execute_python
    self._sandbox_context(pycode)
  File &quot;/usr/local/lib/python3.12/dist-packages/cadabra2_jupyter/context.py&quot;, line 51, in __call__
    exec(code, self._sandbox)
  File &quot;&amp;lt;string&amp;gt;&quot;, line 2
    substitute(_, &quot;&quot;Ex(r'''A + M? + N? | \regex{M?}{&quot;[A-Z]7&quot;} -&amp;gt; \sin(M? N?)/N?''', False)); display(_)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The command line simply crash :&lt;/p&gt;
&lt;p&gt;&amp;gt; ex:= A + B3 + C7;
A + B3 + C7
&amp;gt; substitute(_\, $A + M? + N? | \regex{M?}{&quot;[A-Z]7&quot;} -&amp;gt; \sin(M? N?)/N?$);&lt;/p&gt;
&lt;p&gt;Terminated by user interrupt.&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
I'm using Cadabra 2.5.12&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3035/regex-not-working</guid>
<pubDate>Sat, 12 Jul 2025 21:06:37 +0000</pubDate>
</item>
<item>
<title>execution problems</title>
<link>https://cadabra.science/qa/3015/execution-problems</link>
<description>&lt;p&gt;Hi Kasper,
Thanks for the quick update. I've tried to run the latest version of cadabra2 but I get this run time error&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Cadabra 2.5.11 (build 3796.22211b1d23 dated 2025-04-08)
Copyright (C) 2001-2025  Kasper Peeters &amp;lt;info@cadabra.science&amp;gt;
Traceback (most recent call last):
  File &quot;&amp;lt;input&amp;gt;&quot;, line 1, in &amp;lt;module&amp;gt;
FileNotFoundError: [Errno 2] No such file or directory: '/Users/leo/tmp2//opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/cadabra2_defaults.py'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I had no problems compiling the code. Here is what I did&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/kpeeters/cadabra2
cd cadabra2/
git checkout devel
cmake -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX:PATH=/Users/leo/tmp2/ ..
mkdir build
make install

export PATH=/Users/leo/tmp2/bin/:$PATH&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I chose to install to ~/tmp2 just for testing. I've done this mant times before and b=nvere had this problem.
Any thoughts?
Cheers,
Leo
ps. Santa was very busy over Xmas so no surprise that a few gremlins got into the system :)&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3015/execution-problems</guid>
<pubDate>Tue, 08 Apr 2025 09:22:21 +0000</pubDate>
</item>
<item>
<title>cadabra2python seg fault</title>
<link>https://cadabra.science/qa/3012/cadabra2python-seg-fault</link>
<description>&lt;p&gt;Hi Kasper,&lt;/p&gt;
&lt;p&gt;Just a short note. Running &lt;code&gt;cadabra2python&lt;/code&gt; on any non-empty file produces a seg fault.&lt;/p&gt;
&lt;p&gt;Cheers,
Leo&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3012/cadabra2python-seg-fault</guid>
<pubDate>Mon, 07 Apr 2025 04:21:01 +0000</pubDate>
</item>
<item>
<title>simple substitute hits wrong target</title>
<link>https://cadabra.science/qa/3011/simple-substitute-hits-wrong-target</link>
<description>&lt;p&gt;Greetings,&lt;/p&gt;
&lt;p&gt;Here is an interesting case.&lt;/p&gt;
&lt;p&gt;This short code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tmp := 2 A B + 3 B C + 4 C D.
substitute (tmp, $A? -&amp;gt; \theta A?$)
collect_factors (tmp)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tmp := 2 \theta^2 A B + 3 \theta^2 B C + 4 \theta^2 C D&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;while&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tmp := 2 A B C + 3 B C D + 4 C D E.
substitute (tmp, $A? -&amp;gt; \theta A?$)
collect_factors (tmp)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tmp := 2 \theta^3 A B C + 3 \theta^3 B C D + 4 \theta^3 C D E&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Okay, so far , so good.&lt;/p&gt;
&lt;p&gt;However, this code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tmp := 2 A + 3 B + 4 C.
substitute (tmp, $A? -&amp;gt; \theta A?$)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tmp := 4 \theta A + 9 \theta B + 16 \theta C&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice that the integer coefficients have been squared! That's not correct.&lt;/p&gt;
&lt;p&gt;Quite interesting, n'est pas?&lt;/p&gt;
&lt;p&gt;Cheers,
Leo&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3011/simple-substitute-hits-wrong-target</guid>
<pubDate>Mon, 07 Apr 2025 04:09:04 +0000</pubDate>
</item>
<item>
<title>curly-braces and lost indices</title>
<link>https://cadabra.science/qa/3010/curly-braces-and-lost-indices</link>
<description>&lt;p&gt;Greetings,&lt;/p&gt;
&lt;p&gt;This short example&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,e,f#}::Indices.

foo := A^{a} A^{b} g_{a b}.
substitute (foo,$A^{a}-&amp;gt;B^{a}$)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;does what you'd expect. It returns&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;foo := B^{a} B^{b} g_{a b}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But the following code&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;foo := A^{a} A^{b} g_{a b}.
substitute (foo,$A^{a}-&amp;gt;{B}^{a}$)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;foo := B B g_{a b}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now that seems wrong to me.&lt;/p&gt;
&lt;p&gt;Any thoughts?&lt;/p&gt;
&lt;p&gt;My guess is that the curly-braces around B in the second assignment disconnects B from the following indices. Those indices are orphaned and are thus lost in the substitution.&lt;/p&gt;
&lt;p&gt;The simple answer is -- Don't use unnecessary curly-braces.&lt;/p&gt;
&lt;p&gt;Cheers,
Leo&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/3010/curly-braces-and-lost-indices</guid>
<pubDate>Mon, 07 Apr 2025 04:06:29 +0000</pubDate>
</item>
<item>
<title>c++lib fails to compile</title>
<link>https://cadabra.science/qa/2970/c-lib-fails-to-compile</link>
<description>&lt;p&gt;On my system, &lt;code&gt;c++lib&lt;/code&gt; fails to compile properly. I needed to add the line
&lt;code&gt;${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/DerivativeOp.cc&lt;/code&gt;
and also explicitly add the python include path, i.e.
&lt;code&gt;include_directories(/usr/include/python3.10)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I'm not sending a fix because my Python include is obviously system-dependent; probably there is a correct way to do this.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2970/c-lib-fails-to-compile</guid>
<pubDate>Tue, 10 Dec 2024 16:24:56 +0000</pubDate>
</item>
<item>
<title>Kronecker delta wrong output in 2D</title>
<link>https://cadabra.science/qa/2969/kronecker-delta-wrong-output-in-2d</link>
<description>&lt;p&gt;I'm basically following the &lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/manual/eliminate_metric.html&quot;&gt;eliminate_metric example&lt;/a&gt; from the website:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{m, n, p, q, r}::Indices(vector, position=fixed).
{m, n, p, q, r}::Integer(0..9).
g_{m n}::Metric.
g^{m n}::InverseMetric.
g_{m}^{n}::KroneckerDelta.
g^{m}_{n}::KroneckerDelta.
ex:=g_{m p} g^{p m};
eliminate_metric(_);
eliminate_kronecker(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but I'm working with doubled coordinates, meaning that my coordinates go from 0 to 2D-1. Therefore, if I change the corresponding part to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{m, n, p, q, r}::Integer(0..2*D-1).&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;the output is, against all odds and common sense, &lt;strong&gt;D&lt;/strong&gt;. You may be thinking that it won't work with such terms, but I've stumbled upon a bizzare bug; here are some examples of different inputs and outputs:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{m, n, p, q, r}::Integer(0..D).

D+1&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;{m, n, p, q, r}::Integer(0..2 D + 1).

2D+2&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;{m, n, p, q, r}::Integer(0..3D-1).

D&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;{m, n, p, q, r}::Integer(0..2*(D-1)).

2D-1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It seems that when the dimensionality of Kronecker is a multiple of &lt;strong&gt;D&lt;/strong&gt;, it stops working properly. Any ideas on why this is happening? What can be done to fix it? &lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2969/kronecker-delta-wrong-output-in-2d</guid>
<pubDate>Tue, 10 Dec 2024 15:45:07 +0000</pubDate>
</item>
<item>
<title>Canonicalise Kernel crash</title>
<link>https://cadabra.science/qa/2962/canonicalise-kernel-crash</link>
<description>&lt;p&gt;Hello everyone.&lt;/p&gt;
&lt;p&gt;I am currently calculating a large expression in coordinates and using the canonicalise function to order partial derivatives without using sympy bridge. And I found that an expression of this kind causes the kernel to crash when executing the canonicalise function.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{t, x, y, z, u}::Coordinate.
{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,v,w#}::Indices(full, values={t,x,y,z,u}, position=independent).
\partial{#}::PartialDerivative.

p::Depends(t).
W_{m?}::Depends(t,x,y,z).

test := Dh \partial_{x}(W_{x}) \partial_{y}(W_{y}) (\partial_{t}(p))**2 (\partial_{t t}(p))**2 (a)**(-4) a2X;

canonicalise(test);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm using Cadabra 2.5.8 (build 3421.a815a66da2 dated 2024-10-25) on Ubuntu 22.04.5&lt;/p&gt;
&lt;p&gt;update:&lt;/p&gt;
&lt;p&gt;I also noticed that if I write &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;canonicalise($\partial_{x}{W_{x}} \partial_{y}{W_{y} (\partial_{t}{p})**2 (\partial_{t t}{p})$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get the following error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Traceback (most recent call last): File &quot;/usr/local/lib/python3.10/dist-packages/cadabra2_jupyter/kernel.py&quot;, line 56, in do_execute self._execute_python(pycode) File &quot;/usr/local/lib/python3.10/dist-packages/cadabra2_jupyter/kernel.py&quot;, line 110, in _execute_python self._sandbox_context(pycode) File &quot;/usr/local/lib/python3.10/dist-packages/cadabra2_jupyter/context.py&quot;, line 51, in __call__ exec(code, self._sandbox) File &quot;&amp;lt;string&amp;gt;&quot;, line 1, in &amp;lt;module&amp;gt; IndexError: vector::_M_range_check: __n (which is 3) &amp;gt;= this-&amp;gt;size() (which is 3)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and If if I replace &lt;code&gt;\partial_{t t}{p}&lt;/code&gt; with &lt;code&gt;(\partial_{t t}{p})**2&lt;/code&gt; , the kernel dies&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;canonicalise($\partial_{x}{W_{x}} \partial_{y}{W_{y} (\partial_{t}{p})**2 (\partial_{t t}{p})**2$);&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2962/canonicalise-kernel-crash</guid>
<pubDate>Mon, 02 Dec 2024 19:13:19 +0000</pubDate>
</item>
<item>
<title>collect_factors / simplify with AntiCommuting objects</title>
<link>https://cadabra.science/qa/2958/collect_factors-simplify-with-anticommuting-objects</link>
<description>&lt;p&gt;This is a weird case and perhaps unlikely to be encountered in normal use, but I'm noting it here.&lt;/p&gt;
&lt;p&gt;Consider:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{A,X}::AntiCommuting.
ex := X A X;
sort_product(ex)
collect_factors(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above produces a negative sign as one might suspect. However:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{A,X}::AntiCommuting.
ex := X A X;
collect_factors(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above does not. Nor does this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{A,X}::AntiCommuting.
ex := X A X;
simplify(ex);&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2958/collect_factors-simplify-with-anticommuting-objects</guid>
<pubDate>Thu, 21 Nov 2024 20:35:21 +0000</pubDate>
</item>
<item>
<title>sympy(?) errors parsing nested derivatives?</title>
<link>https://cadabra.science/qa/2949/sympy-errors-parsing-nested-derivatives</link>
<description>&lt;p&gt;As a warmup exercise before what I &lt;em&gt;really&lt;/em&gt; want to do, I'm trying to compute the Laplacian operator in 2D plane polar coordinates. I do this by expressing &lt;code&gt;\partial_{x}&lt;/code&gt; and &lt;code&gt;\partial_{y}&lt;/code&gt; in terms of &lt;code&gt;\partial_{r}&lt;/code&gt; and &lt;code&gt;\partial_{\theta}&lt;/code&gt;, and then compute the sum of the squares of these operators.&lt;/p&gt;
&lt;p&gt;Of course, operator expressions like &lt;code&gt;\partial_x^2&lt;/code&gt; are quickly regurgitated, so I'm trying the following alternative:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Px:= { px = \cos{\phi} \partial_{r}{f} 
     - \frac{\sin\phi}{r} \partial_{\phi}{f} } ;

Pxx:= { pxx = \cos{\phi} \partial_{r}{px} 
     - \frac{\sin\phi}{r} \partial_{\phi}{px}};

substitute(Pxx,Px);

evaluate(Pxx);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cadabra gets the substitution correct, but evaluate() gives what looks like a sympy error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{\color{red}{\begin{verbatim}TypeError: bad operand type for unary -: 'FunctionClass'

{\color{red}{\begin{verbatim}TypeError: bad operand type for unary -: 'FunctionClass'

TypeError: bad operand type for unary -: 'FunctionClass'
At:
  Notebook Cell (Line 0): 
  /tmp/.mount_CadabrIqWtS3/usr/lib/python3.8/dist-packages/sympy/parsing/sympy_parser.py(909): eval_expr
  /tmp/.mount_CadabrIqWtS3/usr/lib/python3.8/dist-packages/sympy/parsing/sympy_parser.py(1090): parse_expr
  Notebook Cell (Line 0): &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Btw, I was unable to copy and paste these red error messages out of cadabra easily by the usual highlight-and-click methods. I had to click Edit-&amp;gt;Copy and then paste it over here, but it still omitted the first line above (which I ended up typing in by hand).&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2949/sympy-errors-parsing-nested-derivatives</guid>
<pubDate>Tue, 01 Oct 2024 06:47:52 +0000</pubDate>
</item>
<item>
<title>\partial_\theta causes infinite loop(?) in server</title>
<link>https://cadabra.science/qa/2945/partial_-theta-causes-infinite-loop-in-server</link>
<description>&lt;p&gt;As in my previous questions, I have&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;f::Depends(r,\theta,\phi, vr, vtheta, vphi);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The following works ok:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;exfr:= { fr = \partial_r{f} };&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;exfth:= { fth = \partial_\theta{f} };&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;makes the server go into some kind of infinite loop (i.e., consumes ~ 99% CPU). So I have to restart the kernel.&lt;/p&gt;
&lt;p&gt;Similarly,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;exfvth:= { fvth = \partial_vtheta{f} };&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;causes infinite looping in server.&lt;/p&gt;
&lt;p&gt;Enclosing the \theta or vtheta in braces works ok, i.e.,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;exfth:= { fth = \partial_{\theta}{f} };&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2945/partial_-theta-causes-infinite-loop-in-server</guid>
<pubDate>Mon, 30 Sep 2024 08:53:35 +0000</pubDate>
</item>
<item>
<title>Gtk error messages on startup.</title>
<link>https://cadabra.science/qa/2941/gtk-error-messages-on-startup</link>
<description>&lt;p&gt;When I run Cadabra_2.5.6_x86_64.AppImage from a terminal I get the following error messages:&lt;/p&gt;
&lt;p&gt;Gtk-Message: 12:54:41.239: Failed to load module &quot;canberra-gtk-module&quot;
Gtk-Message: 12:54:41.264: Failed to load module &quot;window-decorations-gtk-module&quot;
Gtk-Message: 12:54:41.264: Failed to load module &quot;colorreload-gtk-module&quot;&lt;/p&gt;
&lt;p&gt;but it seems to keep running, although with fonts that are not my usual choice.&lt;/p&gt;
&lt;p&gt;Also, (not necessarily at startup) I get messages on the terminal saying&lt;/p&gt;
&lt;p&gt;cadabra-client: connection to server on port 33555 failed&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2941/gtk-error-messages-on-startup</guid>
<pubDate>Mon, 30 Sep 2024 03:02:33 +0000</pubDate>
</item>
<item>
<title>Cycle freeze</title>
<link>https://cadabra.science/qa/2929/cycle-freeze</link>
<description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I often use the following function with a converge loop to simplify expressions:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;def tidy (expr):
   converge(expr):
       distribute(expr)
       product_rule(expr)
       sort_product(expr)
       collect_factors(expr)
   return expr&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But after today's update of cadabra to the latest version, this loop became infinite. Not for all expressions, but, for example, for this one&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c,d,f,g,m,n,k,q,r,s,t,u,v,w,x,y,z,m#}::Indices(subspace, position=independent, parent=full);
\partial{#}::PartialDerivative.


expr := ((\phi)**(-2) + A_{a} h^{a b} A_{b}) (\partial_{n}((\phi)**2 A_{m}) + \partial_{m}((\phi)**2 A_{n}));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, the problem only occurs if I use this function from a external file&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import functions as fun&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;so, if I use &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;fun.tidy(expr)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Loop is infinite.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2929/cycle-freeze</guid>
<pubDate>Thu, 26 Sep 2024 15:31:48 +0000</pubDate>
</item>
<item>
<title>A bug of Accent</title>
<link>https://cadabra.science/qa/2912/a-bug-of-accent</link>
<description>&lt;p&gt;For example, &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;Result is not right.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2912/a-bug-of-accent</guid>
<pubDate>Thu, 01 Aug 2024 04:36:53 +0000</pubDate>
</item>
<item>
<title>LaTeXForm fails in version 2.5.2</title>
<link>https://cadabra.science/qa/2893/latexform-fails-in-version-2-5-2</link>
<description>&lt;p&gt;Greetings,&lt;/p&gt;
&lt;p&gt;This simple statement&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Dx{#}::LaTeXForm{&quot;Dx&quot;}.&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;raises a syntax error&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SyntaxError: '{' was never closed&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I'm running Cadabra version 2.5.2. build 3043.2a1d62739a.&lt;/p&gt;
&lt;p&gt;Also, this version of Cadabra compiles fine under MacOS Sonoma 14.5.&lt;/p&gt;
&lt;p&gt;Cheers, Leo&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2893/latexform-fails-in-version-2-5-2</guid>
<pubDate>Mon, 17 Jun 2024 22:50:17 +0000</pubDate>
</item>
<item>
<title>substitute gives incorrect value on scalar expression</title>
<link>https://cadabra.science/qa/2892/substitute-gives-incorrect-value-on-scalar-expression</link>
<description>&lt;p&gt;Greetings,
I'm trying to use the &lt;code&gt;substitute&lt;/code&gt; algorithm to set the value of a scalar expression but I'm getting some very odd results. In the following examples I set a variable &lt;code&gt;s&lt;/code&gt; to be 1 and the expected result should be zero. But in the first case I get 2. This problem only seems to arise for the single choice of &lt;code&gt;s=1&lt;/code&gt;. 
Cheers, Leo&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# ----------------------------------------------------
# fails, should return 0

foo := s - s**3;

substitute (foo, $s = 1$);

# ----------------------------------------------------
# success

foo := s - s*s*s;

substitute (foo, $s = 1$);

# ----------------------------------------------------
# success

foo := s**3 - s;

substitute (foo, $s = 1$);

# ----------------------------------------------------
# success

foo := s - s**3;

substitute (foo, $s = 2$);

# ----------------------------------------------------
# success

foo := s - s**3;

substitute (foo, $s = 1/2$);
&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2892/substitute-gives-incorrect-value-on-scalar-expression</guid>
<pubDate>Mon, 17 Jun 2024 22:25:46 +0000</pubDate>
</item>
<item>
<title>location of bracket blocks distribute</title>
<link>https://cadabra.science/qa/2876/location-of-bracket-blocks-distribute</link>
<description>&lt;p&gt;Hi Folks,&lt;/p&gt;
&lt;p&gt;Here are two instances of the &lt;code&gt;distribute&lt;/code&gt; algorithm. Only the first gives the expected result. The only difference in the code is where the opening bracket is placed.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# ----------------------------------------------
# this works as expected

foo := A (
       B + C);

distribute (foo);

# ----------------------------------------------
# this fails to apply the &quot;distribute&quot; algorithm

bah := A
       (B + C);

distribute (bah);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cheers,
Leo&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2876/location-of-bracket-blocks-distribute</guid>
<pubDate>Tue, 11 Jun 2024 05:46:21 +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>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>bug of unwrap</title>
<link>https://cadabra.science/qa/2828/bug-of-unwrap</link>
<description>&lt;p&gt;For example, &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;u::Coordinate.
f::Depends(u).
\partial{#}::PartialDerivative.
ex:=\partial_u{u f};
product_rule(_);
unwrap(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where $\partial_u(u)=0$, there seems to be a bug here.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2828/bug-of-unwrap</guid>
<pubDate>Tue, 23 Apr 2024 07:46:59 +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>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>The output is lost in WSL2</title>
<link>https://cadabra.science/qa/2775/the-output-is-lost-in-wsl2</link>
<description>&lt;p&gt;In WSL2, I often cannot find where the output is. But sometimes it works. I don't know what happened. I have followed the &lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/notebooks/ref_import.html&quot;&gt;tutorial&lt;/a&gt;.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2775/the-output-is-lost-in-wsl2</guid>
<pubDate>Fri, 12 Apr 2024 22:41:16 +0000</pubDate>
</item>
<item>
<title>unwrap of partial derivatives</title>
<link>https://cadabra.science/qa/2768/unwrap-of-partial-derivatives</link>
<description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;I have a problem with the unwrap() function. When I apply it to multiple partial derivatives, it doesn't always work, for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{t, x, y, z}::Coordinate.
\partial{#}::PartialDerivative.
a::Depends(t).

unwrap($\partial_{t t x}{a}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I was thinking that partial derivatives by definition in Cadabra commute, in which case, unwrap() should give zero.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2768/unwrap-of-partial-derivatives</guid>
<pubDate>Tue, 26 Mar 2024 14:37:48 +0000</pubDate>
</item>
<item>
<title>meld returns zero where it shouldn't?</title>
<link>https://cadabra.science/qa/2734/meld-returns-zero-where-it-shouldnt</link>
<description>&lt;p&gt;I've been trying to make use of &lt;code&gt;meld&lt;/code&gt; and I'm finding some potential bugs.&lt;/p&gt;
&lt;p&gt;Consider:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;X_{a b c}_{d}::TableauSymmetry(shape=(2,1,1), indices=(0,3,1,2)).&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This generates a tensor &lt;code&gt;X_{a b c}_{d}&lt;/code&gt; which is antisymmetric in &lt;code&gt;abc&lt;/code&gt; but with the totally antisymmetric part in &lt;code&gt;abcd&lt;/code&gt; removed.&lt;/p&gt;
&lt;p&gt;If I evaluate meld on the following three quantities:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;meld($ X_{a b d d}$);
meld($ X_{a d b d}$);
meld($ X_{d a b d}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get 0 for the first two and &lt;code&gt;X_{d a b d}&lt;/code&gt; for the last. Of course, they should all be nonzero. (For the last, if I then call canonicalise and meld again, I get 0 because it rearranges the indices into the first case.)&lt;/p&gt;
&lt;p&gt;Similar behavior occurs with the simpler tensor&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;X_{a b}_{c}::TableauSymmetry(shape=(2,1), indices=(0,2,1)).&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;meld($ X_{a d d}$);
meld($ X_{d a d}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;gives 0 for the first but &lt;code&gt;X_{d a d}&lt;/code&gt; for the second.&lt;/p&gt;
&lt;p&gt;Perhaps I am doing something stupid but I don't quite see what it is.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2734/meld-returns-zero-where-it-shouldnt</guid>
<pubDate>Mon, 05 Feb 2024 01:46:56 +0000</pubDate>
</item>
<item>
<title>Operations with fractional powers of negative numbers</title>
<link>https://cadabra.science/qa/2726/operations-with-fractional-powers-of-negative-numbers</link>
<description>&lt;p&gt;Hi! When I try to work with expressions like (-X)^{1/2} or any other fractional degree the expand_power and collect_powers commands cause a kernel crash, for example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;collect_factors($(-X)**{-5/2} X$);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I know that without defining the X sign beforehand, I can't shorten this expression, but kernel crush is too much. 
That's why I have another question for this bugreport, is it possible to define the sign of X in advance to work with such expressions correctly?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2726/operations-with-fractional-powers-of-negative-numbers</guid>
<pubDate>Tue, 16 Jan 2024 14:02:49 +0000</pubDate>
</item>
<item>
<title>Interaction between 'canonicalise' and vector spinors</title>
<link>https://cadabra.science/qa/2723/interaction-between-canonicalise-and-vector-spinors</link>
<description>&lt;p&gt;I'm trying to do some computations involving bilinears of vector spinors &lt;code&gt;\psi_a&lt;/code&gt; and it seems that using &lt;code&gt;canonicalise&lt;/code&gt; eliminates terms which shouldn't be zero. &lt;/p&gt;
&lt;p&gt;In particular this applies to terms like &lt;code&gt;\psi^a \bar{\psi^b}&lt;/code&gt;, as showcased by the following minimal example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Setup properties needed
{a, b}::Indices.

\psi^a::SelfAntiCommuting.
{\psi^a, \rho, \chi}::Spinor(dimension=10).
{\psi^a, \rho, \chi}::AntiCommuting.

\bar{#}::DiracBar.

A{#}::AntiSymmetric.&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;# Non-zero canonicalisation
ex := A_{a b}  \bar{\psi^b} \rho \bar{\psi^a} \chi.
canonicalise(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns &lt;code&gt;-A_{a b}  \bar{\psi^a} \rho \bar{\psi^b} \chi&lt;/code&gt; as expected, while &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Zero canonicalisation
ex := A_{a b} \bar{\rho} \psi^b\bar{\psi^a} \chi.
canonicalise(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns &lt;code&gt;0&lt;/code&gt;, even though it should not be zero. &lt;/p&gt;
&lt;p&gt;Stripping everything else away, also the following canonicalises to zero, even though it should not:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Zero canonicalisation
ex := A_{a b} \psi^b\bar{\psi^a}.
canonicalise(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Did I forget something in the setup of my spinors, or is that a genuine error in &lt;code&gt;canonicalise&lt;/code&gt;?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2723/interaction-between-canonicalise-and-vector-spinors</guid>
<pubDate>Thu, 11 Jan 2024 16:01:22 +0000</pubDate>
</item>
<item>
<title>remove_zero_components and components_to_subrule fail with AttributeError</title>
<link>https://cadabra.science/qa/2714/remove_zero_components-components_to_subrule-attributeerror</link>
<description>&lt;p&gt;The following two snippets of code are taken from the manual. They both now fail with &lt;code&gt;AttributeError: 'cadabra2.ExNode' object has no attribute 'top'&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Am I doing something wrong?&lt;/p&gt;
&lt;p&gt;This is using
Cadabra2 2.4.5.2
Ubuntu 22.04&lt;/p&gt;
&lt;p&gt;Snippet 1:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from cdb.core.component import *

{x, y, z}::Coordinate.
{i, j}::Indices(values={x, y, z}, position=fixed).
ex := a_{i}a_{j};
evaluate(ex, $a_{x} = k, a_{y} = l, a_{z} = m$)
substitute(ex, $k m -&amp;gt; 0$);
remove_zero_components(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Snippet 2:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from cdb.core.component import *

{x, y, z}::Coordinate.
{i, j}::Indices(values={x, y, z}, position=fixed).
ex := b_{i j} = a_{i}a_{j};
evaluate(ex, $a_{x} = k, a_{y} = l, a_{z} = m$, rhsonly=True);
# substitute(ex, $k m -&amp;gt; 0$);
components_to_subrule(ex);&lt;/code&gt;&lt;/pre&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2714/remove_zero_components-components_to_subrule-attributeerror</guid>
<pubDate>Mon, 08 Jan 2024 09:05:45 +0000</pubDate>
</item>
<item>
<title>Negative powers of 0</title>
<link>https://cadabra.science/qa/2673/negative-powers-of-0</link>
<description>&lt;p&gt;Hi! I've found out that &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;substitute($t**{-1}$, $t -&amp;gt; 0$)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;equal to 0 in cadabra, and this is the same for any negative power. I think it's a bug.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2673/negative-powers-of-0</guid>
<pubDate>Tue, 12 Dec 2023 13:10:44 +0000</pubDate>
</item>
<item>
<title>meld sets to zero when it shouldn't?</title>
<link>https://cadabra.science/qa/2668/meld-sets-to-zero-when-it-shouldnt</link>
<description>&lt;p&gt;Hi, and thanks as always for cdb.&lt;/p&gt;
&lt;p&gt;I think I may be missing something, but I can't figure what it might be. Please consider the following two pieces of code; they only differ in that the first uses &lt;code&gt;canonicalise&lt;/code&gt; while the second uses &lt;code&gt;meld&lt;/code&gt;. However the second gives 0 as the result and I don't see why.&lt;/p&gt;
&lt;p&gt;First segment of code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\partial{#}::PartialDerivative.
{\mu,\nu,μ,ν}::Indices(spacetime,position=fixed).
f::Depends(\partial{#}).
\delta_{\alpha}^{\mu}::KroneckerDelta.
{\alpha,\beta,α,β}::Indices(flat,position=fixed).
e_{\alpha}^{\mu}::Depends(\partial{#}).

{u^{\mu},v^{\mu}, \partial_{\nu}{Q??}, \partial_{\nu}{f}, \partial_{\mu\nu}{f}, e_{\nu}, f, (1/f)}::SortOrder.

ex := \partial_{μ}(e_{β}^{ν}) \partial_{ν}(f) e_{α}^{μ} +
        \partial_{μ ν}(f) e_{α}^{μ} e_{β}^{ν}
        -\partial_{μ}(e_{α}^{ν}) \partial_{ν}(f) e_{β}^{μ}
        -\partial_{μ ν}(f) e_{α}^{ν} e_{β}^{μ}.
ex;
canonicalise(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Second segment of code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\partial{#}::PartialDerivative.
{\mu,\nu,μ,ν}::Indices(spacetime,position=fixed).
f::Depends(\partial{#}).
\delta_{\alpha}^{\mu}::KroneckerDelta.
{\alpha,\beta,α,β}::Indices(flat,position=fixed).
e_{\alpha}^{\mu}::Depends(\partial{#}).

{u^{\mu},v^{\mu}, \partial_{\nu}{Q??}, \partial_{\nu}{f}, \partial_{\mu\nu}{f}, e_{\nu}, f, (1/f)}::SortOrder.

ex := \partial_{μ}(e_{β}^{ν}) \partial_{ν}(f) e_{α}^{μ} +
        \partial_{μ ν}(f) e_{α}^{μ} e_{β}^{ν}
        -\partial_{μ}(e_{α}^{ν}) \partial_{ν}(f) e_{β}^{μ}
        -\partial_{μ ν}(f) e_{α}^{ν} e_{β}^{μ}.
ex;
meld(ex);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;GPN&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2668/meld-sets-to-zero-when-it-shouldnt</guid>
<pubDate>Tue, 05 Dec 2023 21:15:09 +0000</pubDate>
</item>
<item>
<title>Manually fiddling with multiplier on \sum</title>
<link>https://cadabra.science/qa/2649/manually-fiddling-with-multiplier-on-sum</link>
<description>&lt;p&gt;There is an interesting bug (?) when one manually fiddles with the multiplier on \sum.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := x+y;
ex.top().multiplier=-1&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;display(ex) and ex.input_form both return x+y.
But if I access @(ex), it returns -x-y.  tree(ex) clearly sees the -1 on the \sum node.&lt;/p&gt;
&lt;p&gt;Presumably the multiplier on sum shouldn't be manually modified by the user, but I found this behaviour interesting.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2649/manually-fiddling-with-multiplier-on-sum</guid>
<pubDate>Fri, 01 Dec 2023 16:20:34 +0000</pubDate>
</item>
<item>
<title>WeightInherit type=additive thinks operator is \sum</title>
<link>https://cadabra.science/qa/2633/weightinherit-type-additive-thinks-operator-is-sum</link>
<description>&lt;p&gt;The ::WeightInherit property appears to treat the operator implicitly as a \sum when type=additive.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;x::Weight(value=2, label=field).
y::Weight(value=3, label=field).
f{#}::WeightInherit(label=all, type=additive).
ex:= f{x}.
drop_weight(ex, $field=2$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns 0, as expected, but&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;drop_weight(ex, $field=1$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns x.  (Same for field=3,4,...)&lt;/p&gt;
&lt;p&gt;Interestingly,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := f{x}{y}.
drop_weight(ex, $field=3$);
ex := f{x}{y}.
drop_weight(ex, $field=2$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns  first x and then y.
Similarly,&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := f{x}{y}{z}.
drop_weight(ex, $field=3$)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;returns f{x}{z}.&lt;/p&gt;
&lt;p&gt;So drop_weight is converting f{x} to x but if f has more than one child, it's leaving it as f. Presumably this is because the code implicitly treats f as \sum.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2633/weightinherit-type-additive-thinks-operator-is-sum</guid>
<pubDate>Wed, 29 Nov 2023 16:09:51 +0000</pubDate>
</item>
<item>
<title>substitute crashes with empty replacement rule</title>
<link>https://cadabra.science/qa/2616/substitute-crashes-with-empty-replacement-rule</link>
<description>&lt;p&gt;This is a bit pathological, but calling substitute with an empty set of rules causes the kernel to crash.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := A+B;
substitute(ex, $ $);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex := A+B;
substitute(ex, ${ }$);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is perhaps more a feature request than a bug report, as it might be nicer if we received the usual error message (i.e. &quot;not a replacement rule or equality&quot;).&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2616/substitute-crashes-with-empty-replacement-rule</guid>
<pubDate>Sun, 26 Nov 2023 05:45:04 +0000</pubDate>
</item>
<item>
<title>Bug with Ex.matches() for indices in opposite positions</title>
<link>https://cadabra.science/qa/2615/bug-with-ex-matches-for-indices-in-opposite-positions</link>
<description>&lt;p&gt;Consider the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{a,b,c}::Indices(vector, position=independent).
{i,j,k}::Indices(isospin, position=independent).

bool1 = $\Lambda_{a}$.matches($\Lambda_{i}$);

bool2 = $\Lambda_{a}$.matches($\Lambda^{i}$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;bool1 evaluates to False, while bool2 evaluates to True.&lt;/p&gt;
&lt;p&gt;The same behavior occurs if we use position=fixed. However, for position=free, both evaluate to False (as expected). This would seem to be a bug.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2615/bug-with-ex-matches-for-indices-in-opposite-positions</guid>
<pubDate>Sun, 26 Nov 2023 04:10:23 +0000</pubDate>
</item>
<item>
<title>Empty expressions fail to match</title>
<link>https://cadabra.science/qa/2608/empty-expressions-fail-to-match</link>
<description>&lt;p&gt;Any of the following cause the kernel to crash:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Ex('X').matches(Ex(' '));
Ex(' ').matches(Ex(' '));
Ex(' ').matches(Ex('X'));&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is slightly pathological, of course.&lt;/p&gt;
&lt;p&gt;Using 2.4.5 (build 2910.ad85a64173).&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2608/empty-expressions-fail-to-match</guid>
<pubDate>Mon, 20 Nov 2023 19:20:56 +0000</pubDate>
</item>
<item>
<title>Problem with substitute and powers</title>
<link>https://cadabra.science/qa/2575/problem-with-substitute-and-powers</link>
<description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;When i try to make a substitution in the following expression:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:=-a**2 - b**2 - 2 a b;
substitute(_,$b-&amp;gt;-a$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get 2aa, which is obviously wrong. However, if i run the following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:=-a**2 - b**2 - 2 a b;
expand_power(_);
substitute(_,$b-&amp;gt;-a$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get 0, as should be. What is the problem with the first example?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2575/problem-with-substitute-and-powers</guid>
<pubDate>Tue, 31 Oct 2023 22:12:31 +0000</pubDate>
</item>
<item>
<title>Substitution after map_sympy(*, 'simplify')</title>
<link>https://cadabra.science/qa/2570/substitution-after-map_sympy-simplify</link>
<description>&lt;p&gt;Hello!&lt;/p&gt;
&lt;p&gt;I've found some strange thing: If I have an expression with square root in it, and try to substitute it, like&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Eq := \sqrt(X);
substitute(Eq, $\sqrt(X) -&amp;gt; A$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;it works and I get A. But if I send it to sympy in the middle, the substitution stops working&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Eq := \sqrt(X);
map_sympy(Eq, 'simplify');
substitute(Eq, $\sqrt(X) -&amp;gt; A$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This particular example is silly, but it illustrates the problem.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2570/substitution-after-map_sympy-simplify</guid>
<pubDate>Wed, 25 Oct 2023 12:21:30 +0000</pubDate>
</item>
<item>
<title>InverseMetric is not symmetric?</title>
<link>https://cadabra.science/qa/2564/inversemetric-is-not-symmetric</link>
<description>&lt;p&gt;Hi
And as always many thanks for $C_{δβ}$.&lt;/p&gt;
&lt;p&gt;Is this a bug or a feature, please?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;g^{\mu\nu}::InverseMetric.

if InverseMetric.get($g^{\gamma\kappa}$):
    print('yes')  # &amp;lt;-- actually prints yes
else:
    print('no')

if Symmetric.get($g^{\gamma\kappa}$):
    print('yes')
else:
    print('no')  # &amp;lt;-- actually prints no&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks
GPN&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2564/inversemetric-is-not-symmetric</guid>
<pubDate>Mon, 23 Oct 2023 12:28:11 +0000</pubDate>
</item>
<item>
<title>function evaluate output a wrong order of SelfAntiCommuting objects</title>
<link>https://cadabra.science/qa/2543/function-evaluate-output-wrong-selfanticommuting-objects</link>
<description>&lt;p&gt;Hi, the following codes output a wrong result.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{x,y}::Coordinate;
{a,b,c,d,e,f# }::Indices(vielbein, values={x,y}, position=independent);
{a,b,c,d,e,f# }::Integer(range=0..1)
\gamma_{a}::SelfAntiCommuting.
\omega^{a b}::AntiSymmetric.
ex:=  xxx  =  \gamma_{a} \gamma_{b} \omega^{a b}  ;
evaluate(ex,rhsonly=True,simplify=False);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I obtained&lt;/p&gt;
&lt;p&gt;$\gamma_x \gamma_y \omega^{y x} +\gamma_y \gamma_x \omega^{x y}$&lt;/p&gt;
&lt;p&gt;The right result should be &lt;/p&gt;
&lt;p&gt;$\gamma_x \gamma_y \omega^{x y} +\gamma_y \gamma_x \omega^{y x}$&lt;/p&gt;
&lt;p&gt;Any suggestion would be greatly appreciated!&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2543/function-evaluate-output-wrong-selfanticommuting-objects</guid>
<pubDate>Wed, 20 Sep 2023 13:33:27 +0000</pubDate>
</item>
<item>
<title>Module &quot;cdb.core.component&quot; cannot be imported</title>
<link>https://cadabra.science/qa/2534/module-cdb-core-component-cannot-be-imported</link>
<description>&lt;p&gt;When I import cdb.core.component using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import cdb.core.component as comp&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I get the following error:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  File &quot;/Users/hl/Library/Preferences/cadabra_packages/cdb/core/component.py&quot;, line 17, in &amp;lt;module&amp;gt;
    from cdb.core._component import get_component
ModuleNotFoundError: No module named 'cdb.core._component'&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When I go to the folder containing the file &quot;component.py&quot;, I saw that there are 3 functions: &quot;get_component&quot;, &quot;remove_zero_components(ex), components_to_subrule(ex)&quot; (this is expected as these are the 3 functions under the 'core.component' module), but the function &quot;get_component&quot; is grayed out (commented out).  The code for this also has a strange import: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;from cdb.core._component import get_component&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which refers to &quot;cdb.core._component&quot; that cannot be found. &lt;/p&gt;
&lt;p&gt;I recently updated Cadabra to the latest version and this is the first time I am using 'get_component' so I don't know what is wrong, but the fact that the entire 'get_component' function is grayed out is strange to me. I wish I could attach a screenshot to show this, but I can't find the option to attach an image (only the URL for the image), so I copied and pasted the code from &quot;component.py&quot; here:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;import cadabra2
import imp
from cadabra2 import *
from cadabra2_defaults import *
__cdbkernel__ = cadabra2.__cdbkernel__
temp__all__ = dir() + ['temp__all__']

def display(ex):
   pass

from cdb.utils.node import n_children
from cdb.core.manip import get_lhs, get_rhs
from cdb.utils.indices import get_free_indices
from cdb.core._component import get_component

#def get_component(ex, components):
#   &quot;&quot;&quot;Gets a particular component of an expression&quot;&quot;&quot;
#   # Work on a copy of ex
#   ex = ex.top().ex()
#
#   # Replace all free indices with the components
#   free_indices = get_free_indices(ex.top())
#   if components.top().name != r&quot;\comma&quot;:
#       tmp = Ex(r'\comma')
#       tmp.top().append_child(components.top())
#       components = tmp
#   assert len(free_indices) == n_children(components.top()), f&quot;Expression contains {len(free_indices)} free indices, but {n_children(components.top())} components supplied&quot;
#   for index, component in zip(free_indices, components.top().children()):
#       node = next(ex[index.top().name], None)
#       changed = True
#       while changed:
#           for node in ex[index.top().name]:
#               if node.parent_rel == parent_rel_t.super or node.parent_rel == parent_rel_t.sub:
#                   pr = node.parent_rel
#                   node.replace(component.ex())
#                   node.parent_rel = pr
#                   break
#           else:
#               changed = False
#
#   # Replace all component nodes with the particular component we are looking for
#   for node in ex[r'\components']:
#       # Sift through \equals nodes finding the one with the right components
#       for candidate in node[r'\equals']:
#           arg = get_lhs(candidate)
#           if arg == components:
#               node = node.replace(get_rhs(candidate))
#               break
#       else:
#           node = node.replace($0$)
#
#   # The components paramater needs to have a head '\comma' node
#   # so let's quickly make sure that's true.
#   if components.head() != r'\comma':
#       bit = $@(components)$
#       components.top().name = r'\comma'
#       components.top().append_child(bit)
#
#   return ex&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thank you in advance for any help. &lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2534/module-cdb-core-component-cannot-be-imported</guid>
<pubDate>Tue, 29 Aug 2023 06:49:36 +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>eliminate_metric - avoid partial differential</title>
<link>https://cadabra.science/qa/2487/eliminate_metric-avoid-partial-differential</link>
<description>&lt;p&gt;Hi,
I don't know if this is a bug: Does eliminate_metric supposed to move the metric tensor inside partial derivative freely?&lt;/p&gt;
&lt;p&gt;I have the following code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{x1,x2,x3,x4}::Coordinate;
{k,l,m,n,p,q,r,s,t}::Indices(position=fixed,values=[x1,x2,x3,x4]);
g{m n}::Metric;
g^{m n}::InverseMetric;
g{m}^{n}::KroneckerDelta;
g^{m}{n}::KroneckerDelta;
{g{m n},g^{m n}}::Depends(x1,x2,x3,x4);
\nabla{#}::Derivative.
\partial{#}::PartialDerivative.
test := Q^{s}_{r m n} -&amp;gt; g^{s k} \partial{r m}{g{k n}};
eliminate_metric();&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The output I get is that the inverse-metric goes inside the derivative and contracts with the metric to form the Kronecker-delta. Is this supposed to happen? Am I supposed to limit the method eliminate_metric to avoid partial-derivatives?&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2487/eliminate_metric-avoid-partial-differential</guid>
<pubDate>Wed, 05 Apr 2023 12:06:14 +0000</pubDate>
</item>
<item>
<title>exponents problems</title>
<link>https://cadabra.science/qa/2452/exponents-problems</link>
<description>&lt;p&gt;If I try to use collect_factors for an expression that contains exponents, it does not collect them into one exponent, for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;collect_factors($\exp(-2\sigma-2\kappa) \exp(2\sigma) \exp(2\kappa)$);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;these exponents can only be removed by map_sympy(ex, &quot;simplify&quot;), but it can't be used with zoom function, for example.
same situation with product_rule.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2452/exponents-problems</guid>
<pubDate>Mon, 13 Feb 2023 14:46:11 +0000</pubDate>
</item>
<item>
<title>Incorrect Derivative Free Index Behaviour For User-Defined Symbols</title>
<link>https://cadabra.science/qa/2445/incorrect-derivative-free-index-behaviour-defined-symbols</link>
<description>&lt;p&gt;Consider the following example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\m::LaTeXForm(&quot;\mu&quot;).
\n::LaTeXForm(&quot;\nu&quot;).

D{#}::Derivative;
{\m,\n}::Indices(s,position=fixed);
{\mu,\nu}::Indices(p,position=fixed);


{x_\mu}::Coordinate;
ex:=D_{x_\mu}{\theta_\mu};
for i in ex.top().free_indices(): 
   display(i);

{x_\m}::Coordinate;
ex:=D_{x_\m}{\theta_\m};
for i in ex.top().free_indices(): 
   display(i);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One would expect no free indices in both expressions. Indeed, for D&lt;em&gt;{x&lt;/em&gt;\mu}{\theta_\mu}, there are no free indices. However, for the expression involving the user-defined LaTeXForm symbols \m, there are free indices.&lt;/p&gt;
&lt;p&gt;This creates issues when trying to add two expressions like this together.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2445/incorrect-derivative-free-index-behaviour-defined-symbols</guid>
<pubDate>Fri, 27 Jan 2023 05:35:51 +0000</pubDate>
</item>
<item>
<title>Incorrect behaviour of meld?</title>
<link>https://cadabra.science/qa/2442/incorrect-behaviour-of-meld</link>
<description>&lt;p&gt;Hi! I'm trying to do some manipulations in supersymmetry. I'm getting this behaviour from the meld function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{i, j, k,l,m,n}::Indices(position=fixed).
{i, j, k,l,m,n}::Integer(1..2).
{i, j, k,l,m,n}::AntiCommuting.

ex:=v^i v_i -v_i v^i;
meld(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This gives me an output of 0, but this should be 
$2v^iv_i$ in order to respect the anticommuting nature of the object.&lt;/p&gt;
&lt;p&gt;One would also expect&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ex:=v^i v_j -v_j v^i;
meld(_);&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to give $2v^iv_j$, but rather it doesn't change the expression at all. Neither does canonicalise. I'd assume this is not the expected behaviour based on &lt;a rel=&quot;nofollow&quot; href=&quot;https://cadabra.science/qa/2347/raising-and-lowering-indices-with-an-anti-symmetric-tensor&quot;&gt;this question.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let me know if this is not the case.&lt;/p&gt;</description>
<category>Bug reports</category>
<guid isPermaLink="true">https://cadabra.science/qa/2442/incorrect-behaviour-of-meld</guid>
<pubDate>Mon, 23 Jan 2023 07:43:17 +0000</pubDate>
</item>
</channel>
</rss>