]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpms_drops.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cpms_drops.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
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".
18
19 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS **************)
20
21 (* Advanced properties ******************************************************)
22
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/
35 ]
36 qed.
37
38 (* Advanced inversion lemmas ************************************************)
39
40 lemma cpms_inv_lref1_drops (n) (h) (G):
41                            ∀L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[n, h] T2 →
42                            ∨∨ ∧∧ T2 = #i & n = 0
43                             | ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡*[n, h] V2 &
44                                         ⬆*[↑i] V2 ≘ T2
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 *
50   [ #H1 #H2 destruct
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/
55     ]
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/
64   ]
65 ]
66 qed-. 
67
68 (* Properties with generic slicing for local environments *******************)
69
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-.
75
76 (* Inversion lemmas with generic slicing for local environments *************)
77
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-.