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