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 "static_2/notation/relations/positive_3.ma".
16 include "static_2/syntax/item_sd.ma".
17 include "static_2/syntax/term.ma".
19 (* DEGREE POSITIVITY ON TERMS ***********************************************)
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)
29 "context-free degree positivity (term)"
30 'Positive h o T = (tdpos h o T).
32 (* Basic inversion lemmas ***************************************************)
34 fact tdpos_inv_sort_aux (h) (o):
35 ∀X. 𝐏[h,o]⦃X⦄ → ∀s. X = ⋆s → ∃d. deg h o s (↑d).
37 [ #s #d #Hsd #x #H destruct /2 width=2 by ex_intro/
40 | #I #V #T #_ #_ #x #H destruct
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-.
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⦄.
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/
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-.
61 (* Basic properties *********************************************************)
63 axiom tdpos_total (h): ∀T. ∃o. 𝐏[h,o]⦃T⦄.