(* * Copyright (c) 2009 Robert Dockins and Aquinas Hobor. * *)
(* Coq development: using indirection theory to model types in l-calculus *)
(* lam_ref_type_defs.v: the definition of the type system; this is the main event. *)
Require Export lam_ref_type_prelim.
Open Scope pred.
(* From introduction; this is the judgment psi |- v : tau *)
Definition forces (psi : mtype) (v : value) (tau : pred world) :=
tau (psi, v).
(* Section 4.1, equation 17 *)
Program Definition ty_nat : pred world :=
fun w => match w with (k, v) =>
exists n, v = v_Nat n
end.
Next Obligation.
destruct a; destruct a'.
replace v0 with v; auto.
assert (necR (m,v) (m0,v0)).
apply rt_step; auto.
rewrite value_knot_necR in H1.
intuition.
Qed.

(* Specifications: *)
Lemma ty_nat_extends :
boxy extendM ty_nat.