]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/etc/relocation/rtmap_le.etc
ground_2 released and permanently renamed as ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / etc / relocation / rtmap_le.etc
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 "ground_2/relocation/rtmap_tl.ma".
16
17 (* RELOCATION MAP ***********************************************************)
18
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
22 .
23
24 interpretation "less or equal to (rtmap)" 'leq x y = (le x y).
25
26 (* Basic properties *********************************************************)
27
28 lemma le_refl: reflexive … le.
29 /2 width=1 by eq_refl, le_eq/ qed.
30
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/
34 qed-.
35
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/
38 qed-.
39
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/
43 qed-.
44
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/
47 qed-.
48
49 lemma le_tl_comp: ∀f1,f2. f1 ≤ f2 → ∀g1,g2. ↓f1 = g1 → ↓f2 = g2 → g1 ≤ g2.
50 #f1 #f2 #H elim H -f2
51 /3 width=3 by le_tl, le_eq, tl_eq_repl/
52 qed.
53
54 (* Main properties **********************************************************)
55
56 theorem le_trans: Transitive … le.
57 #f1 #f #H elim H -f
58 /4 width=5 by le_tl_comp, le_eq_repl_fwd_sn, le_tl/
59 qed-.