Do we require that a morphism constructed between free modules share a
common base ring between the domain and codomain?
I cannot see this required in the code and it is possible in practice
to mix base rings, and even get pretty far:
sage: V = GF(3)^3
sage: W = QQ^2
sage: H = Hom(V, W)
sage: m = matrix(3, 2, range(6))
sage: f = H(m)
sage: f([1, 2, 3])
(1, 1)
sage: f.is_surjective()
True
sage: f.image()
Vector space of degree 2 and dimension 2 over Rational Field
Basis matrix:
[1 0]
[0 1]
So far, so good, I guess, but the last two results are incorrect,
IMHO.
But more telling, the following fails.
sage: f.lift([1/2, 3])
---------------------------------------------------------------------------
AssertionError Traceback (most recent call
last)
/sage/dev/devel/sage-main/<ipython console> in <module>()
/sage/dev/local/lib/python2.6/site-packages/sage/modules/
free_module_morphism.pyc in lift(self, x)
376 except TypeError:
377 raise ValueError, "element is not in the image"
--> 378 assert self(t) == x
379 return t
380
AssertionError:
Reactions? I've got a pretty good idea where to reject different base
rings, but maybe this flexibility is needed for something?
Rob
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org