hyperell_regulator.frobenius module

Frobenius polynomials by Harvey’s simultaneous algorithm.

The rforest implementation handles odd and even degree models. Unsupported primes are computed by Sage.

euler_binary()[source]

The Frobenius executable, or None if unavailable.

EXAMPLES:

sage: from hyperell_regulator.frobenius import euler_binary
sage: euler_binary() is None or euler_binary().endswith("euler")
True
odd_model(f)[source]

A monic integral odd degree model, or None if none exists over \(\QQ\).

EXAMPLES:

sage: from hyperell_regulator.frobenius import odd_model
sage: from sage.all import ZZ, PolynomialRing
sage: R = PolynomialRing(ZZ, 'x'); x = R.gen()
sage: odd_model(x**5 + x**3 + 1)             # already odd and monic
x^5 + x^3 + 1
sage: f = (x - 1) * (x**5 + x + 3)           # even, with a rational root
sage: g = odd_model(f); g.degree(), g.is_monic()
(5, True)

sage: odd_model(x**6 + x + 1) is None
True
frobenius_polynomials(f, primes, nthreads=None, *, backend=None, progress=None)[source]

Frobenius characteristic polynomials of \(y^2=f(x)\), keyed by prime.

f has integral coefficients and primes must have good reduction. The native backend is rforest; unsupported jobs use Sage. nthreads overrides HYPELLFROB_THREADS, then the logical CPU count.

EXAMPLES:

sage: from hyperell_regulator.frobenius import frobenius_polynomials
sage: from sage.all import ZZ, PolynomialRing
sage: R = PolynomialRing(ZZ, 'x'); x = R.gen()
sage: P = frobenius_polynomials(x**5 + x**3 + 1, [11, 13, 17])
sage: [P[p].degree() for p in (11, 13, 17)]
[4, 4, 4]
sage: all(P[p][0] == p**2 for p in (11, 13, 17))     # a_0 = q^g
True
frobenius_polynomial(f, p, *, backend=None)[source]

The Frobenius characteristic polynomial at one good prime.

EXAMPLES:

sage: from hyperell_regulator.frobenius import frobenius_polynomial
sage: from sage.all import ZZ, PolynomialRing
sage: R = PolynomialRing(ZZ, 'x'); x = R.gen()
sage: frobenius_polynomial(x**5 + x**3 + 1, 37).degree()
4
exception FrobeniusBackendError[source]

Bases: ArithmeticError

A bulk native computation failed; per-prime fallback would be too slow.