]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/delift/cpr_delift.etc
small improvements and corrections ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / delift / cpr_delift.etc
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/thin_delift.ma".
16 include "basic_2/reducibility/tpr_delift.ma".
17 include "basic_2/reducibility/cpr.ma".
18
19 (* CONTEXT-SENSITIVE PARALLEL REDUCTION ON TERMS ****************************)
20
21 (* Properties on inverse basic term relocation ******************************)
22
23 (* Basic_1: was only: pr2_gen_cabbr *)
24 lemma thin_cpr_delift_conf: ∀L,U1,U2. L ⊢ U1 ➡ U2 →
25                             ∀K,d,e. ▼*[d, e] L ≡ K → ∀T1. L ⊢ ▼*[d, e] U1 ≡ T1 →
26                             ∃∃T2. K ⊢ T1 ➡ T2 & L ⊢ ▼*[d, e] U2 ≡ T2.
27 #L #U1 #U2 * #U #HU1 #HU2 #K #d #e #HLK #T1 #HTU1
28 elim (tpr_delift_conf … HU1 … HTU1) -U1 #T #HT1 #HUT
29 elim (le_or_ge (|L|) d) #Hd
30 [ elim (thin_delift_tpss_conf_le … HU2 … HUT … HLK ?)
31 | elim (le_or_ge (|L|) (d+e)) #Hde
32   [ elim (thin_delift_tpss_conf_le_up … HU2 … HUT … HLK ? ? ?)
33   | elim (thin_delift_tpss_conf_be … HU2 … HUT … HLK ? ?)
34   ]
35 ] -U -HLK // -Hd [2,3: -Hde] #T2 #HT2
36 lapply (cpr_intro … HT1 HT2) -T /2 width=3/
37 qed.