Definition ty_bool := ALL a:pred world, ty_lam a (ty_lam a a).
Definition e_true := Lam (Lam (Var 1)).
Definition e_false := Lam (Lam (Var 0)).
Definition e_if b t f :=
(App (App (App b (Lam t)) (Lam f)) (Nat 0)).

(* Specifications: *)
Lemma e_true_typ :
Typ nil e_true ty_bool.
Lemma e_false_typ :
Typ nil e_false ty_bool.
Lemma T_if : forall G b t f tau,
Typ G b ty_bool ->
Typ (TT :: G) t tau ->
Typ (TT :: G) f tau ->
Typ G (e_if b t f) tau.