> sage: C = VectorSpaces(GF(5)) > sage: C > Category of vector spaces over Finite Field of size 5 > sage: W = (ZZ^3).span([[1,2,3],[4,5,3]]) > sage: W > > Free module of degree 3 and rank 2 over Integer Ring > Echelon basis matrix: > [1 2 3] > [0 3 9] > sage: C(W) > > Vector space of degree 3 and dimension 2 over Finite Field of size 5 > Basis matrix: > [1 0 2] > [0 1 3] > > That looks to me as if C is like a coercion function.
> Ralf Wel looking at it mathematically, you would like C to be some functor from free modules over Z to vectorspases over Finite Fields of size 5. And taking this in mind I think this is a good behaviour of C(W), since this behaviour is for example similar to that of F5(x) in the example below: sage: F5=GF(5) sage: F5 Finite Field of size 5 sage: x=ZZ(102) sage: F5(x) 2 That is F5() tries to make an element in F5() of 102 as C tries to make a vectorfield over GF(5) out of W. So maybe it is also not bad to have coercion functions defined for categories. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---