]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx.ma
some improvements towards the confluence of lfpr ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / lfpx.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/notation/relations/predtysn_5.ma".
16 include "basic_2/static/lfxs.ma".
17 include "basic_2/rt_transition/cpx.ma".
18
19 (* UNCOUNTED PARALLEL RT-TRANSITION FOR LOCAL ENV.S ON REFERRED ENTRIES *****)
20
21 definition lfpx: sh → genv → relation3 term lenv lenv ≝
22                  λh,G. lfxs (cpx h G).
23
24 interpretation
25    "uncounted parallel rt-transition on referred entries (local environment)"
26    'PRedTySn h T G L1 L2 = (lfpx h G T L1 L2).
27
28 (* Basic properties ***********************************************************)
29
30 lemma lfpx_atom: ∀h,I,G. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] ⋆.
31 /2 width=1 by lfxs_atom/ qed.
32
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.
36
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.
40
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.
44
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.
48
49 lemma lfpx_pair_repl_dx: ∀h,I,G,L1,L2,T,V,V1.
50                          ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V1 →
51                          ∀V2. ⦃G, L1⦄ ⊢ V ⬈[h] V2 →
52                          ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V2.
53 /2 width=2 by lfxs_pair_repl_dx/ qed-.
54
55 (* Basic inversion lemmas ***************************************************)
56
57 lemma lfpx_inv_atom_sn: ∀h,I,G,Y2. ⦃G, ⋆⦄ ⊢ ⬈[h, ⓪{I}] Y2 → Y2 = ⋆.
58 /2 width=3 by lfxs_inv_atom_sn/ qed-.
59
60 lemma lfpx_inv_atom_dx: ∀h,I,G,Y1. ⦃G, Y1⦄ ⊢ ⬈[h, ⓪{I}] ⋆ → Y1 = ⋆.
61 /2 width=3 by lfxs_inv_atom_dx/ qed-.
62
63 lemma lfpx_inv_sort: ∀h,G,Y1,Y2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] Y2 →
64                      (Y1 = ⋆ ∧ Y2 = ⋆) ∨
65                      ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 &
66                                       Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
67 /2 width=1 by lfxs_inv_sort/ qed-.
68
69 lemma lfpx_inv_zero: ∀h,G,Y1,Y2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] Y2 →
70                      (Y1 = ⋆ ∧ Y2 = ⋆) ∨
71                      ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 &
72                                       ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
73                                       Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
74 /2 width=1 by lfxs_inv_zero/ qed-.
75
76 lemma lfpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] Y2 →
77                      (Y1 = ⋆ ∧ Y2 = ⋆) ∨
78                      ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
79                                       Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
80 /2 width=1 by lfxs_inv_lref/ qed-.
81
82 lemma lfpx_inv_gref: ∀h,G,Y1,Y2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] Y2 →
83                      (Y1 = ⋆ ∧ Y2 = ⋆) ∨
84                      ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 &
85                                       Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
86 /2 width=1 by lfxs_inv_gref/ qed-.
87
88 lemma lfpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 →
89                      ⦃G, L1⦄ ⊢ ⬈[h, V] L2 ∧ ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
90 /2 width=2 by lfxs_inv_bind/ qed-.
91
92 lemma lfpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 →
93                      ⦃G, L1⦄ ⊢ ⬈[h, V] L2 ∧ ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
94 /2 width=2 by lfxs_inv_flat/ qed-.
95
96 (* Advanced inversion lemmas ************************************************)
97
98 lemma lfpx_inv_sort_pair_sn: ∀h,I,G,Y2,L1,V1,s. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, ⋆s] Y2 →
99                              ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y2 = L2.ⓑ{I}V2.
100 /2 width=2 by lfxs_inv_sort_pair_sn/ qed-.
101
102 lemma lfpx_inv_sort_pair_dx: ∀h,I,G,Y1,L2,V2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] L2.ⓑ{I}V2 →
103                              ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y1 = L1.ⓑ{I}V1.
104 /2 width=2 by lfxs_inv_sort_pair_dx/ qed-.
105
106 lemma lfpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] Y2 →
107                              ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
108                                       Y2 = L2.ⓑ{I}V2.
109 /2 width=1 by lfxs_inv_zero_pair_sn/ qed-.
110
111 lemma lfpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2 →
112                              ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
113                                       Y1 = L1.ⓑ{I}V1.
114 /2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
115
116 lemma lfpx_inv_lref_pair_sn: ∀h,I,G,Y2,L1,V1,i. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #⫯i] Y2 →
117                              ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓑ{I}V2.
118 /2 width=2 by lfxs_inv_lref_pair_sn/ qed-.
119
120 lemma lfpx_inv_lref_pair_dx: ∀h,I,G,Y1,L2,V2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] L2.ⓑ{I}V2 →
121                              ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓑ{I}V1.
122 /2 width=2 by lfxs_inv_lref_pair_dx/ qed-.
123
124 lemma lfpx_inv_gref_pair_sn: ∀h,I,G,Y2,L1,V1,l. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, §l] Y2 →
125                              ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y2 = L2.ⓑ{I}V2.
126 /2 width=2 by lfxs_inv_gref_pair_sn/ qed-.
127
128 lemma lfpx_inv_gref_pair_dx: ∀h,I,G,Y1,L2,V2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] L2.ⓑ{I}V2 →
129                              ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y1 = L1.ⓑ{I}V1.
130 /2 width=2 by lfxs_inv_gref_pair_dx/ qed-.
131
132 (* Basic forward lemmas *****************************************************)
133
134 lemma lfpx_fwd_bind_sn: ∀h,p,I,G,L1,L2,V,T.
135                         ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
136 /2 width=4 by lfxs_fwd_bind_sn/ qed-.
137
138 lemma lfpx_fwd_bind_dx: ∀h,p,I,G,L1,L2,V,T.
139                         ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
140 /2 width=2 by lfxs_fwd_bind_dx/ qed-.
141
142 lemma lfpx_fwd_flat_sn: ∀h,I,G,L1,L2,V,T.
143                         ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
144 /2 width=3 by lfxs_fwd_flat_sn/ qed-.
145
146 lemma lfpx_fwd_flat_dx: ∀h,I,G,L1,L2,V,T.
147                         ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
148 /2 width=3 by lfxs_fwd_flat_dx/ qed-.
149
150 lemma lfpx_fwd_pair_sn: ∀h,I,G,L1,L2,V,T.
151                         ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
152 /2 width=3 by lfxs_fwd_pair_sn/ qed-.
153
154 (* Basic_2A1: removed theorems 14:
155               lpx_refl lpx_pair lpx_fwd_length
156               lpx_inv_atom1 lpx_inv_pair1 lpx_inv_atom2 lpx_inv_pair2 lpx_inv_pair
157               lpx_drop_conf drop_lpx_trans lpx_drop_trans_O1
158               lpx_cpx_frees_trans cpx_frees_trans lpx_frees_trans
159 *)