Definition compatible_rule (r:rule) : Prop :=
  match r with
    | rule_intro f _ t => forall f', In f' (functions_of_term t) -> rank f' <= rank f
  end.Definition compatible_prog : Prop :=
  forall r, In r prog -> compatible_rule r.

Lemma all_functions_in_prog (function_default : function) (proof_tree: cbv) : wf proof_tree -> forall p, In p (activations proof_tree) -> In (activation_function function_default p) (functions_of_prog prog).