Definition activation_rank (p : cbv) : nat :=
match p with
| cbv_update _ _ _ _ (fapply f _) _ _ => rank f
| _                                   => 0
end.

Lemma le_rank_first_activation 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 proof_tree) ->
activation_rank p' <= activation_rank proof_tree.