English
If l and r are balanced and sized, and a certain existence of a raised node holds, then size(balanceL l x r) equals size l plus size r plus 1.
Русский
Если l и r сбалансированы и имеют размеры, и существует условие raises, то размер balanceL l x r равен размеру l плюс размеру r плюс 1.
LaTeX
$$$\\text{size}(balanceL\\;l\\;x\\;r) = \\text{size}(l) + \\text{size}(r) + 1$ under the given hypotheses.$$
Lean4
theorem pred_to_nat {n : PosNum} (h : 1 < n) : (pred n : ℕ) = Nat.pred n :=
by
unfold pred
cases e : pred' n
· have : (1 : ℕ) ≤ Nat.pred n := Nat.pred_le_pred ((@cast_lt ℕ _ _ _).2 h)
rw [← pred'_to_nat, e] at this
exact absurd this (by decide)
· rw [← pred'_to_nat, e]
rfl