1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/substitution/fsups_fsups.ma".
16 include "basic_2/reduction/cpx_lift.ma".
17 include "basic_2/computation/cpxs.ma".
19 (* CONTEXT-SENSITIVE EXTENDED PARALLEL COMPUTATION ON TERMS *****************)
21 (* Advanced properties ******************************************************)
23 lemma cpxs_delta: ∀h,g,I,G,L,K,V,V2,i.
24 ⇩[0, i] L ≡ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ➡*[h, g] V2 →
25 ∀W2. ⇧[0, i + 1] V2 ≡ W2 → ⦃G, L⦄ ⊢ #i ➡*[h, g] W2.
26 #h #g #I #G #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/
32 (* Advanced inversion lemmas ************************************************)
34 lemma cpxs_inv_lref1: ∀h,g,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡*[h, g] T2 →
36 ∃∃I,K,V1,T1. ⇩[0, i] L ≡ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ➡*[h, g] T1 &
38 #h #g #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1/
41 elim (cpx_inv_lref1 … HT2) -HT2 /2 width=1/
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/
49 (* Relocation properties ****************************************************)
51 lemma cpxs_lift: ∀h,g,G. l_liftable (cpxs h g G).
54 lemma cpxs_inv_lift1: ∀h,g,G. l_deliftable_sn (cpxs h g G).
55 /3 width=5 by l_deliftable_sn_LTC, cpx_inv_lift1/
58 (* Properties on supclosure *************************************************)
60 lemma fsupq_cpxs_trans: ∀h,g,G1,G2,L1,L2,T2,U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 →
61 ∀T1. ⦃G1, L1, T1⦄ ⊃⸮ ⦃G2, L2, T2⦄ →
62 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃* ⦃G2, L2, U2⦄.
63 #h #g #G1 #G2 #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/
69 lemma fsups_cpxs_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃* ⦃G2, L2, T2⦄ →
70 ∀U2. ⦃G2, L2⦄ ⊢ T2 ➡*[h, g] U2 →
71 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡*[h, g] U1 & ⦃G1, L1, U1⦄ ⊃* ⦃G2, L2, U2⦄.
72 #h #g #G1 #G2 #L1 #L2 #T1 #T2 #H @(fsups_ind … H) -G2 -L2 -T2 [ /2 width=3/ ]
73 #G #G2 #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) -G -L -T2 /2 width=3/
79 lemma fsup_ssta_trans: ∀h,g,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
80 ∀U2,l. ⦃G2, L2⦄ ⊢ T2 •[h, g] ⦃l+1, U2⦄ →
81 ∃∃U1. ⦃G1, L1⦄ ⊢ T1 ➡[h, g] U1 & ⦃G1, L1, U1⦄ ⊃⸮ ⦃G2, L2, U2⦄.
82 /3 width=4 by fsup_cpx_trans, ssta_cpx/ qed-.