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_2/grammar/lenv_weight.ma".
16 include "basic_2/grammar/cl_shift.ma".
18 (* WEIGHT OF A CLOSURE ******************************************************)
20 definition cw: lenv → term → ? ≝ λL,T. #[L] + #[T].
22 interpretation "weight (closure)" 'Weight L T = (cw L T).
24 (* Basic properties *********************************************************)
26 (* Basic_1: was: flt_wf__q_ind *)
28 (* Basic_1: was: flt_wf_ind *)
29 axiom cw_wf_ind: ∀R:lenv→predicate term.
30 (∀L2,T2. (∀L1,T1. #[L1,T1] < #[L2,T2] → R L1 T1) → R L2 T2) →
33 (* Basic_1: was: flt_shift *)
34 lemma cw_shift: ∀K,I,V,T. #[K. ⓑ{I} V, T] < #[K, ②{I} V. T].
38 lemma tw_shift: ∀L,T. #[L, T] ≤ #[L @@ T].
41 @transitive_le [3: @IHL |2: /2 width=2/ | skip ]
44 lemma cw_tpair_sn: ∀I,L,V,T. #[L, V] < #[L, ②{I}V.T].
45 #I #L #V #T normalize in ⊢ (? % %); //
48 lemma cw_tpair_dx: ∀I,L,V,T. #[L, T] < #[L, ②{I}V.T].
49 #I #L #V #T normalize in ⊢ (? % %); //
52 lemma cw_tpair_dx_sn: ∀I1,I2,L,V1,V2,T. #[L, V2] < #[L, ②{I1}V1.②{I2}V2.T].
53 #I1 #I2 #L #V1 #V2 #T normalize in ⊢ (? % %); /2 width=1/
56 lemma cw_tpair_dx_sn_shift: ∀I1,I2,L,V1,V2,T. #[L.ⓑ{I2}V2, T] < #[L, ②{I1}V1.②{I2}V2.T].
57 #I1 #I2 #L #V1 #V2 #T normalize in ⊢ (? % %); /2 width=1/
60 (* Basic_1: removed theorems 6:
61 flt_thead_sx flt_thead_dx flt_arith0 flt_arith1 flt_arith2 flt_trans