Indeed

sage: VectorSpace(QQ,12) in Modules(QQ)
True
sage: VectorSpace(QQ,12) in Modules(QQ).FiniteDimensional()
False

On 23/08/16 13:29, VictorMiller wrote:
I just tried the following code on sagemath cloud.  Note the last line in
the error message -- clearly not correct!

Victor

sage> V = VectorSpace(QQ,12)

sage> C = ModulesWithBasis(V.base_ring())

sage> C0 = C.FiniteDimensional()

sage> V in C0
False
sage> v = V.random_element()

sage> V0 = V.subspace([v])

sage> V0 in C0
False
sage> def DualMorphism(S):
sage>    A = matrix(S.gens())
sage>    V = S.ambient_vector_space()
sage>    return V.module_morphism(matrix=A)

sage> foo = DualMorphism(V0)

Error in lines 1-1
Traceback (most recent call last):
  File
"/projects/sage/sage-6.10/local/lib/python2.7/site-packages/smc_sagews/sage_server.py",
line 947, in execute
    exec compile(block+'\n', '', 'single') in namespace, locals
  File "", line 1, in <module>
  File "", line 4, in DualMorphism
  File
"/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/categories/modules_with_basis.py",
line 541, in module_morphism
    return ModuleMorphismFromMatrix(domain=self, matrix=matrix, **keywords)
  File "sage/misc/lazy_import.pyx", line 379, in
sage.misc.lazy_import.LazyImport.__call__
(/projects/sage/sage-6.10/src/build/cythonized/sage/misc/lazy_import.c:3560)
    return self._get_object()(*args, **kwds)
  File
"/projects/sage/sage-6.10/local/lib/python2.7/site-packages/sage/modules/with_basis/morphism.py",
line 1270, in __init__
    raise ValueError("The domain %s should be finite dimensional"%domain)
ValueError: The domain Vector space of dimension 12 over Rational Field
should be finite dimensional


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to