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 "ground_2/relocation/rtmap_tl.ma".
17 (* RELOCATION MAP ***********************************************************)
19 inductive le (f1): predicate rtmap ≝
20 | le_eq: ∀f2. f1 ≗ f2 → le f1 f2
21 | le_tl: ∀f2,g2. le f1 f2 → ↓g2 = f2 → le f1 g2
24 interpretation "less or equal to (rtmap)" 'leq x y = (le x y).
26 (* Basic properties *********************************************************)
28 lemma le_refl: reflexive … le.
29 /2 width=1 by eq_refl, le_eq/ qed.
31 lemma le_eq_repl_back_dx: ∀f1. eq_repl_back (λf2. f1 ≤ f2).
32 #f #f1 #Hf1 elim Hf1 -f1
33 /4 width=3 by le_tl, le_eq, tl_eq_repl, eq_trans/
36 lemma le_eq_repl_fwd_dx: ∀f1. eq_repl_fwd (λf2. f1 ≤ f2).
37 #f1 @eq_repl_sym /2 width=3 by le_eq_repl_back_dx/
40 lemma le_eq_repl_back_sn: ∀f2. eq_repl_back (λf1. f1 ≤ f2).
41 #f #f1 #Hf1 elim Hf1 -f
42 /4 width=3 by le_tl, le_eq, tl_eq_repl, eq_canc_sn/
45 lemma le_eq_repl_fwd_sn: ∀f2. eq_repl_fwd (λf1. f1 ≤ f2).
46 #f2 @eq_repl_sym /2 width=3 by le_eq_repl_back_sn/
49 lemma le_tl_comp: ∀f1,f2. f1 ≤ f2 → ∀g1,g2. ↓f1 = g1 → ↓f2 = g2 → g1 ≤ g2.
51 /3 width=3 by le_tl, le_eq, tl_eq_repl/
54 (* Main properties **********************************************************)
56 theorem le_trans: Transitive … le.
58 /4 width=5 by le_tl_comp, le_eq_repl_fwd_sn, le_tl/