]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/frees/frees_bind.etc
extension of a relation to binders
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / frees / frees_bind.etc
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/bind.ma".
16 include "basic_2/static/frees.ma".
17
18 (* CONTEXT-SENSITIVE FREE VARIABLES FOR BINDERS *****************************)
19
20 inductive freesb (L): relation2 β€¦ β‰
21 | freesb_pair: βˆ€I,V,f. L βŠ’ π…*⦃V⦄ β‰‘ f β†’ freesb L (BPair I V) f
22 | freesb_unit: βˆ€I,f. πˆβ¦ƒf⦄ β†’ freesb L (BUnit I) f
23 .
24
25 interpretation
26    "context-sensitive free variables (binder)"
27    'FreeStar L I f = (freesb L I f).
28
29 (* Basic inversion lemmas ***************************************************)
30
31 fact frees_inv_pair_aux: βˆ€L,Z,f. L βŠ’ π…*⦃Z⦄ β‰‘ f β†’
32                          βˆ€I,V. Z = BPair I V β†’ L βŠ’ π…*⦃V⦄ β‰‘ f.
33 #L #Z #f * -Z -f
34 [ #I #V #f #Hf #Z #X #H destruct //
35 | #I #f #_ #Z #X #H destruct
36 ]
37 qed-.
38
39 lemma frees_inv_pair: βˆ€L,I,V,f. L βŠ’ π…*⦃BPair I V⦄ β‰‘ f β†’ L βŠ’ π…*⦃V⦄ β‰‘ f.
40 /2 width=4 by frees_inv_pair_aux/ qed-.
41
42 fact frees_inv_unit_aux: βˆ€L,Z,f. L βŠ’ π…*⦃Z⦄ β‰‘ f β†’
43                          βˆ€I. Z = BUnit I β†’ πˆβ¦ƒf⦄.
44 #L #Z #f * -Z -f
45 [ #I #V #f #_ #Z #H destruct
46 | #I #f #Hf #Z #H destruct //
47 ]
48 qed-.
49
50 lemma frees_inv_unit: βˆ€L,I,f. L βŠ’ π…*⦃BUnit I⦄ β‰‘ f β†’ πˆβ¦ƒf⦄.
51 /2 width=5 by frees_inv_unit_aux/ qed-.