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/cpm_simple.ma".
16 include "basic_2/rt_transition/cnr.ma".
18 (* NORMAL TERMS FOR CONTEXT-SENSITIVE R-TRANSITION **************************)
20 (* Inversion lemmas with simple terms ***************************************)
22 lemma cnr_inv_appl (h) (G) (L):
23 ∀V,T. ❨G,L❩ ⊢ ➡𝐍[h,0] ⓐV.T →
24 ∧∧ ❨G,L❩ ⊢ ➡𝐍[h,0] V & ❨G,L❩ ⊢ ➡𝐍[h,0] T & 𝐒❨T❩.
25 #h #G #L #V1 #T1 #HVT1 @and3_intro
26 [ #V2 #HV2 lapply (HVT1 (ⓐV2.T1) ?) -HVT1 /2 width=1 by cpr_pair_sn/ -HV2 #H destruct //
27 | #T2 #HT2 lapply (HVT1 (ⓐV1.T2) ?) -HVT1 /2 width=1 by cpr_flat/ -HT2 #H destruct //
28 | generalize in match HVT1; -HVT1 elim T1 -T1 * // #a * #W1 #U1 #_ #_ #H
29 [ elim (lifts_total V1 𝐔❨1❩) #V2 #HV12
30 lapply (H (ⓓ[a]W1.ⓐV2.U1) ?) -H /2 width=3 by cpm_theta/ -HV12 #H destruct
31 | lapply (H (ⓓ[a]ⓝW1.V1.U1) ?) -H /2 width=1 by cpm_beta/ #H destruct
36 (* Properties with simple terms *********************************************)
38 (* Basic_1: was only: nf2_appl_lref *)
39 lemma cnr_appl_simple (h) (G) (L):
40 ∀V,T. ❨G,L❩ ⊢ ➡𝐍[h,0] V → ❨G,L❩ ⊢ ➡𝐍[h,0] T → 𝐒❨T❩ → ❨G,L❩ ⊢ ➡𝐍[h,0] ⓐV.T.
41 #h #G #L #V #T #HV #HT #HS #X #H
42 elim (cpm_inv_appl1_simple … H) -H // #V0 #T0 #HV0 #HT0 #H destruct
43 <(HV … HV0) -V0 <(HT … HT0) -T0 //