]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambda_delta/Basic_2/substitution/gdrop.ma
5cef649377b112aa4b87ba9d01415ef9587ee148
[helm.git] / matita / matita / contribs / lambda_delta / Basic_2 / substitution / gdrop.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/substitution/ldrop.ma".
16
17 (* GLOBAL ENVIRONMENT SLICING ***********************************************)
18
19 inductive gdrop (e:nat) (G1:lenv) : predicate lenv ≝
20 | gdrop_lt: ∀G2. e < |G1| → ⇓[0, |G1| - (e + 1)] G1 ≡ G2 → gdrop e G1 G2
21 | gdrop_ge: |G1| ≤ e → gdrop e G1 (⋆)
22 .
23
24 interpretation "global slicing" 'RGDrop e G1 G2 = (gdrop e G1 G2).
25
26 (* basic inversion lemmas ***************************************************)
27 (*
28 fact gdrop_inv_atom2_aux: ∀G1,G2,e. ⇓[e] G1 ≡ G2 → G2 = ⋆ → |G1| ≤ e.
29 #G1 #G2 #e * -G2 //
30 #G2 #He #HG12 #H destruct
31 lapply (ldrop_fwd_O1_length … HG12) -HG12
32 >minus_le_minus_minus_comm // -He >le_plus_minus_comm // <minus_n_n
33 >(commutative_plus e) normalize #H destruct
34 qed.
35
36 lemma gdrop_inv_atom2: ∀G1,e. ⇓[e] G1 ≡ ⋆ → |G1| ≤ e.
37 /2 width=3/ qed-.
38
39 lemma gdrop_inv_ge: ∀G1,G2,e. ⇓[e] G1 ≡ G2 → |G1| ≤ e → G2 = ⋆.
40 #G1 #G2 #e * // #G2 #H1 #_ #H2
41 lapply (lt_to_le_to_lt … H1 H2) -H1 -H2 #He
42 elim (lt_refl_false … He)
43 qed-.
44 *)