Quotients of free modules#

AUTHORS:

  • William Stein (2009): initial version

  • Kwankyu Lee (2022-05): added quotient module over domain

class sage.modules.quotient_module.FreeModule_ambient_field_quotient(domain, sub, quotient_matrix, lift_matrix, inner_product_matrix=None)[source]#

Bases: FreeModule_ambient_field

A quotient \(V/W\) of two vector spaces as a vector space.

To obtain \(V\) or \(W\) use self.V() and self.W().

EXAMPLES:

sage: # needs sage.rings.number_field
sage: k.<i> = QuadraticField(-1)
sage: A = k^3; V = A.span([[1,0,i], [2,i,0]])
sage: W = A.span([[3,i,i]])
sage: U = V/W; U
Vector space quotient V/W of dimension 1 over Number Field in i
 with defining polynomial x^2 + 1 with i = 1*I where
 V: Vector space of degree 3 and dimension 2 over Number Field in i
    with defining polynomial x^2 + 1 with i = 1*I
    Basis matrix:
    [ 1  0  i]
    [ 0  1 -2]
 W: Vector space of degree 3 and dimension 1 over Number Field in i
    with defining polynomial x^2 + 1 with i = 1*I
    Basis matrix:
    [    1 1/3*i 1/3*i]
sage: U.V()
Vector space of degree 3 and dimension 2 over Number Field in i
 with defining polynomial x^2 + 1 with i = 1*I
 Basis matrix:
 [ 1  0  i]
 [ 0  1 -2]
sage: U.W()
Vector space of degree 3 and dimension 1 over Number Field in i
 with defining polynomial x^2 + 1 with i = 1*I
 Basis matrix:
 [    1 1/3*i 1/3*i]
sage: U.quotient_map()
Vector space morphism represented by the matrix:
[  1]
[3*i]
Domain:   Vector space of degree 3 and dimension 2 over Number Field in i
          with defining polynomial x^2 + 1 with i = 1*I
          Basis matrix:
          [ 1  0  i]
          [ 0  1 -2]
Codomain: Vector space quotient V/W of dimension 1 over Number Field in i
          with defining polynomial x^2 + 1 with i = 1*I where
          V: Vector space of degree 3 and dimension 2 over Number Field in i
             with defining polynomial x^2 + 1 with i = 1*I
             Basis matrix:
             [ 1  0  i]
             [ 0  1 -2]
          W: Vector space of degree 3 and dimension 1 over Number Field in i
             with defining polynomial x^2 + 1 with i = 1*I
             Basis matrix:
             [    1 1/3*i 1/3*i]
sage: Z = V.quotient(W)
sage: Z == U
True
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> k = QuadraticField(-Integer(1), names=('i',)); (i,) = k._first_ngens(1)
>>> A = k**Integer(3); V = A.span([[Integer(1),Integer(0),i], [Integer(2),i,Integer(0)]])
>>> W = A.span([[Integer(3),i,i]])
>>> U = V/W; U
Vector space quotient V/W of dimension 1 over Number Field in i
 with defining polynomial x^2 + 1 with i = 1*I where
 V: Vector space of degree 3 and dimension 2 over Number Field in i
    with defining polynomial x^2 + 1 with i = 1*I
    Basis matrix:
    [ 1  0  i]
    [ 0  1 -2]
 W: Vector space of degree 3 and dimension 1 over Number Field in i
    with defining polynomial x^2 + 1 with i = 1*I
    Basis matrix:
    [    1 1/3*i 1/3*i]
>>> U.V()
Vector space of degree 3 and dimension 2 over Number Field in i
 with defining polynomial x^2 + 1 with i = 1*I
 Basis matrix:
 [ 1  0  i]
 [ 0  1 -2]
>>> U.W()
Vector space of degree 3 and dimension 1 over Number Field in i
 with defining polynomial x^2 + 1 with i = 1*I
 Basis matrix:
 [    1 1/3*i 1/3*i]
