1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "static_2/syntax/teqx.ma".
16 include "basic_2/rt_transition/cpm_drops.ma".
18 (* T-BOUND CONTEXT-SENSITIVE PARALLEL RT-TRANSITION FOR TERMS ***************)
20 (* Inversion lemmas with sort-irrelevant equivalence for terms **************)
22 lemma cpm_teqx_inv_lref_sn (h) (n) (G) (L) (i):
23 ∀X. ❪G,L❫ ⊢ #i ➡[h,n] X → #i ≛ X →
25 #h #n #G #L #i #X #H1 #H2
26 lapply (teqx_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 //
32 lemma cpm_teqx_inv_atom_sn (h) (n) (I) (G) (L):
33 ∀X. ❪G,L❫ ⊢ ⓪[I] ➡[h,n] X → ⓪[I] ≛ X →
34 ∨∨ ∧∧ X = ⓪[I] & n = 0
35 | ∃∃s. X = ⋆(⫯[h]s) & I = Sort s & n = 1.
36 #h #n * #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/
43 | elim (cpm_teqx_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/