]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/tdpos.ma
update in static_2 and basic_2
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / tdpos.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 "static_2/notation/relations/positive_3.ma".
16 include "static_2/syntax/item_sd.ma".
17 include "static_2/syntax/term.ma".
18
19 (* DEGREE POSITIVITY ON TERMS ***********************************************)
20
21 inductive tdpos (h) (o): predicate term ≝
22 | tdpos_sort: ∀s,d. deg h o s (↑d) → tdpos h o (⋆s)
23 | tdpos_lref: ∀i. tdpos h o (#i)
24 | tdpos_gref: ∀l. tdpos h o (§l)
25 | tdpos_pair: ∀I,V,T. tdpos h o V → tdpos h o T → tdpos h o (②{I}V.T)
26 .
27
28 interpretation
29    "context-free degree positivity (term)"
30    'Positive h o T = (tdpos h o T).
31
32 (* Basic inversion lemmas ***************************************************)
33
34 fact tdpos_inv_sort_aux (h) (o): 
35                         ∀X. 𝐏[h,o]⦃X⦄ → ∀s. X = ⋆s → ∃d. deg h o s (↑d).
36 #h #o #H *
37 [ #s #d #Hsd #x #H destruct /2 width=2 by ex_intro/
38 | #i #x #H destruct
39 | #l #x #H destruct
40 | #I #V #T #_ #_ #x #H destruct
41 ]
42 qed-.
43
44 lemma tdpos_inv_sort (h) (o): ∀s. 𝐏[h,o]⦃⋆s⦄ → ∃d. deg h o s (↑d).
45 /2 width=3 by tdpos_inv_sort_aux/ qed-.
46
47 fact tdpos_inv_pair_aux (h) (o): ∀X. 𝐏[h,o]⦃X⦄ → ∀I,V,T. X = ②{I}V.T →
48                                  ∧∧ 𝐏[h,o]⦃V⦄ & 𝐏[h,o]⦃T⦄.
49 #h #o #H *
50 [ #s #d #_ #Z #X1 #X2 #H destruct
51 | #i #Z #X1 #X2 #H destruct
52 | #l #Z #X1 #X2 #H destruct
53 | #I #V #T #HV #HT #Z #X1 #X2 #H destruct /2 width=1 by conj/
54 ]
55 qed-.
56
57 lemma tdpos_inv_pair (h) (o): ∀I,V,T. 𝐏[h,o]⦃②{I}V.T⦄ →
58                               ∧∧ 𝐏[h,o]⦃V⦄ & 𝐏[h,o]⦃T⦄.
59 /2 width=4 by tdpos_inv_pair_aux/ qed-.
60
61 (* Basic properties *********************************************************)
62
63 axiom tdpos_total (h): ∀T. ∃o. 𝐏[h,o]⦃T⦄.