Fixpoint wf_btree_over t :=
match t with BNode keys children =>
(length keys = 2 * d + 1)%nat /\
(children = [] \/ length children = S (length keys) /\ Forall wf_btree_aux children)
end.

Lemma find_leaf_aux : forall tgt lt i, (fix f children i :=
match children with
| [] => Some []
| c :: rest => match i with
| 0%nat => find_leaf tgt c
| S i0 => f rest i0
end
end) lt i = match nth_error lt i with Some c => find_leaf tgt c | None => Some [] end.