]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda-delta/Basic-2/grammar/cl_weight.ma
- the shift function is now defined and cpr_shift_fwd is proved
[helm.git] / matita / matita / contribs / lambda-delta / Basic-2 / grammar / cl_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 "Basic-2/grammar/lenv_weight.ma".
16
17 (* WEIGHT OF A CLOSURE ******************************************************)
18
19 definition cw: lenv → term → ? ≝ λL,T. #[L] + #[T].
20
21 interpretation "weight (closure)" 'Weight L T = (cw L T).
22
23 (* Basic properties *********************************************************)
24
25 lemma cw_shift: ∀K,I,V,T. #[K. 𝕓{I} V, T] < #[K, 𝕓{I} V. T].
26 normalize //
27 qed.
28
29 axiom cw_wf_ind: ∀R:lenv→term→Prop.
30                  (∀L2,T2. (∀L1,T1. #[L1,T1] < #[L2,T2] → R L1 T1) → R L2 T2) →
31                  ∀L,T. R L T.