]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_computation/jsx.ma
05292539f92f0fb191b3e266cd2189ea700e756e
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_computation / jsx.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/topredtysnstrong_4.ma".
16 include "basic_2/rt_computation/rsx.ma".
17
18 (* COMPATIBILITY OF STRONG NORMALIZATION FOR UNBOUND RT-TRANSITION **********)
19
20 (* Note: this should be an instance of a more general sex *)
21 (* Basic_2A1: uses: lcosx *)
22 inductive jsx (h) (G): relation lenv ≝
23 | jsx_atom: jsx h G (⋆) (⋆)
24 | jsx_bind: ∀I,K1,K2. jsx h G K1 K2 →
25             jsx h G (K1.ⓘ{I}) (K2.ⓘ{I})
26 | jsx_pair: ∀I,K1,K2,V. jsx h G K1 K2 →
27             G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ → jsx h G (K1.ⓑ{I}V) (K2.ⓧ)
28 .
29
30 interpretation
31   "strong normalization for unbound parallel rt-transition (compatibility)"
32   'ToPRedTySNStrong h G L1 L2 = (jsx h G L1 L2).
33
34 (* Basic inversion lemmas ***************************************************)
35
36 fact jsx_inv_atom_sn_aux (h) (G):
37      ∀L1,L2. G ⊢ L1 ⊒[h] L2 → L1 = ⋆ → L2 = ⋆.
38 #h #G #L1 #L2 * -L1 -L2
39 [ //
40 | #I #K1 #K2 #_ #H destruct
41 | #I #K1 #K2 #V #_ #_ #H destruct
42 ]
43 qed-.
44
45 lemma jsx_inv_atom_sn (h) (G): ∀L2. G ⊢ ⋆ ⊒[h] L2 → L2 = ⋆.
46 /2 width=5 by jsx_inv_atom_sn_aux/ qed-.
47
48 fact jsx_inv_bind_sn_aux (h) (G):
49      ∀L1,L2. G ⊢ L1 ⊒[h] L2 →
50      ∀I,K1. L1 = K1.ⓘ{I} →
51      ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓘ{I}
52       | ∃∃J,K2,V. G ⊢ K1 ⊒[h] K2 & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄  & I = BPair J V & L2 = K2.ⓧ.
53 #h #G #L1 #L2 * -L1 -L2
54 [ #J #L1 #H destruct
55 | #I #K1 #K2 #HK12 #J #L1 #H destruct /3 width=3 by ex2_intro, or_introl/
56 | #I #K1 #K2 #V #HK12 #HV #J #L1 #H destruct /3 width=7 by ex4_3_intro, or_intror/
57 ]
58 qed-.
59
60 lemma jsx_inv_bind_sn (h) (G):
61      ∀I,K1,L2. G ⊢ K1.ⓘ{I} ⊒[h] L2 →
62      ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓘ{I}
63       | ∃∃J,K2,V. G ⊢ K1 ⊒[h] K2 & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄  & I = BPair J V & L2 = K2.ⓧ.
64 /2 width=3 by jsx_inv_bind_sn_aux/ qed-.
65
66 (* Advanced inversion lemmas ************************************************)
67
68 (* Basic_2A1: uses: lcosx_inv_pair *)
69 lemma jsx_inv_pair_sn (h) (G):
70       ∀I,K1,L2,V. G ⊢ K1.ⓑ{I}V ⊒[h] L2 →
71       ∨∨ ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓑ{I}V
72        | ∃∃K2. G ⊢ K1 ⊒[h] K2 & G ⊢ ⬈*[h,V] 𝐒⦃K2⦄ & L2 = K2.ⓧ.
73 #h #G #I #K1 #L2 #V #H elim (jsx_inv_bind_sn … H) -H *
74 [ /3 width=3 by ex2_intro, or_introl/
75 | #J #K2 #X #HK12 #HX #H1 #H2 destruct /3 width=4 by ex3_intro, or_intror/
76 ]
77 qed-.
78
79 lemma jsx_inv_void_sn (h) (G):
80       ∀K1,L2. G ⊢ K1.ⓧ ⊒[h] L2 →
81       ∃∃K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓧ.
82 #h #G #K1 #L2 #H elim (jsx_inv_bind_sn … H) -H *
83 /2 width=3 by ex2_intro/
84 qed-.
85
86 (* Advanced forward lemmas **************************************************)
87
88 lemma jsx_fwd_bind_sn (h) (G):
89       ∀I1,K1,L2. G ⊢ K1.ⓘ{I1} ⊒[h] L2 →
90       ∃∃I2,K2. G ⊢ K1 ⊒[h] K2 & L2 = K2.ⓘ{I2}.
91 #h #G #I1 #K1 #L2 #H elim (jsx_inv_bind_sn … H) -H *
92 /2 width=4 by ex2_2_intro/
93 qed-.
94
95 (* Advanced properties ******************************************************)
96
97 (* Basic_2A1: uses: lcosx_O *)
98 lemma jsx_refl (h) (G): reflexive … (jsx h G).
99 #h #G #L elim L -L /2 width=1 by jsx_atom, jsx_bind/
100 qed.
101
102 (* Basic_2A1: removed theorems 2:
103               lcosx_drop_trans_lt lcosx_inv_succ
104 *)