Program Definition type_at (l:addr) (tau:pred world) : pred world :=
  fun w:world =>
    let (n,psi) := unsquash (fst w) in
      match psi l with
        | None => False
        | Some p => approx_eq n p tau
      end.Program Definition just (v:value) : pred world :=
  fun w => snd w = v.Program Definition with_val (v:value) (p:pred world) : pred world :=
  fun w => p (fst w,v).

Lemma extend_level : forall w1 w2, R_extends w1 w2 -> level w1 = level w2.