Re: Computation with two algebraic integers

Ewan Delanoy <[email protected]> Thu, 22 Jan 2026 16:24:57 +0100
Newsgroups gmane.comp.mathematics.pari.user
Message-ID <[email protected]>
> Maybe provide a small example as a tested for experiment. 
 


On a small example one can proceed as follows : 



minpoly_for_h=h^6 - 3*h^4 + 3*h^2 - 3

minpoly_for_g=g^3-2

relator=(15*h^4 - 18*h^2 - 15)*g^2 + (6*h^5 - 12*h^3 + 18*h^2 - 30*h - 30)*g + (36*h^3 - 18*h^2 - 48*h - 6)



polrem(pol1,pol2,var)=divrem(pol1,pol2,var)[2]



relator_lead_inverse=lift(Mod(1/pollead(relator,g),minpoly_for_h))

relator2=polrem(relator_lead_inverse*relator,minpoly_for_h,h)

relator3=polrem(minpoly_for_g,relator2,g)

relator4=polrem(relator3,minpoly_for_h,h)

g_in_terms_of_h=lift(Mod(-polcoeff(relator4,0,g)/polcoeff(relator4,1,g),minpoly_for_h))






Cheers, 
Ewan