]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/syntax/voids.ma
ca5c4fc58a691c8537e4c7d55a9780147e41743a
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / syntax / voids.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/notation/relations/rvoidstar_4.ma".
16 include "basic_2/syntax/lenv.ma".
17
18 (* EQUIVALENCE FOR LOCAL ENVIRONMENTS UP TO EXCLUSION BINDERS ***************)
19
20 inductive voids: bi_relation nat lenv ≝
21 | voids_atom   : voids 0 (⋆) 0 (⋆)
22 | voids_pair_sn: ∀I1,I2,K1,K2,V1,n. voids n K1 n K2 →
23                  voids 0 (K1.ⓑ{I1}V1) 0 (K2.ⓘ{I2})
24 | voids_pair_dx: ∀I1,I2,K1,K2,V2,n. voids n K1 n K2 →
25                  voids 0 (K1.ⓘ{I1}) 0 (K2.ⓑ{I2}V2)
26 | voids_void_sn: ∀K1,K2,n1,n2. voids n1 K1 n2 K2 →
27                  voids (⫯n1) (K1.ⓧ) n2 K2
28 | voids_void_dx: ∀K1,K2,n1,n2. voids n1 K1 n2 K2 →
29                  voids n1 K1 (⫯n2) (K2.ⓧ)
30 .
31
32 interpretation "equivalence up to exclusion binders (local environment)"
33    'RVoidStar n1 L1 n2 L2 = (voids n1 L1 n2 L2).
34
35 (* Basic properties *********************************************************)
36
37 lemma voids_refl: ∀L. ∃n. ⓧ*[n]L ≋ ⓧ*[n]L.
38 #L elim L -L /2 width=2 by ex_intro, voids_atom/
39 #L #I * #n #IH cases I -I /3 width=2 by ex_intro, voids_pair_dx/
40 * /4 width=2 by ex_intro, voids_void_sn, voids_void_dx/
41 qed-.
42
43 lemma voids_sym: bi_symmetric … voids.
44 #n1 #n2 #L1 #L2 #H elim H -L1 -L2 -n1 -n2
45 /2 width=2 by voids_atom, voids_pair_sn, voids_pair_dx, voids_void_sn, voids_void_dx/
46 qed-.
47
48 (* Advanced Inversion lemmas ************************************************)
49
50 fact voids_inv_void_dx_aux: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ ⓧ*[n2]L2 →
51                             ∀K2,m2. n2 = ⫯m2 → L2 = K2.ⓧ → ⓧ*[n1]L1 ≋ ⓧ*[m2]K2.
52 #L1 #L2 #n1 #n2 #H elim H -L1 -L2 -n1 -n2
53 [ #K2 #m2 #H destruct
54 | #I1 #I2 #L1 #L2 #V #n #_ #_ #K2 #m2 #H destruct
55 | #I1 #I2 #L1 #L2 #V #n #_ #_ #K2 #m2 #H destruct
56 | #L1 #L2 #n1 #n2 #_ #IH #K2 #m2 #H1 #H2 destruct
57   /3 width=1 by voids_void_sn/
58 | #L1 #L2 #n1 #n2 #HL12 #_ #K2 #m2 #H1 #H2 destruct //
59 ]
60 qed-.
61
62 lemma voids_inv_void_dx: ∀L1,L2,n1,n2. ⓧ*[n1]L1 ≋ ⓧ*[⫯n2]L2.ⓧ → ⓧ*[n1]L1 ≋ ⓧ*[n2]L2.
63 /2 width=5 by voids_inv_void_dx_aux/ qed-.