]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lsubf_frees.ma
- basic_2 : restricted refinement for free variables (lsubf): first results
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lsubf_frees.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/static/lsubf.ma".
16
17 (* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************)
18
19 (* Properties with context-sensitive free variables *************************)
20
21 lemma lsubf_free_trans: ∀f2,L2,T. L2 ⊢ 𝐅*⦃T⦄ ≡ f2 → ∀f,L1. ⦃L1, f⦄ ⫃𝐅* ⦃L2, f2⦄ →
22                         ∃∃f1. L1 ⊢ 𝐅*⦃T⦄ ≡ f1 & f1 ⊆ f.
23 #f2 #L2 #T #H elim H -f2 -L2 -T
24 [ #f2 #I #Hf2 #f #L1 #H elim (lsubf_inv_atom2 … H) -H
25   #H1 #H2 destruct /3 width=3 by frees_atom, sle_refl, ex2_intro/
26 | #f2 #I #K2 #W #s #_ #IH #f #L1 #H elim (lsubf_inv_push2 … H) -H *
27   [ #g1 #K1 #H12 #H1 #H2
28   | #g #g1 #K1 #V #Hg #Hg1 #H12 #H1 #H2 #H3
29   ] destruct elim (IH … H12) -f2 -K2
30   /3 width=7 by frees_sort, sle_push, ex2_intro/
31 | #f2 #I #K2 #W #_ #IH #f #L1 #H elim (lsubf_inv_next2 … H) -H *
32   [ #g1 #K1 #H12 #H1 #H2 destruct elim (IH … H12) -f2 -K2
33     /3 width=7 by frees_zero, sle_next, ex2_intro/
34   | #g #g1 #K1 #V #Hg #Hg1 #H12 #H1 #H2 #H3 destruct
35     elim (IH … H12) -K2 #f1 #Hf1 #Hfg1
36     elim (sor_isfin_ex … f1 g ??)
37     /5 width=10 by frees_fwd_isfin, frees_flat, frees_zero, monotonic_sle_sor, sor_inv_sle_dx, sor_sle_sn, sle_next, ex2_intro/
38   ]
39 | #f2 #I #K2 #W #i #_ #IH #f #L1 #H elim (lsubf_inv_push2 … H) -H *
40   [ #g1 #K1 #H12 #H1 #H2
41   | #g #g1 #K1 #V #Hg #Hg1 #H12 #H1 #H2 #H3
42   ] destruct elim (IH … H12) -f2 -K2
43   /3 width=7 by frees_lref, sle_push, ex2_intro/
44 | #f2 #I #K2 #W #l #_ #IH #f #L1 #H elim (lsubf_inv_push2 … H) -H *
45   [ #g1 #K1 #H12 #H1 #H2
46   | #g #g1 #K1 #V #Hg #Hg1 #H12 #H1 #H2 #H3
47   ] destruct elim (IH … H12) -f2 -K2
48   /3 width=7 by frees_gref, sle_push, ex2_intro/
49 | #f2V #f2T #f2 #p #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #f #L1 #H12
50 | #f2V #f2T #f2 #I #L2 #V #T #_ #_ #Hf2 #IHV #IHT #f #L1 #H12
51