FLINT3.7.0-dev

Frobenius, Teichmüller lifts, norm and trace

Synopsis#include <flint/qadic.h>
void qadic_frobenius(qadic_t rop, const qadic_t op, slong e, const qadic_ctx_t ctx)source

Sets rop to Σe(op)\Sigma^e(op), reduced, for any integer ee, which is taken modulo dd. Σ\Sigma is the automorphism of Qq\mathbf{Q}_q that reduces to x↦xpx \mapsto x^p on Fq\mathbf{F}_q; it generates the Galois group, which is cyclic of order dd.

void qadic_teichmuller(qadic_t rop, const qadic_t op, const qadic_ctx_t ctx)source

Sets rop to the Teichmüller lift of op: the unique (q−1)(q - 1)-th root of unity congruent to op modulo pp, reduced. Sets rop to zero if op is zero or divisible by pp, or if the precision of rop is not positive. Throws if op has negative valuation.

void _qadic_trace(fmpz_t rop, const fmpz * op, slong len, const fmpz * a, const slong * j, slong lena, const fmpz_t pN)source
void qadic_trace(padic_t rop, const qadic_t op, const qadic_ctx_t ctx)source

Set rop to the trace of op over Qp\mathbf{Q}_p, reduced modulo pN, respectively to the precision of rop. The trace is computed from the power sums of the roots of ff by Newton's identities.

void qadic_norm(padic_t rop, const qadic_t op, const qadic_ctx_t ctx)source
void qadic_norm_analytic(padic_t rop, const qadic_t op, const qadic_ctx_t ctx)source
void qadic_norm_resultant(padic_t rop, const qadic_t op, const qadic_ctx_t ctx)source

Set rop to the norm of op over Qp\mathbf{Q}_p, reduced to the precision of rop. The analytic version computes exp⁡(Tr⁡(log⁡u))\exp(\operatorname{Tr}(\log u)) for the unit part uu and throws unless u≡1(modp)u \equiv 1 \pmod p ( mod 4\bmod 4 for p=2p = 2) or u∈Qpu \in \mathbf{Q}_p; the resultant version computes Res⁡(f,u)\operatorname{Res}(f, u) as a determinant modulo pNp^N; qadic_norm chooses.

The extension Qq/Qp\mathbf{Q}_q/\mathbf{Q}_p is Galois with cyclic Galois group of order dd, generated by the Frobenius automorphism Σ\Sigma, the unique automorphism that reduces to x↦xpx \mapsto x^p on the residue field Fq\mathbf{F}_q. These functions compute Σe\Sigma^e, the Teichmüller lifts, which are the roots of unity of order prime to pp, and the trace and norm, which are the sum and the product of the dd conjugates Σi(x)\Sigma^i(x). All four reduce their output to its precision; for the norm and trace the output is a padic_t.

AlgorithmFrobenius automorphism and Teichmüller lifts in unramified extensionsHow qadic computes the Frobenius automorphism of Q_q by Newton lifting the image of the generator and evaluating by rectangular splitting, and how Teichmüller lifts are computed, with the relations between the two.

Algorithms#

  • qadic_frobenius computes the image Σe(X)\Sigma^e(X) of the generator as the root of ff congruent to XpeX^{p^e} modulo pp, by Newton iteration, and evaluates the input polynomial at it by rectangular splitting. The cost is O(elog⁡p)O(e \log p) multiplications modulo pp and O(d)O(\sqrt d) multiplications in Zq\mathbf{Z}_q at each precision. Elements of Qp\mathbf{Q}_p are returned unchanged, and for precision 1 the image is computed as a power xpex^{p^e}.
  • qadic_teichmuller lifts a unit xx to the root of tq−tt^q - t congruent to xx modulo pp by the Newton iteration t←t−(tq−t)/(q−1)t \gets t - (t^q - t)/(q - 1), which costs O(dlog⁡p)O(d \log p) multiplications at each precision (Teichmüller lifts).
  • qadic_trace computes the power sums SiS_i of the roots of ff by Newton's identities and returns ∑iciSi\sum_i c_i S_i for the element ∑iciXi\sum_i c_i X^i; the cost is linear in dd times the number of terms of ff.
  • qadic_norm uses N(x)=exp⁡(Tr⁡(log⁡x))N(x) = \exp(\operatorname{Tr}(\log x)) when the unit part is ≡1(modp)\equiv 1 \pmod p ( mod 4\bmod 4 for p=2p = 2) and dd is large compared with log⁡N\log N, and otherwise the resultant Res⁡(f,x)\operatorname{Res}(f, x), computed as the determinant of the Sylvester matrix modulo pNp^N (Norm).

