1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "static_2/relocation/lifts_basic.ma".
16 include "basic_2/rt_transition/cpm_drops.ma".
17 include "basic_2/rt_transition/cpr.ma".
19 (* CONTEXT-SENSITIVE PARALLEL R-TRANSITION FOR TERMS ************************)
21 (* Properties with basic relocation *****************************************)
23 lemma cpr_subst (h) (G) (L) (U1) (i):
24 ∀K,V. ⇩*[i] L ≘ K.ⓓV →
25 ∃∃U2,T2. ⦃G,L⦄ ⊢ U1 ➡[h] U2 & ⇧[i,1] T2 ≘ U2.
26 #h #G #L #U1 @(fqup_wf_ind_eq (Ⓣ) … G L U1) -G -L -U1
27 #G0 #L0 #U0 #IH #G #L * *
28 [ #s #HG #HL #HT #i #K #V #_ destruct -IH
29 /2 width=4 by lifts_sort, ex2_2_intro/
30 | #j #HG #HL #HT #i #K #V #HLK destruct -IH
31 elim (lt_or_eq_or_gt i j) #Hij
32 [ /3 width=4 by lifts_lref_ge_minus, cpr_refl, ex2_2_intro/
33 | elim (lifts_total V (𝐔❴↑i❵)) #U2 #HU2
34 elim (lifts_split_trans … HU2 (𝐔❴i❵) (𝐁❴i,1❵)) [2: @(after_basic_rc i 0) ]
35 /3 width=7 by cpm_delta_drops, ex2_2_intro/
36 | /3 width=4 by lifts_lref_lt, cpr_refl, ex2_2_intro/
38 | #l #HG #HL #HT #i #K #V #_ destruct -IH
39 /2 width=4 by lifts_gref, ex2_2_intro/
40 | #p #J #W1 #U1 #HG #HL #HT #i #K #V #HLK destruct
41 elim (IH G L W1 … HLK) [| // ] #W2 #V2 #HW12 #HVW2
42 elim (IH G (L.ⓑ{J}W1) U1 … (↑i)) [|*: /3 width=4 by drops_drop/ ] #U2 #T2 #HU12 #HTU2
43 /3 width=9 by cpm_bind, lifts_bind, ex2_2_intro/
44 | #J #W1 #U1 #HG #HL #HT #i #K #V #HLK destruct
45 elim (IH G L W1 … HLK) [| // ] #W2 #V2 #HW12 #HVW2
46 elim (IH G L U1 … HLK) [| // ] #U2 #T2 #HU12 #HTU2
47 /3 width=8 by cpr_flat, lifts_flat, ex2_2_intro/