]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/Basic_2/reducibility/twhnf.ma
- lambda_delta: context-free weak head normal forms continued ...
[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/thom.ma".
16 include "Basic_2/reducibility/tpr.ma".
17
18 (* CONTEXT-FREE WEAK HEAD NORMAL TERMS **************************************)
19
20 definition twhnf: term → Prop ≝
21    NF … tpr thom.
22
23 interpretation
24    "context-free weak head normality (term)"
25    'WHdNormal T = (twhnf T).
26
27 (* Basic inversion lemmas ***************************************************)
28
29 lemma twhnf_inv_thom: ∀T. 𝕎ℍℕ[T] → T ≈ T.
30 normalize /2 depth=1/
31 qed-.
32
33 (* Basic properties *********************************************************)
34
35 lemma tpr_thom: ∀T1,T2. T1 ⇒ T2 → T1 ≈ T1 → T1 ≈ T2.
36 #T1 #T2 #H elim H -T1 T2 //
37 [ #I #V1 #V2 #T1 #T2 #_ #_ #_ #IHT12 #H
38   elim (thom_inv_flat1 … H) -H #W2 #U2 #HT1U2 #HT1 #_ #H1 #H2 destruct -I T1 V1;
39   lapply (IHT12 HT1U2) -IHT12 HT1U2 #HUT2
40   lapply (simple_thom_repl_dx … HUT2 HT1) /2 width=1/
41 | #V1 #V2 #W #T1 #T2 #_ #_ #_ #_ #H
42   elim (thom_inv_flat1 … H) -H #W2 #U2 #_ #H
43   elim (simple_inv_bind … H)
44 | #I #V1 #V2 #T1 #T #T2 #_ #_ #_ #_ #_ #H
45   elim (thom_inv_bind1 … H) -H #W2 #U2 #H destruct -I //
46 | #V2 #V1 #V #W1 #W2 #T1 #T2 #_ #_ #_ #_ #_ #_ #_ #H
47   elim (thom_inv_flat1 … H) -H #U1 #U2 #_ #H
48   elim (simple_inv_bind … H)
49 | #V #T #T1 #T2 #_ #_ #_ #H
50   elim (thom_inv_bind1 … H) -H #W2 #U2 #H destruct
51 | #V #T1 #T2 #_ #_ #H
52   elim (thom_inv_flat1 … H) -H #W2 #U2 #_ #_ #_ #H destruct
53 ]
54 qed.
55
56 lemma twhnf_thom: ∀T. T ≈ T → 𝕎ℍℕ[T].
57 /2/ qed.