1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "basic_2/static/frees.ma".
17 (* CONTEXT-SENSITIVE FREE VARIABLES *****************************************)
19 (* Main inversion lemmas ****************************************************)
21 theorem frees_mono: ∀f1,L,T. L ⊢ 𝐅*⦃T⦄ ≡ f1 → ∀f2. L ⊢ 𝐅*⦃T⦄ ≡ f2 → f1 ≗ f2.
22 #f1 #L #T #H elim H -f1 -L -T
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 | #f1 #I #L #V #_ #IH #x #H elim (frees_inv_zero … H) -H *
27 | #f2 #Z #Y #X #Hf2 #H1 #H2 destruct /3 width=5 by eq_next/
29 | #f1 #I #L #V #i #_ #IH #x #H elim (frees_inv_lref … H) -H *
31 | #f2 #Z #Y #X #Hf2 #H1 #H2 destruct /3 width=5 by eq_push/
33 | /4 width=5 by frees_inv_gref, eq_push_inv_isid, isid_inv_eq_repl, eq_trans/
34 | #f1 #f2 #f #p #I #L #V #T #_ #_ #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 | #f1 #f2 #f #I #L #V #T #_ #_ #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 *)