Ask Your Question
2

Symbolic variables with Clifford algebra

asked 2021-11-11 21:48:57 +0200

anon2203 gravatar image

Hello, a similar question was asked previously, but I am unable to use multiple symbolic variables with the answer. What I would like to do is the following:

sage: Q = QuadraticForm(ZZ,2,[1,1,1])                                                                                                                              
sage: Cl.<x,y> = CliffordAlgebra(Q)

Then, I would like to define two symbolic a and b variables

sage: a*x+b*y

such that this output is produced:

sage: (a*x+b*y)*(a*x+b*y)
a^2+b^2

How do I declare a and b so that this is possible?


I have tried a, b = var('a b') but a*x gives an error

sage: a*x
TypeError: unsupported operand parent(s) for *: 'Symbolic Ring' and 'The Clifford algebra of the Quadratic form in 2 variables over Integer Ring with coefficients: 
[ 1 1 ]
[ * 1 ]'

I have also tried R.<a> = PolynomialRing(ZZ) and it works for 1 variable. But if I also tried to add b, it fails

sage: R.<a,b> = PolynomialRing(ZZ)
sage: a*x+b*y
TypeError: unsupported operand parent(s) for +: 'Multivariate Polynomial Ring in a, b over Integer Ring' and 'The Clifford algebra of the Quadratic form in 2 variables over Integer Ring with coefficients: 
[ 1 1 ]
[ * 1 ]'
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-11-12 14:00:35 +0200

Max Alekseyev gravatar image

You can define Q over polynomial ring in a and b:

R.<a,b> = PolynomialRing(ZZ)
Q = QuadraticForm(R,2,[1,1,1])                                                                                                                              
Cl.<x,y> = CliffordAlgebra(Q)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-11-11 21:32:25 +0200

Seen: 211 times

Last updated: Nov 12 '21