Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.TraceExponential

Modular coefficients of a finite exponential #

Uniform coefficients in F_a give polynomial evaluation in F_(a+1), finite-exponential evaluation in F_(max (a+1) 3 + 1), and its addressed coefficients in F_(max (a+1) 3 + 2). The degree, modulus and coefficient address are binary polynomial-time functions. Summation and product certificates include all query, intermediate and output lengths, without expanding the coefficient vector or factorials.

Correctness at a prime requires D < p for the factorial denominators and D * D < p - 1 for extraction without aliasing. The mathematical polynomial is Polynomial.finiteExponential D (Polynomial.ofFn (D + 1) c).

Adapted from lean-canny.

Modular evaluation of the truncated exponential, using only short indices.

Coefficient reconstruction is one more uniform Fourier sum.

theorem Cslib.Complexity.RealAlgebraic.truncatedExponentialResidue_cast {p : ℕ} [Fact (Nat.Prime p)] {D : ℕ} (hD : D < p) (z : ℕ) (c : ℕ → ℕ) :
↑(truncatedExponentialResidue p D z c) = Polynomial.eval (↑z) (Polynomial.finiteExponential D ((Polynomial.ofFn (D + 1)) fun (k : Fin (D + 1)) => ↑(c ↑k)))
theorem Cslib.Complexity.RealAlgebraic.truncatedExponentialCoefficient_eq {p : ℕ} [Fact (Nat.Prime p)] {D k : ℕ} (hdegree : D * D < p - 1) (hk : k < p - 1) (c : ℕ → ℕ) :
truncatedExponentialCoefficient p D k c = ((Polynomial.finiteExponential D ((Polynomial.ofFn (D + 1)) fun (i : Fin (D + 1)) => ↑(c ↑i))).coeff k).val

Correct canonical coefficients of the actual truncated-exponential polynomial.

Indexed truncated-exponential coefficients are available at fixed depth. This certificate constructs the sums and modular denominators rather than assuming an exponential-sized matrix or coefficient oracle.