# 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)#

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: 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

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
V()#

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
W()#

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]
cover()#

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
lift(x)#

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)
lift_map()#

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
quotient_map()#

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)
relations()#

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]
class sage.modules.quotient_module.QuotientModule_free_ambient(module, sub)#

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]
V()#

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
W()#

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
ambient_module()#

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
cover()#

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
free_cover()#

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

Note that this is different than the immediate cover:

sage: QNQ.cover() is Q
True
sage: QNQ.cover() is QNQ.free_cover()
False
free_relations()#

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]

Note that this is different than the defining relations:

sage: QNQ.relations() is NQ
True
sage: QNQ.relations() == QNQ.free_relations()
False
gen(i=0)#

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)
gens()#

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))
relations()#

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