Adding support of geometric algebra to hp prime v2
|
02-02-2024, 06:14 AM
(This post was last modified: 02-11-2024 05:35 AM by Aleksandr94.)
Post: #1
|
|||
|
|||
Adding support of geometric algebra to hp prime v2
I am willing to start learning geometric algebra, it is good for physics. I didn't found support of it in the calculator. So I am wondering is it possible to define all nesisary things for it manually. Any ideas how to do it?
So I am asking: 1)Is it possible to define complex units e1, e2, e3 and wedge and geometric product using hp prime v2? 2)It would be also awesome to be able to integrate and differentiate such expressions. My idea to solve this issue. Any multivector can be thought as linear combination of: 1, e1, e2, e3, e12, e13, e23, e133. Where first one is scalar, than three vector components and than three bivector components and one trivector. These units can be represented as: 1=[[1,0],[0,1]] e1=[[0,1],[1,0]] e2=[[0,-i],[i,0]] e3=[[1,0],[0,-1]] e12=e1*e2 e13=e1*e3 e23=e2*e3 e123=e12*e3 Where * is matrix multiplication. Matrices multiplication here serves as geometric product. So to multiply multivectors we need to obtain matrix product of corresponding matrix sums. Than we need to decompose obtained complex-valued matrix into linear combination of Pauli matrices. Sympy Galgebra gives geometric product of two multivectors M and N as: M*N + M__x*N__x - M__xy*N__xy - M__xyz*N__xyz - M__xz*N__xz + M__y*N__y - M__yz*N__yz + M__z*N__z + (M*N__x + M__x*N - M__xy*N__y - M__xyz*N__yz - M__xz*N__z + M__y*N__xy - M__yz*N__xyz + M__z*N__xz)*e_x + (M*N__y - M__x*N__xy + M__xy*N__x + M__xyz*N__xz + M__xz*N__xyz + M__y*N - M__yz*N__z + M__z*N__yz)*e_y + (M*N__z - M__x*N__xz - M__xy*N__xyz - M__xyz*N__xy + M__xz*N__x - M__y*N__yz + M__yz*N__y + M__z*N)*e_z + (M*N__xy - M__x*N__y + M__xy*N + M__xyz*N__z + M__xz*N__yz + M__y*N__x - M__yz*N__xz + M__z*N__xyz)*e_x^e_y + (M*N__xz - M__x*N__z - M__xy*N__yz - M__xyz*N__y + M__xz*N - M__y*N__xyz + M__yz*N__xy + M__z*N__x)*e_x^e_z + (M*N__yz + M__x*N__xyz + M__xy*N__xz + M__xyz*N__x - M__xz*N__xy - M__y*N__z + M__yz*N + M__z*N__y)*e_y^e_z + (M*N__xyz + M__x*N__yz + M__xy*N__z + M__xyz*N - M__xz*N__y - M__y*N__xz + M__yz*N__x + M__z*N__xy)*e_x^e_y^e_z The best I could came up with was to define vector function. We use 8d vectors to represent 3d multivectors. #CAS GPROD(a,b):= BEGIN LOCAL c1,c2,c3,c4,c5,c6,c7,c8; c1:=a(1)*b(1)+a(2)*b(2)+a(3)*b(3)+a(4)*b(4)+a(5)*b(5)+a(6)*b(6)+a(7)*b(7)+a(8)*b(8); c2:=...i am lazy to rewrite multivector multiplication definition..; ... c8:=....; RETURN [c1,c2,c3,c4,c5,c6,c7,c8]; END; #end Now we need somehow to force program to parse expressions like: 4e1+6e2+7e12+(x+y)e123. Than we can feed them to code above. So how can I do it? |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Adding support of geometric algebra to hp prime v2 - Aleksandr94 - 02-02-2024 06:14 AM
|
User(s) browsing this thread: 2 Guest(s)