Documentation

CslibFrontier.Computability.WordRAM.Admission

Ceiling-logarithm word admission #

Two sufficient scalar rules convert ceiling-logarithm width bounds into unsigned word fits. An envelope itself requires a strict width margin; a value strictly below the envelope needs only the non-strict logarithmic width bound. Existing Fits.of_le and Fits.mono transport these certificates to smaller values and larger physical widths.

Main results #

theorem Cslib.WordRAM.fits_of_clog_lt {B W : ℕ} (hW : Nat.clog 2 B < W) :
Fits W B

An envelope fits when its ceiling logarithm is strictly below the word width.

theorem Cslib.WordRAM.fits_of_lt_clog_le {v B W : ℕ} (hv : v < B) (hW : Nat.clog 2 B ≤ W) :
Fits W v

A value strictly below an envelope fits at any width at least its ceiling logarithm.