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

Lemma first_activations_at_given_rank_lt_previous i s p c1 t c2 v p': let proof_tree := cbv_update i s p c1 t c2 v in PPO_prog -> wf proof_tree -> In p' (first_activations_at_given_rank (activation_rank rank p') proof_tree) -> activation_rank rank p' < activation_rank rank proof_tree -> exists p'', In p'' (activations proof_tree) /\ In p' (first_activations p'') /\ activation_rank rank p' < activation_rank rank p''.