(* returns the proposition generated by a fact *)
Definition eval_fact i f :=
  match f with
  | eqH h1 h2 => interp i h1 = interp i h2
  | eqD d1 d2 => d1 = d2
  | eqX x1 x2 => plook i x1 = plook i x2
  end.Notation pread' x t := (odflt (dyn tt) (pread x t)).Definition pfree x t := filter (predC (ptreq x)) t.Definition hfree h t := filter (predC (vareq h)) t.

Lemma count0_hfree v t: count (pred1 v) (vars t) = 0 -> hfree v t = t.