Hi all,

I write this to ask about a kind of coercion in the category system.

Yesterday and today I spend my time on adapting some classes in psage
to the changes that Simon has made to the categories and functors. In
particular, the codomain is now enforced and that drew my a attention
to the following:

sage: FreeModule(QQ, 3) in Modules(ZZ)
False

The only reason why the functor VectorSpace, which enforces the
codomain, does not crash is that its domain is
CommutativeAdditiveGroups(). That is of cause true, however, it is
quite weak. In the particular case I was dealing with it would have
been of some use to have the codomain Modules(some fancy ring) or at
least Modules(ZZ),
The first would demand for something like an automatic restriction of
functions, and I don't think it is what we want globally. The latter,
though, would simply need

sage: FreeModule(QQ, 3) in Modules(ZZ)
True

which is the mathematically correct answer. One would need to find the
coercion from ZZ to QQ and then conclude that this leads to a faithful
functor from Modules(QQ) to Modules(ZZ).

I am not at all an expert for the categories framework, so I depend on
others implementing this. I just thought it might be worth considering
it.

Martin

-- 
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

Reply via email to