]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lfeq_lfeq.ma
basic_2: stronger supclosure allows better inversion lemmas
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lfeq_lfeq.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/relocation/lreq_lreq.ma".
16 include "basic_2/static/frees_frees.ma".
17 include "basic_2/static/lfxs_lfxs.ma".
18 include "basic_2/static/lfeq_lreq.ma".
19
20 (* EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES *******************)
21
22 (* Main properties **********************************************************)
23
24 theorem lfeq_bind: ∀p,I,L1,L2,V1,V2,T.
25                    L1 ≡[V1] L2 → L1.ⓑ{I}V1 ≡[T] L2.ⓑ{I}V2 →
26                    L1 ≡[ⓑ{p,I}V1.T] L2.
27 /2 width=2 by lfxs_bind/ qed.
28
29 theorem lfeq_flat: ∀I,L1,L2,V,T. L1 ≡[V] L2 → L1 ≡[T] L2 →
30                    L1 ≡[ⓕ{I}V.T] L2.
31 /2 width=1 by lfxs_flat/ qed.
32
33 (* Note: /2 width=3 by lfeq_lfxs_trans/ *)
34 theorem lfeq_trans: ∀T. Transitive … (lfeq T).
35 #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
36 lapply (frees_lreq_conf … Hf1 … HL1) #H0
37 lapply (frees_mono … Hf2 … H0) -Hf2 -H0
38 /4 width=7 by lreq_trans, lexs_eq_repl_back, ex2_intro/
39 qed-.
40
41 theorem lfeq_canc_sn: ∀T. left_cancellable … (lfeq T).
42 /3 width=3 by lfeq_trans, lfeq_sym/ qed-.
43
44 theorem lfeq_canc_dx: ∀T. right_cancellable … (lfeq T).
45 /3 width=3 by lfeq_trans, lfeq_sym/ qed-.
46
47 (* Advanced properies on negated lazy equivalence *****************************)
48
49 (* Note: for use in auto, works with /4 width=8/ so lfeq_canc_sn is preferred *) 
50 lemma lfeq_nlfeq_trans: ∀T,L1,L. L1 ≡[T] L →
51                         ∀L2. (L ≡[T] L2 → ⊥) → (L1 ≡[T] L2 → ⊥).
52 /3 width=3 by lfeq_canc_sn/ qed-.
53
54 lemma nlfeq_lfeq_div: ∀T,L2,L. L2 ≡[T] L →
55                       ∀L1. (L1 ≡[T] L → ⊥) → (L1 ≡[T] L2 → ⊥).
56 /3 width=3 by lfeq_trans/ qed-.