]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/unfold/lcpss_lcpss.ma
update in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / unfold / lcpss_lcpss.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/unfold/lcpss_cpss.ma".
16
17 (* SN PARALLEL UNFOLD ON LOCAL ENVIRONMENTS *********************************)
18
19 (* Main properties **********************************************************)
20
21 theorem lcpss_conf: confluent … lcpss.
22 #L0 @(f_ind … length … L0) -L0 #n #IH *
23 [ #_ #X1 #H1 #X2 #H2 -n
24   >(lcpss_inv_atom1 … H1) -X1
25   >(lcpss_inv_atom1 … H2) -X2 /2 width=3/
26 | #L0 #I #V0 #Hn #X1 #H1 #X2 #H2 destruct
27   elim (lcpss_inv_pair1 … H1) -H1 #L1 #V1 #HL01 #HV01 #H destruct
28   elim (lcpss_inv_pair1 … H2) -H2 #L2 #V2 #HL02 #HV02 #H destruct
29   elim (IH … HL01 … HL02) -IH normalize // #L #HL1 #HL2
30   elim (cpss_conf_lcpss … HV01 … HV02 … HL01 … HL02) -L0 -V0 /3 width=5/
31 ]
32 qed-.
33
34 theorem lcpss_trans: Transitive … lcpss.
35 #L1 #L #H elim H -L1 -L //
36 #I #L1 #L #V1 #V #HL1 #HV1 #IHL1 #X #H
37 elim (lcpss_inv_pair1 … H) -H #L2 #V2 #HL2 #HV2 #H destruct
38 lapply (cpss_trans_lcpss … HV1 … HL1 … HV2) -V -HL1 /3 width=1/
39 qed-.
40
41 (* Advanced forward lemmas **************************************************)
42
43 lemma cpss_fwd_shift1: ∀L1,L,T1,T. L ⊢ L1 @@ T1 ▶* T →
44                        ∃∃L2,T2. L @@ L1 ⊢ ▶* L @@ L2 & L @@ L1 ⊢ T1 ▶* T2 &
45                                 T = L2 @@ T2.
46 #L1 @(lenv_ind_dx … L1) -L1
47 [ #L #T1 #T #HT1
48   @ex3_2_intro [3: // |4,5: // |1,2: skip ] (**) (* /2 width=4/ does not work *)
49 | #I #L1 #V1 #IH #L #T1 #T >shift_append_assoc #H <append_assoc
50   elim (cpss_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
51   elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
52   lapply (lcpss_trans … HL12 (L.ⓑ{I}V2@@L2) ?) -HL12 /3 width=1/ #HL12
53   @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3/ | skip ] <append_assoc // (**) (* explicit constructor *)
54 ]
55 qed-.