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.
Next Obligation.
unfold age, age1 in H.
destruct a; destruct a'.
simpl in *.
rewrite knot_age1 in H.
case_eq (unsquash m); intros; rewrite H1 in H, H0.
destruct n; try discriminate.
inv H.
rewrite unsquash_squash.
simpl.
case_eq (f l); simpl; intros; rewrite H in H0.
unfold approx_eq in *.
unfold fidentity_fmap.
change (approx n (approx n p)) with
((approx n oo approx n) p).
rewrite <- (approx_approx1 0).
rewrite (approx_approx1 1).
unfold compose; simpl.
rewrite H0; auto.
auto.
Qed.

Lemma type_at_extends : forall l tau,
%(type_at l tau) = type_at l tau.