Definition cbv_cache_entry (proof_tree : cbv) := (proj_left proof_tree, proj_right proof_tree).

Lemma first_activations_residues_activation i s p c1 t c2 v :
let proof_tree := cbv_update i s p c1 t c2 v in
wf proof_tree ->
Forall2 (fun p' t' =>
match (proj_left p', t') with
| (fapply f lv, fapply f' lt) =>
f = f' /\
Forall2 (fun t v => cache_lookup (cache_left p') t = v) lt lv
| _ => False
end)
(first_activations_and_semi proof_tree)
(fapplies_in_term (proj_left p)).