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

Lemma PPO_activations 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' (activations proof_tree) ->
p' = proof_tree \/ PPO (proj_left p') (proj_left proof_tree).