# cyclic algebras

I'm new to sage so forgive me if this is trivial. I want to eventually make a symbol algebras and generic crossed products. The first step would be to make quaternion algebras. I know there is a quaternion algebra function but I want to make one with generators and relations. When I try

F.<i,j> = FreeAlgebra(QQ,2)
A = F.g_algebra({i**2 :-1,j**2:-1,j*i:-i*j})


I get the follow error 'AssertionError: -1'

When I try

F.<i,j> = FreeAlgebra(QQ,2)
A = F.g_algebra({i**2 :-F(1),j**2:-F(1),j*i:-i*j})


I get the error 'ValueError: need more than 1 value to unpack'. Can anyone advise? I want to make the algebra $A=\mathbb{Q}[x,y|x^{n}=a,y^{n}=b,yx =\rho xy]$. If there is a better way to go about it then what I'm doing I would love to hear about that as well. Thanks.

edit retag close merge delete

Sort by » oldest newest most voted

I tried in the sense of the first question alternatively:

sage: Q = QuadraticForm( QQ, 2, [ -1, 0, -1 ] )
sage: Q
Quadratic form in 2 variables over Rational Field with coefficients:
[ -1 0 ]
[ * -1 ]
sage: A = CliffordAlgebra( Q )
sage: A.<x,y> = CliffordAlgebra( Q )
sage: (x+y)^2
-2
sage: (x+y)^3
-2*x - 2*y
sage: (x+y)^2017 == 2^1008*(x+y)
True


The choice of an other quadratic form does the slightly more general job for $n=2$ and $\rho=-1$. The g_algebra method did not work, i suppose, because the generators are considered in a canonical order ... < i < j < ... and we are allowed only to declare how to interchange j*i for i < j . The case i == j produces problems.

I do not have more. The try

sage: F.<i,j> = FreeAlgebra( QQ, 2 )
sage: J = F.ideal( [ i*i + F(1), j*j + F(1), i*j + j*i ] )
sage: J
Twosided Ideal (1 + i^2, 1 + j^2, i*j + j*i) of Free Algebra on 2 generators (i, j) over Rational Field
sage: Q.<x,y> = F.quotient( J )
sage: (x+y)^2
x^2 + x*y + y*x + y^2
sage: Q(i) == x, Q(j) == y
(True, True)


did not work.

more