]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/lfpx.ma
4067962d8fe89682653be2bd9b381f5e51b768b2
[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 (* UNBOUND PARALLEL RT-TRANSITION FOR REFERRED LOCAL ENVIRONMENTS ***********)
20
21 definition lfpx (h) (G): relation3 term lenv lenv ≝
22                          lfxs (cpx h G).
23
24 interpretation
25    "unbound 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 lemma lfpx_inv_atom_sn: ∀h,G,Y2,T. ⦃G, ⋆⦄ ⊢ ⬈[h, T] Y2 → Y2 = ⋆.
58 /2 width=3 by lfxs_inv_atom_sn/ qed-.
59
60 lemma lfpx_inv_atom_dx: ∀h,G,Y1,T. ⦃G, Y1⦄ ⊢ ⬈[h, T] ⋆ → 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                       | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, ⋆s] L2 &
66                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
67 /2 width=1 by lfxs_inv_sort/ qed-.
68
69 lemma lfpx_inv_lref: ∀h,G,Y1,Y2,i. ⦃G, Y1⦄ ⊢ ⬈[h, #↑i] Y2 →
70                      ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
71                       | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
72                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
73 /2 width=1 by lfxs_inv_lref/ qed-.
74
75 lemma lfpx_inv_gref: ∀h,G,Y1,Y2,l. ⦃G, Y1⦄ ⊢ ⬈[h, §l] Y2 →
76                      ∨∨ Y1 = ⋆ ∧ Y2 = ⋆
77                       | ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, §l] L2 &
78                                        Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
79 /2 width=1 by lfxs_inv_gref/ qed-.
80
81 lemma lfpx_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 lfxs_inv_bind/ qed-.
84
85 lemma lfpx_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 lfxs_inv_flat/ qed-.
88
89 (* Advanced inversion lemmas ************************************************)
90
91 lemma lfpx_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 lfxs_inv_sort_bind_sn/ qed-.
94
95 lemma lfpx_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 lfxs_inv_sort_bind_dx/ qed-.
98
99 lemma lfpx_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 &
101                                       Y2 = L2.ⓑ{I}V2.
102 /2 width=1 by lfxs_inv_zero_pair_sn/ qed-.
103
104 lemma lfpx_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 &
106                                       Y1 = L1.ⓑ{I}V1.
107 /2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
108
109 lemma lfpx_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 lfxs_inv_lref_bind_sn/ qed-.
112
113 lemma lfpx_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 lfxs_inv_lref_bind_dx/ qed-.
116
117 lemma lfpx_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 lfxs_inv_gref_bind_sn/ qed-.
120
121 lemma lfpx_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 lfxs_inv_gref_bind_dx/ qed-.
124
125 (* Basic forward lemmas *****************************************************)
126
127 lemma lfpx_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 lfxs_fwd_pair_sn/ qed-.
130
131 lemma lfpx_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 lfxs_fwd_bind_dx/ qed-.
134
135 lemma lfpx_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 lfxs_fwd_flat_dx/ qed-.