Bill Allombert on Wed, 15 Nov 2023 23:00:46 +0100


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

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.