]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/relocation/tr_minus_pap.ma
update from master branch
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / relocation / tr_minus_pap.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 "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/pnat_le.ma".
20
21 (* RIGHT SUBTRACTION FOR TOTAL RELOCATION MAPS ******************************)
22
23 (* Constructions with tr_pap ************************************************)
24
25 lemma tr_pap_minus_le (n) (p) (f):
26       f@⧣❨p❩ ≤ p + n →
27       p = (f-n)@⧣❨p❩.
28 #n @(nat_ind_succ … n) -n [| #n #IHn ]
29 [ #p #f #H1f
30   lapply (tr_pap_increasing f p) #H2f
31   >(ple_antisym … H2f H1f) in ⊢ (??%?); -H1f -H2f //
32 | #p elim p -p [| #p #IHp ]
33   #f elim (tr_map_split f) * #g #H0 destruct
34   [ //
35   |2,4:
36     <tr_pap_next <nrplus_succ_dx #Hf
37     lapply (ple_inv_succ_bi … Hf) -Hf #Hf
38     <tr_minus_next_succ /2 width=1 by/
39   | <tr_minus_push_succ <tr_pap_push <tr_pap_push <nrplus_succ_sn #Hf
40     lapply (ple_inv_succ_bi … Hf) -Hf #Hf
41     <IHp -IHp //
42   ]
43 ]
44 qed-.