English
natSize computes the number of bits needed to represent a PosNum in binary.
Русский
natSize вычисляет число бит, необходимых для двоичного представления PosNum.
LaTeX
$$$\operatorname{natSize}(1) = 1,\ \operatorname{natSize}(\mathrm{bit0}\, n) = \operatorname{succ}(\operatorname{natSize}(n)),\ \operatorname{natSize}(\mathrm{bit1}\, n) = \operatorname{succ}(\operatorname{natSize}(n))$$$
Lean4
theorem add_one_le_of_lt {n m : WithBot ℕ} (h : n < m) : n + 1 ≤ m :=
by
cases n
· simp only [WithBot.bot_add, bot_le]
cases m
· exact (not_lt_bot h).elim
· rwa [WithBot.coe_lt_coe, ← Nat.add_one_le_iff, ← WithBot.coe_le_coe, WithBot.coe_add, WithBot.coe_one] at h