]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/relocation/gr_sor_fcla.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / ground / relocation / gr_sor_fcla.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/xoa/ex_3_1.ma".
16 include "ground/xoa/ex_4_2.ma".
17 include "ground/arith/nat_plus.ma".
18 include "ground/arith/nat_le_max.ma".
19 include "ground/relocation/gr_fcla_eq.ma".
20 include "ground/relocation/gr_sor_isi.ma".
21
22 (* RELATIONAL UNION FOR GENERIC RELOCATION MAPS *****************************)
23
24 (* Constructions with gr_fcla ***********************************************)
25
26 (*** sor_fcla_ex *)
27 lemma gr_sor_fcla_bi:
28       âˆ€f1,n1. đ‚❪f1❫ â‰˜ n1 â†’ âˆ€f2,n2. đ‚❪f2❫ â‰˜ n2 â†’
29       âˆƒâˆƒf,n. f1 â‹“ f2 â‰˜ f & đ‚❪f❫ â‰˜ n & (n1 âˆ¨ n2) â‰¤ n & n â‰¤ n1 + n2.
30 #f1 #n1 #Hf1 elim Hf1 -f1 -n1 /3 width=6 by gr_sor_isi_sn, ex4_2_intro/
31 #f1 #n1 #Hf1 #IH #f2 #n2 * -f2 -n2 /3 width=6 by gr_fcla_push, gr_fcla_next, ex4_2_intro, gr_sor_isi_dx/
32 #f2 #n2 #Hf2 elim (IH â€Ś Hf2) -IH -Hf2 -Hf1 [2,4: #f #n <nplus_succ_dx ] (* * full auto fails *)
33 [ /3 width=7 by gr_fcla_next, gr_sor_push_next, nle_max_sn_succ_dx, nle_succ_bi, ex4_2_intro/
34 | /4 width=7 by gr_fcla_next, gr_sor_next_bi, nle_succ_dx, nle_succ_bi, ex4_2_intro/
35 | /3 width=7 by gr_fcla_push, gr_sor_push_bi, ex4_2_intro/
36 | /3 width=7 by gr_fcla_next, gr_sor_next_push, nle_max_sn_succ_sn, nle_succ_bi, ex4_2_intro/
37 ]
38 qed-.
39
40 (* Destructions with gr_fcla ************************************************)
41
42 (*** sor_fcla *)
43 lemma gr_sor_inv_fcla_bi:
44       âˆ€f1,n1. đ‚❪f1❫ â‰˜ n1 â†’ âˆ€f2,n2. đ‚❪f2❫ â‰˜ n2 â†’ âˆ€f. f1 â‹“ f2 â‰˜ f â†’
45       âˆƒâˆƒn. đ‚❪f❫ â‰˜ n & (n1 âˆ¨ n2) â‰¤ n & n â‰¤ n1 + n2.
46 #f1 #n1 #Hf1 #f2 #n2 #Hf2 #f #Hf elim (gr_sor_fcla_bi â€Ś Hf1 â€Ś Hf2) -Hf1 -Hf2
47 /4 width=6 by gr_sor_mono, gr_fcla_eq_repl_back, ex3_intro/
48 qed-.
49
50 (* Destructions with gr_fcla ************************************************)
51
52 (*** sor_fwd_fcla_sn_ex *)
53 lemma gr_sor_des_fcla_sn:
54       âˆ€f,n. đ‚❪f❫ â‰˜ n â†’ âˆ€f1,f2. f1 â‹“ f2 â‰˜ f â†’
55       âˆƒâˆƒn1. đ‚❪f1❫ â‰˜ n1 & n1 â‰¤ n.
56 #f #n #H elim H -f -n
57 [ /4 width=4 by gr_sor_des_isi_sn, gr_fcla_isi, ex2_intro/
58 | #f #n #_ #IH #f1 #f2 #H
59   elim (gr_sor_inv_push â€Ś H) -H [ |*: // ] #g1 #g2 #Hf #H1 #H2 destruct
60   elim (IH â€Ś Hf) -f /3 width=3 by gr_fcla_push, ex2_intro/
61 | #f #n #_ #IH #f1 #f2 #H
62   elim (gr_sor_inv_next â€Ś H) -H [1,3,4: * |*: // ] #g1 #g2 #Hf #H1 #H2 destruct
63   elim (IH â€Ś Hf) -f /3 width=3 by gr_fcla_push, gr_fcla_next, nle_succ_bi, nle_succ_dx, ex2_intro/
64 ]
65 qed-.
66
67 (*** sor_fwd_fcla_dx_ex *)
68 lemma gr_sor_des_fcla_dx:
69       âˆ€f,n. đ‚❪f❫ â‰˜ n â†’ âˆ€f1,f2. f1 â‹“ f2 â‰˜ f â†’
70       âˆƒâˆƒn2. đ‚❪f2❫ â‰˜ n2 & n2 â‰¤ n.
71 /3 width=4 by gr_sor_des_fcla_sn, gr_sor_comm/ qed-.