-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Milestone
Description
Modules over integral domain lack basic functionality:
sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: A = S**2
sage: A
Ambient free module of rank 2 over the integral domain Multivariate Polynomial Ring in x, y, z, w over Rational Field
sage: A.submodule([vector([x-y,z-w]), vector([y*z, x*w])])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-cabbcc8d5285> in <module>
----> 1 A.submodule([vector([x-y,z-w]), vector([y*z, x*w])])
~/GitHub/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/categories/modules_with_basis.py in submodule(self, gens, check, already_echelonized, unitriangular, support_order, category, *args, **opts)
876 support_order = self._compute_support_order(gens, support_order)
877 if not already_echelonized:
--> 878 gens = self.echelon_form(gens, unitriangular, order=support_order)
879
880 from sage.modules.with_basis.subquotient import SubmoduleWithBasis
~/GitHub/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/categories/finite_dimensional_modules_with_basis.py in echelon_form(self, elements, row_reduced, order)
367 order = self._compute_support_order(elements, order)
368 from sage.matrix.constructor import matrix
--> 369 mat = matrix(self.base_ring(), [g._vector_(order=order) for g in elements])
370 # Echelonizing a matrix over a field returned the rref
371 if row_reduced and self.base_ring() not in Fields():
~/GitHub/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/categories/finite_dimensional_modules_with_basis.py in <listcomp>(.0)
367 order = self._compute_support_order(elements, order)
368 from sage.matrix.constructor import matrix
--> 369 mat = matrix(self.base_ring(), [g._vector_(order=order) for g in elements])
370 # Echelonizing a matrix over a field returned the rref
371 if row_reduced and self.base_ring() not in Fields():
~/GitHub/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/modules/free_module_element.pyx in sage.modules.free_module_element.FreeModuleElement._vector_ (build/cythonized/sage/modules/free_module_element.c:9892)()
1141 return hash(tuple(self))
1142
-> 1143 def _vector_(self, R=None):
1144 r"""
1145 Return self as a vector.
TypeError: _vector_() got an unexpected keyword argument 'order'
We improve the situation by adding modules over integral domains. Thus we can do at least
sage: S.<x,y,z,w> = PolynomialRing(QQ)
sage: A = S**2
sage: A
Ambient free module of rank 2 over the integral domain Multivariate Polynomial Ring in x, y, z, w over Rational Field
sage: N = A.submodule([vector([x-y,z-w]), vector([y*z, x*w])])
sage: N
Submodule of Ambient free module of rank 2 over the integral domain Multivariate Polynomial Ring in x, y, z, w over Rational Field
Generated by the rows of the matrix:
[x - y z - w]
[ y*z x*w]
sage: Q = A.quotient(N)
sage: Q
Quotient module by Submodule of Ambient free module of rank 2 over the integral domain Multivariate Polynomial Ring in x, y, z, w over Rational Field
Generated by the rows of the matrix:
[x - y z - w]
[ y*z x*w]
Depends on #33985
Depends on #34040
CC: @tscrim @jhpalmieri
Component: algebra
Author: Kwankyu Lee, Travis Scrimshaw
Branch/Commit: f58d2f3
Reviewer: Travis Scrimshaw, Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/33868