1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/rt_conversion/cpce.ma".
16 include "basic_2/rt_equivalence/cpcs.ma".
17 include "basic_2/dynamic/lsubv.ma".
19 (* LOCAL ENVIRONMENT REFINEMENT FOR NATIVE VALIDITY *************************)
21 lemma lsubv_inv_unit_dx (h) (a) (G):
22 ∀I,L1,K2. G ⊢ L1 ⫃![h,a] K2.ⓤ{I} →
23 ∃∃K1. G ⊢ K1 ⫃![h,a] K2 & L1 = K1.ⓤ{I}.
24 #h #a #G #I #L1 #K2 #H
25 elim (lsubv_inv_bind_dx … H) -H // *
26 #K1 #XW #XV #_ #_ #H1 #H2 destruct
29 lemma lsubv_inv_abbr_dx (h) (a) (G):
30 ∀L1,K2,V. G ⊢ L1 ⫃![h,a] K2.ⓓV →
31 ∃∃K1. G ⊢ K1 ⫃![h,a] K2 & L1 = K1.ⓓV.
32 #h #a #G #L1 #K2 #V #H
33 elim (lsubv_inv_bind_dx … H) -H // *
34 #K1 #XW #XV #_ #_ #H1 #H2 destruct
37 lemma lsubv_cpce_trans_cpcs (h) (a) (G) (T0):
38 ∀L2,T2. ⦃G,L2⦄ ⊢ T0 ⬌η[h] T2 → ∀L1. G ⊢ L1 ⫃![h,a] L2 →
39 ∃∃T1. ⦃G,L1⦄ ⊢ T0 ⬌η[h] T1 & ⦃G,L1⦄ ⊢ T1 ⬌*[h] T2.
40 #h #a #G #T0 #L2 #T2 #H elim H -G -L2 -T0 -T2
42 /2 width=3 by cpce_sort, ex2_intro/
44 lapply (lsubv_inv_atom2 … HY1) -HY1 #H destruct
45 /2 width=3 by cpce_atom, ex2_intro/
47 elim (lsubv_inv_unit_dx … HY1) -HY1 #K2 #_ #H destruct
48 /2 width=3 by cpce_unit, ex2_intro/
50 elim (lsubv_inv_abbr_dx … HY1) -HY1 #K2 #_ #H destruct
51 /2 width=3 by cpce_ldef, ex2_intro/
52 | #G #K2 #W2 #HW2 #Y1 #HY1
53 elim (lsubv_inv_bind_dx … HY1) -HY1 *
54 [ #K1 #HK12 #H destruct
55 @(ex2_intro … (#0)) [| // ]
56 @cpce_ldec #n #p #V2 #U2 #HWU2