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 "basic_2/rt_transition/cpx_simple.ma".
16 include "basic_2/rt_transition/cnx.ma".
18 (* NORMAL TERMS FOR UNCOUNTED CONTEXT-SENSITIVE PARALLEL RT-TRANSITION ******)
20 (* Inversion lemmas with simple terms ***************************************)
22 lemma cnx_inv_appl: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓐV.T⦄ →
23 ∧∧ ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃V⦄ & ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ & 𝐒⦃T⦄.
24 #h #o #G #L #V1 #T1 #HVT1 @and3_intro
25 [ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpx_pair_sn/ -HV2
26 #H elim (tdeq_inv_pair … H) -H //
27 | #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpx_flat/ -HT2
28 #H elim (tdeq_inv_pair … H) -H //
29 | generalize in match HVT1; -HVT1 elim T1 -T1 * //
31 [ elim (lifts_total V1 (𝐔❴1❵)) #V2 #HV12
32 lapply (H (ⓓ{p}W1.ⓐV2.U1) ?) -H /2 width=3 by cpx_theta/ -HV12
33 #H elim (tdeq_inv_pair … H) -H #H destruct
34 | lapply (H (ⓓ{p}ⓝW1.V1.U1) ?) -H /2 width=1 by cpx_beta/
35 #H elim (tdeq_inv_pair … H) -H #H destruct
40 (* Properties with simple terms *********************************************)
42 lemma cnx_appl_simple: ∀h,o,G,L,V,T. ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃V⦄ → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃T⦄ → 𝐒⦃T⦄ →
43 ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃ⓐV.T⦄.
44 #h #o #G #L #V #T #HV #HT #HS #X #H elim (cpx_inv_appl1_simple … H) -H //
45 #V0 #T0 #HV0 #HT0 #H destruct
46 @tdeq_pair [ @HV | @HT ] // (**) (* auto fails because δ-expansion gets in the way *)