Maybe my conception of a free module is different then: In the sense 
of http://en.wikipedia.org/wiki/Free_module, I want an R-module M with 
basis E ⊆ M, where R = ZZ and E is a set of vectors in RR^n. R is what I 
refer to as "coefficient ring" (or "scalar ring"), and it makes a big 
difference whether this is integers (which results in a classic point 
lattice) or real numbers (which results in a subspace). Was FreeModule 
(or FreeModule_submodule_with_basis_pid, specifically) ever meant to be 
used for the former case?

Thanks,
Jan

On Tuesday, June 5, 2012 1:56:36 PM UTC+2, John Cremona wrote:
>
> I don't see what is wrong in your example.  If you want vectors in 
> RR^2, replace ZZ^2 with RR^2 in the input line. 
>
> John 
>
> On 5 June 2012 09:01, Jan Pöschko wrote: 
> > Hi everyone, 
> > 
> > I am working on the Summer of Code Lattices project 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), 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 
>

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