| Bill Allombert on Thu, 22 Jan 2026 20:17:02 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Computation with two algebraic integers |
On Thu, Jan 22, 2026 at 03:17:55PM +0100, Bill Allombert wrote: > On Thu, Jan 22, 2026 at 02:56:58PM +0100, Ewan Delanoy wrote: > > I have two algebraic integers g and h, and > > > > - I know the minimal polynomial of g, stored in a variable called minpoly_for_g, which has degree 18 in g > > - I know the minimal polynomial of h, stored in a variable called minpoly_for_h, which has degree 72 in h > > - I also know an extra relation between g and h, in the form of a polynomial with integer coefficients called > > relator, and which has degree 17 in g, 71 in h. This relation ensures that g is unique in terms of h. > > > > > > My goal is to compute the (polynomial) expression of g in terms of h from those data. > > So you have three polynomials > minpoly_for_g(x), minpoly_for_h(y) and relator(x,y) and you define g,h by > > minpoly_for_g(g) = 0 > minpoly_for_h(h) = 0 > relator(g,h) = 0 > > What is the equation satisfied by the polynomial you are looking for ? > Is it > g = pol(h) In that case, I suggest you do: ? G=nfisincl(minpoly_for_g, minpoly_for_h); ? #G %10 = 2 \\ There are two solutions, we need to check that relator(g,h) = 0! ? substvec(relator,[g,h],[G[1],h]*Mod(1,minpoly_for_h))==0 %11 = 1 G[1] is the right one. There is a better way to do that, which is used internally by nfisincl. Cheers, Bill