Ask Your Question

Basile's profile - activity

2015-04-15 22:27:37 +0200 received badge  Famous Question (source)
2015-04-15 22:27:37 +0200 received badge  Popular Question (source)
2015-04-15 22:27:37 +0200 received badge  Notable Question (source)
2014-12-12 10:40:01 +0200 received badge  Editor (source)
2014-12-12 09:20:58 +0200 commented answer quadratic form over the integers with odd coefficients

I carefully read both the documentation and the source code before asking. Still no explanation why, for instance, they ask matrices of quadratic forms over the integers to have even diagonal ! Following this constructor it seems impossible to define x^2 as a quadratic form over ZZ.

2014-12-11 14:23:36 +0200 asked a question quadratic form over the integers with odd coefficients

Hi,

I'm a newcomer in Sage, and even after thorough examination of the manual I cannot understand the constructor QuadraticFrom :

sage: Q = QuadraticForm(ZZ, 2, [1,2,3])
sage: Q
Quadratic form in 2 variables over Integer Ring with coefficients:
[ 1 2  ]
[ * 3  ]

But

sage: Q.polynomial()
2*x0^2 + 4*x0*x1 + 6*x1^2

So how do I construct a quadratic form with odd coefficients in its polynomial expression ? The polynomial x0^2 + 4x0x1 + 3*x1^2 defines a genuine quadratic form over the integers. Is it made on purpose for some reasons related to classification of lattices ?

Thank you.