]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/etc/append/cpy2.etc
milestone update in ground_2 and basic_2A
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / etc / append / cpy2.etc
1 include "basic_2/grammar/cl_shift.ma".
2 include "basic_2/relocation/ldrop_append.ma".
3
4 lemma cpy_append: ∀G,d,e. l_appendable_sn … (cpy d e G).
5 #G #d #e #K #T1 #T2 #H elim H -G -K -T1 -T2 -d -e
6 /2 width=1 by cpy_atom, cpy_bind, cpy_flat/
7 #I #G #K #K0 #V #W #i #d #e #Hdi #Hide #HK0 #HVW #L
8 lapply (ldrop_fwd_length_lt2 … HK0) #H
9 @(cpy_subst I … (L@@K0) … HVW) // (**) (* /4/ does not work *)
10 @(ldrop_O1_append_sn_le … HK0) /2 width=2 by lt_to_le/
11 qed-.
12
13 lemma cpy_fwd_shift1: ∀G,L1,L,T1,T,d,e. ⦃G, L⦄ ⊢ L1 @@ T1 ▶[d, e] T →
14                       ∃∃L2,T2. |L1| = |L2| & T = L2 @@ T2.
15 #G #L1 @(lenv_ind_dx … L1) -L1 normalize
16 [ #L #T1 #T #d #e #HT1
17   @(ex2_2_intro … (⋆)) // (**) (* explicit constructor *)
18 | #I #L1 #V1 #IH #L #T1 #X #d #e
19   >shift_append_assoc normalize #H
20   elim (cpy_inv_bind1 … H) -H
21   #V0 #T0 #_ #HT10 #H destruct
22   elim (IH … HT10) -IH -HT10 #L2 #T2 #HL12 #H destruct
23   >append_length >HL12 -HL12
24   @(ex2_2_intro … (⋆.ⓑ{I}V0@@L2) T2) [ >append_length ] (**) (* explicit constructor *)
25   /2 width=3 by trans_eq/
26 ]
27 qed-.