The valuation passes through unchanged for Σ\Sigma, is zero for the Teichmüller lift, and is multiplied by dd for the norm (N(pvu)=pdvN(u)N(p^v u) = p^{dv} N(u)); the trace of pvup^v u is pvTr⁡(u)p^v \operatorname{Tr}(u), which can have larger valuation.

Example#

The program works in the extension of degree 3 of Q3\mathbf{Q}_3 defined by the Conway polynomial X3+2X+1X^3 + 2X + 1, to precision 383^8. It computes the Teichmüller lift tt of the generator, checks that tt is a 26th root of unity and that Σ(t)=t3\Sigma(t) = t^3, checks that Σ3\Sigma^3 is the identity, and computes the norm and trace of XX, which are −f(0)=−1-f(0) = -1 and minus the coefficient of X2X^2 in ff.

Exampleqadic_galois.cchecked by make checkdoc
#include <flint/flint.h>
#include <flint/fmpz.h>
#include <flint/padic.h>
#include <flint/qadic.h>

int main(void)
{
    fmpz_t p, e;
    qadic_ctx_t ctx;
    qadic_t x, t, s, u;
    padic_t n;

    fmpz_init_set_ui(p, 3);
    fmpz_init(e);
    qadic_ctx_init_conway(ctx, p, 3, 0, 20, "X", PADIC_SERIES);
    qadic_ctx_print(ctx);

    qadic_init2(x, 8); qadic_init2(t, 8); qadic_init2(s, 8); qadic_init2(u, 8);
    padic_init2(n, 8);

    qadic_gen(x, ctx);

    qadic_teichmuller(t, x, ctx);            /* the (q-1)-th root of unity = X mod 3 */
    flint_printf("t = "); qadic_print_pretty(t, ctx); flint_printf("\n");

    fmpz_set_ui(e, 26);                      /* q - 1 = 26 */
    qadic_pow(u, t, e, ctx);
    flint_printf("t^26 == 1: %d\n", qadic_is_one(u));

    qadic_frobenius(s, t, 1, ctx);           /* Sigma(t) */
    fmpz_set_ui(e, 3);
    qadic_pow(u, t, e, ctx);                 /* t^p */
    flint_printf("Sigma(t) == t^3: %d\n", qadic_equal(s, u));

    qadic_frobenius(s, x, 3, ctx);           /* Sigma^3 = identity */
    flint_printf("Sigma^3(X) == X: %d\n", qadic_equal(s, x));

    qadic_norm(n, x, ctx);
    flint_printf("Norm(X) = "); padic_print(n, &ctx->pctx);
    qadic_trace(n, x, ctx);
    flint_printf(", Trace(X) = "); padic_print(n, &ctx->pctx);
    flint_printf("\n");

    qadic_clear(x); qadic_clear(t); qadic_clear(s); qadic_clear(u);
    padic_clear(n);
    qadic_ctx_clear(ctx);
    fmpz_clear(p); fmpz_clear(e);
    return 0;
}
Output
p    = 3
d    = 3
f(X) = 1 + 2*X + X^3
t = (X) + (X^2)*3 + (1)*3^2 + (2*X^2+1)*3^3 + (X+1)*3^4 + (X)*3^5 + (X+2)*3^6 + (2*X^2+X+2)*3^7
t^26 == 1: 1
Sigma(t) == t^3: 1
Sigma^3(X) == X: 1
Norm(X) = 2 + 2*3^1 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7, Trace(X) = 0

The series form of the norm shows the 3-adic expansion of −1-1, whose digits are all p−1=2p - 1 = 2. The relation Σ(t)=tp\Sigma(t) = t^p holds for every Teichmüller lift, because both sides are (q−1)(q-1)-th roots of unity with the same reduction modulo pp.

Cite this page

The FLINT team, “Frobenius, Teichmüller lifts, norm and trace (qadic.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/qadic/galois.html (generated 2026-11-02).