]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/syntax/voids_length.ma
\lambda\delta web site update for git
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / syntax / voids_length.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/syntax/lenv_length.ma".
16 include "basic_2/syntax/voids.ma".
17
18 (* EXTENSION OF A LOCAL ENVIRONMENT WITH EXCLUSION BINDERS ******************)
19
20 (* Properties with length for local environments ****************************)
21
22 lemma length_void: ∀L,n. n+|L| = |ⓧ*[n]L|.
23 #L #n elim n -n //
24 #n #IH <voids_succ >length_bind <IH -IH //
25 qed.
26
27 lemma length_void_le: ∀L,n. |L| ≤ |ⓧ*[n]L|.
28 // qed.
29
30 (* Main forward properties with length for local environments ***************)
31
32 theorem voids_inj_length: ∀n1,n2,L1,L2. ⓧ*[n1]L1 = ⓧ*[n2]L2 →
33                           |L1| = |L2| → n1 = n2 ∧ L1 = L2.
34 #n1 elim n1 -n1
35 [ * /2 width=1 by conj/ #n2 #L1 #L2 | #n1 #IH * [ | #n2 ] #L1 #L2 ]
36 [ <voids_zero #H destruct
37   <length_void <commutative_plus #H
38   elim (plus_xSy_x_false … H)
39 | <voids_zero #H destruct
40   <length_void <commutative_plus #H
41   elim (plus_xSy_x_false … (sym_eq … H))
42 | <voids_succ <voids_succ #H #HL12
43   elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
44   #H #_ elim (IH … H HL12) -IH -H -HL12 /2 width=1 by conj/
45 ]
46 qed-.