Indexed characteristic coefficients from uniform power traces #
traceExponentialCoefficient is a total modular evaluator: it forms the divided negative
trace coefficients by powering, evaluates their finite exponential, extracts one coefficient,
and returns zero for addresses above the matrix dimension. Given uniform F_a trace residues,
its certificate is F_(max (a + 1) 3 + 2); the modulus, dimension and address are binary
polynomial-time functions. No matrix or trace evaluator is constructed by this generic step.
At a prime with D * D < p - 1, the output is the canonical characteristic coefficient
of a D-dimensional matrix when the supplied residues give its traces for powers 1, …, D.
The zero trace slot is ignored, so the empty matrix is included.
Adapted from the trace-to-coefficient construction in lean-canny and its matrix correctness proof.
The zero logarithm slot is masked before Fermat inversion, including at p=2.
The reconstructed expression is exactly the one with coefficients -t_k/k.
Forming the divided negative trace costs no additional counting level.
The trace-to-exponential-coefficient stage has fixed depth for binary dimensions.
From the positive power traces through the dimension, the evaluator returns the actual characteristic coefficient, including the zero default above the dimension. The prime cutoff also ensures that every required factorial denominator is invertible.