]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/rt_transition/cpm_tdeq.ma
milestone in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / rt_transition / cpm_tdeq.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 "static_2/syntax/tdeq.ma".
16 include "basic_2/rt_transition/cpm_drops.ma".
17
18 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
19
20 (* Inversion lemmas with sort-irrelevant equivalence for terms **************)
21
22 lemma cpm_tdeq_inv_lref_sn (n) (h) (G) (L) (i):
23                            ∀X.  ⦃G,L⦄ ⊢ #i ➡[n,h] X → #i ≛ X →
24                            ∧∧ X = #i & n = 0.
25 #n #h #G #L #i #X #H1 #H2
26 lapply (tdeq_inv_lref1 … H2) -H2 #H destruct
27 elim (cpm_inv_lref1_drops … H1) -H1 // * [| #m ]
28 #K #V1 #V2 #_ #_ #H -V1
29 elim (lifts_inv_lref2_uni_lt … H) -H //
30 qed-.
31
32 lemma cpm_tdeq_inv_atom_sn (n) (h) (I) (G) (L):
33                            ∀X. ⦃G,L⦄ ⊢ ⓪{I} ➡[n,h] X → ⓪{I} ≛ X →
34                            ∨∨ ∧∧ X = ⓪{I} & n = 0
35                             | ∃∃s. X = ⋆(next h s) & I = Sort s & n = 1.
36 #n #h * #s #G #L #X #H1 #H2
37 [ elim (cpm_inv_sort1 … H1) -H1
38   cases n -n [| #n ] #H #Hn destruct -H2
39   [ /3 width=1 by or_introl, conj/
40   | <(le_n_O_to_eq n) [| /2 width=3 by le_S_S_to_le/ ] -n
41     /3 width=3 by ex3_intro, or_intror/
42   ]
43 | elim (cpm_tdeq_inv_lref_sn … H1 H2) -H1 -H2 /3 width=1 by or_introl, conj/
44 | elim (cpm_inv_gref1 … H1) -H1 -H2 /3 width=1 by or_introl, conj/
45 ]
46 qed-.