]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/frees_frees.ma
- advances on drops
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / frees_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/frees.ma".
16
17 (* CONTEXT-SENSITIVE FREE VARIABLES *****************************************)
18
19 (* Main inversion lemmas ****************************************************)
20
21 theorem frees_mono: ∀L,T,f1. L ⊢ 𝐅*⦃T⦄ ≡ f1 → ∀f2. L ⊢ 𝐅*⦃T⦄ ≡ f2 → f1 ≗ f2.
22 #L #T #f1 #H elim H -L -T -f1
23 [ /3 width=2 by frees_inv_atom, isid_inv_eq_repl/
24 | /4 width=5 by frees_inv_sort, eq_push_inv_isid, isid_inv_eq_repl, eq_trans/
25 | #I #L #V #f1 #_ #IH #x #H elim (frees_inv_zero … H) -H *
26   [ #H destruct
27   | #Z #Y #X #f2 #Hf2 #H1 #H2 destruct /3 width=5 by eq_next/
28   ]
29 | #I #L #V #i #f1 #_ #IH #x #H elim (frees_inv_lref … H) -H *
30   [ #H destruct
31   | #Z #Y #X #f2 #Hf2 #H1 #H2 destruct /3 width=5 by eq_push/
32   ]
33 | /4 width=5 by frees_inv_gref, eq_push_inv_isid, isid_inv_eq_repl, eq_trans/
34 | #I #L #V #T #p #f1 #f2 #f #_ #_ #Hf #IHV #IHT #g #H elim (frees_inv_bind … H) -H
35   #g1 #g2 #HV #HT #Hg @(sor_mono … Hf) -Hf
36   /5 width=3 by sor_eq_repl_fwd2, sor_eq_repl_fwd1, tl_eq_repl/ (**) (* full auto too slow *)
37 | #I #L #V #T #f1 #f2 #f #_ #_ #Hf #IHV #IHT #g #H elim (frees_inv_flat … H) -H
38   #g1 #g2 #HV #HT #Hg @(sor_mono … Hf) -Hf
39   /4 width=3 by sor_eq_repl_fwd2, sor_eq_repl_fwd1/ (**) (* full auto too slow *)
40 ]
41 qed-.