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)[source]#
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 fieldnames
– (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 bothnames
anddegrees
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(1),Integer(2),Integer(2),Integer(3)), max_degree=Integer(6), names=('x', 'y', 'z', 't',)); (x, y, z, t,) = A._first_ngens(4) >>> A Graded commutative algebra with generators ('x', 'y', 'z', 't') in degrees (1, 2, 2, 3) with maximal degree 6 >>> t*x + x*t 0 >>> x**Integer(2) 0 >>> x*t**Integer(2) 0 >>> x*y**Integer(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]
>>> from sage.all import * >>> F = A.algebra_generators(); F Family (x, y, z, t) >>> [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]
>>> from sage.all import * >>> 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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(1),Integer(2),Integer(6),Integer(6)), max_degree=Integer(10), ... mul_symbol='⌣', ... mul_latex_symbol=r'\smile', names=('x', 'y', 'z', 't',)); (x, y, z, t,) = A._first_ngens(4) >>> x*y**Integer(2) + x*t x⌣y^2 + x⌣t >>> latex(x*y**Integer(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 classsage.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'>
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(1),Integer(2),Integer(6),Integer(6)), names=('x', 'y', 'z', 't',)); (x, y, z, t,) = A._first_ngens(4) >>> type(A) <class 'sage.algebras.commutative_dga.GCAlgebra_with_category'>
- algebra_generators()[source]#
Return the generators of
self
as asage.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)
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(4),Integer(8),Integer(2)), max_degree=Integer(10), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> A.algebra_generators() Family (x, y, z)
- degree_on_basis(i)[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(2),Integer(4),Integer(6)), max_degree=Integer(7), names=('a', 'b', 'c',)); (a, b, c,) = A._first_ngens(3) >>> a.degree() 2 >>> (Integer(2)*a*b).degree() 6 >>> (a+b).degree() Traceback (most recent call last): ... ValueError: element is not homogeneous
- gen(i)[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(4),Integer(8),Integer(2)), max_degree=Integer(10), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> A.gen(Integer(0)) x >>> A.gen(Integer(1)) y >>> A.gen(Integer(2)) z
- gens()[source]#
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)
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(4),Integer(8),Integer(2)), max_degree=Integer(10), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> A.gens() (x, y, z)
- max_degree()[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(1),Integer(2),Integer(3)), max_degree=Integer(8), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> A.maximal_degree() 8
- maximal_degree()[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(1),Integer(2),Integer(3)), max_degree=Integer(8), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> A.maximal_degree() 8
- ngens()[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(4),Integer(8),Integer(2)), max_degree=Integer(10), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> A.ngens() 3
- one_basis()[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(4),Integer(8),Integer(2)), max_degree=Integer(10), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> ind = A.one_basis(); ind [0, 0, 0] >>> A.monomial(ind) 1 >>> A.one() # indirect doctest 1
- product_on_basis(w1, w2)[source]#
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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(4),Integer(8),Integer(2)), max_degree=Integer(10), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> z*x x*z >>> x**Integer(3) 0 >>> Integer(5)*z + Integer(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
>>> from sage.all import * >>> A = GradedCommutativeAlgebra(QQ, degrees=(Integer(1),Integer(2),Integer(3)), max_degree=Integer(5), names=('x', 'y', 'z',)); (x, y, z,) = A._first_ngens(3) >>> Integer(2)*x*y 2*x*y >>> x**Integer(2) 0 >>> x*z x*z >>> z*x -x*z >>> x*y*z 0