Finite dimensional graded commutative algebras#

AUTHORS:

  • Michael Jung (2021): initial version

class sage.algebras.finite_gca.FiniteGCAlgebra(base, names, degrees, max_degree, category=None, **kwargs)#

Bases: CombinatorialFreeModule

Finite dimensional graded commutative algebras.

A finite dimensional graded commutative algebra \(A\) is an integer-graded algebra satisfying the super-algebra relation w.r.t. the degree modulo 2. More precisely, \(A\) has a graded ring structure

\[A = \bigoplus_{i=0}^n A_i,\]

where \(n \in \NN\) is the finite maximal degree, and the multiplication satisfies

\[\begin{split}A_i \cdot A_j \subset \begin{cases}A_{i+j} & \text{if $i+j\leq n$}, \\ 0 & \text{if $i+j > n$},\end{cases}\end{split}\]

as well as the super-algebra relation

\[x y = (-1)^{ij} y x\]

for all homogeneous elements \(x \in A_i\) and \(y \in A_j\).

Such an algebra is multiplicatively generated by a set of single monomials \(\{ x_1, \ldots, x_k \}\), where each \(x_i\) is given a certain degree \(\mathrm{deg}(x_i)\). To that end, this algebra can be given a vector space basis, and the basis vectors are of the form \(x_1^{w_1} \cdots x_n^{ w_k}\), where \(\sum_{i=1}^k \mathrm{deg}(x_i) \, w_i \leq n\) and

\[\begin{split}w_i \in \begin{cases} \ZZ_2 & \text{if $\mathrm{deg}(x_i)$ is odd}, \\ \NN & \text{if $\mathrm{deg}(x_i)$ is even}. \end{cases}\end{split}\]

Typical examples of finite dimensional graded commutative algebras are cohomology rings over finite dimensional CW-complexes.

INPUT:

  • base – the base field

  • names – (optional) names of the generators: a list of strings or a single string with the names separated by commas. If not specified, the generators are named “x0”, “x1”,…

  • degrees – (optional) a tuple or list specifying the degrees of the generators; if omitted, each generator is given degree 1, and if both names and degrees are omitted, an error is raised.

  • max_degree – the maximal degree of the graded algebra.

  • mul_symbol – (optional) symbol used for multiplication. If omitted, the string “*” is used.

  • mul_latex_symbol – (optional) latex symbol used for multiplication. If omitted, the empty string is used.

EXAMPLES:

sage: A.<x,y,z,t> = GradedCommutativeAlgebra(QQ, degrees=(1,2,2,3), max_degree=6)
sage: A
Graded commutative algebra with generators ('x', 'y', 'z', 't')
 in degrees (1, 2, 2, 3) with maximal degree 6
sage: t*x + x*t
0
sage: x^2
0
sage: x*t^2
0
sage: x*y^2 + z*t
x*y^2 + z*t

The generators can be returned with algebra_generators():

sage: F = A.algebra_generators(); F
Family (x, y, z, t)
sage: [g.degree() for g in F]
[1, 2, 2, 3]

We can also return the basis:

sage: list(A.basis())
[1, x, z, y, t, x*z, x*y, x*t, z^2, y*z, y^2, z*t, y*t, x*z^2, x*y*z, x*y^2]

Depending on the context, the multiplication can be given a different symbol:

sage: A.<x,y,z,t> = GradedCommutativeAlgebra(QQ, degrees=(1,2,6,6), max_degree=10,
....:                                        mul_symbol='⌣',
....:                                        mul_latex_symbol=r'\smile')
sage: x*y^2 + x*t
x⌣y^2 + x⌣t
sage: latex(x*y^2 - z*x)
x\smile y^{2} - x\smile z

Note

Notice, when the argument max_degree in the global namespace is omitted, an instance of the class sage.algebras.commutative_dga.GCAlgebra is created instead:

sage: A.<x,y,z,t> = GradedCommutativeAlgebra(QQ, degrees=(1,2,6,6))
sage: type(A)
<class 'sage.algebras.commutative_dga.GCAlgebra_with_category'>
algebra_generators()#

Return the generators of self as a sage.sets.family.TrivialFamily.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(4,8,2), max_degree=10)
sage: A.algebra_generators()
Family (x, y, z)
degree_on_basis(i)#

Return the degree of a homogeneous element with index \(i\).

EXAMPLES:

sage: A.<a,b,c> = GradedCommutativeAlgebra(QQ, degrees=(2,4,6), max_degree=7)
sage: a.degree()
2
sage: (2*a*b).degree()
6
sage: (a+b).degree()
Traceback (most recent call last):
...
ValueError: element is not homogeneous
gen(i)#

Return the \(i\)-th generator of self.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(4,8,2), max_degree=10)
sage: A.gen(0)
x
sage: A.gen(1)
y
sage: A.gen(2)
z
gens()#

Return the generators of self as a tuple.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(4,8,2), max_degree=10)
sage: A.gens()
(x, y, z)
max_degree()#

Return the maximal degree of self.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(1,2,3), max_degree=8)
sage: A.maximal_degree()
8
maximal_degree()#

Return the maximal degree of self.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(1,2,3), max_degree=8)
sage: A.maximal_degree()
8
ngens()#

Return the number of generators of self.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(4,8,2), max_degree=10)
sage: A.ngens()
3
one_basis()#

Return the index of the one element of self.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(4,8,2), max_degree=10)
sage: ind = A.one_basis(); ind
[0, 0, 0]
sage: A.monomial(ind)
1
sage: A.one()  # indirect doctest
1
product_on_basis(w1, w2)#

Return the product of two indices within the algebra.

EXAMPLES:

sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(4,8,2), max_degree=10)
sage: z*x
x*z
sage: x^3
0
sage: 5*z + 4*z*x
5*z + 4*x*z
sage: A.<x,y,z> = GradedCommutativeAlgebra(QQ, degrees=(1,2,3), max_degree=5)
sage: 2*x*y
2*x*y
sage: x^2
0
sage: x*z
x*z
sage: z*x
-x*z
sage: x*y*z
0