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/syntax/lenv_length.ma".
16 include "basic_2/syntax/voids.ma".
18 (* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
20 (* Forward lemmas with length for local environments ************************)
22 lemma voids_fwd_length: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ ⓧ*[n2]L2 →
23 |L1| + n2 = |L2| + n1.
24 #L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2 normalize //
25 #I1 #I2 #K1 #K2 #V #n #_ #IH
27 (* Main forward properties with length for local environments ***************)
29 theorem voids_inj_length: ∀n1,n2,L1,L2. ⓧ*[n1]L1 = ⓧ*[n2]L2 →
30 |L1| = |L2| → n1 = n2 ∧ L1 = L2.
32 [ * /2 width=1 by conj/ #n2 #L1 #L2 | #n1 #IH * [ | #n2 ] #L1 #L2 ]
33 [ <voids_zero #H destruct
34 <length_void <commutative_plus #H
35 elim (plus_xSy_x_false … H)
36 | <voids_zero #H destruct
37 <length_void <commutative_plus #H
38 elim (plus_xSy_x_false … (sym_eq … H))
39 | <voids_succ <voids_succ #H #HL12
40 elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
41 #H #_ elim (IH … H HL12) -IH -H -HL12 /2 width=1 by conj/