]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/relocation/drops_drops.ma
theory of generic slicing almost completed ....
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / relocation / drops_drops.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_2/relocation/lifts_lifts.ma".
16 include "basic_2/relocation/drops.ma".
17
18 (* GENERAL SLICING FOR LOCAL ENVIRONMENTS ***********************************)
19
20 (* Main properties **********************************************************)
21
22 (* Basic_2A1: includes: drop_conf_ge drop_conf_be drop_conf_le *)
23 theorem drops_conf: ∀L1,L,s1,t1. ⬇*[s1, t1] L1 ≡ L →
24                     ∀L2,s2,t. ⬇*[s2, t] L1 ≡ L2 →
25                     ∀t2. t1 ⊚ t2 ≡ t → ⬇*[s2, t2] L ≡ L2.
26 #L1 #L #s1 #t1 #H elim H -L1 -L -t1
27 [ #t1 #_ #L2 #s2 #t #H #t2 #Ht12 elim (drops_inv_atom1 … H) -s1 -H
28   #H #Ht destruct @drops_atom
29   #H elim (after_inv_isid3 … Ht12) -Ht12 /2 width=1 by/
30 | #I #K1 #K #V1 #t1 #_ #IH #L2 #s2 #t #H12 #t2 #Ht elim (after_inv_false1 … Ht) -Ht
31   #u #H #Hu destruct /3 width=3 by drops_inv_drop1/
32 | #I #K1 #K #V1 #V #t1 #_ #HV1 #IH #L2 #s2 #t #H #t2 #Ht elim (after_inv_true1 … Ht) -Ht
33   #u2 #u * #H1 #H2 #Hu destruct
34   [ elim (drops_inv_skip1 … H) -H /3 width=6 by drops_skip, lifts_div/
35   | /4 width=3 by drops_inv_drop1, drops_drop/
36   ]
37 ]
38 qed-.
39
40 (* Basic_1: was: drop1_trans *)
41 (* Basic_2A1: includes: drop_trans_ge drop_trans_le drop_trans_ge_comm 
42                         drops_drop_trans
43 *)
44 theorem drops_trans: ∀L1,L,s1,t1. ⬇*[s1, t1] L1 ≡ L →
45                      ∀L2,s2,t2. ⬇*[s2, t2] L ≡ L2 →
46                      ∀t. t1 ⊚ t2 ≡ t → ⬇*[s1∨s2, t] L1 ≡ L2.
47 #L1 #L #s1 #t1 #H elim H -L1 -L -t1
48 [ #t1 #Ht1 #L2 #s2 #t2 #H #t #Ht elim (drops_inv_atom1 … H) -H
49   #H #Ht2 destruct @drops_atom #H elim (orb_false_r … H) -H
50   #H1 #H2 >(after_isid_inv_sn … Ht) -Ht /2 width=1 by/
51 | #I #K1 #K #V1 #t1 #_ #IH #L #s2 #t2 #HKL #t #Ht elim (after_inv_false1 … Ht) -Ht
52   /3 width=3 by drops_drop/
53 | #I #K1 #K #V1 #V #t1 #_ #HV1 #IH #L #s2 #t2 #H #t #Ht elim (after_inv_true1 … Ht) -Ht
54   #u2 #u * #H1 #H2 #Hu destruct
55   [ elim (drops_inv_skip1 … H) -H /3 width=6 by drops_skip, lifts_trans/
56   | /4 width=3 by drops_inv_drop1, drops_drop/
57   ]
58 ]
59 qed-.
60
61 (* Advanced properties ******************************************************)
62
63 (* Basic_2A1: includes: drop_mono *)
64 lemma drops_mono: ∀L,L1,s1,t. ⬇*[s1, t] L ≡ L1 →
65                   ∀L2,s2. ⬇*[s2, t] L ≡ L2 → L1 = L2.
66 #L #L1 #s1 #t elim (isid_after_dx t)
67 /3 width=8 by drops_conf, drops_fwd_isid/
68 qed-.
69
70 (* Basic_2A1: includes: drop_conf_lt *)
71 lemma drops_conf_skip1: ∀L,L2,s2,t. ⬇*[s2, t] L ≡ L2 →
72                         ∀I,K1,V1,s1,t1. ⬇*[s1, t1] L ≡ K1.ⓑ{I}V1 →
73                         ∀t2. t1 ⊚ Ⓣ@t2 ≡ t →
74                         ∃∃K2,V2. L2 = K2.ⓑ{I}V2 &
75                                  ⬇*[s2, t2] K1 ≡ K2 & ⬆*[t2] V2 ≡ V1.
76 #L #L2 #s2 #t #H2 #I #K1 #V1 #s1 #t1 #H1 #t2 #Ht lapply (drops_conf … H1 … H2 … Ht) -L -Ht
77 #H elim (drops_inv_skip1 … H) -H /2 width=5 by ex3_2_intro/
78 qed-.
79
80 (* Basic_2A1: includes: drop_trans_lt *)
81 lemma drops_trans_skip2: ∀L1,L,s1,t1. ⬇*[s1, t1] L1 ≡ L →
82                          ∀I,K2,V2,s2,t2. ⬇*[s2, t2] L ≡ K2.ⓑ{I}V2 →
83                          ∀t. t1 ⊚ t2 ≡ Ⓣ@t →
84                          ∃∃K1,V1. L1 = K1.ⓑ{I}V1 &
85                                   ⬇*[s1∨s2, t] K1 ≡ K2 & ⬆*[t] V2 ≡ V1.
86 #L1 #L #s1 #t1 #H1 #I #K2 #V2 #s2 #t2 #H2 #t #Ht
87 lapply (drops_trans … H1 … H2 … Ht) -L -Ht
88 #H elim (drops_inv_skip2 … H) -H /2 width=5 by ex3_2_intro/
89 qed-.