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/relocation/drops_ltc.ma".
16 include "basic_2/rt_transition/cpm_drops.ma".
17 include "basic_2/rt_computation/cpms.ma".
19 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
21 (* Advanced properties ******************************************************)
23 (* Note: apparently this was missing in basic_1 *)
24 (* Basic_2A1: uses: cprs_delta *)
25 lemma cpms_delta_drops (n) (h) (G):
26 ∀L,K,V,i. ⬇*[i] L ≘ K.ⓓV →
27 ∀V2. ⦃G, K⦄ ⊢ V ➡*[n, h] V2 →
28 ∀W2. ⬆*[↑i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ➡*[n, h] W2.
29 #n #h #G #L #K #V #i #HLK #V2 #H @(cpms_ind_dx … H) -V2
30 [ /3 width=6 by cpm_cpms, cpm_delta_drops/
31 | #n1 #n2 #V1 #V2 #_ #IH #HV12 #W2 #HVW2
32 lapply (drops_isuni_fwd_drop2 … HLK) -HLK // #HLK
33 elim (lifts_total V1 (𝐔❴↑i❵)) #W1 #HVW1
34 /3 width=11 by cpm_lifts_bi, cpms_step_dx/
38 (* Advanced inversion lemmas ************************************************)
40 lemma cpms_inv_lref1_drops (n) (h) (G):
41 ∀L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[n, h] T2 →
43 | ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡*[n, h] V2 &
45 | ∃∃m,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ➡*[m, h] V2 &
46 ⬆*[↑i] V2 ≘ T2 & n = ↑m.
47 #n #h #G #L #T2 #i #H @(cpms_ind_dx … H) -T2
48 [ /3 width=1 by or3_intro0, conj/
49 | #n1 #n2 #T #T2 #_ #IH #HT2 cases IH -IH *
51 elim (cpm_inv_lref1_drops … HT2) -HT2 *
52 [ /3 width=1 by or3_intro0, conj/
53 | /4 width=6 by cpm_cpms, or3_intro1, ex3_3_intro/
54 | /4 width=8 by cpm_cpms, or3_intro2, ex4_4_intro/
56 | #K #V0 #V #HLK #HV0 #HVT
57 lapply (drops_isuni_fwd_drop2 … HLK) // #H0LK
58 elim (cpm_inv_lifts_sn … HT2 … H0LK … HVT) -H0LK -T
59 /4 width=6 by cpms_step_dx, ex3_3_intro, or3_intro1/
60 | #m #K #V0 #V #HLK #HV0 #HVT #H destruct
61 lapply (drops_isuni_fwd_drop2 … HLK) // #H0LK
62 elim (cpm_inv_lifts_sn … HT2 … H0LK … HVT) -H0LK -T
63 /4 width=8 by cpms_step_dx, ex4_4_intro, or3_intro2/
68 (* Properties with generic slicing for local environments *******************)
70 (* Basic_2A1: uses: scpds_lift *)
71 (* Basic_2A1: includes: cprs_lift *)
72 (* Basic_1: includes: pr3_lift *)
73 lemma cpms_lifts_sn: ∀n,h,G. d_liftable2_sn … lifts (λL. cpms h G L n).
74 /3 width=6 by d2_liftable_sn_ltc, cpm_lifts_sn/ qed-.
76 (* Inversion lemmas with generic slicing for local environments *************)
78 (* Basic_2A1: uses: scpds_inv_lift1 *)
79 (* Basic_2A1: includes: cprs_inv_lift1 *)
80 (* Basic_1: includes: pr3_gen_lift *)
81 lemma cpms_inv_lifts_sn: ∀n,h,G. d_deliftable2_sn … lifts (λL. cpms h G L n).
82 /3 width=6 by d2_deliftable_sn_ltc, cpm_inv_lifts_sn/ qed-.