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 "basic_2A/notation/functions/weight_3.ma".
16 include "basic_2A/grammar/lenv_weight.ma".
17 include "basic_2A/grammar/genv.ma".
19 (* WEIGHT OF A CLOSURE ******************************************************)
22 definition fw: genv → lenv → term → ? ≝ λG,L,T. ♯{L} + ♯{T}.
24 interpretation "weight (closure)" 'Weight G L T = (fw G L T).
26 (* Basic properties *********************************************************)
28 lemma fw_shift: ∀a,I,G,K,V,T. ♯{G, K.ⓑ{I}V, T} < ♯{G, K, ⓑ{a,I}V.T}.
32 lemma fw_tpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L, ②{I}V.T}.
33 normalize in ⊢ (?→?→?→?→?→?%%); //
36 lemma fw_tpair_dx: ∀I,G,L,V,T. ♯{G, L, T} < ♯{G, L, ②{I}V.T}.
37 normalize in ⊢ (?→?→?→?→?→?%%); //
40 lemma fw_lpair_sn: ∀I,G,L,V,T. ♯{G, L, V} < ♯{G, L.ⓑ{I}V, T}.
41 normalize /3 width=1 by monotonic_lt_plus_l, monotonic_le_plus_r/