Hi everyone, I am working on the Summer of Code Lattices project<http://gsoc-sage-lattices.blogspot.com>and ran into a problem when trying to subclass Lattice from FreeModule_submodule_with_basis_pid. If I'm getting it right, the coefficient ring *R* is to be specified as parameter ambient (in the form R^n), followed by the basis vectors in K^n. Now I don't understand why the basis is coerced to the fraction field of R (if not R itself), e.g.
sage: from sage.modules.free_module import FreeModule_submodule_with_basis_pid as FMs sage: FMs(ZZ^2, [(0.5,0.25), (1.0,0)]) Free module of degree 2 and rank 2 over Integer Ring User basis matrix: [1/2 1/4] [ 1 0] I would like to allow creating lattices of points in RR^n (the real vector space) with integer coefficients (ZZ), which is probably the most common form of point lattices. As lattices really *are* free modules, it would be good to inherit from them, but with the basis being kept in RR^n if given therein. I tried a workaround by disabling checking and echelonization of the basis (see the details of my approach<http://gsoc-sage-lattices.blogspot.co.at/2012/06/preventing-freemodule-from-coercing-to.html>), but this doesn't work actually. Is there a reason why FreeModule is restricted in this way? Should it be patched? Or should lattices subclass from something else? Thanks, Jan -- 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
