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

Lemma NoDup_first_activations_at_given_rank rk i s p c1 t c2 v : PPO_prog -> wf (cbv_update i s p c1 t c2 v) -> NoDup (first_activations_at_given_rank rk (cbv_update i s p c1 t c2 v)).