]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/computation/cprs_lift.ma
7e5961604e9766dae0e68eb0b866804c1a98cc02
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / computation / cprs_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/cpr_lift.ma".
16 include "basic_2/computation/cprs.ma".
17
18 (* CONTEXT-SENSITIVE PARALLEL COMPUTATION ON TERMS **************************)
19
20 (* Advanced properties ******************************************************)
21
22 (* Note: apparently this was missing in basic_1 *)
23 lemma cprs_delta: ∀L,K,V,V2,i.
24                   ⇩[0, i] L ≡ K. ⓓV → K ⊢ V ➡* V2 →
25                   ∀W2. ⇧[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡* W2.
26 #L #K #V #V2 #i #HLK #H elim H -V2 [ /3 width=6/ ]
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 cpr_lift, cprs_strap1/
30 qed.
31
32 (* Advanced inversion lemmas ************************************************)
33
34 (* Basic_1: was: pr3_gen_lref *)
35 lemma cprs_inv_lref1: ∀L,T2,i. ⦃G, L⦄ ⊢ #i ➡* T2 →
36                       T2 = #i ∨
37                       ∃∃K,V1,T1. ⇩[0, i] L ≡ K. ⓓV1 &
38                                  K ⊢ V1 ➡* T1 &
39                                  ⇧[0, i + 1] T1 ≡ T2.
40 #L #T2 #i #H @(cprs_ind … H) -T2 /2 width=1/
41 #T #T2 #_ #HT2 *
42 [ #H destruct
43   elim (cpr_inv_lref1 … HT2) -HT2 /2 width=1/
44   * /4 width=6/
45 | * #K #V1 #T1 #HLK #HVT1 #HT1
46   lapply (ldrop_fwd_ldrop2 … HLK) #H0LK
47   elim (cpr_inv_lift1 … HT2 … H0LK … HT1) -H0LK -T /4 width=6/
48 ]
49 qed-.
50
51 (* Relocation properties ****************************************************)
52
53 (* Basic_1: was: pr3_lift *)
54 lemma cprs_lift: l_liftable cprs.
55 /3 width=9/ qed.
56
57 (* Basic_1: was: pr3_gen_lift *)
58 lemma cprs_inv_lift1: l_deliftable_sn cprs.
59 /3 width=5 by l_deliftable_sn_LTC, cpr_inv_lift1/
60 qed-.