Condition of GRH on a sage program

Skip to first unread message

Subramani Muthukrishnan

Jan 12, 2021, 5:26:55 AM1/12/21
to sage-nt
Dear All,

I am M. Subramani, working at the Indian Institute of Information Technology D&M, Chennai. I would like to know whether the following sage code uses GRH or not. Kindly looking forward to your suggestions/comments.

sage: x = polygen(QQ)
sage: K.<a,b> = NumberField([x^2+67,x^2+163])
sage: K.absolute_discriminant()
sage: UK = UnitGroup(K); UK
sage: UK.gens_values()
sage: f = K.factor(47); f
sage: [i.residue_class_degree() for i, _ in f]
sage: g = K.factor(167); g
sage: [i.residue_class_degree() for i, _ in g]
sage: I = K.ideal((102005618195957366438*b - 670427217454663892839)*a + 859657055484696603731/2*b + 21319906288123697979267/2)^2
sage: I.small_residue(-113532749239375013512100611401835237324223211*a + 72788832531850093592405531048689006688627546*b)^(71*35)

Thanking you in advance,

with regards,
M. Subramani

John Cremona

Jan 12, 2021, 5:47:25 AM1/12/21
to sage-nt
Although Sage uses the pari library for number field computations, and
by default the pari library does make assumptions such as the GRH, for
speed, Sage's philosophy is that computations should not make any
silent assumptions, so that the results obtained from the pari library
are certified by Sage. Hence, unless you explicitly ask Sage to
assume GRH -- which is often useful as it can speed up computations
considerably -- the output will be unconditional.

John Cremona
> --
> You received this message because you are subscribed to the Google Groups "sage-nt" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> To view this discussion on the web visit

kevin lui

Jan 13, 2021, 1:04:45 AM1/13/21
to sage-nt
Adding to what John said, in case, you're interested in using GRH in your computations.

Methods that have speedups based on conjectures often have a "proof" parameter that is True by default (meaning, it won't use the conjecture) (example: Setting it False will make use of the speedups. It can also be set globally (

Reply all
Reply to author
0 new messages