On Wed, Apr 28, 2010 at 9:51 AM, Simon King <simon.k...@nuigalway.ie> wrote:
> Hi!
>
> I always thought that categories and functors are about objects *and*
> morphisms. But is this implemented in the categories of Sage?
>
> Example:
>  sage: R.<x> = ZZ[]
>  sage: f = R.hom([2*x],R)
>  sage: C = Fields()
>  sage: R in C # R is no field, so its fine:
>  False
>  sage: f in C.hom_category() # ??
>  True
>  sage: C.hom_category()
>  Category of hom sets in Category of rings
>
> So, the fields do not have their own hom category, and instead use
> ring homomorphisms.
>
> Now about functors. The fraction field construction is functorial, and
> indeed one has
>  sage: F = C(R)
>  sage: F
>  Fraction Field of Univariate Polynomial Ring in x over Integer Ring
>
> But if it is a functor, I would expect that in some way one is able to
> transform f into the corresponding automorphism of F.
>
> Is this implemented in Sage? I expected that C(f) would return a
> morphism, but it only yields an error. And while
>  sage: f2 = C.hom_category()(f)
> does not raise an error, one has
>  sage: f2 is f
>  True
> so, this is not what I was looking for.
>
> f.extend_codomain(F).extend_domain(F) or F.hom(f,F) doesn't work
> either. Another failing attempt was to work with a proper functor,
> namely
>  sage: Frac = F.construction()[0]
>  sage: Frac
>  FractionField
>  sage: Frac(R) is F
>  True
>  sage: Frac(f)
>  *BOOM*
>
> So, what can one do? Is there the framework to implement the missing
> bits? When I look at the code in sage/categories/functor.pyx, it seems
> that morphisms are not taken care of.

The T-shirt I'm wearing says -- "It's easy.  Implement it and post a patch."

But seriously, the above is natural and makes sense, but is *NOT*
implemented.  It would be a great thing for people to make a stab at.
It would be very good to get feedback from Nick A., Robert B., Nick
T., etc.

 -- William

>
> Best regards,
> Simon
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to 
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to