Preparing short parameters for residue signs #
The manuscript parameters are ordinary polynomial-time arithmetic on binary magnitude and excluded-prime bounds. The precision is output in unary because it counts actual bits of the dyadic scale. The cutoff and doubling limit are output in binary and may have exponential value. Neither the represented integer nor the prime product is computed.
theorem Cslib.PrimeWindowSign.cutoff_polyTime {α : Type} {enc : α ↪ List Bool} {m L : α → ℕ} (hm : Turing.MultiTapeTM.ComputableInPolyTime m enc Turing.MultiTapeTM.encNat) (hL : Turing.MultiTapeTM.ComputableInPolyTime L enc Turing.MultiTapeTM.encNat) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => cutoff (m w) (L w)) enc Turing.MultiTapeTM.encNat
The exact prime cutoff has a polynomial-time binary certificate.
theorem Cslib.PrimeWindowSign.precision_polyTime {α : Type} {enc : α ↪ List Bool} {m L : α → ℕ} (hm : Turing.MultiTapeTM.ComputableInPolyTime m enc Turing.MultiTapeTM.encNat) (hL : Turing.MultiTapeTM.ComputableInPolyTime L enc Turing.MultiTapeTM.encNat) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => (cutoff (m w) (L w)).size + 10) enc Turing.MultiTapeTM.encUnary
The dyadic precision counts polynomially many bits, so it is computable in unary.
theorem Cslib.PrimeWindowSign.doublingLimit_polyTime {α : Type} {enc : α ↪ List Bool} {m L : α → ℕ} (hm : Turing.MultiTapeTM.ComputableInPolyTime m enc Turing.MultiTapeTM.encNat) (hL : Turing.MultiTapeTM.ComputableInPolyTime L enc Turing.MultiTapeTM.encNat) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (w : α) => cutoff (m w) (L w) * (cutoff (m w) (L w)).size + 1) enc
Turing.MultiTapeTM.encNat
The doubling limit has polynomial binary length even when exponentially large.