>>> U.quotient_map()
Vector space morphism represented by the matrix:
[  1]
[3*i]
Domain:   Vector space of degree 3 and dimension 2 over Number Field in i
          with defining polynomial x^2 + 1 with i = 1*I
          Basis matrix:
          [ 1  0  i]
          [ 0  1 -2]
Codomain: Vector space quotient V/W of dimension 1 over Number Field in i
          with defining polynomial x^2 + 1 with i = 1*I where
          V: Vector space of degree 3 and dimension 2 over Number Field in i
             with defining polynomial x^2 + 1 with i = 1*I
             Basis matrix:
             [ 1  0  i]
             [ 0  1 -2]
          W: Vector space of degree 3 and dimension 1 over Number Field in i
             with defining polynomial x^2 + 1 with i = 1*I
             Basis matrix:
             [    1 1/3*i 1/3*i]
>>> Z = V.quotient(W)
>>> Z == U
True

We create three quotient spaces and compare them:

sage: A = QQ^2
sage: V = A.span_of_basis([[1,0], [1,1]])
sage: W0 = V.span([V.1, V.0])
sage: W1 = V.span([V.1])
sage: W2 = V.span([V.1])
sage: Q0 = V/W0
sage: Q1 = V/W1
sage: Q2 = V/W2

sage: Q0 == Q1
False
sage: Q1 == Q2
True
>>> from sage.all import *
>>> A = QQ**Integer(2)
>>> V = A.span_of_basis([[Integer(1),Integer(0)], [Integer(1),Integer(1)]])
>>> W0 = V.span([V.gen(1), V.gen(0)])
>>> W1 = V.span([V.gen(1)])
>>> W2 = V.span([V.gen(1)])
>>> Q0 = V/W0
>>> Q1 = V/W1
>>> Q2 = V/W2

>>> Q0 == Q1
False
>>> Q1 == Q2
True
V()[source]#

Given this quotient space \(Q = V/W\), return \(V\).

EXAMPLES:

sage: M = QQ^10 / [list(range(10)), list(range(2,12))]
sage: M.cover()
Vector space of dimension 10 over Rational Field
>>> from sage.all import *
>>> M = QQ**Integer(10) / [list(range(Integer(10))), list(range(Integer(2),Integer(12)))]
>>> M.cover()
Vector space of dimension 10 over Rational Field
W()[source]#

Given this quotient space \(Q = V/W\), return \(W\).

EXAMPLES:

sage: M = QQ^10 / [list(range(10)), list(range(2,12))]
sage: M.relations()
Vector space of degree 10 and dimension 2 over Rational Field
Basis matrix:
[ 1  0 -1 -2 -3 -4 -5 -6 -7 -8]
[ 0  1  2  3  4  5  6  7  8  9]
>>> from sage.all import *
>>> M = QQ**Integer(10) / [list(range(Integer(10))), list(range(Integer(2),Integer(12)))]
>>> M.relations()
Vector space of degree 10 and dimension 2 over Rational Field
Basis matrix:
[ 1  0 -1 -2 -3 -4 -5 -6 -7 -8]
[ 0  1  2  3  4  5  6  7  8  9]
cover()[source]#

Given this quotient space \(Q = V/W\), return \(V\).

EXAMPLES:

sage: M = QQ^10 / [list(range(10)), list(range(2,12))]
sage: M.cover()
Vector space of dimension 10 over Rational Field
>>> from sage.all import *
>>> M = QQ**Integer(10) / [list(range(Integer(10))), list(range(Integer(2),Integer(12)))]
>>> M.cover()
Vector space of dimension 10 over Rational Field
lift(x)[source]#

Lift element of this quotient \(V / W\) to \(V\) by applying the fixed lift homomorphism.

The lift is a fixed homomorphism.

EXAMPLES:

