Bill Allombert on Fri, 16 Feb 2024 17:56:50 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: conversion of t_FFELT to t_POL
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: conversion of t_FFELT to t_POL
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Fri, 16 Feb 2024 17:56:43 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1708102607; c=relaxed/relaxed; bh=Avgkw40NQ40Zv/NXSuqsBPPoY149Db3o+WX//PCiCaM=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: MIME-Version:Content-Type:Content-Disposition; b=fvbEEB/ZjcrRDTHDKoBi14Z0xnEuazRXPaaqpJ5sViNg3Z0F4WnPg47m9DIia9J3FP6Bs8VZm5+EP5b1I5XYB9c5Y4vvqI2HcTo+fSvywTYyOJ8l0KTDFw9rG5e2r9a7PqdQUSuaUPySw3gv9xT5qSZ27mxch7meVWJxjusKVtKnvaMGXELCE4zvi1zRZGHK7TTaQ9j896Oux99KAsxS1NaDDLRaixVhIGyCq1qOBTRq2deyeSLN3ImJQfqolA0QnG7sAccg2QybRIPgAbvfRo2RihrokK6q4z9gUfIeo9zduFz8lG5Q4F7bl+lgqLj8l9HJS5la9tgOM87AyRHdxADRTVGhYm6jMnNNry8WpdP9Bms05nk8J+5EAp2xP6wZzhWSdVFEUb7ih2oCaBXwy4+G8rGxAJQlvM8kEvwB4SEjGSPfsTbVZEwS+MveQsMtT9LkvR99hIwqxViGB/lk9qE9DSqplqtxgdQbthoD+8m50BrXL43rFrgf5GAN0/Fr3Jm47Jm8hFwIZrmc5g8KIzc1IryRoXPWEqn9fNP15ETKq1W1aX7DfyCZD9lepn1eCOHj77vYRui0mzd8ZCxYOkdw1DecRUozXTGpv/i4oJDVHx6ncRnbfxMTv/CPxfp3cLaqXzXnFUiQEfcIFTuSvRJzhzPgNVB+9h97ajI6xmc=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1708102607; cv=none; b=lSQcEh2v3rlv8di0ZCweNJM+AYpCea1fwFgGOwMIrZcZnZ0+jkecvHiZKEBbca4WoiCyX1f/GkTd/qNZK+KPvIESzbVh4YZIcKOz5Paw2/6DvNmB/bk/5vw2gg2yTTShu6PVrnyhE5wVz/c1eGv+vIprqK5oHv6jwlEq95EsTr1xLqfnDZV6AJx+THI6rxnJjVxPvwrpXbV2lLU7RzJ1hDuItTYF/6Dm8QSlO6yrFZ0rZC7m/3Q2YsEyRvgkDpzLS1pJmiywXCPTsXilgyes1wGn24prlWY8v3U4qN6Xj8m6QhzYxtMDM+KQPCVmZZRi/KXb00C33gIQN2twdyWPZTReC0S3w6bHaqzCUbQsve5z9skbSVWJoAtihcc8Fuw0Xd+cWAsMf5Kkvj2oHTa/830BMJjCGRKGaoVdVLjLfy9N9grrqjB1RFysOLGSpkLU/KH5XXH6kLpjnUxUJXbMWguun3lBuXRwzernXvO2knsJTf2okwb8ZNN4IbrJnPOcjzmT6mb18JADdc4BZyC4/Q1JdUDW/siHRmiprlgI74mb6QFlMwPBzTan26wZejKrfpPWJQBX5MOQTgzc30+HTh+PzC5zZN3euUCdihRCwS9nZwQ6uju394Tf0Y1qU4G6+eBae3hVK5Pj9xy7pXVAjzt3VaAdZEoqKVWAzpSgoao=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Fri, 16 Feb 2024 17:56:50 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1708102607; bh=Avgkw40NQ40Zv/NXSuqsBPPoY149Db3o+WX//PCiCaM=; h=Date:From:To:Subject:From; b=COU+iqdalO22K2n30iI1F+nw1MvaHxN4p99tAMsU45rb5tLUvP+TgOW9UDbgw1Ry/ 62x/J7f3gdIUDcsWnKk7zcr0jDM4Y0cRnzxgiTf96492Pc0nf8r6UFP7zARxws3XBh jVsoI9PhDoIAzln3VAnFgqxEOMWgbDzEFRcQ5fbCOVjAxTwzqEVujFYYzQjIwkiO61 eIOYUoFByl84j7lfyvTVuKQ7ZDTNczH2NIDVHgEjQGSas49VJJ+JW+QOXbJPJgGI9U FR7wpK7WPO4846z86kbOIUBC6f8VPT+4xNSr69pLMiMAX2pB/HeXBx/uqzA72XIa9N C2TDoLJurDpzUF16TmSvurEiVtPw5Z+XJj33QLaNRG65NocTO+vouNsvAHuvHecPSo g1Yi6leILvLQXBTN1siYShc58btVz8PWmCq46t9AHR1cJgxiMa6QuswJ9nXFijl1dH o93uL3atzNBdVB5FDhvOyHHAJxFqfBntCRxMQtbPCzNuVNADUKajrqkRWTx3cMkder GZsSVS0/4WQs91m2owB5Dl+F4gTSFGdDTw2BWAEbSJKDF+RTcvfcAddceX8bkNdiMr qtcigs3FJkpCov1IS2AS6iO/5v2dgmkNGC6/iab/nknCERv2F5jcDby7bz5SrlCkuz FtLhux9hsqluZOFqFyLTkp+Q=
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
On Fri, Feb 16, 2024 at 11:11:03AM -0500, Max Alekseyev wrote:
> Please take a look at this example:
>
> ? r = ffprimroot(ffgen([3,5]))
> %1 = 2*x^4 + 2*x^3 + x^2 + x + 2
> ? type(r)
> %2 = "t_FFELT"
> ? f = Pol(r)
> %3 = 2*x^4 + 2*x^3 + x^2 + x + 2
> ? type(f)
> %4 = "t_POL"
> ? print(f)
> (2*x^4 + 2*x^3 + x^2 + x + 2)
>
> Why are there parentheses around the polynomial f when it's printed?
Because f is a constant polynomial in x whose value is r.
? poldegree(f)
%8 = 0
But really, the question you should ask is why %3 is printed without
parenthesis. This is due to 'simplify' being on.
? \y
simplify = 0 (off)
? f = Pol(r)
%10 = (2*x^4+2*x^3+x^2+x+2)
But really, always set a name in ffgen to avoid confusion.
? \y
simplify = 0 (off)
? r = ffprimroot(ffgen([3,5],'a))
%4 = a^4+2*a^3+2*a^2+2*a+2
? f = Pol(r,'x)
%5 = (a^4+2*a^3+2*a^2+2*a+2)
Is it clearer now ?
(I think we should set simplify to off by default. This is more confusing than
helpful).
If you want the underlying polynomial of r, just do
r.pol
? r.pol
%6 = 2*a^4+2*a^3+a^2+a+2
subst substpol substvec
? subst(r.pol,a,x)
%7 = 2*x^4+2*x^3+x^2+x+2
Cheers,
Bill