Definition functions_of_prog : list function :=
map (fun x => match x with | rule_intro f _ _ => f end) prog.

(* Specifications: *)
Lemma activation_is_function :
forall proof_tree p,
In p (activations proof_tree) -> exists i s p' c1 t c2 v, p = cbv_update i s p' c1 t c2 v.
Lemma cbv_update_in_activations_InCBV proof_tree sub_proof_tree i s p c1 t c2 v:
sub_proof_tree = cbv_update i s p c1 t c2 v ->
InCBV sub_proof_tree proof_tree ->
In sub_proof_tree (activations proof_tree).
Lemma activations_wf : forall proof_tree p, wf proof_tree -> In p (activations proof_tree) -> wf p.
Lemma le_max_active_size proof_tree p :
In p (activations proof_tree) ->
term_size (proj_left p) + value_size (proj_right p) <= max_active_size proof_tree.