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 "basic_2A/substitution/drop_drop.ma".
16 include "basic_2A/reduction/crr.ma".
18 (* REDUCIBLE TERMS FOR CONTEXT-SENSITIVE REDUCTION **************************)
20 (* Properties on relocation *************************************************)
22 lemma crr_lift: ∀G,K,T. ⦃G, K⦄ ⊢ ➡ 𝐑⦃T⦄ → ∀L,s,l,m. ⬇[s, l, m] L ≡ K →
23 ∀U. ⬆[l, m] T ≡ U → ⦃G, L⦄ ⊢ ➡ 𝐑⦃U⦄.
24 #G #K #T #H elim H -K -T
25 [ #K #K0 #V #i #HK0 #L #s #l #m #HLK #X #H
26 elim (lift_inv_lref1 … H) -H * #Hil #H destruct
27 [ elim (drop_trans_lt … HLK … HK0) -K /2 width=4 by crr_delta/
28 | lapply (drop_trans_ge … HLK … HK0 ?) -K /3 width=4 by crr_delta, drop_inv_gen/
30 | #K #V #T #_ #IHV #L #s #l #m #HLK #X #H
31 elim (lift_inv_flat1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crr_appl_sn/
32 | #K #V #T #_ #IHT #L #s #l #m #HLK #X #H
33 elim (lift_inv_flat1 … H) -H #W #U #_ #HTU #H destruct /3 width=5 by crr_appl_dx/
34 | #I #K #V #T #HI #L #s #l #m #_ #X #H
35 elim (lift_fwd_pair1 … H) -H #W #U #_ #H destruct /2 width=1 by crr_ri2/
36 | #a #I #K #V #T #HI #_ #IHV #L #s #l #m #HLK #X #H
37 elim (lift_inv_bind1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crr_ib2_sn/
38 | #a #I #K #V #T #HI #_ #IHT #L #s #l #m #HLK #X #H
39 elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct /4 width=5 by crr_ib2_dx, drop_skip/
40 | #a #K #V #V0 #T #L #s #l #m #_ #X #H
41 elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct
42 elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crr_beta/
43 | #a #K #V #V0 #T #L #s #l #m #_ #X #H
44 elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct
45 elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crr_theta/
49 lemma crr_inv_lift: ∀G,L,U. ⦃G, L⦄ ⊢ ➡ 𝐑⦃U⦄ → ∀K,s,l,m. ⬇[s, l, m] L ≡ K →
50 ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ ➡ 𝐑⦃T⦄.
51 #G #L #U #H elim H -L -U
52 [ #L #L0 #W #i #HK0 #K #s #l #m #HLK #X #H
53 elim (lift_inv_lref2 … H) -H * #Hil #H destruct
54 [ elim (drop_conf_lt … HLK … HK0) -L /2 width=4 by crr_delta/
55 | lapply (drop_conf_ge … HLK … HK0 ?) -L /2 width=4 by crr_delta/
57 | #L #W #U #_ #IHW #K #s #l #m #HLK #X #H
58 elim (lift_inv_flat2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crr_appl_sn/
59 | #L #W #U #_ #IHU #K #s #l #m #HLK #X #H
60 elim (lift_inv_flat2 … H) -H #V #T #_ #HTU #H destruct /3 width=5 by crr_appl_dx/
61 | #I #L #W #U #HI #K #s #l #m #_ #X #H
62 elim (lift_fwd_pair2 … H) -H #V #T #_ #H destruct /2 width=1 by crr_ri2/
63 | #a #I #L #W #U #HI #_ #IHW #K #s #l #m #HLK #X #H
64 elim (lift_inv_bind2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crr_ib2_sn/
65 | #a #I #L #W #U #HI #_ #IHU #K #s #l #m #HLK #X #H
66 elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct /4 width=5 by crr_ib2_dx, drop_skip/
67 | #a #L #W #W0 #U #K #s #l #m #_ #X #H
68 elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct
69 elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crr_beta/
70 | #a #L #W #W0 #U #K #s #l #m #_ #X #H
71 elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct
72 elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crr_theta/