Definition activation_function (function_default : function) (p: cbv) :=
  match p with
    | cbv_update _ _ _ _ (fapply f _) _ _ => f
    | _                                   => function_default
  end.

Lemma split_activations_by_first_activations_at_rank rk p : wf p -> activations_at_rank rk p = flat_map (activations_at_rank rk) (first_activations_at_given_rank rk p).