]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/syntax/term_weight.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / static_2 / syntax / term_weight.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 "ground/arith/pnat_lt_plus.ma".
16 include "static_2/notation/functions/weight_1.ma".
17 include "static_2/syntax/term.ma".
18
19 (* WEIGHT OF A TERM *********************************************************)
20
21 rec definition tw T ≝ match T with
22 [ TAtom _     ⇒ 𝟏
23 | TPair _ V T ⇒ ↑(tw V + tw T)
24 ].
25
26 interpretation "weight (term)" 'Weight T = (tw T).
27
28 (* Basic properties *********************************************************)
29
30 lemma tw_atom_unfold (I): 𝟏 = ♯❨⓪[I]❩.
31 // qed.
32
33 lemma tw_pair_unfold (I) (V) (T): ↑(♯❨V❩ + ♯❨T❩) = ♯❨②[I]V.T❩.
34 // qed.
35
36 lemma tw_le_pair_dx (I): ∀V,T. ♯❨T❩ < ♯❨②[I]V.T❩.
37 /2 width=1 by plt_succ_dx_trans/
38 qed.
39
40 (* Basic_1: removed theorems 12:
41             tweight_lt
42             wadd_le wadd_lt wadd_O weight_le weight_eq weight_add_O
43             weight_add_S tlt_trans tlt_head_sx tlt_head_dx tlt_wf_ind
44 *)
45 (* Basic_1: removed local theorems 1: q_ind *)