]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/append/lpys0.etc
small improvements and corrections ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / append / lpys0.etc
1 lemma lpys_append: ∀G,K1,K2. ⦃G, K1⦄ ⊢ ▶*× K2 → ∀L1,L2. ⦃G, L1⦄ ⊢ ▶*× L2 →
2                    ⦃G, L1 @@ K1⦄ ⊢ ▶*× L2 @@ K2.
3 /3 width=1 by lpx_sn_append, cpys_append/ qed.
4
5 (* Advanced forward lemmas **************************************************)
6
7 lemma lpys_fwd_append1: ∀G,K1,L1,L. ⦃G, K1 @@ L1⦄ ⊢ ▶*× L →
8                         ∃∃K2,L2. ⦃G, K1⦄ ⊢ ▶*× K2 & L = K2 @@ L2.
9 /2 width=2 by lpx_sn_fwd_append1/ qed-.
10
11 lemma lpys_fwd_append2: ∀G,L,K2,L2. ⦃G, L⦄ ⊢ ▶*× K2 @@ L2 →
12                         ∃∃K1,L1. ⦃G, K1⦄ ⊢ ▶*× K2 & L = K1 @@ L1.
13 /2 width=2 by lpx_sn_fwd_append2/ qed-.
14
15 (* Advanced forward lemmas **************************************************)
16
17 lemma cpys_fwd_shift1_ext: ∀G,L1,L,T1,T. ⦃G, L⦄ ⊢ L1 @@ T1 ▶*× T →
18                            ∃∃L2,T2. ⦃G, L @@ L1⦄ ⊢ ▶*× L @@ L2 & ⦃G, L @@ L1⦄ ⊢ T1 ▶*× T2 &
19                                     T = L2 @@ T2.
20 #G #L1 @(lenv_ind_dx … L1) -L1
21 [ #L #T1 #T #HT1 @ex3_2_intro
22   [3: // |4,5: // |1,2: skip ] (**) (* auto does not work *)
23 | #I #L1 #V1 #IH #L #T1 #T >shift_append_assoc #H <append_assoc
24   elim (cpys_inv_bind1 … H) -H #V2 #T2 #HV12 #HT12 #H destruct
25   elim (IH … HT12) -IH -HT12 #L2 #T #HL12 #HT1 #H destruct
26   lapply (lpys_trans … HL12 (L.ⓑ{I}V2@@L2) ?) -HL12 /3 width=1 by lpys_append, lpys_pair/ #HL12
27   @(ex3_2_intro … (⋆.ⓑ{I}V2@@L2)) [4: /2 width=3 by trans_eq/ | skip ] <append_assoc // (**) (* explicit constructor *)
28 ]
29 qed-.