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 "static_2/syntax/lveq_length.ma".
17 (* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
19 (* Main inversion lemmas ****************************************************)
21 theorem lveq_inv_bind: โK1,K2. K1 โโง*[๐,๐] K2 โ
22 โI1,I2,m1,m2. K1.โ[I1] โโง*[m1,m2] K2.โ[I2] โ
23 โงโง ๐ = m1 & ๐ = m2.
24 #K1 #K2 #HK #I1 #I2 #m1 #m2 #H
25 lapply (lveq_fwd_length_eq โฆ HK) -HK #HK
26 elim (lveq_inj_length โฆ H) -H /3 width=1 by conj/
29 theorem lveq_inj: โL1,L2,n1,n2. L1 โโง*[n1,n2] L2 โ
30 โm1,m2. L1 โโง*[m1,m2] L2 โ
31 โงโง n1 = m1 & n2 = m2.
32 #L1 #L2 #n1 #n2 #Hn #m1 #m2 #Hm
33 elim (lveq_fwd_length โฆ Hn) -Hn #H1 #H2 destruct
34 elim (lveq_fwd_length โฆ Hm) -Hm #H1 #H2 destruct
38 theorem lveq_inj_void_sn_ge: โK1,K2. |K2| โค |K1| โ
39 โn1,n2. K1 โโง*[n1,n2] K2 โ
40 โm1,m2. K1.โง โโง*[m1,m2] K2 โ
41 โงโง โn1 = m1 & ๐ = m2 & ๐ = n2.
42 #L1 #L2 #HL #n1 #n2 #Hn #m1 #m2 #Hm
43 elim (lveq_fwd_length โฆ Hn) -Hn #H1 #H2 destruct
44 elim (lveq_fwd_length โฆ Hm) -Hm #H1 #H2 destruct
45 >length_bind <nminus_succ_dx
46 <(nminus_succ_sn โฆ HL) <(nle_inv_eq_zero_minus โฆ HL)
47 /2 width=1 by and3_intro/
50 theorem lveq_inj_void_dx_le: โK1,K2. |K1| โค |K2| โ
51 โn1,n2. K1 โโง*[n1,n2] K2 โ
52 โm1,m2. K1 โโง*[m1,m2] K2.โง โ
53 โงโง โn2 = m2 & ๐ = m1 & ๐ = n1.
54 /3 width=5 by lveq_inj_void_sn_ge, lveq_sym/ qed-. (* auto: 2x lveq_sym *)