Bill Allombert on Wed, 11 Oct 2023 23:27:41 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: efficient foursquare() and/or threesquare1m4() functions
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: efficient foursquare() and/or threesquare1m4() functions
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Wed, 11 Oct 2023 23:27:22 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1697059634; c=relaxed/relaxed; bh=w4vNXyitd1BO8BaVt3twhLJCVCi2nGJO2DxrKLvs1Vg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=yaeMC1BwJ/ixPhfY09XiFwFyWrA9MTnjBn4CEHgDuVPuX1mJFPO46b72vstzlyroWElToATZuDKw5jhDgIXAoHU6xQBIJ5pfiGtguQWnCj5Ha6Z/oBfdT/5HUso31hSb3C25DXrXMRtjQbhGj7gkLYXtCbdbW9ZvG6l1UleJtAv21OW7xvAkUPc8fdL1BgigeUY2fRMfZHU++RvHUmvsVuP68hT2Up0+urwLPsBQXWWYgvFocNHTUPnq+53Q3+xtgPGinAbTuQm9I1Hi1/BoR8yLueZlcfy0UkDF1qec0MtueaiE2cLuZDE+AHxf6xLAOSHYNLa34Z438FvKxeVy52nL27V4o84iVUfMFE1Z49zrOQa7TEnIwtGSK/Qi+QM8vIpqZkOS+YhZpZg0SLqTyZRJzTEgPagX1X024zYF7/EQMdWUA8kiEIn3EFY89ZOStczA8/WBp/WmEJbBgrdb38aPYM4wEsn+SsGQIAijBMw9AC+ZGbeJp0ruVSxnnTH070RZYuuDFacwViVe/IMAlR3ExKnrUM1ifxEVJ895pPM7WTbqKI1nRJ76ckEJ01zD4wZVVztsze2dtWMmX0CDMI4MyWfeqwdjYMZfWRzJr7FECN8j8G09+pgFud+arjBC+0NnbWtFMeJTePdUfWaXw72RgzQdGxhLkLjXscyNLUQ=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1697059634; cv=none; b=QuNutjD3zAyOnMz5JSREJuaTy3miikI6TpaZ5vWYghhyFKVf7mPfFKXEjxkAKaUYMxpww73wQ9DxnwRkc6JPI4FfkJ02TwjIjwSbHZWrpIrpaL7hpTw8ZImleTHz1TNVPSPLihmpxq5LSfENyPesnxI8R7Ff7CCupdhNGxWcdMlKrz5Do1rwqigiUkbUhvEBCuzr/adgTJZo//QyFF0LTyR+tb/baw9o670Z0SNUOEWV8UBa7Yqn7Fd+J9oLL2WmwAumfL6Wu1f720ytUbx3rO9zKP8zBjjUtRZV3WjNAzQ3vkcSHm581kVEdcKZAduR1FAOa5XpSj4MckUrJISC5gR7v96SW2G8oXubfaZHz3abwPgPK/lUASsSpYAjIS2y52guWxvK0DgTDgNlOpV3heJfFSc5JLBKxW9s9RxK6b1sMeRbdwuhGkkyFTXeu0RNVf7p4HOYLmhuiKuX7R3zS+1ljdVnr3jZb0QhdDRbIFmBnkWUuw3k1qw7GF3CnfztiZem9ZKjkCmC9I6J+mwlESNuc8XgTeVr/QXJCl0SVSvToQbGc58z4gJyMb4c8eCFrSp9PN1yw/A3Fz4Q1eOEOzN6IC6IkC+79rBHuyaQXMd7pMHf2cdQvlNJAEpXl0Svx9DfKAXtS558areg4OtfxgISxYDm8EwReqXAWBEt6/o=
- Authentication-results: smail; arc=none
- Delivery-date: Wed, 11 Oct 2023 23:27:41 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1697059634; bh=w4vNXyitd1BO8BaVt3twhLJCVCi2nGJO2DxrKLvs1Vg=; h=Date:From:To:Subject:References:In-Reply-To:From; b=q8ct/JNgV+cIqOyzgrcerj/woQ/6pti6OlPLkAYQ4ZgFpQPsec7gFcZ5glOYzAg76 DvcXZltkl7qGk0icAZBeK1ndAni8b51o7gh9gJ2FJ452PsP1ngsOApZJJo1lS1+OTn DbAuRrimB1iG9Fb4jOIzcX5qBuv5zpxcXp2Tc6yS5GOhNPy5dvZIIreWSgqq3ERmWF ZszkYykaUbkIE23mFHARCV5ibT2Nz8pXs+Kg0FyoLcN0drXSUkc0RFS63Efumb4Ldm yuFolivskLksH3gaRDkKoM8S5KxSTmsoCWIViiqoqsZwmAiVdSnoQmw2bMj4Y/4LBY r3yiejxyiQyDJN7/z+pWin4S1ovQTWe1+Vx5/DSpjkGCT2hXoJmG8QN2FBf7/uUZXp WN/qJxyPScvlV+fMEz2XqF70Kdpv6o4KPLBWS8DYkbcVFTGjOQeSkmY6iLgPiFeEfO lzgjvalFfOTvjVRMxz/MKsXw+jyX6ZiWMRljRkDPImzmsshKSELW+e/SkukPJV6T7V rhIpB1i4wBu9pV11LpSifwJ1j2otKC9Txk9Is01kibOkeKp3uJj0SegoHQ6hltAfg9 NoA7EpOTrmhAMnbbZrQfcXQcttSaKATJYtI/3HyC+Lnt1eWB7KH7anXxt8rlwQB1G6 kC8w8C4v4TfIs5xfEwD9GM4M=
- In-reply-to: <ZSKEuj4E0ovQolf6@seventeen>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <ZR/CnVFCjw69Ukyc@seventeen> <ZR/HnWWiyARDRhLM@seventeen> <ZSAT28CAqWZ+90qF@seventeen> <fd1141975cb1f0b4b488689089c0f980@stamm-wilbrandt.de> <ZSBJ5p0VR2EXTlqB@seventeen> <CAD0p0K7TTCbA7TR-4gn_peSKrGnPyDoTJ+LgeSsK9QKcC-X58g@mail.gmail.com> <26af7a392abb26df8258c64f9868d1bb@stamm-wilbrandt.de> <ZSJmCdjg4FXZvotu@seventeen> <fee82bef0775af830ecb61b3631083f6@stamm-wilbrandt.de> <ZSKEuj4E0ovQolf6@seventeen>
On Sun, Oct 08, 2023 at 12:30:18PM +0200, Bill Allombert wrote:
> On Sun, Oct 08, 2023 at 12:01:16PM +0200, hermann@stamm-wilbrandt.de wrote:
> > On 2023-10-08 10:19, Bill Allombert wrote:
> > > On Sun, Oct 08, 2023 at 01:25:07AM +0200, hermann@stamm-wilbrandt.de
> > > wrote:
> > > > Because I already implemented generation of ternary quadratic form Q
> > > > for n
> > > > - that represents n
> > > > - and has determinant 1.
> > >
> > > > Now I need to figure out how to determine matrix M, such that
> > > > M~*Q*M is diagonal matrix. The diagonal entries of M~*Q*M
> > > > are three square representation of n.
> > >
> > > See qfgaussred
> > >
> > > Cheers,
> > > Bill.
> > >
> > Thanks, but that matrix is not the matrix M I search for.
>
> Yes, you need to read the documentation...
>
> ? Q=[41,50,1;50,61,0;1,0,62]
> %1 = [41,50,1;50,61,0;1,0,62]
> ? M=qfgaussred(Q)
> %2 = [41,50/41,1/41;0,1/41,-50;0,0,1]
> ? D=matrix(#M,#M,i,j,if(i==j,M[i,j]))
> %3 = [41,0,0;0,1/41,0;0,0,1]
> ? R=matrix(#M,#M,i,j,if(i==j,1,M[i,j]))
> %4 = [1,50/41,1/41;0,1,-50;0,0,1]
> ? R~*D*R == Q
> %5 = 1
> ? R~^-1*Q*R^-1
> %6 = [41,0,0;0,1/41,0;0,0,1]
Since it was convoluted, I added a flag to qfgaussred in the master branch, so now we can do
? Q=[41,50,1;50,61,0;1,0,62]
%1 = [41,50,1;50,61,0;1,0,62]
? [U,V] = qfgaussred(Q,1); D = matdiagonal(V)
%2 = [41,0,0;0,1/41,0;0,0,1]
? U~*D*U
%3 = [41,50,1;50,61,0;1,0,62]
? U~^-1*Q*U^-1
%4 = [41,0,0;0,1/41,0;0,0,1]
Cheers,
Bill