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/substitution/ldrop.ma".
17 (* GLOBAL ENVIRONMENT SLICING ***********************************************)
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 (⋆)
24 interpretation "global slicing" 'RDrop e G1 G2 = (gdrop e G1 G2).
26 (* basic inversion lemmas ***************************************************)
28 fact gdrop_inv_atom2_aux: ∀G1,G2,e. ↓[e] G1 ≡ G2 → G2 = ⋆ → |G1| ≤ e.
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
36 lemma gdrop_inv_atom2: ∀G1,e. ↓[e] G1 ≡ ⋆ → |G1| ≤ e.
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)