]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/static_2/relocation/drops_weight.ma
partial commit in static_2
[helm.git] / matita / matita / contribs / lambdadelta / static_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 "static_2/syntax/cl_restricted_weight.ma".
16 include "static_2/relocation/lifts_weight_bind.ma".
17 include "static_2/relocation/drops.ma".
18
19 (* GENERIC SLICING FOR LOCAL ENVIRONMENTS ***********************************)
20
21 (* Forward lemmas with weight for local environments ************************)
22
23 (* Basic_2A1: includes: drop_fwd_lw *)
24 lemma drops_fwd_lw: ∀b,f,L1,L2. ⇩*[b,f] L1 ≘ L2 → ♯❨L2❩ ≤ ♯❨L1❩.
25 #b #f #L1 #L2 #H elim H -f -L1 -L2 //
26 [ /2 width=3 by nle_trans/
27 | #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 normalize
28   >(liftsb_fwd_bw … HI21) -HI21 /2 width=1 by nle_plus_bi_dx/
29 ]
30 qed-.
31
32 (* Basic_2A1: includes: drop_fwd_lw_lt *)
33 lemma drops_fwd_lw_lt: ∀f,L1,L2. ⇩*[Ⓣ,f] L1 ≘ L2 →
34                        (𝐈❪f❫ → ⊥) → ♯❨L2❩ < ♯❨L1❩.
35 #f #L1 #L2 #H elim H -f -L1 -L2
36 [ #f #Hf #Hnf elim Hnf -Hnf /2 width=1 by/
37 | /3 width=3 by drops_fwd_lw, nle_nlt_trans/
38 | #f #I1 #I2 #L1 #L2 #_ #HI21 #IHL12 #H normalize in ⊢ (?%%);
39   >(liftsb_fwd_bw … HI21) -I2 /5 width=3 by pr_isi_push, nlt_plus_bi_dx/
40 ]
41 qed-.
42
43 (* Forward lemmas with restricted weight for closures ***********************)
44
45 (* Basic_2A1: includes: drop_fwd_rfw *)
46 lemma drops_bind2_fwd_rfw: ∀b,f,I,L,K,V. ⇩*[b,f] L ≘ K.ⓑ[I]V → ∀T. ♯❨K,V❩ < ♯❨L,T❩.
47 #b #f #I #L #K #V #HLK lapply (drops_fwd_lw … HLK) -HLK
48 normalize in ⊢ (%→?→?%%); /3 width=3 by nle_nlt_trans, nlt_plus_bi_sn/
49 qed-.
50
51 (* Advanced inversion lemma *************************************************)
52
53 lemma drops_inv_x_bind_xy: ∀b,f,I,L. ⇩*[b,f] L ≘ L.ⓘ[I] → ⊥.
54 #b #f #I #L #H lapply (drops_fwd_lw … H) -b -f
55 /2 width=4 by nlt_ge_false/ (**) (* full auto is a bit slow: 19s *)
56 qed-.