Relative survivor-count approximation #
This module gives the relative approximate counter in the constructive
Anti-Checker Lemma an exact natural-number contract. Relative error
1 / precision is encoded by cross-multiplied inequalities, avoiding rational
rounding in the counter output.
The comparison theorem captures the reason approximate minimization works: if the estimate for one candidate is no larger than another's, then their true counts are ordered up to the two relative-error factors. Precision greater than one also preserves whether the count is zero, hence whether a canonical sample prefix is already an anti-checker.
The exact count is a relative approximation at every positive precision.
A relative estimate of a zero count is zero.
At precision greater than one, a zero relative estimate has zero true count.
At precision greater than one, relative approximation preserves zero exactly.
Choosing no larger an estimate orders the true counts up to the lower and upper relative-error factors.
The exact canonical survivor count satisfies the approximation contract at every positive precision.
At precision greater than one, a canonical relative estimate is zero exactly when the sample prefix is an anti-checker.