Definition proj_left_max_size (proof_tree : cbv) : cbv :=
proj_left_max_size_list (proof_tree) (sub_trees proof_tree).

Lemma InCBV_proj_left_max_size p : InCBV (proj_left_max_size p) p.
Fixpoint max_proj_right_size (proof_tree : cbv) : nat :=
match proof_tree with
| cbv_constr lp t v => max (value_size v) (maxl (map max_proj_right_size lp))
| cbv_split lp p t v => max (value_size v) (max (max_proj_right_size p) (maxl (map max_proj_right_size lp)))
| cbv_function _ _ p t v => max (value_size v) (max_proj_right_size p)
end.