On Feb 24, 2012, at 08:04 , Jacob Hicks wrote:

> When I run:
> 
> sage: q = QuadraticForm(ZZ,2,[3,2,5])
> sage: q.polynomial()
> 6*x0^2 + 4*x0*x1 + 10*x1^2
> 
> I would expect to get half of this result, which is the quadratic form
> as a polynomial.  The doc tests say this is what the behavior should
> be, but I don't understand why.  Is this actually the desired behavior
> and if so what am I misunderstanding?

You're in the middle of a centuries-old debate, stemming from the 
Lagrange-Gauss smackdown (or maybe it was Legendre; it's been a while).  The 
issue stems from the desire to equate quadratic forms and symmetric matrices 
("b*x0*x1" vs "b/2*x0*x1+b/2*x1*x0").  If you don't use the above, you end up 
having to deal with the ring ZZ[1/2].  This is discussed in the Wikipedia 
article on quadratic forms (and in other places, like Cassels' "Rational 
Quadratic Forms").

HTH

Justin

--
Justin C. Walker, Curmudgeon at Large
Director
Institute for the Enhancement of the Director's Income
-----------
Nobody knows the trouble I've been
-----------



-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to