Ltac spec H := match type of H with ?A -> _ =>
                            let H' := fresh in (assert (H' : A); [ | specialize (H H'); clear H']) end.

Lemma treeify'_g_is_redblack: forall n l, S (length l) >= nat_of_P n -> is_redblack (fst (treeify_g n l)) Red (plog2 n).