]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/reduction/crx_lift.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / reduction / crx_lift.ma
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_2A/substitution/drop_drop.ma".
16 include "basic_2A/reduction/crx.ma".
17
18 (* REDUCIBLE TERMS FOR CONTEXT-SENSITIVE EXTENDED REDUCTION *****************)
19
20 (* Properties on relocation *************************************************)
21
22 lemma crx_lift: ∀h,g,G,K,T. ⦃G, K⦄ ⊢ ➡[h, g] 𝐑⦃T⦄ → ∀L,s,l,m. ⬇[s, l, m] L ≡ K →
23                 ∀U. ⬆[l, m] T ≡ U → ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄.
24 #h #g #G #K #T #H elim H -K -T
25 [ #K #k #d #Hkd #L #s #l #m #_ #X #H
26   >(lift_inv_sort1 … H) -X /2 width=2 by crx_sort/
27 | #I #K #K0 #V #i #HK0 #L #s #l #m #HLK #X #H
28   elim (lift_inv_lref1 … H) -H * #Hil #H destruct
29   [ elim (drop_trans_lt … HLK … HK0) -K /2 width=4 by crx_delta/
30   | lapply (drop_trans_ge … HLK … HK0 ?) -K /3 width=5 by crx_delta, drop_inv_gen/
31   ]
32 | #K #V #T #_ #IHV #L #s #l #m #HLK #X #H
33   elim (lift_inv_flat1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crx_appl_sn/
34 | #K #V #T #_ #IHT #L #s #l #m #HLK #X #H
35   elim (lift_inv_flat1 … H) -H #W #U #_ #HTU #H destruct /3 width=5 by crx_appl_dx/
36 | #I #K #V #T #HI #L #s #l #m #_ #X #H
37   elim (lift_fwd_pair1 … H) -H #W #U #_ #H destruct /2 width=1 by crx_ri2/
38 | #a #I #K #V #T #HI #_ #IHV #L #s #l #m #HLK #X #H
39   elim (lift_inv_bind1 … H) -H #W #U #HVW #_ #H destruct /3 width=5 by crx_ib2_sn/
40 | #a #I #K #V #T #HI #_ #IHT #L #s #l #m #HLK #X #H
41   elim (lift_inv_bind1 … H) -H #W #U #HVW #HTU #H destruct /4 width=5 by crx_ib2_dx, drop_skip/
42 | #a #K #V #V0 #T #L #s #l #m #_ #X #H
43   elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct
44   elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crx_beta/
45 | #a #K #V #V0 #T #L #s #l #m #_ #X #H
46   elim (lift_inv_flat1 … H) -H #W #X0 #_ #H0 #H destruct
47   elim (lift_inv_bind1 … H0) -H0 #W0 #U #_ #_ #H0 destruct /2 width=1 by crx_theta/
48 ]
49 qed.
50
51 lemma crx_inv_lift: ∀h,g,G,L,U. ⦃G, L⦄ ⊢ ➡[h, g] 𝐑⦃U⦄ → ∀K,s,l,m. ⬇[s, l, m] L ≡ K →
52                     ∀T. ⬆[l, m] T ≡ U → ⦃G, K⦄ ⊢ ➡[h, g] 𝐑⦃T⦄.
53 #h #g #G #L #U #H elim H -L -U
54 [ #L #k #d #Hkd #K #s #l #m #_ #X #H
55   >(lift_inv_sort2 … H) -X /2 width=2 by crx_sort/
56 | #I #L #L0 #W #i #HK0 #K #s #l #m #HLK #X #H
57   elim (lift_inv_lref2 … H) -H * #Hil #H destruct
58   [ elim (drop_conf_lt … HLK … HK0) -L /2 width=4 by crx_delta/
59   | lapply (drop_conf_ge … HLK … HK0 ?) -L /2 width=4 by crx_delta/
60   ]
61 | #L #W #U #_ #IHW #K #s #l #m #HLK #X #H
62   elim (lift_inv_flat2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crx_appl_sn/
63 | #L #W #U #_ #IHU #K #s #l #m #HLK #X #H
64   elim (lift_inv_flat2 … H) -H #V #T #_ #HTU #H destruct /3 width=5 by crx_appl_dx/
65 | #I #L #W #U #HI #K #s #l #m #_ #X #H
66   elim (lift_fwd_pair2 … H) -H #V #T #_ #H destruct /2 width=1 by crx_ri2/
67 | #a #I #L #W #U #HI #_ #IHW #K #s #l #m #HLK #X #H
68   elim (lift_inv_bind2 … H) -H #V #T #HVW #_ #H destruct /3 width=5 by crx_ib2_sn/
69 | #a #I #L #W #U #HI #_ #IHU #K #s #l #m #HLK #X #H
70   elim (lift_inv_bind2 … H) -H #V #T #HVW #HTU #H destruct /4 width=5 by crx_ib2_dx, drop_skip/
71 | #a #L #W #W0 #U #K #s #l #m #_ #X #H
72   elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct
73   elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crx_beta/
74 | #a #L #W #W0 #U #K #s #l #m #_ #X #H
75   elim (lift_inv_flat2 … H) -H #V #X0 #_ #H0 #H destruct
76   elim (lift_inv_bind2 … H0) -H0 #V0 #T #_ #_ #H0 destruct /2 width=1 by crx_theta/
77 ]
78 qed-.