Constructions of quadratic forms#
- sage.quadratic_forms.constructions.BezoutianQuadraticForm(f, g)[source]#
Compute the Bezoutian of two polynomials defined over a common base ring. This is defined by
\[{\rm Bez}(f, g) := \frac{f(x) g(y) - f(y) g(x)}{y - x}\]and has size defined by the maximum of the degrees of \(f\) and \(g\).
INPUT:
f
,g
– polynomials in \(R[x]\), for some ring \(R\)
OUTPUT: a quadratic form over \(R\)
EXAMPLES:
sage: R = PolynomialRing(ZZ, 'x') sage: f = R([1,2,3]) sage: g = R([2,5]) sage: Q = BezoutianQuadraticForm(f, g); Q # needs sage.libs.singular Quadratic form in 2 variables over Integer Ring with coefficients: [ 1 -12 ] [ * -15 ]
>>> from sage.all import * >>> R = PolynomialRing(ZZ, 'x') >>> f = R([Integer(1),Integer(2),Integer(3)]) >>> g = R([Integer(2),Integer(5)]) >>> Q = BezoutianQuadraticForm(f, g); Q # needs sage.libs.singular Quadratic form in 2 variables over Integer Ring with coefficients: [ 1 -12 ] [ * -15 ]
AUTHORS:
Fernando Rodriguez-Villegas, Jonathan Hanke – added on 11/9/2008
- sage.quadratic_forms.constructions.HyperbolicPlane_quadratic_form(R, r=1)[source]#
Constructs the direct sum of \(r\) copies of the quadratic form \(xy\) representing a hyperbolic plane defined over the base ring \(R\).
INPUT:
R
: a ringn
(integer, default 1) number of copies
EXAMPLES:
sage: HyperbolicPlane_quadratic_form(ZZ) Quadratic form in 2 variables over Integer Ring with coefficients: [ 0 1 ] [ * 0 ]
>>> from sage.all import * >>> HyperbolicPlane_quadratic_form(ZZ) Quadratic form in 2 variables over Integer Ring with coefficients: [ 0 1 ] [ * 0 ]