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/syntax/tdeq_tdeq.ma".
16 include "basic_2/static/lfxs_lfxs.ma".
17 include "basic_2/static/lfdeq.ma".
19 (* DEGREE-BASED EQUIVALENCE FOR LOCAL ENVIRONMENTS ON REFERRED ENTRIES ******)
21 (* Main properties **********************************************************)
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.
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.
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/
39 theorem lfdeq_canc_sn: ∀h,o,T. left_cancellable … (lfdeq h o T).
40 /3 width=3 by lfdeq_trans, lfdeq_sym/ qed-.
42 theorem lfdeq_canc_dx: ∀h,o,T. right_cancellable … (lfdeq h o T).
43 /3 width=3 by lfdeq_trans, lfdeq_sym/ qed-.
45 theorem lfdeq_repl: ∀h,o,L1,L2. ∀T:term. L1 ≡[h, o, T] L2 →
46 ∀K1. L1 ≡[h, o, T] K1 → ∀K2. L2 ≡[h, o, T] K2 → K1 ≡[h, o, T] K2.
47 /3 width=3 by lfdeq_canc_sn, lfdeq_trans/ qed-.
49 (* Advanced properies on negated lazy equivalence *****************************)
51 (* Note: auto works with /4 width=8/ so lfdeq_canc_sn is preferred ************)
52 lemma lfdeq_nlfdeq_trans: ∀h,o.∀T:term.∀L1,L. L1 ≡[h, o, T] L →
53 ∀L2. (L ≡[h, o, T] L2 → ⊥) → (L1 ≡[h, o, T] L2 → ⊥).
54 /3 width=3 by lfdeq_canc_sn/ qed-.
56 lemma nlfdeq_lfdeq_div: ∀h,o.∀T:term.∀L2,L. L2 ≡[h, o, T] L →
57 ∀L1. (L1 ≡[h, o, T] L → ⊥) → (L1 ≡[h, o, T] L2 → ⊥).
58 /3 width=3 by lfdeq_trans/ qed-.