# Symbolic variables with Clifford algebra

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 close merge delete

Sort by » oldest newest most voted You can define Q over polynomial ring in a and b:

R.<a,b> = PolynomialRing(ZZ)
Cl.<x,y> = CliffordAlgebra(Q)

more