Definition p_compatible_QI qic qif:= forall f lp t, forall s:variable -> value,
let ru := rule_intro f lp t in
(In ru prog) ->
p_term_assignment qic qif (subst s t) ≤p
p_term_assignment qic qif (subst s (lhs_of_rule ru)).

Lemma p_term_assignment_first_choice qic f t v:
p_term_assignment qic f t = Some v ->
forall g, p_term_assignment qic (f;;g) t = Some v.