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 value_as_p_term_assignment qic qif: forall v:value,
(p_term_assignment qic qif (term_from_value v)) = Some (value_assignment qic v).