]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/cpxs_lift.ma
partial commit: just the components before "static" ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / cpxs_lift.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/substitution/fsups_fsups.ma".
16 include "basic_2/reduction/cpx_lift.ma".
17 include "basic_2/computation/cpxs.ma".
18
19 (* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************)
20
21 (* Advanced properties ******************************************************)
22
23 lemma cpxs_delta: ∀h,g,I,L,K,V,V2,i.
24                   ⇩[0, i] L ≡ K. ⓑ{I}V → ⦃h, K⦄ ⊢ V ➡*[h, g] V2 →
25                   ∀W2. ⇧[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2.
26 #h #g #I #L #K #V #V2 #i #HLK #H elim H -V2 [ /3 width=9/ ]
27 #V1 #V2 #_ #HV12 #IHV1 #W2 #HVW2
28 lapply (ldrop_fwd_ldrop2 … HLK) -HLK #HLK
29 elim (lift_total V1 0 (i+1)) /4 width=11 by cpx_lift, cpxs_strap1/
30 qed.
31
32 (* Advanced inversion lemmas ************************************************)
33
34 lemma cpxs_inv_lref1: ∀h,g,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 →
35                       T2 = #i ∨
36                       ∃∃I,K,V1,T1. ⇩[0, i] L ≡ K.ⓑ{I}V1 & ⦃h, K⦄ ⊢ V1 ➡*[h, g] T1 &
37                                    ⇧[0, i + 1] T1 ≡ T2.
38 #h #g #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1/
39 #T #T2 #_ #HT2 *
40 [ #H destruct
41   elim (cpx_inv_lref1 … HT2) -HT2 /2 width=1/
42   * /4 width=7/
43 | * #I #K #V1 #T1 #HLK #HVT1 #HT1
44   lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
45   elim (cpx_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T /4 width=7/
46 ]
47 qed-.
48
49 (* Relocation properties ****************************************************)
50
51 lemma cpxs_lift: ∀h,g. l_liftable (cpxs h g).
52 /3 width=9/ qed.
53
54 lemma cpxs_inv_lift1: ∀h,g. l_deliftable_sn (cpxs h g).
55 /3 width=5 by l_deliftable_sn_LTC, cpx_inv_lift1/
56 qed-.
57
58 (* Properties on supclosure *************************************************)
59
60 lemma fsupq_cpxs_trans: ∀h,g,L1,L2,T2,U2. ⦃h, L2⦄ ⊢ T2 ➡*[h, g] U2 →
61                         ∀T1. ⦃L1, T1⦄ ⊃⸮ ⦃L2, T2⦄ →
62                         ∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃L1, U1⦄ ⊃* ⦃L2, U2⦄.
63 #h #g #L1 #L2 #T2 #U2 #H @(cpxs_ind_dx … H) -T2 [ /3 width=3/ ]
64 #T #T2 #HT2 #_ #IHTU2 #T1 #HT1
65 elim (fsupq_cpx_trans … HT1 … HT2) -T #T #HT1 #HT2
66 elim (IHTU2 … HT2) -T2 /3 width=3/
67 qed-.
68
69 lemma fsups_cpxs_trans: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ →
70                         ∀U2. ⦃h, L2⦄ ⊢ T2 ➡*[h, g] U2 →
71                         ∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃L1, U1⦄ ⊃* ⦃L2, U2⦄.
72 #h #g #L1 #L2 #T1 #T2 #H @(fsups_ind … H) -L2 -T2 [ /2 width=3/ ]
73 #L #L2 #T #T2 #_ #HT2 #IHT1 #U2 #HTU2
74 elim (fsupq_cpxs_trans … HTU2 … HT2) -T2 #T2 #HT2 #HTU2
75 elim (IHT1 … HT2) -T #T #HT1 #HT2
76 lapply (fsups_trans … HT2 … HTU2) -L -T2 /2 width=3/
77 qed-.
78
79 lemma fsup_ssta_trans: ∀h,g,L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ →
80                        ∀U2,l. ⦃h, L2⦄ ⊢ T2 •[h, g] ⦃l+1, U2⦄ →
81                        ∃∃U1. ⦃h, L1⦄ ⊢ T1 ➡[h, g] U1 & ⦃L1, U1⦄ ⊃⸮ ⦃L2, U2⦄.
82 /3 width=4 by fsup_cpx_trans, ssta_cpx/ qed-.