sage: M = QQ^3 / [[1,2,3]]
sage: M.lift(M.0)
(1, 0, 0)
sage: M.lift(M.1)
(0, 1, 0)
sage: M.lift(M.0 - 2*M.1)
(1, -2, 0)
>>> from sage.all import *
>>> M = QQ**Integer(3) / [[Integer(1),Integer(2),Integer(3)]]
>>> M.lift(M.gen(0))
(1, 0, 0)
>>> M.lift(M.gen(1))
(0, 1, 0)
>>> M.lift(M.gen(0) - Integer(2)*M.gen(1))
(1, -2, 0)
lift_map()[source]#

Given this quotient space \(Q = V / W\), return a fixed choice of linear homomorphism (a section) from \(Q\) to \(V\).

EXAMPLES:

sage: M = QQ^3 / [[1,2,3]]
sage: M.lift_map()
Vector space morphism represented by the matrix:
[1 0 0]
[0 1 0]
Domain:   Vector space quotient V/W of dimension 2 over Rational Field where
          V: Vector space of dimension 3 over Rational Field
          W: Vector space of degree 3 and dimension 1 over Rational Field
             Basis matrix:
             [1 2 3]
Codomain: Vector space of dimension 3 over Rational Field
>>> from sage.all import *
>>> M = QQ**Integer(3) / [[Integer(1),Integer(2),Integer(3)]]
>>> M.lift_map()
Vector space morphism represented by the matrix:
[1 0 0]
[0 1 0]
Domain:   Vector space quotient V/W of dimension 2 over Rational Field where
          V: Vector space of dimension 3 over Rational Field
          W: Vector space of degree 3 and dimension 1 over Rational Field
             Basis matrix:
             [1 2 3]
Codomain: Vector space of dimension 3 over Rational Field
quotient_map()[source]#

Given this quotient space \(Q = V / W\), return the natural quotient map from \(V\) to \(Q\).

EXAMPLES:

sage: M = QQ^3 / [[1,2,3]]
sage: M.quotient_map()
Vector space morphism represented by the matrix:
[   1    0]
[   0    1]
[-1/3 -2/3]
Domain:   Vector space of dimension 3 over Rational Field
Codomain: Vector space quotient V/W of dimension 2 over Rational Field where
          V: Vector space of dimension 3 over Rational Field
          W: Vector space of degree 3 and dimension 1 over Rational Field
          Basis matrix:
          [1 2 3]

sage: M.quotient_map()( (QQ^3)([1,2,3]) )
(0, 0)
>>> from sage.all import *
>>> M = QQ**Integer(3) / [[Integer(1),Integer(2),Integer(3)]]
>>> M.quotient_map()
Vector space morphism represented by the matrix:
[   1    0]
[   0    1]
[-1/3 -2/3]
Domain:   Vector space of dimension 3 over Rational Field
Codomain: Vector space quotient V/W of dimension 2 over Rational Field where
          V: Vector space of dimension 3 over Rational Field
          W: Vector space of degree 3 and dimension 1 over Rational Field
          Basis matrix:
          [1 2 3]

>>> M.quotient_map()( (QQ**Integer(3))([Integer(1),Integer(2),Integer(3)]) )
(0, 0)
relations()[source]#

Given this quotient space \(Q = V/W\), return \(W\).

EXAMPLES:

sage: M = QQ^10 / [list(range(10)), list(range(2,12))]
sage: M.relations()
Vector space of degree 10 and dimension 2 over Rational Field
Basis matrix:
[ 1  0 -1 -2 -3 -4 -5 -6 -7 -8]
[ 0  1  2  3  4  5  6  7  8  9]
>>> from sage.all import *
>>> M = QQ**Integer(10) / [list(range(Integer(10))), list(range(Integer(2),Integer(12)))]
>>> M.relations()
Vector space of degree 10 and dimension 2 over Rational Field
Basis matrix:
[ 1  0 -1 -2 -3 -4 -5 -6 -7 -8]
[ 0  1  2  3  4  5  6  7  8  9]
class sage.modules.quotient_module.QuotientModule_free_ambient(module, sub)[source]#

Bases: Module_free_ambient

Quotients of ambient free modules by a submodule.

