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/seq_seq.ma".
16 include "static_2/static/rex_drops.ma".
17 include "static_2/i_static/rexs.ma".
19 (* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***)
21 definition tc_f_dedropable_sn: predicate (relation3 lenv term term) ≝
22 λR. ∀b,f,L1,K1. ⇩*[b,f] L1 ≘ K1 →
23 ∀K2,T. K1 ⪤*[R,T] K2 → ∀U. ⇧*[f] T ≘ U →
24 ∃∃L2. L1 ⪤*[R,U] L2 & ⇩*[b,f] L2 ≘ K2 & L1 ≡[f] L2.
26 definition tc_f_dropable_sn: predicate (relation3 lenv term term) ≝
27 λR. ∀b,f,L1,K1. ⇩*[b,f] L1 ≘ K1 → 𝐔❨f❩ →
28 ∀L2,U. L1 ⪤*[R,U] L2 → ∀T. ⇧*[f] T ≘ U →
29 ∃∃K2. K1 ⪤*[R,T] K2 & ⇩*[b,f] L2 ≘ K2.
31 definition tc_f_dropable_dx: predicate (relation3 lenv term term) ≝
32 λR. ∀L1,L2,U. L1 ⪤*[R,U] L2 →
33 ∀b,f,K2. ⇩*[b,f] L2 ≘ K2 → 𝐔❨f❩ → ∀T. ⇧*[f] T ≘ U →
34 ∃∃K1. ⇩*[b,f] L1 ≘ K1 & K1 ⪤*[R,T] K2.
36 (* Properties with generic slicing for local environments *******************)
38 lemma dedropable_sn_CTC: ∀R. f_dedropable_sn R → tc_f_dedropable_sn R.
39 #R #HR #b #f #L1 #K1 #HLK1 #K2 #T #H elim H -K2
40 [ #K2 #HK12 #U #HTU elim (HR … HLK1 … HK12 … HTU) -K1 -T -HR
41 /3 width=4 by ex3_intro, inj/
42 | #K #K2 #_ #HK2 #IH #U #HTU -HLK1
43 elim (IH … HTU) -IH #L #HL1 #HLK
44 elim (HR … HLK … HK2 … HTU) -K -T -HR
45 /3 width=6 by seq_trans, rexs_step_dx, ex3_intro/
49 (* Inversion lemmas with generic slicing for local environments *************)
51 lemma dropable_sn_CTC: ∀R. f_dropable_sn R → tc_f_dropable_sn R.
52 #R #HR #b #f #L1 #K1 #HLK1 #Hf #L2 #U #H elim H -L2
53 [ #L2 #HL12 #T #HTU elim (HR … HLK1 … HL12 … HTU) -L1 -U -HR
54 /3 width=3 by inj, ex2_intro/
55 | #L #L2 #_ #HL2 #IH #T #HTU -HLK1
56 elim (IH … HTU) -IH #K #HK1 #HLK
57 elim (HR … HLK … HL2 … HTU) -L -U -HR
58 /3 width=3 by rexs_step_dx, ex2_intro/
62 lemma dropable_dx_CTC: ∀R. f_dropable_dx R → tc_f_dropable_dx R.
63 #R #HR #L1 #L2 #U #H elim H -L2
64 [ #L2 #HL12 #b #f #K2 #HLK2 #Hf #T #HTU
65 elim (HR … HL12 … HLK2 … HTU) -L2 -U -HR
66 /3 width=3 by inj, ex2_intro/
67 | #L #L2 #_ #HL2 #IH #b #f #K2 #HLK2 #Hf #T #HTU
68 elim (HR … HL2 … HLK2 … HTU) -L2 -HR // #K #HLK #HK2
69 elim (IH … HLK … HTU) -IH -L -U
70 /3 width=5 by rexs_step_dx, ex2_intro/