]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_eq.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / gr_sor_eq.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 "ground/relocation/gr_tl_eq.ma".
16 include "ground/relocation/gr_sor.ma".
17
18 (* RELATIONAL UNION FOR GENERIC RELOCATION MAPS *****************************)
19
20 (* Constructions with gr_eq *************************************************)
21
22 (*** sor_eq_repl_back1 *)
23 corec lemma gr_sor_eq_repl_back_sn:
24             ∀f2,f. gr_eq_repl_back … (λf1. f1 ⋓ f2 ≘ f).
25 #f2 #f #f1 * -f1 -f2 -f
26 #f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x #Hx
27 try cases (gr_eq_inv_push_sn … Hx … H1) try cases (gr_eq_inv_next_sn … Hx … H1) -g1
28 /3 width=7 by gr_sor_push_bi, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi/
29 qed-.
30
31 (*** sor_eq_repl_fwd1 *)
32 lemma gr_sor_eq_repl_fwd_sn:
33       ∀f2,f. gr_eq_repl_fwd … (λf1. f1 ⋓ f2 ≘ f).
34 #f2 #f @gr_eq_repl_sym /2 width=3 by gr_sor_eq_repl_back_sn/
35 qed-.
36
37 (*** sor_eq_repl_back2 *)
38 corec lemma gr_sor_eq_repl_back_dx:
39             ∀f1,f. gr_eq_repl_back … (λf2. f1 ⋓ f2 ≘ f).
40 #f1 #f #f2 * -f1 -f2 -f
41 #f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
42 try cases (gr_eq_inv_push_sn … Hx … H2) try cases (gr_eq_inv_next_sn … Hx … H2) -g2
43 /3 width=7 by gr_sor_push_bi, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi/
44 qed-.
45
46 (*** sor_eq_repl_fwd2 *)
47 lemma gr_sor_eq_repl_fwd_dx:
48       ∀f1,f. gr_eq_repl_fwd … (λf2. f1 ⋓ f2 ≘ f).
49 #f1 #f @gr_eq_repl_sym /2 width=3 by gr_sor_eq_repl_back_dx/
50 qed-.
51
52 (*** sor_eq_repl_back3 *)
53 corec lemma gr_sor_eq_repl_back:
54             ∀f1,f2. gr_eq_repl_back … (λf. f1 ⋓ f2 ≘ f).
55 #f1 #f2 #f * -f1 -f2 -f
56 #f1 #f2 #f #g1 #g2 #g #Hf #H #H2 #H0 #x #Hx
57 try cases (gr_eq_inv_push_sn … Hx … H0) try cases (gr_eq_inv_next_sn … Hx … H0) -g
58 /3 width=7 by gr_sor_push_bi, gr_sor_next_push, gr_sor_push_next, gr_sor_next_bi/
59 qed-.
60
61 (*** sor_eq_repl_fwd3 *)
62 lemma gr_sor_eq_repl_fwd:
63       ∀f1,f2. gr_eq_repl_fwd … (λf. f1 ⋓ f2 ≘ f).
64 #f1 #f2 @gr_eq_repl_sym /2 width=3 by gr_sor_eq_repl_back/
65 qed-.