INPUT:

  • module – an ambient free module

  • sub – a submodule of module

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: M.quotient_module(N)
Quotient module by Submodule of Ambient free module of rank 2 over
 the integral domain Multivariate Polynomial Ring in x, y, z over Rational Field
 Generated by the rows of the matrix:
 [x - y     z]
 [  y*z   x*z]
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> M.quotient_module(N)
Quotient module by Submodule of Ambient free module of rank 2 over
 the integral domain Multivariate Polynomial Ring in x, y, z over Rational Field
 Generated by the rows of the matrix:
 [x - y     z]
 [  y*z   x*z]
V()[source]#

Given this quotient space \(Q = V/W\), return \(V\).

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.cover() is M
True
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.cover() is M
True
W()[source]#

Given this quotient space \(Q = V/W\), return \(W\)

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.relations() is N
True
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.relations() is N
True
ambient_module()[source]#

Return self, since self is ambient.

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.ambient_module() is Q
True
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.ambient_module() is Q
True
cover()[source]#

Given this quotient space \(Q = V/W\), return \(V\).

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.cover() is M
True
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.cover() is M
True
free_cover()[source]#

Given this quotient space \(Q = V/W\), return the free module that covers \(V\).

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M / N
sage: NQ = Q.submodule([Q([1,x])])
sage: QNQ = Q / NQ
sage: QNQ.free_cover() is Q.free_cover() is M
True
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M / N
>>> NQ = Q.submodule([Q([Integer(1),x])])
>>> QNQ = Q / NQ
>>> QNQ.free_cover() is Q.free_cover() is M
True

Note that this is different than the immediate cover:

sage: QNQ.cover() is Q
True
sage: QNQ.cover() is QNQ.free_cover()
False
>>> from sage.all import *
>>> QNQ.cover() is Q
True
>>> QNQ.cover() is QNQ.free_cover()
False
free_relations()[source]#

Given this quotient space \(Q = V/W\), return the submodule that generates all relations of \(Q\).

When \(V\) is a free module, then this returns \(W\). Otherwise this returns the union of \(W\) lifted to the cover of \(V\) and the relations of \(V\) (repeated until \(W\) is a submodule of a free module).

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M / N
sage: NQ = Q.submodule([Q([1, x])])
sage: QNQ = Q / NQ
sage: QNQ.free_relations()
Submodule of Ambient free module of rank 2 over the integral domain
Multivariate Polynomial Ring in x, y, z over Rational Field
Generated by the rows of the matrix:
[    1     x]
[x - y     z]
[  y*z   x*z]
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M / N
>>> NQ = Q.submodule([Q([Integer(1), x])])
>>> QNQ = Q / NQ
>>> QNQ.free_relations()
Submodule of Ambient free module of rank 2 over the integral domain
Multivariate Polynomial Ring in x, y, z over Rational Field
Generated by the rows of the matrix:
[    1     x]
[x - y     z]
[  y*z   x*z]

Note that this is different than the defining relations:

sage: QNQ.relations() is NQ
True
sage: QNQ.relations() == QNQ.free_relations()
False
>>> from sage.all import *
>>> QNQ.relations() is NQ
True
>>> QNQ.relations() == QNQ.free_relations()
False
gen(i=0)[source]#

Return the \(i\)-th generator of this module.

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.gen(0)
(1, 0)
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.gen(Integer(0))
(1, 0)
gens()[source]#

Return the generators of this module.

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.gens()
((1, 0), (0, 1))
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.gens()
((1, 0), (0, 1))
relations()[source]#

Given this quotient space \(Q = V/W\), return \(W\)

EXAMPLES:

sage: S.<x,y,z> = PolynomialRing(QQ)
sage: M = S**2
sage: N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
sage: Q = M.quotient_module(N)
sage: Q.relations() is N
True
>>> from sage.all import *
>>> S = PolynomialRing(QQ, names=('x', 'y', 'z',)); (x, y, z,) = S._first_ngens(3)
>>> M = S**Integer(2)
>>> N = M.submodule([vector([x - y, z]), vector([y*z, x*z])])
>>> Q = M.quotient_module(N)
>>> Q.relations() is N
True