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