]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/static/lfdeq_lfdeq.ma
- updated equivalence on referred entries: it nust be degree-based
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / static / lfdeq_lfdeq.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/tdeq_tdeq.ma".
16 include "basic_2/static/lfxs_lfxs.ma".
17 include "basic_2/static/lfdeq.ma".
18
19 (* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
20
21 (* Main properties **********************************************************)
22
23 theorem lfdeq_bind: ∀h,o,p,I,L1,L2,V1,V2,T.
24                     L1 ≡[h, o, V1] L2 → L1.ⓑ{I}V1 ≡[h, o, T] L2.ⓑ{I}V2 →
25                     L1 ≡[h, o, ⓑ{p,I}V1.T] L2.
26 /2 width=2 by lfxs_bind/ qed.
27
28 theorem lfdeq_flat: ∀h,o,I,L1,L2,V,T. L1 ≡[h, o, V] L2 → L1 ≡[h, o, T] L2 →
29                     L1 ≡[h, o, ⓕ{I}V.T] L2.
30 /2 width=1 by lfxs_flat/ qed.
31
32 theorem lfdeq_trans: ∀h,o,T. Transitive … (lfdeq h o T).
33 #h #o #T #L1 #L * #f1 #Hf1 #HL1 #L2 * #f2 #Hf2 #HL2
34 lapply (frees_tdeq_conf_lexs … Hf1 T … HL1) // #H0
35 lapply (frees_mono … Hf2 … H0) -Hf2 -H0
36 /4 width=7 by lexs_trans, lexs_eq_repl_back, tdeq_trans, ex2_intro/
37 qed-.
38
39 theorem lfdeq_canc_sn: ∀h,o,T. left_cancellable … (lfdeq h o T).
40 /3 width=3 by lfdeq_trans, lfdeq_sym/ qed-.
41
42 theorem lfdeq_canc_dx: ∀h,o,T. right_cancellable … (lfdeq h o T).
43 /3 width=3 by lfdeq_trans, lfdeq_sym/ qed-.
44
45 (* Advanced properies on negated lazy equivalence *****************************)
46
47 (* Note: auto works with /4 width=8/ so lfdeq_canc_sn is preferred ************) 
48 lemma lfdeq_nlfdeq_trans: ∀h,o.∀T:term.∀L1,L. L1 ≡[h, o, T] L →
49                           ∀L2. (L ≡[h, o, T] L2 → ⊥) → (L1 ≡[h, o, T] L2 → ⊥).
50 /3 width=3 by lfdeq_canc_sn/ qed-.
51
52 lemma nlfdeq_lfdeq_div: ∀h,o.∀T:term.∀L2,L. L2 ≡[h, o, T] L →
53                         ∀L1. (L1 ≡[h, o, T] L → ⊥) → (L1 ≡[h, o, T] L2 → ⊥).
54 /3 width=3 by lfdeq_trans/ qed-.