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
""" Ideals of Finite Algebras """ from __future__ import absolute_import
#***************************************************************************** # Copyright (C) 2011 Johan Bosman <johan.g.bosman@gmail.com> # Copyright (C) 2011, 2013 Peter Bruin <peter.bruin@math.uzh.ch> # # 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 .finite_dimensional_algebra_element import FiniteDimensionalAlgebraElement
from sage.matrix.constructor import Matrix from sage.structure.element import is_Matrix from sage.rings.ideal import Ideal_generic from sage.structure.element import parent from sage.structure.sage_object import SageObject
from sage.misc.cachefunc import cached_method from functools import reduce
from sage.structure.richcmp import (op_LT, op_LE, op_EQ, op_NE, op_GT, op_GE)
class FiniteDimensionalAlgebraIdeal(Ideal_generic): """ An ideal of a :class:`FiniteDimensionalAlgebra`.
INPUT:
- ``A`` -- a finite-dimensional algebra - ``gens`` -- the generators of this ideal - ``given_by_matrix`` -- (default: ``False``) whether the basis matrix is given by ``gens``
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A.ideal(A([0,1])) Ideal (e1) of Finite-dimensional algebra of degree 2 over Finite Field of size 3 """ def __init__(self, A, gens=None, given_by_matrix=False): """ EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.ideal(A([0,1])) sage: TestSuite(I).run(skip="_test_category") # Currently ideals are not using the category framework """ self._basis_matrix = Matrix(k, 0, n) gens = FiniteDimensionalAlgebraElement(A, gens)
def _richcmp_(self, other, op): r""" Comparisons
TESTS::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.ideal(A([1,1])) sage: J = A.ideal(A([0,1])) sage: I == J False sage: I == I True sage: I == I + J True
sage: A2 = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: A is A2 True sage: A == A2 True sage: I2 = A.ideal(A([1,1])) sage: I == I2 True
sage: I != J, I != I, I != I+J (True, False, False) sage: I <= J, I <= I, I <= I+J (False, True, True) sage: I < J, I < I, I < I+J (False, False, False) sage: I >= J, I >= I, I >= I+J (True, True, True) sage: I > J, I > I, I > I+J (True, False, False)
sage: I = A.ideal(A([1,1])) sage: J = A.ideal(A([0,1])) sage: I != J True sage: I != I False sage: I != I + J False """
def __contains__(self, elt): """ EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: J = A.ideal(A([0,1])) sage: A([0,1]) in J True sage: A([1,0]) in J False """ return False
def basis_matrix(self): """ Return the echelonized matrix whose rows form a basis of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.ideal(A([1,1])) sage: I.basis_matrix() [1 0] [0 1] """
@cached_method def vector_space(self): """ Return ``self`` as a vector space.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(GF(3), [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.ideal(A([1,1])) sage: I.vector_space() Vector space of degree 2 and dimension 2 over Finite Field of size 3 Basis matrix: [1 0] [0 1] """
|