]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/frees_append.ma
renaming in basic_2
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / frees_append.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/syntax/append.ma".
16 include "basic_2/static/frees.ma".
17
18 (* CONTEXT-SENSITIVE FREE VARIABLES *****************************************)
19
20 (* Properties with append for local environments ****************************)
21
22 lemma frees_append_void: ∀f,K,T. K ⊢ 𝐅*⦃T⦄ ≘ f → ⓧ.K ⊢ 𝐅*⦃T⦄ ≘ f.
23 #f #K #T #H elim H -f -K -T
24 [ /2 width=1 by frees_sort/
25 | #f * /3 width=1 by frees_atom, frees_unit, frees_lref/
26 | /2 width=1 by frees_pair/
27 | /2 width=1 by frees_unit/
28 | /2 width=1 by frees_lref/
29 | /2 width=1 by frees_gref/
30 | /3 width=5 by frees_bind/
31 | /3 width=5 by frees_flat/
32 ]
33 qed.
34
35 (* Inversion lemmas with append for local environments **********************)
36
37 fact frees_inv_append_void_aux: ∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f →
38                                 ∀K. L = ⓧ.K → K ⊢ 𝐅*⦃T⦄ ≘ f.
39 #f #L #T #H elim H -f -L -T
40 [ /2 width=1 by frees_sort/
41 | #f #i #_ #K #H 
42   elim (append_inv_atom3_sn … H) -H #H1 #H2 destruct
43 | #f #I #L #V #_ #IH #K #H
44   elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct
45   /3 width=1 by frees_pair/
46 | #f #I #L #Hf #K #H
47   elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct
48   /2 width=1 by frees_atom, frees_unit/
49 | #f #I #L #i #Hf #IH #K #H
50   elim (append_inv_bind3_sn … H) -H * [ | #Y ] #H1 #H2 destruct
51   /3 width=1 by frees_lref, frees_lref_push/
52 | /2 width=1 by frees_gref/
53 | /3 width=5 by frees_bind/
54 | /3 width=5 by frees_flat/
55 ]
56 qed-.
57
58 lemma frees_inv_append_void: ∀f,K,T. ⓧ.K  ⊢ 𝐅*⦃T⦄ ≘ f → K ⊢ 𝐅*⦃T⦄ ≘ f.
59 /2 width=3 by frees_inv_append_void_aux/ qed-.