(* * Copyright (c) 2009 Robert Dockins and Aquinas Hobor. * *)
(* Coq development: using indirection theory to model types in l-calculus *)

Lemma expr_type_search_rule : forall (G Q tau sigma:pred world) (f:expr -> expr),
forall e a,
closed (f e) ->
expr_type e tau a ->
(Q) a ->
(|>G) a ->
forall
(HQ: boxy extendM Q)
(HG: boxy extendM G)
(Hstep : forall m m' x y, step (m,x) (m',y) -> step (m,f x) (m',f y))
(Hredex:
forall k v e m (H:isValue e),
closed (f e) ->
(|>G) (k,v) ->
Q (k,v) ->
mtype_valid m (k,v) ->
(%tau) (k,exp_to_val e H) ->
expr_type (f e) sigma (k,v))
(Hsearch:
forall e a,
closed (f e) ->
G a ->
Q a ->
expr_type e tau a ->
expr_type (f e) sigma a),
expr_type (f e) sigma a.