Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Finite-Dimensional Algebras """ #***************************************************************************** # Copyright (C) 2011 Johan Bosman <johan.g.bosman@gmail.com> # Copyright (C) 2011, 2013 Peter Bruin <peter.bruin@math.uzh.ch> # Copyright (C) 2011 Michiel Kosters <kosters@gmail.com> # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # http://www.gnu.org/licenses/ #***************************************************************************** from __future__ import absolute_import from six.moves import range
from .finite_dimensional_algebra_element import FiniteDimensionalAlgebraElement from .finite_dimensional_algebra_ideal import FiniteDimensionalAlgebraIdeal
from sage.rings.integer_ring import ZZ
from sage.categories.magmatic_algebras import MagmaticAlgebras from sage.matrix.constructor import Matrix, matrix from sage.structure.element import is_Matrix from sage.modules.free_module_element import vector from sage.rings.ring import Algebra from sage.structure.category_object import normalize_names from sage.structure.unique_representation import UniqueRepresentation
from sage.misc.cachefunc import cached_method from functools import reduce
class FiniteDimensionalAlgebra(UniqueRepresentation, Algebra): """ Create a finite-dimensional `k`-algebra from a multiplication table.
INPUT:
- ``k`` -- a field
- ``table`` -- a list of matrices
- ``names`` -- (default: ``'e'``) string; names for the basis elements
- ``assume_associative`` -- (default: ``False``) boolean; if ``True``, then the category is set to ``category.Associative()`` and methods requiring associativity assume this
- ``category`` -- (default: ``MagmaticAlgebras(k).FiniteDimensional().WithBasis()``) the category to which this algebra belongs
The list ``table`` must have the following form: there exists a finite-dimensional `k`-algebra of degree `n` with basis `(e_1, \ldots, e_n)` such that the `i`-th element of ``table`` is the matrix of right multiplication by `e_i` with respect to the basis `(e_1, \ldots, e_n)`.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A Finite-dimensional algebra of degree 2 over Finite Field of size 3 sage: TestSuite(A).run()
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,0,0], [0,0,1]])]) sage: B Finite-dimensional algebra of degree 3 over Rational Field
TESTS::
sage: A.category() Category of finite dimensional magmatic algebras with basis over Finite Field of size 3 sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])], assume_associative=True) sage: A.category() Category of finite dimensional associative algebras with basis over Finite Field of size 3 """ @staticmethod def __classcall_private__(cls, k, table, names='e', assume_associative=False, category=None): """ Normalize input.
TESTS::
sage: table = [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])] sage: A1 = FiniteDimensionalAlgebra(GF(3), table) sage: A2 = FiniteDimensionalAlgebra(GF(3), table, names='e') sage: A3 = FiniteDimensionalAlgebra(GF(3), table, names=['e0', 'e1']) sage: A1 is A2 and A2 is A3 True
The ``assume_associative`` keyword is built into the category::
sage: from sage.categories.magmatic_algebras import MagmaticAlgebras sage: cat = MagmaticAlgebras(GF(3)).FiniteDimensional().WithBasis() sage: A1 = FiniteDimensionalAlgebra(GF(3), table, category=cat.Associative()) sage: A2 = FiniteDimensionalAlgebra(GF(3), table, assume_associative=True) sage: A1 is A2 True
Uniqueness depends on the category::
sage: cat = Algebras(GF(3)).FiniteDimensional().WithBasis() sage: A1 = FiniteDimensionalAlgebra(GF(3), table) sage: A2 = FiniteDimensionalAlgebra(GF(3), table, category=cat) sage: A1 == A2 False sage: A1 is A2 False
Checking that equality is still as expected::
sage: A = FiniteDimensionalAlgebra(GF(3), table) sage: B = FiniteDimensionalAlgebra(GF(5), [Matrix([0])]) sage: A == A True sage: B == B True sage: A == B False sage: A != A False sage: B != B False sage: A != B True """
names, category=cat)
def __init__(self, k, table, names='e', category=None): """ TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, []) sage: A Finite-dimensional algebra of degree 0 over Rational Field sage: type(A) <class 'sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra.FiniteDimensionalAlgebra_with_category'> sage: TestSuite(A).run()
sage: B = FiniteDimensionalAlgebra(GF(7), [Matrix([1])]) sage: B Finite-dimensional algebra of degree 1 over Finite Field of size 7 sage: TestSuite(B).run()
sage: C = FiniteDimensionalAlgebra(CC, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: C Finite-dimensional algebra of degree 2 over Complex Field with 53 bits of precision sage: TestSuite(C).run()
sage: FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]])]) Traceback (most recent call last): ... ValueError: input is not a multiplication table
sage: D.<a,b> = FiniteDimensionalAlgebra(RR, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [-1, 0]])]) sage: D.gens() (a, b)
sage: E = FiniteDimensionalAlgebra(QQ, [Matrix([0])]) sage: E.gens() (e,) """ # No further validity checks necessary!
def _repr_(self): """ Return a string representation of ``self``.
TESTS::
sage: FiniteDimensionalAlgebra(RR, [Matrix([1])])._repr_() 'Finite-dimensional algebra of degree 1 over Real Field with 53 bits of precision' """
def _coerce_map_from_(self, S): """ TESTS::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.has_coerce_map_from(ZZ) True sage: A.has_coerce_map_from(GF(3)) True sage: A.has_coerce_map_from(GF(5)) False sage: A.has_coerce_map_from(QQ) False """
Element = FiniteDimensionalAlgebraElement
def _element_constructor_(self, x): """ TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([0])]) sage: a = A(0) sage: a.parent() Finite-dimensional algebra of degree 1 over Rational Field sage: A(1) Traceback (most recent call last): ... TypeError: algebra is not unitary
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,0,0], [0,0,1]])]) sage: B(17) 17*e0 + 17*e2 """
# This is needed because the default implementation # assumes that the algebra is unitary. from_base_ring = _element_constructor_
def _Hom_(self, B, category): """ Construct a homset of ``self`` and ``B``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A._Hom_(B, A.category()) Set of Homomorphisms from Finite-dimensional algebra of degree 1 over Rational Field to Finite-dimensional algebra of degree 2 over Rational Field """ return super(FiniteDimensionalAlgebra, self)._Hom_(B, category)
def ngens(self): """ Return the number of generators of ``self``, i.e., the degree of ``self`` over its base field.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.ngens() 2 """
degree = ngens
@cached_method def gen(self, i): """ Return the `i`-th basis element of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.gen(0) e0 """
def basis(self): """ Return a list of the basis elements of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.basis() [e0, e1] """
def __iter__(self): """ Iterates over the elements of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: list(A) [0, e0, 2*e0, e1, e0 + e1, 2*e0 + e1, 2*e1, e0 + 2*e1, 2*e0 + 2*e1]
This is used in the :class:`Testsuite`'s when ``self`` is finite. """ raise NotImplementedError("object does not support iteration")
def _ideal_class_(self, n=0): """ Return the ideal class of ``self`` (that is, the class that all ideals of ``self`` inherit from).
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A._ideal_class_() <class 'sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra_ideal.FiniteDimensionalAlgebraIdeal'> """
def table(self): """ Return the multiplication table of ``self``, as a list of matrices for right multiplication by the basis elements.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.table() ( [1 0] [0 1] [0 1], [0 0] ) """
@cached_method def left_table(self): """ Return the list of matrices for left multiplication by the basis elements.
EXAMPLES::
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0], [0,1]]), Matrix([[0,1],[-1,0]])]) sage: T = B.left_table(); T ( [1 0] [ 0 1] [0 1], [-1 0] )
We check immutability::
sage: T[0] = "vandalized by h4xx0r" Traceback (most recent call last): ... TypeError: 'tuple' object does not support item assignment sage: T[1][0] = [13, 37] Traceback (most recent call last): ... ValueError: matrix is immutable; please change a copy instead (i.e., use copy(M) to change a copy of M). """
def base_extend(self, F): """ Return ``self`` base changed to the field ``F``.
EXAMPLES::
sage: C = FiniteDimensionalAlgebra(GF(2), [Matrix([1])]) sage: k.<y> = GF(4) sage: C.base_extend(k) Finite-dimensional algebra of degree 1 over Finite Field in y of size 2^2 """ # Base extension of the multiplication table is done by __classcall_private__.
def cardinality(self): """ Return the cardinality of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(7), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [2, 3]])]) sage: A.cardinality() 49
sage: B = FiniteDimensionalAlgebra(RR, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [2, 3]])]) sage: B.cardinality() +Infinity
sage: C = FiniteDimensionalAlgebra(RR, []) sage: C.cardinality() 1 """
def ideal(self, gens=None, given_by_matrix=False, side=None): """ Return the right ideal of ``self`` generated by ``gens``.
INPUT:
- ``A`` -- a :class:`FiniteDimensionalAlgebra`
- ``gens`` -- (default: None) - either an element of ``A`` or a list of elements of ``A``, given as vectors, matrices, or FiniteDimensionalAlgebraElements. If ``given_by_matrix`` is ``True``, then ``gens`` should instead be a matrix whose rows form a basis of an ideal of ``A``.
- ``given_by_matrix`` -- boolean (default: ``False``) - if ``True``, no checking is done
- ``side`` -- ignored but necessary for coercions
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.ideal(A([1,1])) Ideal (e0 + e1) of Finite-dimensional algebra of degree 2 over Finite Field of size 3 """ given_by_matrix=given_by_matrix)
@cached_method def is_associative(self): """ Return ``True`` if ``self`` is associative.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0], [0,1]]), Matrix([[0,1],[-1,0]])]) sage: A.is_associative() True
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,1]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,1], [0,0,0], [1,0,0]])]) sage: B.is_associative() False
sage: e = B.basis() sage: (e[1]*e[2])*e[2]==e[1]*(e[2]*e[2]) False """
@cached_method def is_commutative(self): """ Return ``True`` if ``self`` is commutative.
EXAMPLES::
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,0,0], [0,0,1]])]) sage: B.is_commutative() True
sage: C = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,0,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,1,0], [0,0,1]])]) sage: C.is_commutative() False """ # Equivalent to self.table() == self.left_table()
def is_finite(self): """ Return ``True`` if the cardinality of ``self`` is finite.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(7), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [2, 3]])]) sage: A.is_finite() True
sage: B = FiniteDimensionalAlgebra(RR, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [2, 3]])]) sage: B.is_finite() False
sage: C = FiniteDimensionalAlgebra(RR, []) sage: C.is_finite() True """
@cached_method def is_unitary(self): """ Return ``True`` if ``self`` has a two-sided multiplicative identity element.
.. WARNING::
This uses linear algebra; thus expect wrong results when the base ring is not a field.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, []) sage: A.is_unitary() True
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0], [0,1]]), Matrix([[0,1], [-1,0]])]) sage: B.is_unitary() True
sage: C = FiniteDimensionalAlgebra(QQ, [Matrix([[0,0], [0,0]]), Matrix([[0,0], [0,0]])]) sage: C.is_unitary() False
sage: D = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0], [0,1]]), Matrix([[1,0], [0,1]])]) sage: D.is_unitary() False
sage: E = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0],[1,0]]), Matrix([[0,1],[0,1]])]) sage: E.is_unitary() False
sage: F = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,1]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,1], [0,0,0], [1,0,0]])]) sage: F.is_unitary() True
sage: G = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,1]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [1,0,0]])]) sage: G.is_unitary() # Unique right identity, but no left identity. False """ self._table, Matrix(k, n, 0)) self.left_table(), Matrix(k, n, 0)) # This is the vector obtained by concatenating the rows of the # n times n identity matrix:
def is_zero(self): """ Return ``True`` if ``self`` is the zero ring.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, []) sage: A.is_zero() True
sage: B = FiniteDimensionalAlgebra(GF(7), [Matrix([0])]) sage: B.is_zero() False """
def one(self): """ Return the multiplicative identity element of ``self``, if it exists.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, []) sage: A.one() 0
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0], [0,1]]), Matrix([[0,1], [-1,0]])]) sage: B.one() e0
sage: C = FiniteDimensionalAlgebra(QQ, [Matrix([[0,0], [0,0]]), Matrix([[0,0], [0,0]])]) sage: C.one() Traceback (most recent call last): ... TypeError: algebra is not unitary
sage: D = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,1]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,1], [0,0,0], [1,0,0]])]) sage: D.one() e0
sage: E = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,1]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [1,0,0]])]) sage: E.one() Traceback (most recent call last): ... TypeError: algebra is not unitary """ else:
def random_element(self, *args, **kwargs): """ Return a random element of ``self``.
Optional input parameters are propagated to the ``random_element`` method of the underlying :class:`VectorSpace`.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.random_element() # random e0 + 2*e1
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,0,0], [0,0,1]])]) sage: B.random_element(num_bound=1000) # random 215/981*e0 + 709/953*e1 + 931/264*e2 """
def _is_valid_homomorphism_(self, other, im_gens): """ TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: Hom(A, B)(Matrix([[1], [0]])) Morphism from Finite-dimensional algebra of degree 2 over Rational Field to Finite-dimensional algebra of degree 1 over Rational Field given by matrix [1] [0] sage: Hom(B, A)(Matrix([[1, 0]])) Morphism from Finite-dimensional algebra of degree 1 over Rational Field to Finite-dimensional algebra of degree 2 over Rational Field given by matrix [1 0] sage: H = Hom(A, A) sage: H(Matrix.identity(QQ, 2)) Morphism from Finite-dimensional algebra of degree 2 over Rational Field to Finite-dimensional algebra of degree 2 over Rational Field given by matrix [1 0] [0 1] sage: H(Matrix([[1, 0], [0, 0]])) Morphism from Finite-dimensional algebra of degree 2 over Rational Field to Finite-dimensional algebra of degree 2 over Rational Field given by matrix [1 0] [0 0] sage: H(Matrix([[1, 0], [1, 1]])) Traceback (most recent call last): ... ValueError: relations do not all (canonically) map to 0 under map determined by images of generators sage: Hom(B, B)(Matrix([[2]])) Traceback (most recent call last): ... ValueError: relations do not all (canonically) map to 0 under map determined by images of generators """
!= other(gi) * other(gj)):
def quotient_map(self, ideal): """ Return the quotient of ``self`` by ``ideal``.
INPUT:
- ``ideal`` -- a ``FiniteDimensionalAlgebraIdeal``
OUTPUT:
- :class:`~sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra_morphism.FiniteDimensionalAlgebraMorphism`; the quotient homomorphism
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: q0 = A.quotient_map(A.zero_ideal()) sage: q0 Morphism from Finite-dimensional algebra of degree 2 over Finite Field of size 3 to Finite-dimensional algebra of degree 2 over Finite Field of size 3 given by matrix [1 0] [0 1] sage: q1 = A.quotient_map(A.ideal(A.gen(1))) sage: q1 Morphism from Finite-dimensional algebra of degree 2 over Finite Field of size 3 to Finite-dimensional algebra of degree 1 over Finite Field of size 3 given by matrix [1] [0] """
def maximal_ideal(self): """ Compute the maximal ideal of the local algebra ``self``.
.. NOTE::
``self`` must be unitary, commutative, associative and local (have a unique maximal ideal).
OUTPUT:
- :class:`~sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra_ideal.FiniteDimensionalAlgebraIdeal`; the unique maximal ideal of ``self``. If ``self`` is not a local algebra, a ``ValueError`` is raised.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.maximal_ideal() Ideal (0, e1) of Finite-dimensional algebra of degree 2 over Finite Field of size 3
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,0,0], [0,0,1]])]) sage: B.maximal_ideal() Traceback (most recent call last): ... ValueError: algebra is not local """ raise ValueError("the zero algebra is not local") and (self._assume_associative or self.is_associative())): raise TypeError("algebra must be unitary, commutative and associative")
def primary_decomposition(self): """ Return the primary decomposition of ``self``.
.. NOTE::
``self`` must be unitary, commutative and associative.
OUTPUT:
- a list consisting of the quotient maps ``self`` -> `A`, with `A` running through the primary factors of ``self``
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.primary_decomposition() [Morphism from Finite-dimensional algebra of degree 2 over Finite Field of size 3 to Finite-dimensional algebra of degree 2 over Finite Field of size 3 given by matrix [1 0] [0 1]]
sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1,0,0], [0,1,0], [0,0,0]]), Matrix([[0,1,0], [0,0,0], [0,0,0]]), Matrix([[0,0,0], [0,0,0], [0,0,1]])]) sage: B.primary_decomposition() [Morphism from Finite-dimensional algebra of degree 3 over Rational Field to Finite-dimensional algebra of degree 1 over Rational Field given by matrix [0] [0] [1], Morphism from Finite-dimensional algebra of degree 3 over Rational Field to Finite-dimensional algebra of degree 2 over Rational Field given by matrix [1 0] [0 1] [0 0]] """ and (self._assume_associative or self.is_associative())): raise TypeError("algebra must be unitary, commutative and associative") # Start with the trivial decomposition of self. # Use the action of the basis element b to refine our # decomposition of self. # Compute the matrix of b on the component c, find its # characteristic polynomial, and factor it. else:
def maximal_ideals(self): """ Return a list consisting of all maximal ideals of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.maximal_ideals() [Ideal (e1) of Finite-dimensional algebra of degree 2 over Finite Field of size 3]
sage: B = FiniteDimensionalAlgebra(QQ, []) sage: B.maximal_ideals() [] """
|