]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/cpxs_lpx.ma
milestone update in basic_2, update in ground and static_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / cpxs_lpx.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/rt_transition/cpx_fqus.ma".
16 include "basic_2/rt_transition/lpx_fquq.ma".
17 include "basic_2/rt_computation/cpxs_drops.ma".
18 include "basic_2/rt_computation/cpxs_cpxs.ma".
19
20 (* EXTENDED CONTEXT-SENSITIVE PARALLEL RT-COMPUTATION FOR TERMS *************)
21
22 (* Properties with extended rt-transition for full local environments *******)
23
24 lemma lpx_cpx_trans (G):
25       s_r_transitive … (cpx G) (λ_.lpx G).
26 #G #L2 #T1 #T2 #H @(cpx_ind … H) -G -L2 -T1 -T2
27 [ /2 width=3 by/
28 | /3 width=2 by cpx_cpxs, cpx_qu/
29 | #I #G #K2 #V2 #V4 #W4 #_ #IH #HVW4 #L1 #H
30   elim (lpx_inv_pair_dx … H) -H #K1 #V1 #HK12 #HV12 #H destruct
31   /4 width=3 by cpxs_delta, cpxs_strap2/
32 | #I2 #G #K2 #T #U #i #_ #IH #HTU #L1 #H
33   elim (lpx_inv_bind_dx … H) -H #I1 #K1 #HK12 #HI12 #H destruct
34   /4 width=3 by cpxs_lref, cpxs_strap2/
35 |5,10: /4 width=1 by cpxs_beta, cpxs_bind, lpx_bind_refl_dx/
36 |6,8,9: /3 width=1 by cpxs_flat, cpxs_ee, cpxs_eps/
37 | /4 width=3 by cpxs_zeta, lpx_bind_refl_dx/
38 | /4 width=3 by cpxs_theta, cpxs_strap1, lpx_bind_refl_dx/
39 ]
40 qed-.
41
42 lemma lpx_cpxs_trans (G):
43       s_rs_transitive … (cpx G) (λ_.lpx G).
44 #G @s_r_trans_CTC1 /2 width=3 by lpx_cpx_trans/ (**) (* full auto fails *)
45 qed-.
46
47 (* Advanced properties ******************************************************)
48
49 lemma cpx_bind2 (G) (L):
50       ∀V1,V2. ❪G,L❫ ⊢ V1 ⬈ V2 →
51       ∀I,T1,T2. ❪G,L.ⓑ[I]V2❫ ⊢ T1 ⬈ T2 →
52       ∀p. ❪G,L❫ ⊢ ⓑ[p,I]V1.T1 ⬈* ⓑ[p,I]V2.T2.
53 /4 width=5 by lpx_cpx_trans, cpxs_bind_dx, lpx_pair/ qed.
54
55 lemma cpxs_bind2_dx (G) (L):
56       ∀V1,V2. ❪G,L❫ ⊢ V1 ⬈ V2 →
57       ∀I,T1,T2. ❪G,L.ⓑ[I]V2❫ ⊢ T1 ⬈* T2 →
58       ∀p. ❪G,L❫ ⊢ ⓑ[p,I]V1.T1 ⬈* ⓑ[p,I]V2.T2.
59 /4 width=5 by lpx_cpxs_trans, cpxs_bind_dx, lpx_pair/ qed.
60
61 (* Properties with plus-iterated structural successor for closures **********)
62
63 (* Basic_2A1: uses: lpx_fqup_trans *)
64 lemma lpx_fqup_trans (b):
65       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂+[b] ❪G2,L2,T2❫ →
66       ∀K1. ❪G1,K1❫ ⊢ ⬈ L1 →
67       ∃∃K2,T. ❪G1,K1❫ ⊢ T1 ⬈* T & ❪G1,K1,T❫ ⬂+[b] ❪G2,K2,T2❫ & ❪G2,K2❫ ⊢ ⬈ L2.
68 #b #G1 #G2 #L1 #L2 #T1 #T2 #H @(fqup_ind … H) -G2 -L2 -T2
69 [ #G2 #L2 #T2 #H12 #K1 #HKL1 elim (lpx_fqu_trans … H12 … HKL1) -L1
70   /3 width=5 by cpx_cpxs, fqu_fqup, ex3_2_intro/
71 | #G #G2 #L #L2 #T #T2 #_ #H2 #IH1 #K1 #HLK1 elim (IH1 … HLK1) -L1
72   #L0 #T0 #HT10 #HT0 #HL0 elim (lpx_fqu_trans … H2 … HL0) -L
73   #L #T3 #HT3 #HT32 #HL2 elim (fqup_cpx_trans … HT0 … HT3) -T
74   /3 width=7 by cpxs_strap1, fqup_strap1, ex3_2_intro/
75 ]
76 qed-.
77
78 (* Properties with star-iterated structural successor for closures **********)
79
80 (* Basic_2A1: uses: lpx_fqus_trans *)
81 lemma lpx_fqus_trans (b):
82       ∀G1,G2,L1,L2,T1,T2. ❪G1,L1,T1❫ ⬂*[b] ❪G2,L2,T2❫ →
83       ∀K1. ❪G1,K1❫ ⊢ ⬈ L1 →
84       ∃∃K2,T. ❪G1,K1❫ ⊢ T1 ⬈* T & ❪G1,K1,T❫ ⬂*[b] ❪G2,K2,T2❫ & ❪G2,K2❫ ⊢ ⬈ L2.
85 #b #G1 #G2 #L1 #L2 #T1 #T2 #H #K1 #HKL1 elim (fqus_inv_fqup … H) -H
86 [ #H12 elim (lpx_fqup_trans … H12 … HKL1) -L1 /3 width=5 by fqup_fqus, ex3_2_intro/
87 | * #H1 #H2 #H3 destruct /2 width=5 by ex3_2_intro/
88 ]
89 qed-.