Denis Simon on Wed, 15 Nov 2023 23:15:15 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Question on ternary quadratic form


Hi Hermann,

More generally, if you have a quadratic form that you suspect to be highly reducible,
you shoud try to reduce it with qflllgram:

? M=[1,0,0;0,5,28;0,28,157];
? G=qflllgram(M)
%2 = 
[1  0   0]

[0 -6 -11]

[0  1   2]

? G~*M*G
%3 = 
[1 0 0]

[0 1 0]

[0 0 1]

In your situation, you can do the same thing with the 2x2 block [5,28;28,157].

Cheers,
Denis SIMON.

----- Mail original -----
> De: "Bill Allombert" <Bill.Allombert@math.u-bordeaux.fr>
> À: "pari-users" <pari-users@pari.math.u-bordeaux.fr>
> Envoyé: Mercredi 15 Novembre 2023 23:00:39
> Objet: Re: Question on ternary quadratic form

> On Wed, Nov 15, 2023 at 10:28:25PM +0100, hermann@stamm-wilbrandt.de wrote:
>> After two modifications I got this ternary quadratic form:
>> 
>> ? Qt
>> 
>> [1  0   0]
>> 
>> [0  5  28]
>> 
>> [0 28 157]
>> 
>> ?
>> 
>> I know it can be transformed to ternary identity form.
> 
> You can use qfisom (if the form is positive definite):
> 
> ? M=[1,0,0;0,5,28;0,28,157];
> ? qfisom(M,matid(3))
> %17 =
> [0  1   6]
> 
> [0 -2 -11]
> 
> [1  0   0]
> 
> Of course, if you look for solution of the form
> 1 0 0
> 0 a b
> 0 c d
> 
> Then you should do
> ? qfbredsl2(Qfb(5,28+28,157))
> %20 = [Qfb(1, 0, 1), [-6, 11; 1, -2]]
> 
> which will be much faster.
> 
> Cheers,
> Bill.