The shifted scale (y + 1) / √⌊log₂ (y + 2)⌋ #
The scale n / √⌊log₂ n⌋ of CslibFrontier.Foundations.Data.Nat.SqrtLog, shifted so that it is
defined at every size: A (y + 1) / √⌊log₂ (y + 2)⌋. It is monotone up to constants along a
linear bound y ≤ C x + C (Nat.mul_succ_div_sqrt_log_two_le), so a time bound stated in a
derived size, such as the number of variables of a compiled formula or the number of gates of a
linear-size circuit, transfers to the size x it is linear in. The lemma sits in its own module
so that clients do not rebuild with the scale API.
Main results #
Nat.mul_succ_div_sqrt_log_two_le: ify ≤ C x + C, thenA (y + 1) / √⌊log₂ (y + 2)⌋ ≤ A (8 C + 14) (x + 1) / √⌊log₂ (x + 2)⌋.
The shifted scale is monotone up to constants. If y ≤ C x + C, then
A (y + 1) / √⌊log₂ (y + 2)⌋ ≤ A (8 C + 14) (x + 1) / √⌊log₂ (x + 2)⌋.