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 "ground/arith/pnat_minus.ma".
16 include "ground/arith/nat_minus.ma".
17 include "ground/relocation/tr_map.ma".
19 (* RIGHT SUBTRACTION FOR TOTAL RELOCATION MAPS ******************************)
21 corec definition tr_minus: nat → tr_map → tr_map.
22 * [ #f @f ] #q * #p #f
23 @((p-q)⨮(tr_minus (ninj (↑q)-ninj p) f))
27 "right minus (total relocation maps)"
28 'minus f n = (tr_minus n f).
30 (* Basic constructions ******************************************************)
32 lemma tr_minus_zero_dx (f):
34 * #f #p <(stream_unfold … ((f⨮p)-𝟎)) //
37 lemma tr_minus_cons_inj (f) (p) (q):
38 (p-q)⨮(f-(ninj (↑q)-ninj p)) = (p⨮f)-(ninj q).
39 #f #p #q <(stream_unfold … ((p⨮f)-(ninj q))) //