]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/syntax/voids.ma
8c58fd478cb203bfebee9ad77a523b30994162b6
[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 (*
49
50
51
52
53 lemma voids_zero: ∀L. L = ⓧ*[0]L.
54 // qed.
55
56 lemma voids_succ: ∀L,n. (ⓧ*[n]L).ⓧ = ⓧ*[⫯n]L.
57 // qed.
58
59 (* Advanced properties ******************************************************)
60
61 lemma voids_next: ∀n,L. ⓧ*[n](L.ⓧ) = ⓧ*[⫯n]L.
62 #n elim n -n //
63 qed.
64
65 (* Main inversion properties ************************************************)
66
67 theorem voids_inj: ∀n. injective … (λL. ⓧ*[n]L).
68 #n elim n -n //
69 #n #IH #L1 #L2
70 <voids_succ <voids_succ #H
71 elim (destruct_lbind_lbind_aux … H) -H (**) (* destruct lemma needed *)
72 /2 width=1 by/
73 qed-.
74 *)