Skip to content

Commit 300c3a3

Browse files
committed
Add a doctest
1 parent 4591ae8 commit 300c3a3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/sage/modules/submodule.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ def __init__(self, ambient, gens, check=True, already_echelonized=False):
9898
sage: N = M.submodule([vector([x - y, z]), vector([y * z, x * z])])
9999
sage: N.is_submodule(M)
100100
True
101+
102+
::
103+
104+
sage: R.<x,y> = QQ[]
105+
sage: S = R.quotient([x*y])
106+
sage: M = FreeModule(S, 2)
107+
sage: M.zero_submodule()
108+
Submodule of Ambient free module of rank 2 over Quotient of Multivariate Polynomial Ring in x, y
109+
over Rational Field by the ideal (x*y)
110+
Generated by the rows of the matrix:
111+
[]
101112
"""
102113
if not isinstance(ambient, (FreeModule_ambient, QuotientModule_free_ambient)):
103114
raise TypeError("ambient (=%s) must be ambient or a quotient" % ambient)

0 commit comments

Comments
 (0)