I am computing the signature of a quadratic form having entries 0, 1, -1/2, 
-sqrt(2)/2. I noticed that the result of signature_vector() is different if 
we treat the number sqrt(2) as a cyclotomic or as a real number. Please 
look at the example:

sage: K.<z>=CyclotomicField(8)
sage: a=z-z^3  # a is a square root of 2
sage: a-sqrt(2)
0
sage: 
Q=QuadraticForm(K,8,[1/2,-a/2,0,0,0,0,0,0,1/2,-a/2,0,0,0,0,0,1/2,-1/2,0,0,
....: 0,0,1/2,-1/2,0,0,0,1/2,-1/2,0,0,1/2,-a/2,0,1/2,-a/2,1/2])
sage: Q.signature_vector()
(8, 0, 0)

this cannot be true since there exists an isotropic vector:

sage: v=vector([1,a,1,0,0,0,0,0])
sage: v*Q.matrix()*v
0

Let's try it over reals:

sage: a=sqrt(2)
sage: 
Q=QuadraticForm(RR,8,[1/2,-a/2,0,0,0,0,0,0,1/2,-a/2,0,0,0,0,0,1/2,-1/2,0,0
....: ,0,0,1/2,-1/2,0,0,0,1/2,-1/2,0,0,1/2,-a/2,0,1/2,-a/2,1/2])
sage: Q.signature_vector()
(6, 2, 0)

however, the isotropic vector above is not isotropic anymore:

sage: v=vector([1,a,1,0,0,0,0,0])
sage: v*Q.matrix()*v
sqrt(2)*(1.00000000000000*sqrt(2) - 1.41421356237310) - 
1.41421356237310*sqrt(2) + 2.00000000000000

I also tried to define 

sage: a=sqrt(AA(2))
sage: 
Q=QuadraticForm(AA,8,[1/2,-a/2,0,0,0,0,0,0,1/2,-a/2,0,0,0,0,0,1/2,-1/2,0,0
....: ,0,0,1/2,-1/2,0,0,0,1/2,-1/2,0,0,1/2,-a/2,0,1/2,-a/2,1/2])

but Q.signature_vector() gives a runtime error with many lines of code 
ending in:

RuntimeError: maximum recursion depth exceeded


Questions:
1) is Q.signature_vector() over cyclotomic field is interpreted in some 
other way than for reals, thus making the result (8,0,0) somehow correct?

2) Which setting would guarantee both the correct result for 
signature_vector() using the exact arithmetic and at the same time show 
that v is actually an isotropic vector?

Thank you!



-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/ccbac5a6-2ea8-4684-897d-297c083ae17c%40googlegroups.com.

Reply via email to