(** * Relational specification of compilation *)
Definition match_if {A: Type} (flag: unit -> bool) (R: A -> A -> Prop): A -> A -> Prop :=
if flag tt then R else eq.

Lemma total_if_match:
forall (A: Type) (flag: unit -> bool) (f: A -> A) (rel: A -> A -> Prop) (prog: A),
(forall p, rel p (f p)) ->
match_if flag rel prog (total_if flag f prog).