Hi,
I am on 'Sage Version 4.4, Release Date: 2010-04-24' on Ubuntu 10
(don't remember the method of build), and wonder if I might be getting
slightly incorrect results from
find_primitive_p_divisible_vector__next
which is in
quadratic_form__neighbors.py. For example:
QuadraticForm(ZZ,3,
[1,0,0,1,1,3]).find_primitive_p_divisible_vector__next(3)
output: (1,1,1)
QuadraticForm(ZZ,3,
[1,0,0,1,1,3]).find_primitive_p_divisible_vector__next(3,vector([1,1,1]))
output: (2,1,1)
QuadraticForm(ZZ,3,
[1,0,0,1,1,3]).find_primitive_p_divisible_vector__next(3,vector([2,1,1]))
output: (0,2,1)
QuadraticForm(ZZ,3,
[1,0,0,1,1,3]).find_primitive_p_divisible_vector__next(3,vector([0,2,1]))
output: None
gives 3 isotropic lines, but there should be 3+1=4. (Since
QuadraticForm(ZZ,3,[1,0,0,1,1,3]).det()
outputs 22 I don't think there is an issue with 3 dividing the
discriminant.)
I believe the issue is that the very first vector ( (0,0,1) in this
case) is 3-isotropic, but it gets bypassed for the next 3-isotropic
vector (1,1,1).
I think this might be remedied by replacing the following code right
at the beginning:
if v == None:
w = vector([ZZ(0) for i in range(n-1)] + [ZZ(1)])
else:
w = deepcopy(v)
with:
if v == None:
w = vector([ZZ(0) for i in range(n-1)] + [ZZ(1)])
if (self(w) % p == 0):
return w
else:
w = deepcopy(v)
but I am not sure if the programming or the math are correct.
I hope that I have not bothered everyone with just a simple mistake in
my usage or with a problem that has been resolved already, but help in
this matter would be much appreciated.
Thank you very much for your time and attention. Best,
Daniel Kim Murphy
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org