End QI.
Section Partial_QI.
Variables variable function constructor : Type.
Notation p_compatible_QI := (p_compatible_QI variable function constructor).
Notation term_from_value := (Syntax.term_from_value variable function (constructor:=constructor)).
Notation p_smc := (p_smc variable function constructor).

(* f is the current partial qi, and g is what remains to be defined *)
Lemma p_compatible_QI_app f prog1 prog2 qic:
p_compatible_QI prog1 qic f ->
{g | p_compatible_QI prog2 qic (f;;g)} ->
{g | p_compatible_QI (prog1 ++ prog2) qic (f;;g)}.