Hi,
I'm looking for a way to create a map from ZZ^3 to Hom(ZZ^3,Z) mapping
an element x to x :-> <x,-> where <-,-> is the default scalarproduct.
i know i could do this by vertormultiplikation, but i want to know if
it's possible to do with the Hom function.
I tried this one:
H = Hom(ZZ^3,Hom(ZZ^3,ZZ)) #this works
#creating a very simple homom. fails:
f = H([0,0,0])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/j_schn14/<ipython console> in <module>()
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/modules/free_module_homspace.pyc
in __call__(self, A, check)
126 C = self.codomain()
127 try:
--> 128 v = [C(a) for a in A]
129 A = matrix.matrix([C.coordinates(a) for a in v])
130 except TypeError:
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/modules/free_module_homspace.pyc
in __call__(self, A, check)
130 except TypeError:
131 pass
--> 132 return free_module_morphism.FreeModuleMorphism(self, A)
133
134 def _matrix_space(self):
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/modules/free_module_morphism.pyc
in __init__(self, parent, A)
81 if isinstance(A, matrix_morphism.MatrixMorphism):
82 A = A.matrix()
---> 83 A = parent._matrix_space()(A)
84 matrix_morphism.MatrixMorphism.__init__(self, parent, A)
85
/opt/sage-4.6/local/lib/python2.6/site-packages/sage/modules/free_module_homspace.pyc
in _matrix_space(self)
150 except AttributeError:
151 R = self.domain().base_ring()
--> 152 M = matrix.MatrixSpace(R, self.domain().rank(),
self.codomain().rank())
153 self.__matrix_space = M
154 return M
is this a bug, or something which is just not implemented?
It fails if i use QQ instead of ZZ too.
greatz Johannes
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org