]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/cpr/cpr.etc
- updated equivalence on referred entries: it nust be degree-based
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / cpr / cpr.etc
1 lemma cpr_delift: ∀G,K,V,T1,L,l. ⬇[l] L ≡ (K.ⓓV) →
2                   ∃∃T2,T. ⦃G, L⦄ ⊢ T1 ➡ T2 & ⬆[l, 1] T ≡ T2.
3 #G #K #V #T1 elim T1 -T1
4 [ * /2 width=4 by cpr_atom, lift_sort, lift_gref, ex2_2_intro/
5   #i #L #l #HLK elim (lt_or_eq_or_gt i l)
6   #Hil [1,3: /4 width=4 by lift_lref_ge_minus, lift_lref_lt, ylt_inj, yle_inj, ex2_2_intro/ ]
7   destruct
8   elim (lift_total V 0 (i+1)) #W #HVW
9   elim (lift_split … HVW i i) /3 width=6 by cpr_delta, ex2_2_intro/
10 | * [ #a ] #I #W1 #U1 #IHW1 #IHU1 #L #l #HLK
11   elim (IHW1 … HLK) -IHW1 #W2 #W #HW12 #HW2
12   [ elim (IHU1 (L. ⓑ{I}W1) (l+1)) -IHU1 /3 width=9 by drop_drop, cpr_bind, lift_bind, ex2_2_intro/
13   | elim (IHU1 … HLK) -IHU1 -HLK /3 width=8 by cpr_flat, lift_flat, ex2_2_intro/
14   ]
15 ]
16 qed-.
17
18 fact lstas_cpr_aux: ∀h,G,L,T1,T2,d. ⦃G, L⦄ ⊢ T1 •*[h, d] T2 →
19                     d = 0 → ⦃G, L⦄ ⊢ T1 ➡ T2.
20 #h #G #L #T1 #T2 #d #H elim H -G -L -T1 -T2 -d
21 /3 width=1 by cpr_eps, cpr_flat, cpr_bind/
22 [ #G #L #K #V1 #V2 #W2 #i #d #HLK #_ #HVW2 #IHV12 #H destruct
23   /3 width=6 by cpr_delta/
24 | #G #L #K #V1 #V2 #W2 #i #d #_ #_ #_ #_ <plus_n_Sm #H destruct
25 ]
26 qed-.
27
28 lemma lstas_cpr: ∀h,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 •*[h, 0] T2 → ⦃G, L⦄ ⊢ T1 ➡ T2.
29 /2 width=4 by lstas_cpr_aux/ qed.