Fibonacci growth bounds for height-balanced trees #
A binary tree whose sibling heights differ by at most one has at least Nat.fib (h + 2) leaves
(or nodes, counted suitably) at height h. These lemmas turn that count into the logarithmic
height bound h ≤ 2 * Nat.log 2 n, without real numbers. AVL trees, ropes and Fibonacci heaps
share them.
Main results #
Nat.fib_max_add_three_le: the inductive step for sibling heightsnandmthat differ by at most one,Nat.fib (max n m + 3) ≤ Nat.fib (n + 2) + Nat.fib (m + 2).Nat.two_pow_half_succ_le_fib:2 ^ ((h + 1) / 2) ≤ Nat.fib (h + 2).Nat.le_two_mul_log_of_fib_le:Nat.fib (h + 2) ≤ nimpliesh ≤ 2 * Nat.log 2 n.