]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx.ma
537bb8bc87ecdffae0556804809fe88ff874a9c2
[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_ext.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,I1,I2,G,L1,L2,s.
34                  ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 → ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, ⋆s] L2.ⓘ{I2}.
35 /2 width=1 by lfxs_sort/ qed.
36
37 lemma lfpx_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 lfxs_pair/ qed.
40
41 lemma lfpx_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 lfxs_lref/ qed.
44
45 lemma lfpx_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 lfxs_gref/ qed.
48
49 lemma lfpx_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 lfxs_bind_repl_dx/ qed-.
54
55 (* Basic inversion lemmas ***************************************************)
56
57 (* Basic_2A1: uses: lpx_inv_atom1 *)
58 lemma lfpx_inv_atom_sn: ∀h,G,Y2,T. ⦃G, ⋆⦄ ⊢ ⬈[h, T] Y2 → Y2 = ⋆.
59 /2 width=3 by lfxs_inv_atom_sn/ qed-.
60
61 (* Basic_2A1: uses: lpx_inv_atom2 *)
62 lemma lfpx_inv_atom_dx: ∀h,G,Y1,T. ⦃G, Y1⦄ ⊢ ⬈[h, T] ⋆ → Y1 = ⋆.
63 /2 width=3 by lfxs_inv_atom_dx/ qed-.
64
65 lemma lfpx_inv_sort: ∀h,G,Y1,Y2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] Y2 →
66                      ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
67                       | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 &
68                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
69 /2 width=1 by lfxs_inv_sort/ qed-.
70 (*
71 lemma lfpx_inv_zero: ∀h,G,Y1,Y2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] Y2 →
72                      (Y1 = ⋆ ∧ Y2 = ⋆) ∨
73                      ∃∃I,L1,L2,V1,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 &
74                                       ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
75                                       Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
76 /2 width=1 by lfxs_inv_zero/ qed-.
77 *)
78 lemma lfpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] Y2 →
79                      ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
80                       | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
81                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
82 /2 width=1 by lfxs_inv_lref/ qed-.
83
84 lemma lfpx_inv_gref: ∀h,G,Y1,Y2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] Y2 →
85                      ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
86                       | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 &
87                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
88 /2 width=1 by lfxs_inv_gref/ qed-.
89
90 lemma lfpx_inv_bind: ∀h,p,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 →
91                      ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
92 /2 width=2 by lfxs_inv_bind/ qed-.
93
94 lemma lfpx_inv_flat: ∀h,I,G,L1,L2,V,T. ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 →
95                      ∧∧ ⦃G, L1⦄ ⊢ ⬈[h, V] L2 & ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
96 /2 width=2 by lfxs_inv_flat/ qed-.
97
98 (* Advanced inversion lemmas ************************************************)
99
100 lemma lfpx_inv_sort_bind_sn: ∀h,I1,G,Y2,L1,s. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, ⋆s] Y2 →
101                              ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y2 = L2.ⓘ{I2}.
102 /2 width=2 by lfxs_inv_sort_bind_sn/ qed-.
103
104 lemma lfpx_inv_sort_bind_dx: ∀h,I2,G,Y1,L2,s. ⦃G, Y1⦄ ⊢ ⬈[h, ⋆s] L2.ⓘ{I2} →
105                              ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 & Y1 = L1.ⓘ{I1}.
106 /2 width=2 by lfxs_inv_sort_bind_dx/ qed-.
107
108 lemma lfpx_inv_zero_pair_sn: ∀h,I,G,Y2,L1,V1. ⦃G, L1.ⓑ{I}V1⦄ ⊢ ⬈[h, #0] Y2 →
109                              ∃∃L2,V2. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
110                                       Y2 = L2.ⓑ{I}V2.
111 /2 width=1 by lfxs_inv_zero_pair_sn/ qed-.
112
113 lemma lfpx_inv_zero_pair_dx: ∀h,I,G,Y1,L2,V2. ⦃G, Y1⦄ ⊢ ⬈[h, #0] L2.ⓑ{I}V2 →
114                              ∃∃L1,V1. ⦃G, L1⦄ ⊢ ⬈[h, V1] L2 & ⦃G, L1⦄ ⊢ V1 ⬈[h] V2 &
115                                       Y1 = L1.ⓑ{I}V1.
116 /2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
117
118 lemma lfpx_inv_lref_bind_sn: ∀h,I1,G,Y2,L1,i. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, #⫯i] Y2 →
119                              ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓘ{I2}.
120 /2 width=2 by lfxs_inv_lref_bind_sn/ qed-.
121
122 lemma lfpx_inv_lref_bind_dx: ∀h,I2,G,Y1,L2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #⫯i] L2.ⓘ{I2} →
123                              ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓘ{I1}.
124 /2 width=2 by lfxs_inv_lref_bind_dx/ qed-.
125
126 lemma lfpx_inv_gref_bind_sn: ∀h,I1,G,Y2,L1,l. ⦃G, L1.ⓘ{I1}⦄ ⊢ ⬈[h, §l] Y2 →
127                              ∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y2 = L2.ⓘ{I2}.
128 /2 width=2 by lfxs_inv_gref_bind_sn/ qed-.
129
130 lemma lfpx_inv_gref_bind_dx: ∀h,I2,G,Y1,L2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] L2.ⓘ{I2} →
131                              ∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 & Y1 = L1.ⓘ{I1}.
132 /2 width=2 by lfxs_inv_gref_bind_dx/ qed-.
133
134 (* Basic forward lemmas *****************************************************)
135
136 lemma lfpx_fwd_pair_sn: ∀h,I,G,L1,L2,V,T.
137                         ⦃G, L1⦄ ⊢ ⬈[h, ②{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, V] L2.
138 /2 width=3 by lfxs_fwd_pair_sn/ qed-.
139
140 lemma lfpx_fwd_bind_dx: ∀h,p,I,G,L1,L2,V,T.
141                         ⦃G, L1⦄ ⊢ ⬈[h, ⓑ{p,I}V.T] L2 → ⦃G, L1.ⓑ{I}V⦄ ⊢ ⬈[h, T] L2.ⓑ{I}V.
142 /2 width=2 by lfxs_fwd_bind_dx/ qed-.
143
144 lemma lfpx_fwd_flat_dx: ∀h,I,G,L1,L2,V,T.
145                         ⦃G, L1⦄ ⊢ ⬈[h, ⓕ{I}V.T] L2 → ⦃G, L1⦄ ⊢ ⬈[h, T] L2.
146 /2 width=3 by lfxs_fwd_flat_dx/ qed-.
147
148 (* Basic_2A1: removed theorems 3:
149               lpx_inv_pair1 lpx_inv_pair2 lpx_inv_pair
150 *)