Karim Belabas on Sat, 15 Oct 2022 09:51:29 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: polcyclo: overflow in precp().
|
- To: Max Alekseyev <maxale@gmail.com>
- Subject: Re: polcyclo: overflow in precp().
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Sat, 15 Oct 2022 09:50:03 +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=1665820204; c=relaxed/relaxed; bh=w4bL7AbfaEgnFtf9ZdSybVS4tn1maTW6rF4B/sFsEY0=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=ckMH9ZC0UPxrNJ7ykQOBjBgXzaz5MvLaPCJBUct+mnsP6diQt+kGAqnbTGvKg7l5LIpNDmV6elRIZNqUohalCpYCqP+7JalAWpjDyXRANMGFgjFObGJsY+8e6lt4UPh1+Q1JNj6cIbAduQUXel1pyuluLSqIzUgt9cIidYP7EB/1y2MyPYn+g4jW7NqWAK/845d6eZonT6H0H0Px2ZiBZtCT3Dcj8EYqKClliVLMY5+VTrn0BkqEkatRbMCBrc0arJVXImm2taan9G43L4m2ZK3g7onENaVNhbS5z7VgjT8cNTmlLxjr1cwmOQs2gKESE0R4cfi01kxdKXyFmiACRahJx/9ZYXE6g8a6etTXnUJv/nwJr7Gd0KcHZqCbOoc5sYFr1G3zte0iJ8N8ZFOYPG3l2NsCM1oxnSJQKk6BJpDD+dhnApCyCimJnulzqXgtHJFfo107MtYk4O7RTVHJ6NlvUZBr2yWcBchDN/3ClFgX/H/F6uLe2C6u3/pov8zBtdfZetDuZOa7pllHzHzVe15YfCYYPbsNuemSzcVPy/F8fpJC7U2HXzgxYBWq+ZwK0Ssp03Wgu6eNi81Hmc6QvermHHveMbEEUfEO/lVsGDBuv95LcAffz+xAh0lG5+rFkZRuoELzOWmDyRhQqw4avl++knVxME9uDXids7jIri0=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1665820204; cv=none; b=JFqB9aJHDTOgOw7FbcHy8Fz2E/+NeNbs7WIWPE3czv66b4o++HJ411GLPL0WMiXKCjwpDbbB/nAvqUdbRQQDWu0BBcUDzZoMMNi38MK67nhjuka9qC1/0C3Yd6aVZwSWDrCs8RQZGfPGveCoIUvkBPz9w0HBU+6KJqpA2K+6tTvmeGFxa2JHZCDLlXrVwnigp2YvI0TWrxybvwqK8M8tmOda6oT9rKEe4yHWnWFdCga1fcqUhlSMCc8/wM2BH6DnMH0vGlySqc6uvGqBkQ8HZoOPA6NBoqAJpVBqXJtVyBmOftD0kRYZ3thiI5lNS1QDA89AuTdGHRofouSgarq1zkxVjLZIHbDYtUV1EiWvsjCmtyZZOA7Y6eGdZBI5rUhqLktFE23rV8oevvdXvj2XWoikpDQllDeI8gfM5Toz8GTNjb0G9VZlpIZYJT5fl5IIEQtTjw15KgV+lqGJ8HzMywWaf/YtVNRtVv4B3fM9cjuj8KFlAD6Wb9NyRFzniin2Shn4oIykOCCyFltP0HD04gUjTHW0YDt04VUFa3dcGS+nu9TIcaMyu17wLIk50a6zgikYRYlXvVmLbkgJzk2+ZDMfv+Z//GqqJtP1Xf7Y8zURz1y/PmnbPJ8wd5t8MDPRmh0CVRAsotL+kZhPNWfN46bRGCb0aSExsAt4asuGEAE=
- Authentication-results: smail; arc=none
- Cc: pari-users@pari.math.u-bordeaux.fr
- Delivery-date: Sat, 15 Oct 2022 09:51:29 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1665820204; bh=w4bL7AbfaEgnFtf9ZdSybVS4tn1maTW6rF4B/sFsEY0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pz1wLRwF5uAbXWhJ+4Cez6BU6145/WvksG6ituExxLMUS5pu+Z1EhHSKEM/D419hs GsH0Olaqk8HqETagpmvq5wDEXwlYjiQqkNhxx5qCvPng+GXaSPGP0OALUV/jycymCI XsQTFBBr7xm/ocoexeCCm3E6i+4/Cqtkl6X0aQMES0vYjv0xLRx1AAOKts0xjV0JwB H1x3l7KezR9h2/TSanJThSVjTTY/wUojQRFUYxaHeOV1YGlu8HBO29zCpVYVeIkWaX HcBwhTwu4U1QC74dD8hizuRS7NAoYkGaA4kAoQeTs7caG+XjqIdqhYefK6R+8/nCJQ ku83NFI0dvR3DZGGrRS+DVLgK6GsF0qqRT9gXCO5RqYxa0ZXpBpVfzUGMlcx89hQac zjaHZcHzmwmmpTiFMv71F+FxnP/ESMsvdNX/u4Djjf6PThKLtSmuetxFSCYAgRHcFW 4L2B7GcEAugIS0p1lG6vNqaDABugllBYih7zjpIXS5E8wJ0wc5iL2GaLS/PIo+DUTn Ewk4KsBWyzUesbRzfaEmSPQRb4GmGvLsas7ul4IHLbUixeLeJ5gJS4iV0NalaMzSRu oZDAzoXUcdTsk+1y3GvbHN+F8kwrm6tDRY/mmiKmWIb19NLPLF3n1ghj9S8q7y7iBC cjODJryzpvNIv/JBiF+cx90o=
- In-reply-to: <CAJkPp5P-9XceNFerQkqBuZQkv33siWMQOndUU4N2XcdbJdEXyw@mail.gmail.com>
- Mail-followup-to: Max Alekseyev <maxale@gmail.com>, pari-users@pari.math.u-bordeaux.fr
- References: <CAJkPp5MtUWJfkWrHzvzjpO3Qi0_P9Lt1TJBEMikJkgJCwin1MA@mail.gmail.com> <Y0marxmTaNnPjvch@math.u-bordeaux.fr> <CAJkPp5P-9XceNFerQkqBuZQkv33siWMQOndUU4N2XcdbJdEXyw@mail.gmail.com>
* Max Alekseyev [2022-10-14 20:25]:
> Dear Karim,
>
> Thank you for the explanation. As for using t_INTMOD, I see the following
> issue:
>
> ? polcyclo(22,Mod(10,2))
> %1 = Mod(1, 2)
> ? polcyclo(22,Mod(10,11))
> %2 = Mod(0, 11)
>
> but
>
> ? polcyclo(22,Mod(10,22))
> *** at top-level: polcyclo(22,Mod(10,22))
> *** ^-----------------------
> *** polcyclo: impossible inverse in Fl_inv: Mod(11, 22).
> *** Break loop: type 'break' to go back to GP prompt
>
> Why is this happening?
For the same reason as in my previous mail, we use
(*) Prod_{d|n} (x^d - 1) ^ mu(n/d)
formally without bothering to check what "x" is. We do take care about
the possibility x^d - 1 = 0 at every step, though: in a field everything
is fine, even if x is a root of unity.
In Z/22Z, checking that x^d != 1 is not enough for x^d - 1 to be invertible ...
All this is documented in ??polcyclo:
In the evaluated case, the algorithm assumes that a^d - 1 is either 0 or
invertible, for all d | n. If this is not the case (the base ring has zero
divisors), use subst(polcyclo(n),x,a).
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251), Université de Bordeaux
Vice-président en charge du Numérique
T: (+33) 05 40 00 29 77; http://www.math.u-bordeaux.fr/~kbelabas/
`