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 "delayed_updating/relocation/tr_minus_pn.ma".
16 include "ground/relocation/tr_pap_pn.ma".
17 include "ground/relocation/tr_pap_lt.ma".
18 include "ground/arith/nat_rplus_succ.ma".
19 include "ground/arith/nat_minus_pminus.ma".
20 include "ground/arith/pnat_le.ma".
22 (* RIGHT SUBTRACTION FOR TOTAL RELOCATION MAPS ******************************)
24 (* Constructions with tr_pap ************************************************)
26 lemma tr_pap_minus_le (n) (p) (f):
29 #n @(nat_ind_succ … n) -n [| #n #IHn ]
31 lapply (tr_pap_increasing f p) #H2f
32 >(ple_antisym … H2f H1f) in ⊢ (??%?); -H1f -H2f //
33 | #p elim p -p [| #p #IHp ]
34 #f elim (tr_map_split f) * #g #H0 destruct
37 <tr_pap_next <nrplus_succ_dx #Hf
38 lapply (ple_inv_succ_bi … Hf) -Hf #Hf
39 <tr_minus_next_succ /2 width=1 by/
40 | <tr_minus_push_succ <tr_pap_push <tr_pap_push <nrplus_succ_sn #Hf
41 lapply (ple_inv_succ_bi … Hf) -Hf #Hf
47 lemma tr_pap_minus_ge (n:nat) (p:pnat) (f):
49 f@⧣❨p❩-n = (f-n)@⧣❨p❩.
50 #n @(nat_ind_succ … n) -n [| #n #IHn ]
52 | #p elim p -p [| #p #IHp ]
53 #f elim (tr_map_split f) * #g #H0 destruct
54 [ <tr_cons_pap_unit <nrplus_unit_sn #H0
55 elim (ple_inv_succ_unit … H0)
57 <tr_pap_next <nrplus_succ_dx #Hf
58 lapply (ple_inv_succ_bi … Hf) -Hf #Hf
59 <tr_minus_next_succ >nsucc_inj /2 width=1 by/
60 | <tr_minus_push_succ <tr_pap_push <tr_pap_push <nrplus_succ_sn #Hf
61 lapply (ple_inv_succ_bi … Hf) -Hf #Hf
62 >nsucc_inj >nsucc_inj <IHp -IHp //