Integer sign correctness from weighted CRT residues #
crtCircleApprox consumes only moduli, weighted residues and a precision. The integer
being represented and the full modulus product occur only in correctness statements.
For pairwise coprime positive moduli, numerical magnitude and cutoff bounds, and sufficient
precision, crt_firstCircleFlag_sign proves that a nonzero integer has a first flag whose
side of one half gives its sign. crtCircleApprox_not_flag_zero handles zero.
This is the mathematical sign-recovery layer of Section 2 of [OAI26f], used in Appendix A's sign step. The theorem is generic in moduli and all numerical parameters. It does not establish a prime-window product bound, certify computation of the weighted residues, or claim membership in a complexity class.
Main definitions #
Cslib.crtCircleApprox: dyadic approximation from weighted residues alone.
Main results #
Cslib.crt_firstCircleFlag_sign: first-flag correctness for nonzero integers.Cslib.crtCircleApprox_not_flag_zero: zero cannot be flagged.
References #
- [OAI26f], Section 2, proof of Sign from residues; Appendix A, Accounting for the oracle levels (only the mathematical sign step is formalized here).
A zero represented integer cannot produce a flag, for any valid weighted CRT residues.
Integer first-flag correctness from local weighted CRT congruences.
The magnitude bound is |X| < a Π, and the cutoff is a Π ≤ 2ᴷ; integrality of a
nonzero X supplies the missing lower magnitude bound. Neither X nor Π is algorithm data.
The local congruences can be supplied by crtCoefficient_modEq and modular multiplication.