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
""" Morphisms Between Finite Algebras """
#***************************************************************************** # 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/ #*****************************************************************************
""" Create a morphism between two :class:`finite-dimensional algebras <FiniteDimensionalAlgebra>`.
INPUT:
- ``parent`` -- the parent homset
- ``f`` -- matrix of the underlying `k`-linear map
- ``unitary`` -- boolean (default: ``True``); if ``True`` and ``check`` is also ``True``, raise a ``ValueError`` unless ``A`` and ``B`` are unitary and ``f`` respects unit elements
- ``check`` -- boolean (default: ``True``); check whether the given `k`-linear map really defines a (not necessarily unitary) `k`-algebra homomorphism
The algebras ``A`` and ``B`` must be defined over the same base field.
EXAMPLES::
sage: from sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra_morphism import FiniteDimensionalAlgebraMorphism sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: H = Hom(A, B) sage: f = H(Matrix([[1], [0]])) sage: f.domain() is A True sage: f.codomain() is B True sage: f(A.basis()[0]) e sage: f(A.basis()[1]) 0
.. TODO:: An example illustrating unitary flag. """ """ TESTS::
sage: from sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra_morphism import FiniteDimensionalAlgebraMorphism sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: H = Hom(A, B) sage: phi = FiniteDimensionalAlgebraMorphism(H, Matrix([[1, 0]])) sage: TestSuite(phi).run(skip="_test_category") """
or not B.is_unitary() or self(A.one()) != B.one()): raise ValueError("homomorphism does not respect unit elements")
""" TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.maximal_ideal() sage: q = A.quotient_map(I) sage: q._repr_() 'Morphism from Finite-dimensional algebra of degree 2 over Rational Field to Finite-dimensional algebra of degree 1 over Rational Field given by matrix\n[1]\n[0]' """ self.domain(), self.codomain(), self._matrix)
""" TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.maximal_ideal() sage: q = A.quotient_map(I) sage: q(0) == 0 and q(1) == 1 True """
""" Check equality.
TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: H = Hom(A, B) sage: phi = H(Matrix([[1, 0]])) sage: psi = H(Matrix([[1, 0]])) sage: phi == psi True sage: phi == H.zero() False """ and self.parent() == other.parent() and self._matrix == other._matrix)
""" Check not equals.
TESTS::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: H = Hom(A, B) sage: phi = H(Matrix([[1, 0]])) sage: psi = H(Matrix([[1, 0]])) sage: phi != psi False sage: phi != H.zero() True """
""" Return the matrix of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: M = Matrix([[1], [0]]) sage: H = Hom(A, B) sage: f = H(M) sage: f.matrix() == M True """
""" Return the inverse image of ``I`` under ``self``.
INPUT:
- ``I`` -- ``FiniteDimensionalAlgebraIdeal``, an ideal of ``self.codomain()``
OUTPUT:
-- ``FiniteDimensionalAlgebraIdeal``, the inverse image of `I` under ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: I = A.maximal_ideal() sage: q = A.quotient_map(I) sage: B = q.codomain() sage: q.inverse_image(B.zero_ideal()) == I True """
""" Set of morphisms between two finite-dimensional algebras. """ def zero(self): """ Construct the zero morphism of ``self``.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: H = Hom(A, B) sage: H.zero() Morphism from Finite-dimensional algebra of degree 1 over Rational Field to Finite-dimensional algebra of degree 2 over Rational Field given by matrix [0 0] """ self.codomain().ngens()), False, False)
""" Construct a homomorphism.
.. TODO::
Implement taking generator images and converting them to a matrix.
EXAMPLES::
sage: A = FiniteDimensionalAlgebra(QQ, [Matrix([1])]) sage: B = FiniteDimensionalAlgebra(QQ, [Matrix([[1, 0], [0, 1]]), Matrix([[0, 1], [0, 0]])]) sage: H = Hom(A, B) sage: H(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] """ if f.parent() is self: return f if f.parent() == self: return FiniteDimensionalAlgebraMorphism(self, f._matrix, check, unitary) try: from sage.matrix.constructor import Matrix return FiniteDimensionalAlgebraMorphism(self, Matrix(f), check, unitary) except Exception: return RingHomset_generic.__call__(self, f, check)
|