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.ma".
17 (* DEGREE-BASED EQUIVALENCE ON TERMS ****************************************)
19 (* Main properties **********************************************************)
21 theorem tdeq_trans: ∀h,o. Transitive … (tdeq h o).
22 #h #o #T1 #T #H elim H -T1 -T
23 [ #s1 #s #d #Hs1 #Hs #X #H
24 elim (tdeq_inv_sort1_deg … H … Hs) -s /2 width=3 by tdeq_sort/
25 | #i1 #i #H <(tdeq_inv_lref1 … H) -H //
26 | #l1 #l #H <(tdeq_inv_gref1 … H) -H //
27 | #I #V1 #V #T1 #T #_ #_ #IHV #IHT #X #H
28 elim (tdeq_inv_pair1 … H) -H /3 width=1 by tdeq_pair/
32 theorem tdeq_canc_sn: ∀h,o. left_cancellable … (tdeq h o).
33 /3 width=3 by tdeq_trans, tdeq_sym/ qed-.
35 theorem tdeq_canc_dx: ∀h,o. right_cancellable … (tdeq h o).
36 /3 width=3 by tdeq_trans, tdeq_sym/ qed-.
38 theorem tdeq_repl: ∀h,o,T1,T2. T1 ≛[h, o] T2 →
39 ∀U1. T1 ≛[h, o] U1 → ∀U2. T2 ≛[h, o] U2 → U1 ≛[h, o] U2.
40 /3 width=3 by tdeq_canc_sn, tdeq_trans/ qed-.
42 (* Negated main properies ***************************************************)
44 theorem tdeq_tdneq_trans: ∀h,o,T1,T. T1 ≛[h, o] T → ∀T2. (T ≛[h, o] T2 → ⊥) →
46 /3 width=3 by tdeq_canc_sn/ qed-.
48 theorem tdneq_tdeq_canc_dx: ∀h,o,T1,T. (T1 ≛[h, o] T → ⊥) → ∀T2. T2 ≛[h, o] T →
50 /3 width=3 by tdeq_trans/ qed-.