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/static/rex_fqup.ma".
16 include "static_2/i_static/rexs.ma".
18 (* ITERATED EXTENSION ON REFERRED ENTRIES OF A CONTEXT-SENSITIVE REALTION ***)
20 (* Advanced properties ******************************************************)
22 lemma rexs_refl: ∀R. c_reflexive … R →
23 ∀T. reflexive … (rexs R T).
24 /3 width=1 by rex_refl, inj/ qed.
26 (* Basic_2A1: uses: TC_lpx_sn_pair TC_lpx_sn_pair_refl *)
27 lemma rexs_pair_refl: ∀R. c_reflexive … R →
28 ∀L,V1,V2. CTC … R L V1 V2 → ∀I,T. L.ⓑ[I]V1 ⪤*[R,T] L.ⓑ[I]V2.
29 #R #HR #L #V1 #V2 #H elim H -V2
30 /3 width=3 by rexs_step_dx, rex_pair_refl, inj/
33 lemma rexs_tc: ∀R,L1,L2,T,f. 𝐈❨f❩ → TC … (sex cfull (cext2 R) f) L1 L2 →
35 #R #L1 #L2 #T #f #Hf #H elim H -L2
36 [ elim (frees_total L1 T) | #L elim (frees_total L T) ]
37 /5 width=7 by sex_sdj, rexs_step_dx, pr_sdj_isi_sn, inj, ex2_intro/
40 (* Advanced eliminators *****************************************************)
42 lemma rexs_ind_sn: ∀R. c_reflexive … R →
43 ∀L1,T. ∀Q:predicate …. Q L1 →
44 (∀L,L2. L1 ⪤*[R,T] L → L ⪤[R,T] L2 → Q L → Q L2) →
45 ∀L2. L1 ⪤*[R,T] L2 → Q L2.
46 #R #HR #L1 #T #Q #HL1 #IHL1 #L2 #HL12
47 @(TC_star_ind … HL1 IHL1 … HL12) /2 width=1 by rex_refl/
50 lemma rexs_ind_dx: ∀R. c_reflexive … R →
51 ∀L2,T. ∀Q:predicate …. Q L2 →
52 (∀L1,L. L1 ⪤[R,T] L → L ⪤*[R,T] L2 → Q L → Q L1) →
53 ∀L1. L1 ⪤*[R,T] L2 → Q L1.
54 #R #HR #L2 #Q #HL2 #IHL2 #L1 #HL12
55 @(TC_star_ind_dx … HL2 IHL2 … HL12) /2 width=4 by rex_refl/
58 (* Advanced inversion lemmas ************************************************)
60 lemma rexs_inv_bind_void: ∀R. c_reflexive … R →
61 ∀p,I,L1,L2,V,T. L1 ⪤*[R,ⓑ[p,I]V.T] L2 →
62 ∧∧ L1 ⪤*[R,V] L2 & L1.ⓧ ⪤*[R,T] L2.ⓧ.
63 #R #HR #p #I #L1 #L2 #V #T #H @(rexs_ind_sn … HR … H) -L2
64 [ /3 width=1 by rexs_refl, conj/
65 | #L #L2 #_ #H * elim (rex_inv_bind_void … H) -H /3 width=3 by rexs_step_dx, conj/
69 (* Advanced forward lemmas **************************************************)
71 lemma rexs_fwd_bind_dx_void: ∀R. c_reflexive … R →
72 ∀p,I,L1,L2,V,T. L1 ⪤*[R,ⓑ[p,I]V.T] L2 →
74 #R #HR #p #I #L1 #L2 #V #T #H elim (rexs_inv_bind_void … H) -H //