Closed aravindh-krishnamoorthy closed 1 week ago
Unfortunately, another instance, this time stemming from mathics/builtin/numbers/linalg.py
:
$ mathics -e 'A = Array[a, {3,3}]; Eigenvalues[A.ConjugateTranspose[A]]'
[...]
File "~/.conda/envs/mathics/lib/python3.11/site-packages/Mathics3-7.0.0-py3.11.egg/mathics/builtin/numbers/linalg.py", line 171, in eval
eigenvalues = list(sympy_matrix.eigenvals().items())
^^^^^^^^^^^^^^^^^^^^^^^^
[...]
File "~/.conda/envs/mathics/lib/python3.11/site-packages/Mathics3-7.0.0-py3.11.egg/mathics/core/convert/sympy.py", line 163, in __new__
return SympyExpression(self.expr)
^^^^^^^^^
AttributeError: 'SympyExpression' object has no attribute 'expr'
Seems like this problem needs a good, long-term solution.
$ mathics -e 'A = Array[a, {2,2}]; Eigenvalues[A.ConjugateTranspose[A]] // FullSimplify'
This does not crash in the current master branch:
mathics -e 'A = Array[a, {2,2}]; Eigenvalues[A.ConjugateTranspose[A]] // FullSimplify'
{-Sqrt[(a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]]) ^ 2 - 4 a[1, 1] a[2, 2] Conjugate[a[1, 1]] Conjugate[a[2, 2]] - 4 a[1, 2] a[2, 1] Conjugate[a[1, 2]] Conjugate[a[2, 1]] + 4 a[1, 1] a[2, 2] Conjugate[a[1, 2]] Conjugate[a[2, 1]] + 4 a[1, 2] a[2, 1] Conjugate[a[1, 1]] Conjugate[a[2, 2]]] / 2 + a[1, 1] Conjugate[a[1, 1]] / 2 + a[1, 2] Conjugate[a[1, 2]] / 2 + a[2, 1] Conjugate[a[2, 1]] / 2 + a[2, 2] Conjugate[a[2, 2]] / 2, Sqrt[(a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]]) ^ 2 - 4 a[1, 1] a[2, 2] Conjugate[a[1, 1]] Conjugate[a[2, 2]] - 4 a[1, 2] a[2, 1] Conjugate[a[1, 2]] Conjugate[a[2, 1]] + 4 a[1, 1] a[2, 2] Conjugate[a[1, 2]] Conjugate[a[2, 1]] + 4 a[1, 2] a[2, 1] Conjugate[a[1, 1]] Conjugate[a[2, 2]]] / 2 + a[1, 1] Conjugate[a[1, 1]] / 2 + a[1, 2] Conjugate[a[1, 2]] / 2 + a[2, 1] Conjugate[a[2, 1]] / 2 + a[2, 2] Conjugate[a[2, 2]] / 2}
Unfortunately, another instance, this time stemming from
mathics/builtin/numbers/linalg.py
:$ mathics -e 'A = Array[a, {3,3}]; Eigenvalues[A.ConjugateTranspose[A]]' [...] File "~/.conda/envs/mathics/lib/python3.11/site-packages/Mathics3-7.0.0-py3.11.egg/mathics/builtin/numbers/linalg.py", line 171, in eval eigenvalues = list(sympy_matrix.eigenvals().items()) ^^^^^^^^^^^^^^^^^^^^^^^^ [...] File "~/.conda/envs/mathics/lib/python3.11/site-packages/Mathics3-7.0.0-py3.11.egg/mathics/core/convert/sympy.py", line 163, in __new__ return SympyExpression(self.expr) ^^^^^^^^^ AttributeError: 'SympyExpression' object has no attribute 'expr'
Full traceback
I am not seeing this crash in the current master on github:
mathics -e 'A = Array[a, {3,3}]; Eigenvalues[A.ConjugateTranspose[A]]'
{-((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + Sqrt[(2 (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + ((a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) (-a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]]) + (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[1, 1]] - a[2, 2] Conjugate[a[1, 2]] - a[2, 3] Conjugate[a[1, 3]]) + (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[1, 1]] - a[3, 2] Conjugate[a[1, 2]] - a[3, 3] Conjugate[a[1, 3]]) + (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[2, 1]] - a[3, 2] Conjugate[a[2, 2]] - a[3, 3] Conjugate[a[2, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) ^ 2 - 4 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) ^ 3] / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) / 2 - ((a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) / 2 + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) / 2) ^ (1 / 3) / 3 - ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) / (3 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + Sqrt[(2 (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + ((a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) (-a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]]) + (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[1, 1]] - a[2, 2] Conjugate[a[1, 2]] - a[2, 3] Conjugate[a[1, 3]]) + (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[1, 1]] - a[3, 2] Conjugate[a[1, 2]] - a[3, 3] Conjugate[a[1, 3]]) + (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[2, 1]] - a[3, 2] Conjugate[a[2, 2]] - a[3, 3] Conjugate[a[2, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) ^ 2 - 4 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) ^ 3] / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) / 2 - ((a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) / 2 + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) / 2) ^ (1 / 3)) + a[1, 1] Conjugate[a[1, 1]] / 3 + a[1, 2] Conjugate[a[1, 2]] / 3 + a[1, 3] Conjugate[a[1, 3]] / 3 + a[2, 1] Conjugate[a[2, 1]] / 3 + a[2, 2] Conjugate[a[2, 2]] / 3 + a[2, 3] Conjugate[a[2, 3]] / 3 + a[3, 1] Conjugate[a[3, 1]] / 3 + a[3, 2] Conjugate[a[3, 2]] / 3 + a[3, 3] Conjugate[a[3, 3]] / 3, -(-1 / 2 - I / 2 Sqrt[3]) ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + Sqrt[(2 (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + ((a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) (-a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]]) + (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[1, 1]] - a[2, 2] Conjugate[a[1, 2]] - a[2, 3] Conjugate[a[1, 3]]) + (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[1, 1]] - a[3, 2] Conjugate[a[1, 2]] - a[3, 3] Conjugate[a[1, 3]]) + (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[2, 1]] - a[3, 2] Conjugate[a[2, 2]] - a[3, 3] Conjugate[a[2, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) ^ 2 - 4 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) ^ 3] / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) / 2 - ((a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) / 2 + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) / 2) ^ (1 / 3) / 3 + a[1, 1] Conjugate[a[1, 1]] / 3 + a[1, 2] Conjugate[a[1, 2]] / 3 + a[1, 3] Conjugate[a[1, 3]] / 3 + a[2, 1] Conjugate[a[2, 1]] / 3 + a[2, 2] Conjugate[a[2, 2]] / 3 + a[2, 3] Conjugate[a[2, 3]] / 3 + a[3, 1] Conjugate[a[3, 1]] / 3 + a[3, 2] Conjugate[a[3, 2]] / 3 + a[3, 3] Conjugate[a[3, 3]] / 3 - ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) / (3 (-1 / 2 - I / 2 Sqrt[3]) ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + Sqrt[(2 (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + ((a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) (-a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]]) + (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[1, 1]] - a[2, 2] Conjugate[a[1, 2]] - a[2, 3] Conjugate[a[1, 3]]) + (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[1, 1]] - a[3, 2] Conjugate[a[1, 2]] - a[3, 3] Conjugate[a[1, 3]]) + (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[2, 1]] - a[3, 2] Conjugate[a[2, 2]] - a[3, 3] Conjugate[a[2, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) ^ 2 - 4 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) ^ 3] / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) / 2 - ((a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) / 2 + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) / 2) ^ (1 / 3)), -(-1 / 2 + I / 2 Sqrt[3]) ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + Sqrt[(2 (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + ((a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) (-a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]]) + (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[1, 1]] - a[2, 2] Conjugate[a[1, 2]] - a[2, 3] Conjugate[a[1, 3]]) + (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[1, 1]] - a[3, 2] Conjugate[a[1, 2]] - a[3, 3] Conjugate[a[1, 3]]) + (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[2, 1]] - a[3, 2] Conjugate[a[2, 2]] - a[3, 3] Conjugate[a[2, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) ^ 2 - 4 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) ^ 3] / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) / 2 - ((a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) / 2 + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) / 2) ^ (1 / 3) / 3 + a[1, 1] Conjugate[a[1, 1]] / 3 + a[1, 2] Conjugate[a[1, 2]] / 3 + a[1, 3] Conjugate[a[1, 3]] / 3 + a[2, 1] Conjugate[a[2, 1]] / 3 + a[2, 2] Conjugate[a[2, 2]] / 3 + a[2, 3] Conjugate[a[2, 3]] / 3 + a[3, 1] Conjugate[a[3, 1]] / 3 + a[3, 2] Conjugate[a[3, 2]] / 3 + a[3, 3] Conjugate[a[3, 3]] / 3 - ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) / (3 (-1 / 2 + I / 2 Sqrt[3]) ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + Sqrt[(2 (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 3 + ((a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) (-a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]]) + (-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[1, 1]] - a[2, 2] Conjugate[a[1, 2]] - a[2, 3] Conjugate[a[1, 3]]) + (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[1, 1]] - a[3, 2] Conjugate[a[1, 2]] - a[3, 3] Conjugate[a[1, 3]]) + (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]]) (-a[3, 1] Conjugate[a[2, 1]] - a[3, 2] Conjugate[a[2, 2]] - a[3, 3] Conjugate[a[2, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) ^ 2 - 4 ((-a[1, 1] Conjugate[a[1, 1]] - a[1, 2] Conjugate[a[1, 2]] - a[1, 3] Conjugate[a[1, 3]] - a[2, 1] Conjugate[a[2, 1]] - a[2, 2] Conjugate[a[2, 2]] - a[2, 3] Conjugate[a[2, 3]] - a[3, 1] Conjugate[a[3, 1]] - a[3, 2] Conjugate[a[3, 2]] - a[3, 3] Conjugate[a[3, 3]]) ^ 2 - 3 (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) - 3 (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + 3 (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + 3 (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) + 3 (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]])) ^ 3] / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[3, 1]] + a[2, 2] Conjugate[a[3, 2]] + a[2, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) / 2 - 27 ((a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) / 2 - ((a[1, 1] Conjugate[a[1, 1]] + a[1, 2] Conjugate[a[1, 2]] + a[1, 3] Conjugate[a[1, 3]]) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[2, 1]] - a[1, 2] Conjugate[a[2, 2]] - a[1, 3] Conjugate[a[2, 3]]) + (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]]) (a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]]) (-a[1, 1] Conjugate[a[3, 1]] - a[1, 2] Conjugate[a[3, 2]] - a[1, 3] Conjugate[a[3, 3]]) + (a[3, 1] Conjugate[a[2, 1]] + a[3, 2] Conjugate[a[2, 2]] + a[3, 3] Conjugate[a[2, 3]]) (-a[2, 1] Conjugate[a[3, 1]] - a[2, 2] Conjugate[a[3, 2]] - a[2, 3] Conjugate[a[3, 3]])) (-9 a[1, 1] Conjugate[a[1, 1]] - 9 a[1, 2] Conjugate[a[1, 2]] - 9 a[1, 3] Conjugate[a[1, 3]] - 9 a[2, 1] Conjugate[a[2, 1]] - 9 a[2, 2] Conjugate[a[2, 2]] - 9 a[2, 3] Conjugate[a[2, 3]] - 9 a[3, 1] Conjugate[a[3, 1]] - 9 a[3, 2] Conjugate[a[3, 2]] - 9 a[3, 3] Conjugate[a[3, 3]]) / 2 + 27 ((a[1, 1] Conjugate[a[2, 1]] + a[1, 2] Conjugate[a[2, 2]] + a[1, 3] Conjugate[a[2, 3]]) (a[2, 1] Conjugate[a[1, 1]] + a[2, 2] Conjugate[a[1, 2]] + a[2, 3] Conjugate[a[1, 3]]) + (a[1, 1] Conjugate[a[3, 1]] + a[1, 2] Conjugate[a[3, 2]] + a[1, 3] Conjugate[a[3, 3]]) (a[3, 1] Conjugate[a[1, 1]] + a[3, 2] Conjugate[a[1, 2]] + a[3, 3] Conjugate[a[1, 3]])) (a[2, 1] Conjugate[a[2, 1]] + a[2, 2] Conjugate[a[2, 2]] + a[2, 3] Conjugate[a[2, 3]] + a[3, 1] Conjugate[a[3, 1]] + a[3, 2] Conjugate[a[3, 2]] + a[3, 3] Conjugate[a[3, 3]]) / 2) ^ (1 / 3))}
Seems like this problem needs a good, long-term solution.
I don't have a good high-level understanding of what the problem is. Saying this example crashes or that example crashes, doesn't elucidate what long-term solution is needed.
Otherwise, I can also help with a good fix under instructions as I'm new to Mathics.
Help is always appreciated.
I think the thing most needed right now a good high-level description of what the problem is.
Is the problem in how things get translated to SymPy? If so, is this a fundamental mismatch?
The Mathics-specific TraceBuiltins[]
can be used to see what Sympy instructions are run:
In[1]:= TraceEvaluation[Eigenvalues[{{1, 1, 0}, {1, 0, 1}, {0, 1, 1}}]]
Evaluating: System`Eigenvalues[{{1,1,0},{1,0,1},{0,1,1}}]
Evaluating: System`Eigenvalues
Evaluating: System`sympy
-> {2,-1,1}
Out[1]= {2, -1, 1}
There is a newer and even better way to get SymPy call information using an experimental debugger I am working on, but this probably is not yet ready for general use.
Seems like this problem needs a good, long-term solution.
I don't have a good high-level understanding of what the problem is. Saying this example crashes or that example crashes, doesn't elucidate what long-term solution is needed.
Please don't take this issue and the above statement personally. I only meant that the proposed workaround above may not be sufficient. You're doing a great job and this is a great software that I've started using for my day-to-day work as a replacement for Mathematica, and that says something about the software and its stability already.
I think the thing most needed right now a good high-level description of what the problem is.
Is the problem in how things get translated to SymPy? If so, is this a fundamental mismatch?
I tried to use pdb
and this is what I have so far:
(mathics) $ mathics -e 'A = Array[a, {3,3}]; Eigenvalues[A.ConjugateTranspose[A]]'
--Return--
> ~/.conda/envs/mathics/lib/python3.11/site-packages/Mathics3-7.0.0-py3.11.egg/mathics/core/convert/sympy.py(166)__new__()->None
-> breakpoint()
(Pdb) list
161
162 def __new__(cls, *args):
163 try:
164 return SympyExpression(self.expr)
165 except Exception:
166 -> breakpoint()
167 # return SympyExpression(expression.Expression(self.expr.head,
168 # *(from_sympy(arg) for arg in args[1:])))
169
170 return SympyExpressionFunc
171
(Pdb) self
SympyExpression(_Mathics_User_Global`a, 2, 1)
(Pdb) isinstance(self, BasicSympy)
True
(Pdb) isinstance(self, Expression)
False
(Pdb) self.expr
*** AttributeError: 'SympyExpression' object has no attribute 'expr'
(Pdb)
It seems that the call
File "~/.conda/envs/mathics/lib/python3.11/site-packages/sympy/simplify/powsimp.py", line 117, in powsimp
expr = expr.func(*[recurse(w) for w in expr.args])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
is resulting in a func
call on a non-Expression
object. I'm new to Mathics; I'll try to take a closer look and get a feel for the code as well.
Please don't take this issue and the above statement personally.
Honestly, I don't
Please try the current master branch. It might not have a problem you are encountering.
The 3x3 array example runs slowly, but that is a different problem.
Please try the current master branch. It might not have a problem you are encountering.
Hello rocky, does it make sense to find the root cause of this problem? If this bug is already known then I would just switch to current master. Otherwise, I can spend some time to find the root cause... to the best of my abilities.
@aravindh-krishnamoorthy, we are aware that Simplify
is still buggy and would require work to make it work. It would be awesome if you were interested in working on this issue. In any case, I agree with @rocky that a first step would be to collect some test cases that fails, and try to understand what is the generality behind the failure, before trying to propose a patch.
In any case, adding the try-except block around the conversion could also be a good idea.
@rocky, I got the crash on my laptop, even using the master branch. Maybe this is related to a change in Sympy. In any case, it deserves research.
Mathics 7.0.1dev0 on CPython 3.8.19 | packaged by conda-forge | (default, Mar 20 2024, 12:47:35) using SymPy 1.12, mpmath 1.3.0, numpy 1.24.4, cython Not installed
Indeed, I can confirm that is an issue related to Sympy 1.12, and is fixed by using Sympy 1.13
Indeed, I can confirm that is an issue related to Sympy 1.12, and is fixed by using Sympy 1.13
Then the simplest fix would be to require SymPy 1.13 or greater. We support back to Python 3.8 and SymPy 1.13 is supported on Python 3.8.
Thoughts?
I think I could isolate the fix to sympy
commit https://github.com/sympy/sympy/commit/a545639cc08df73296db678e35e3daba713a7f6c.
Strangely conda
says that my sympy
version is sympy 1.12.1 pypyh2585a3b_103 conda-forge
, but it does not have this fix (!) On the other hand, the GitHub tag https://github.com/sympy/sympy/tree/1.12.1 seems to have the fix in. Anyway, if I make that change on my "sympy 1.12.1
" then the problem is gone.
However, I feel that there may be a deeper issue here. This is because, more and more, sympy
guys are replacing x.__class___(...)
with x.func(...)
.
In our case, the code for SympyExpression
(on the most recent commit as of now) is:
https://github.com/Mathics3/mathics-core/blob/94d26c2a23d8d5f84fbdac42dbd9058d0c8831a0/mathics/core/convert/sympy.py#L132-L159
So, calling x.func
on any object created in https://github.com/Mathics3/mathics-core/blob/94d26c2a23d8d5f84fbdac42dbd9058d0c8831a0/mathics/core/convert/sympy.py#L145 will cause a crash because self.expr
is not set: https://github.com/Mathics3/mathics-core/blob/94d26c2a23d8d5f84fbdac42dbd9058d0c8831a0/mathics/core/convert/sympy.py#L160-L170
Hence, we may have to either remove the handling for BasicSympy
without .expr
or set a dummy expr
. However, sometimes SympyExpression
is also called for "leaf nodes" (not sure what SymPy calls them) like SympyExpression(_Mathics_User_Global`a, 2, 1)
which are not real expressions and do not have a function head.
It seems that that the handling for BasicSympy
was introduced in https://github.com/Mathics3/mathics-core/commit/659c83fb27b732c98a15d52c5c1d599d25fde349, which possibly fixed the bug where sympy
incorrectly used x.__class___(...)
instead of x.func(...)
. However, I lack sufficient expertise in Mathics to see if the above fixes will cause other problems or if there's a third option.
Historically, terminology in Mathics has been weird and this causes a lot of confusion. At least to me, this fuzziness in terminology bleeds into fuzziness in intent as well.
Currently, something like "expr" refers to what would be better described as a "compound expression". In other words, an expression that contains subexpressions or is not atomic, such as the name of a variable or a literal constant. The WL term for a node in an expression tree is called an "element", and we have been slowly converting our code to use that term.
The intent of SympyExpression's expr attribute, I think, is to have an equivalent representation in Mathics for the SymPy expression. This reduces the need to convert back and forth from Mathics3 to SymPy.
If this is correct, then I think this field should be filled in to contain the corresponding Mathics object which here would be a Symbol, or more generally, some kind of Atom.
In short, if I have the above correct, the "expr" should be renamed to "element"; it should always be filled in even when the object is not a compound expression.
Historically, terminology in Mathics has been weird and this causes a lot of confusion. At least to me, this fuzziness in terminology bleeds into fuzziness in intent as well.
[...]
In short, if I have the above correct, the "expr" should be renamed to "element"; it should always be filled in even when the object is not a compound expression.
Thank you for the detailed explanation. The code in master
(shown in my previous comment) presently sets obj.expr = None
. I will think a bit more on this and your explanation and get back to you.
Hello @mmatera... I've made the following two comments on your commit https://github.com/Mathics3/mathics-core/commit/94d26c2a23d8d5f84fbdac42dbd9058d0c8831a0. Please add them to the code if you feel they are worthwhile.
The link to comments is here: https://github.com/Mathics3/mathics-core/commit/94d26c2a23d8d5f84fbdac42dbd9058d0c8831a0#comments
The comments are also reproduced below.
Comment: This should likely just be eigvals // FullSimplify
since the [[1]]
is already included in the definition of eigvals
above.
Comment: Suggest to also add a numerical test:
In[17]:= eigvals /. a[x_, y_] -> x+I*y
Out[17]= 10 - 3 Sqrt[11]
Suggest to close this issue once the tests are merged.
Description
When using the following on GitHub built Mathics v7.0.0, a crash is observed.
More
```python File "~/.conda/envs/mathics/bin/mathics", line 33, inHow to Reproduce
Output Given
Crash, please see above.
Expected behavior
Simplified expressions for eigenvalues; likely the result obtained in the Workarounds section below.
Your Environment
Mathics 7.0.0 on CPython 3.11.10 | packaged by conda-forge | (main, Oct 16 2024, 01:27:36) [GCC 13.3.0] using SymPy 1.12.1, mpmath 1.3.0, numpy 2.1.3, cython Not installed
OS: Windows 11 WSL
Workarounds
By changing the line (of v7.0.0 code) from: https://github.com/Mathics3/mathics-core/blob/6a0b3f04484994168cec5582a83434535d8d1d14/mathics/builtin/numbers/algebra.py#L1656
to
analogous to #238, the following output is obtained:
which is likely correct. Note that the above code is restructured a bit (and modified) in the latest commit as of now:
https://github.com/Mathics3/mathics-core/blob/c5a922709e0df1bf37ecff0b7bf88bc9b16dd492/mathics/eval/numbers/algebra/simplify.py#L85
Priority
Programmable workaround exists.
Additional context
In case the workaround is fine, I can submit a PR. Otherwise, I can also help with a good fix under instructions as I'm new to Mathics.