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_2/notation/relations/predtysn_5.ma".
16 include "basic_2/static/lfxs.ma".
17 include "basic_2/rt_transition/cpx.ma".
19 (* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****)
21 definition lfpx: sh → genv → relation3 term lenv lenv ≝
25 "uncounted parallel rt-transition on referred entries (local environment)"
26 'PRedTySn h T G L1 L2 = (lfpx h G T L1 L2).
28 (* Basic properties ***********************************************************)
30 lemma lfpx_atom: ∀h,I,G. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] ⋆.
31 /2 width=1 by lfxs_atom/ qed.
33 lemma lfpx_sort: ∀h,I,G,L1,L2,V1,V2,s.
34 ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, ⋆s] L2.ⓑ{I}V2.
35 /2 width=1 by lfxs_sort/ qed.
37 lemma lfpx_zero: ∀h,I,G,L1,L2,V.
38 ⦃G, L1⦄ ⊢ ⬈[h, V] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V.
39 /2 width=1 by lfxs_zero/ qed.
41 lemma lfpx_lref: ∀h,I,G,L1,L2,V1,V2,i.
42 ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #⫯i] L2.ⓑ{I}V2.
43 /2 width=1 by lfxs_lref/ qed.
45 lemma lfpx_gref: ∀h,I,G,L1,L2,V1,V2,l.
46 ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, §l] L2.ⓑ{I}V2.
47 /2 width=1 by lfxs_gref/ qed.
49 (* Basic inversion lemmas ***************************************************)
51 lemma lfpx_inv_atom_sn: ∀h,I,G,Y2. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] Y2 → Y2 = ⋆.
52 /2 width=3 by lfxs_inv_atom_sn/ qed-.
54 lemma lfpx_inv_atom_dx: ∀h,I,G,Y1. ⦃G, Y1⦄ ⊢ ⬈[h, ⓪{I}] ⋆ → Y1 = ⋆.
55 /2 width=3 by lfxs_inv_atom_dx/ qed-.
57 lemma lfpx_inv_zero: ∀h,G,Y1,Y2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] Y2 →
59 ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 &
60 ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
61 Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
62 /2 width=1 by lfxs_inv_zero/ qed-.
64 lemma lfpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] Y2 →
66 ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
67 Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
68 /2 width=1 by lfxs_inv_lref/ qed-.
70 lemma lfpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 →
71 ⦃G, L1⦄ ⊢ ⬈[h, V] L2 ∧ ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
72 /2 width=2 by lfxs_inv_bind/ qed-.
74 lemma lfpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 →
75 ⦃G, L1⦄ ⊢ ⬈[h, V] L2 ∧ ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
76 /2 width=2 by lfxs_inv_flat/ qed-.
78 (* Advanced inversion lemmas ************************************************)
80 lemma lfpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] Y2 →
81 ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
83 /2 width=1 by lfxs_inv_zero_pair_sn/ qed-.
85 lemma lfpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2 →
86 ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
88 /2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
90 lemma lfpx_inv_lref_pair_sn: ∀h,I,G,Y2,L1,V1,i. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #⫯i] Y2 →
91 ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓑ{I}V2.
92 /2 width=2 by lfxs_inv_lref_pair_sn/ qed-.
94 lemma lfpx_inv_lref_pair_dx: ∀h,I,G,Y1,L2,V2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] L2.ⓑ{I}V2 →
95 ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓑ{I}V1.
96 /2 width=2 by lfxs_inv_lref_pair_dx/ qed-.
98 (* Basic forward lemmas *****************************************************)
100 lemma lfpx_fwd_bind_sn: ∀h,p,I,G,L1,L2,V,T.
101 ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
102 /2 width=4 by lfxs_fwd_bind_sn/ qed-.
104 lemma lfpx_fwd_bind_dx: ∀h,p,I,G,L1,L2,V,T.
105 ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
106 /2 width=2 by lfxs_fwd_bind_dx/ qed-.
108 lemma lfpx_fwd_flat_sn: ∀h,I,G,L1,L2,V,T.
109 ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
110 /2 width=3 by lfxs_fwd_flat_sn/ qed-.
112 lemma lfpx_fwd_flat_dx: ∀h,I,G,L1,L2,V,T.
113 ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
114 /2 width=3 by lfxs_fwd_flat_dx/ qed-.
116 lemma lfpx_fwd_pair_sn: ∀h,I,G,L1,L2,V,T.
117 ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
118 /2 width=3 by lfxs_fwd_pair_sn/ qed-.
120 (* Basic_2A1: removed theorems 14:
121 lpx_refl lpx_pair lpx_fwd_length
122 lpx_inv_atom1 lpx_inv_pair1 lpx_inv_atom2 lpx_inv_pair2 lpx_inv_pair
123 lpx_drop_conf drop_lpx_trans lpx_drop_trans_O1
124 lpx_cpx_frees_trans cpx_frees_trans lpx_frees_trans