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/grammar/lpx_sn_lpx_sn.ma".
16 include "basic_2/substitution/fsupp.ma".
17 include "basic_2/unfold/lpqs_ldrop.ma".
19 (* SN RESTRICTED PARALLEL COMPUTATION FOR LOCAL ENVIRONMENTS ****************)
21 (* Main properties on context-sensitive rest parallel computation for terms *)
23 theorem cpqs_trans_lpqs: lpx_sn_transitive cpqs cpqs.
24 #L0 #T0 @(fsupp_wf_ind … L0 T0) -L0 -T0 #L0 #T0 #IH #L1 * [|*]
25 [ #I #HL #HT #T #H1 #L2 #HL12 #T2 #HT2 destruct
26 elim (cpqs_inv_atom1 … H1) -H1
28 elim (cpqs_inv_atom1 … HT2) -HT2
30 | * #K2 #V #V2 #i #HLK2 #HV2 #HVT2 #H destruct
31 elim (lpqs_ldrop_trans_O1 … HL12 … HLK2) -L2 #X #HLK1 #H
32 elim (lpqs_inv_pair2 … H) -H #K1 #V1 #HK12 #HV1 #H destruct
33 lapply (fsupp_lref … HLK1) /3 width=9/
35 | * #K1 #V1 #V #i #HLK1 #HV1 #HVT #H destruct
36 elim (lpqs_ldrop_conf … HLK1 … HL12) -HL12 #X #H #HLK2
37 elim (lpqs_inv_pair1 … H) -H #K2 #W2 #HK12 #_ #H destruct
38 lapply (ldrop_fwd_ldrop2 … HLK2) -W2 #HLK2
39 elim (cpqs_inv_lift1 … HT2 … HLK2 … HVT) -L2 -T
40 lapply (fsupp_lref … HLK1) /3 width=9/
42 | #a #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
43 elim (cpqs_inv_bind1 … H1) -H1 *
44 [ #V #T #HV1 #HT1 #H destruct
45 elim (cpqs_inv_bind1 … H2) -H2 *
46 [ #V2 #T2 #HV2 #HT2 #H destruct /4 width=5/
47 | #T2 #HT2 #HXT2 #H1 #H2 destruct /4 width=5/
49 | #Y1 #HTY1 #HXY1 #H11 #H12 destruct
50 elim (lift_total X2 0 1) #Y2 #HXY2
51 lapply (cpqs_lift … H2 (L2.ⓓV1) … HXY1 … HXY2) /2 width=1/ -X1 /4 width=5/
53 | #I #V1 #T1 #HL #HT #X1 #H1 #L2 #HL12 #X2 #H2
54 elim (cpqs_inv_flat1 … H1) -H1 *
55 [ #V #T #HV1 #HT1 #H destruct
56 elim (cpqs_inv_flat1 … H2) -H2 *
57 [ #V2 #T2 #HV2 #HT2 #H destruct /3 width=5/
58 | #HX2 #H destruct /3 width=5/
60 | #HX1 #H destruct /3 width=5/
64 theorem cpqs_trans: ∀L. Transitive … (cpqs L).
65 /2 width=5 by cpqs_trans_lpqs/ qed-.
67 (* Properties on context-sensitive rest. parallel computation for terms *****)
69 lemma lpqs_cpqs_trans: ∀L1,L2. L1 ⊢ ➤* L2 →
70 ∀T1,T2. L2 ⊢ T1 ➤* T2 → L1 ⊢ T1 ➤* T2.
71 /2 width=5 by cpqs_trans_lpqs/ qed-.