]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/Basic_2/reducibility/twhnf.ma
- more properties on strongly normalizing terms ...
[helm.git] / matita / matita / contribs / lambda_delta / Basic_2 / reducibility / twhnf.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 "Basic_2/grammar/tshf.ma".
16 include "Basic_2/reducibility/tpr.ma".
17
18 (* CONTEXT-FREE WEAK HEAD NORMAL TERMS **************************************)
19
20 definition twhnf: predicate term ≝ NF … tpr tshf.
21
22 interpretation
23    "context-free weak head normality (term)"
24    'WHdNormal T = (twhnf T).
25
26 (* Basic inversion lemmas ***************************************************)
27
28 lemma twhnf_inv_tshf: ∀T. 𝐖𝐇𝐍[T] → T ≈ T.
29 normalize /2 width=1/
30 qed-.
31
32 (* Basic properties *********************************************************)
33
34 lemma tpr_tshf: ∀T1,T2. T1 ➡ T2 → T1 ≈ T1 → T1 ≈ T2.
35 #T1 #T2 #H elim H -T1 -T2 //
36 [ #I #V1 #V2 #T1 #T2 #_ #_ #_ #IHT12 #H
37   elim (tshf_inv_flat1 … H) -H #W2 #U2 #HT1U2 #HT1 #_ #H1 #H2 destruct
38   lapply (IHT12 HT1U2) -IHT12 -HT1U2 #HUT2
39   lapply (simple_tshf_repl_dx … HUT2 HT1) /2 width=1/
40 | #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #H
41   elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #H
42   elim (simple_inv_bind … H)
43 | #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #_ #_ #H
44   elim (tshf_inv_bind1 … H) -H #W2 #U2 #H destruct //
45 | #V2 #V1 #V #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
46   elim (tshf_inv_flat1 … H) -H #U1 #U2 #_ #H
47   elim (simple_inv_bind … H)
48 | #V #T #T1 #T2 #_ #_ #_ #H
49   elim (tshf_inv_bind1 … H) -H #W2 #U2 #H destruct
50 | #V #T1 #T2 #_ #_ #H
51   elim (tshf_inv_flat1 … H) -H #W2 #U2 #_ #_ #_ #H destruct
52 ]
53 qed.
54
55 lemma twhnf_tshf: ∀T. T ≈ T → 𝐖𝐇𝐍[T].
56 /2 width=1/ qed.