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 "static_2/static/rex.ma".
17 include "basic_2/rt_transition/cpx_ext.ma".
19 (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********)
21 definition rpx (h) (G): relation3 term lenv lenv ≝
25 "unbound parallel rt-transition on referred entries (local environment)"
26 'PRedTySn h T G L1 L2 = (rpx h G T L1 L2).
28 (* Basic properties ***********************************************************)
30 lemma rpx_atom: ∀h,I,G. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] ⋆.
31 /2 width=1 by rex_atom/ qed.
33 lemma rpx_sort: ∀h,I1,I2,G,L1,L2,s.
34 ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, ⋆s] L2.ⓘ{I2}.
35 /2 width=1 by rex_sort/ qed.
37 lemma rpx_pair: ∀h,I,G,L1,L2,V1,V2.
38 ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 → ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2.
39 /2 width=1 by rex_pair/ qed.
41 lemma rpx_lref: ∀h,I1,I2,G,L1,L2,i.
42 ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, #↑i] L2.ⓘ{I2}.
43 /2 width=1 by rex_lref/ qed.
45 lemma rpx_gref: ∀h,I1,I2,G,L1,L2,l.
46 ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, §l] L2.ⓘ{I2}.
47 /2 width=1 by rex_gref/ qed.
49 lemma rpx_bind_repl_dx: ∀h,I,I1,G,L1,L2,T.
50 ⦃G, L1.ⓘ{I}⦄ ⊢ ⬈[h, T] L2.ⓘ{I1} →
51 ∀I2. ⦃G, L1⦄ ⊢ I ⬈[h] I2 →
52 ⦃G, L1.ⓘ{I}⦄ ⊢ ⬈[h, T] L2.ⓘ{I2}.
53 /2 width=2 by rex_bind_repl_dx/ qed-.
55 (* Basic inversion lemmas ***************************************************)
57 lemma rpx_inv_atom_sn: ∀h,G,Y2,T. ⦃G, ⋆⦄ ⊢ ⬈[h, T] Y2 → Y2 = ⋆.
58 /2 width=3 by rex_inv_atom_sn/ qed-.
60 lemma rpx_inv_atom_dx: ∀h,G,Y1,T. ⦃G, Y1⦄ ⊢ ⬈[h, T] ⋆ → Y1 = ⋆.
61 /2 width=3 by rex_inv_atom_dx/ qed-.
63 lemma rpx_inv_sort: ∀h,G,Y1,Y2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] Y2 →
65 | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 &
66 Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
67 /2 width=1 by rex_inv_sort/ qed-.
69 lemma rpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #↑i] Y2 →
71 | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
72 Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
73 /2 width=1 by rex_inv_lref/ qed-.
75 lemma rpx_inv_gref: ∀h,G,Y1,Y2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] Y2 →
77 | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 &
78 Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
79 /2 width=1 by rex_inv_gref/ qed-.
81 lemma rpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 →
82 ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
83 /2 width=2 by rex_inv_bind/ qed-.
85 lemma rpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 →
86 ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
87 /2 width=2 by rex_inv_flat/ qed-.
89 (* Advanced inversion lemmas ************************************************)
91 lemma rpx_inv_sort_bind_sn: ∀h,I1,G,Y2,L1,s. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, ⋆s] Y2 →
92 ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y2 = L2.ⓘ{I2}.
93 /2 width=2 by rex_inv_sort_bind_sn/ qed-.
95 lemma rpx_inv_sort_bind_dx: ∀h,I2,G,Y1,L2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] L2.ⓘ{I2} →
96 ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y1 = L1.ⓘ{I1}.
97 /2 width=2 by rex_inv_sort_bind_dx/ qed-.
99 lemma rpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] Y2 →
100 ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
102 /2 width=1 by rex_inv_zero_pair_sn/ qed-.
104 lemma rpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2 →
105 ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
107 /2 width=1 by rex_inv_zero_pair_dx/ qed-.
109 lemma rpx_inv_lref_bind_sn: ∀h,I1,G,Y2,L1,i. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, #↑i] Y2 →
110 ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓘ{I2}.
111 /2 width=2 by rex_inv_lref_bind_sn/ qed-.
113 lemma rpx_inv_lref_bind_dx: ∀h,I2,G,Y1,L2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #↑i] L2.ⓘ{I2} →
114 ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓘ{I1}.
115 /2 width=2 by rex_inv_lref_bind_dx/ qed-.
117 lemma rpx_inv_gref_bind_sn: ∀h,I1,G,Y2,L1,l. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, §l] Y2 →
118 ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y2 = L2.ⓘ{I2}.
119 /2 width=2 by rex_inv_gref_bind_sn/ qed-.
121 lemma rpx_inv_gref_bind_dx: ∀h,I2,G,Y1,L2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] L2.ⓘ{I2} →
122 ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y1 = L1.ⓘ{I1}.
123 /2 width=2 by rex_inv_gref_bind_dx/ qed-.
125 (* Basic forward lemmas *****************************************************)
127 lemma rpx_fwd_pair_sn: ∀h,I,G,L1,L2,V,T.
128 ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
129 /2 width=3 by rex_fwd_pair_sn/ qed-.
131 lemma rpx_fwd_bind_dx: ∀h,p,I,G,L1,L2,V,T.
132 ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
133 /2 width=2 by rex_fwd_bind_dx/ qed-.
135 lemma rpx_fwd_flat_dx: ∀h,I,G,L1,L2,V,T.
136 ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
137 /2 width=3 by rex_fwd_flat_dx/ qed-.