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/reducibility/tpr.ma".
17 (* CONTEXT-FREE NORMAL TERMS ************************************************)
19 definition tnf: predicate term โ NF โฆ tpr (eq โฆ).
22 "context-free normality (term)"
25 (* Basic inversion lemmas ***************************************************)
27 lemma tnf_inv_abst: โV,T. ๐[โV.T] โ ๐[V] โง ๐[T].
29 [ #V2 #HV2 lapply (HVT1 (โV2.T1) ?) -HVT1 /2 width=1/ -HV2 #H destruct //
30 | #T2 #HT2 lapply (HVT1 (โV1.T2) ?) -HVT1 /2 width=1/ -HT2 #H destruct //
34 lemma tnf_inv_appl: โV,T. ๐[โV.T] โ โงโง ๐[V] & ๐[T] & ๐[T].
35 #V1 #T1 #HVT1 @and3_intro
36 [ #V2 #HV2 lapply (HVT1 (โV2.T1) ?) -HVT1 /2 width=1/ -HV2 #H destruct //
37 | #T2 #HT2 lapply (HVT1 (โV1.T2) ?) -HVT1 /2 width=1/ -HT2 #H destruct //
38 | generalize in match HVT1; -HVT1 elim T1 -T1 * // * #W1 #U1 #_ #_ #H
39 [ elim (lift_total V1 0 1) #V2 #HV12
40 lapply (H (โW1.โV2.U1) ?) -H /2 width=3/ -HV12 #H destruct
41 | lapply (H (โV1.U1) ?) -H /2 width=1/ #H destruct
45 lemma tnf_inv_abbr: โV,T. ๐[โV.T] โ False.
46 #V #T #H elim (is_lift_dec T 0 1)
48 lapply (H U ?) -H /2 width=3/ #H destruct
49 elim (lift_inv_pair_xy_y โฆ HTU)
51 elim (tps_full (โ) V T (โ. โV) 0 ?) // #T2 #T1 #HT2 #HT12
52 lapply (H (โV.T2) ?) -H /2 width=3/ -HT2 #H destruct /3 width=2/
56 lemma tnf_inv_cast: โV,T. ๐[โฃV.T] โ False.
57 #V #T #H lapply (H T ?) -H /2 width=1/ #H
58 @(discr_tpair_xy_y โฆ H)