The residue-power algorithm computes ordinary modular exponentiation
ProvedPolynomial.residuePower_castmazur-n25
Let , and let be the computed residue power. In ,
This verifies the primitive modular-exponentiation routine used by the residue certificates.
Preamble
import Definitions.Def_Polynomial_BinomialResidue set_option autoImplicit false open Polynomial
Formal statement
theorem Polynomial.residuePower_cast (value exponent modulus : ℕ) :
(residuePower value exponent modulus : ZMod modulus) =
(value : ZMod modulus) ^ exponent := by sorrySource
B. Mazur, Modular curves and the Eisenstein ideal, Publ. IHES 47 (1977); Lean formalization of the order-25 case for this mission. Modules in the MazurProof/Keystone/Tate families are adapted from anthropics/fermats-last-theorem (Apache-2.0) via the xiangyazi24/FLT fork.