Kernel-replayable modular composition using structural Horner evaluation.
Equations
- Hex.Conway.compose f g modulus hm = g.composeModMonicList modulus hm (Hex.DensePoly.toArray f).toList
Instances For
Structural composition agrees with the compiled packed dispatcher.
Preserve the optimized implementation in compiled clients.
Structural square-and-multiply. Fuel bounds the number of steps; the exponent is halved at each step. No well-founded recursion is replayed.
Equations
- Hex.Conway.powAux f hm 0 x✝² x✝¹ x✝ = x✝
- Hex.Conway.powAux f hm n.succ 0 x✝¹ x✝ = x✝
- Hex.Conway.powAux f hm fuel.succ n.succ x✝¹ x✝ = Hex.Conway.powAux f hm fuel ((n + 1) / 2) (f.modByMonic (x✝¹ * x✝¹) hm) (if (n + 1) % 2 = 0 then x✝ else f.modByMonic (x✝ * x✝¹) hm)
Instances For
With sufficient fuel, structural replay agrees with executable modular power.
Kernel-replayable binary modular power. The exponent itself is a conservative fuel bound; only logarithmically many steps are evaluated.
Equations
- Hex.Conway.powMod base f hm n = Hex.Conway.powAux f hm n n (f.modByMonic base hm) 1
Instances For
Structural binary power computes the same residue as linear power.
One Frobenius step checked by structural binary exponentiation.
Equations
Instances For
Binary replay of the committed Frobenius chain.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Rabin certificate replay using binary modular powers. The certificate shape and every check other than the power implementation are unchanged.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Binary replay preserves the existing Rabin checker exactly.