]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/relocation/drops_weight.ma
advances in the theory of drops, lexs, and frees ...
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / relocation / drops_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/cl_restricted_weight.ma".
16 include "basic_2/relocation/lifts_weight.ma".
17 include "basic_2/relocation/drops.ma".
18
19 (* GENERAL SLICING FOR LOCAL ENVIRONMENTS ***********************************)
20
21 (* Forward lemmas on weight for local environments **************************)
22
23 (* Basic_2A1: includes: drop_fwd_lw *)
24 lemma drops_fwd_lw: ∀L1,L2,c,f. ⬇*[c, f] L1 ≡ L2 → ♯{L2} ≤ ♯{L1}.
25 #L1 #L2 #c #f #H elim H -L1 -L2 -f //
26 [ /2 width=3 by transitive_le/
27 | #I #L1 #L2 #V1 #V2 #f #_ #HV21 #IHL12 normalize
28   >(lifts_fwd_tw … HV21) -HV21 /2 width=1 by monotonic_le_plus_l/
29 ]
30 qed-.
31
32 (* Basic_2A1: includes: drop_fwd_lw_lt *)
33 lemma drops_fwd_lw_lt: ∀L1,L2,f. ⬇*[Ⓣ, f] L1 ≡ L2 →
34                        (𝐈⦃f⦄ → ⊥) → ♯{L2} < ♯{L1}.
35 #L1 #L2 #f #H elim H -L1 -L2 -f
36 [ #f #Hf #Hnf elim Hnf -Hnf /2 width=1 by/
37 | /3 width=3 by drops_fwd_lw, le_to_lt_to_lt/
38 | #I #L1 #L2 #V1 #V2 #f #_ #HV21 #IHL12 #H normalize in ⊢ (?%%); -I
39   >(lifts_fwd_tw … HV21) -V2 /5 width=3 by isid_push, monotonic_lt_plus_l/
40 ]
41 qed-.
42
43 (* Forward lemmas on restricted weight for closures *************************)
44
45 (* Basic_2A1: includes: drop_fwd_rfw *)
46 lemma drops_pair2_fwd_rfw: ∀I,L,K,V,c,f. ⬇*[c, f] L ≡ K.ⓑ{I}V → ∀T. ♯{K, V} < ♯{L, T}.
47 #I #L #K #V #c #f #HLK lapply (drops_fwd_lw … HLK) -HLK
48 normalize in ⊢ (%→?→?%%); /3 width=3 by le_to_lt_to_lt/
49 qed-.
50
51 (* Advanced inversion lemma *************************************************)
52
53 lemma drops_inv_x_pair_xy: ∀I,L,V,c,f. ⬇*[c,f] L ≡ L.ⓑ{I}V → ⊥.
54 #I #L #V #c #f #H lapply (drops_fwd_lw … H) -c -f
55 /2 width=4 by lt_le_false/ (**) (* full auto is a bit slow: 19s *)
56 qed-.