You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a module octonion.py which needs Python 3.10 and better and of course sympy. Replacing match ... case by corresponding if ... elif ... else constructs is trivially possible. Then octonion.py can be used for Python 3.9, 3.8, ... Is it possible to integrate it in sympy or must it remain outside? I know that integration into sympy is difficult. One reason is that Quaternions are immutable. Quaternions from sympy are used heavily in octionion.py which uses the Cayley-Dickson algorithm to generate Octonions.
Implemented in the class Octonion are addition, subtraction, multiplication, division and the power function, further some tools to generate Octonions, and to allow the arithmetic operations with real/complex/quaternion numbers. Octonions may be expanded and simplified using the corresponding methods from Quaternion. Further some functions like associator, commutator, left_matrix and right_matrix corresponding to left and right multiplication.
With this module it is possible to prove that f.i. Imaedas formula in Appl. Math. Comp. 115 (2000) 77-88 associator(a,b,associator(a,b,c)) = commutator(a,b)*associator(a,b,c) is true, where a,b,c are arbitrary octonions. Simply computing (associator(a,b,associator(a,b,c)) - commutator(a,b)*associator(a,b,c)).expand() results in octonion(0,0,0,0,0,0,0,0).
octonion.py works out of the box with from octonion import *
Doing the same computation of Imaedas formula with sages OctionionAlgebra(SR) seems to be about 10 - 20 times slower.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a module octonion.py which needs Python 3.10 and better and of course sympy. Replacing match ... case by corresponding if ... elif ... else constructs is trivially possible. Then octonion.py can be used for Python 3.9, 3.8, ... Is it possible to integrate it in sympy or must it remain outside? I know that integration into sympy is difficult. One reason is that Quaternions are immutable. Quaternions from sympy are used heavily in octionion.py which uses the Cayley-Dickson algorithm to generate Octonions.
Implemented in the class Octonion are addition, subtraction, multiplication, division and the power function, further some tools to generate Octonions, and to allow the arithmetic operations with real/complex/quaternion numbers. Octonions may be expanded and simplified using the corresponding methods from Quaternion. Further some functions like associator, commutator, left_matrix and right_matrix corresponding to left and right multiplication.
With this module it is possible to prove that f.i. Imaedas formula in Appl. Math. Comp. 115 (2000) 77-88 associator(a,b,associator(a,b,c)) = commutator(a,b)*associator(a,b,c) is true, where a,b,c are arbitrary octonions. Simply computing
(associator(a,b,associator(a,b,c)) - commutator(a,b)*associator(a,b,c)).expand()
results inoctonion(0,0,0,0,0,0,0,0)
.octonion.py works out of the box with
from octonion import *
Doing the same computation of Imaedas formula with sages
OctionionAlgebra(SR)
seems to be about 10 - 20 times slower.The modul is in
octonion.zip
Beta Was this translation helpful? Give feedback.
All reactions