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

Lemma A_T_activation_rank (p p' : cbv) : In p' (first_activations_at_given_rank (activation_rank rank p') p) -> length (activations_at_rank (activation_rank rank p') p') <= A_T p.