Three-way selection at a bounded first event #
firstEventSign returns 1 if the first event satisfies the positive test, otherwise -1
if it satisfies the negative test, and otherwise 0. Positive has priority when both tests
hold. The operation is generic: the test names do not assert any relation to an integer's sign.
Three uniform F_a Boolean evaluators and a polynomial-time binary endpoint give an
F_(a+2) signed binary output. The first-event quantifiers are those of firstEventTest;
no CRT, approximation or manuscript-specific parameters occur in the operation.
Main definitions #
Cslib.Complexity.firstEventSign: positive-priority three-way first-event selection.
Main results #
Cslib.Complexity.firstEventSign_mem_CountingFunction: the two-level computational bound.Cslib.Complexity.firstEventSign_eq_one_iff: positive-test semantics.Cslib.Complexity.firstEventSign_eq_neg_one_iff: negative-test semantics with positive priority.Cslib.Complexity.firstEventSign_eq_zero_iff: neither first-event test holds.
Select 1, -1, or 0 using tests at the first event below r x.
The positive test takes priority if both tests hold. This operation alone does not recover
an integer's sign; an application must establish what its tests mean.
Three uniform F_a Boolean evaluators give signed binary first-event selection in F_(a+2). No semantic sign-correctness premise is needed for this computational certificate.