]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/unwind/nap.ma
985b3ae26e292b0be8b77d0db3f7fa7d555e4010
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / unwind / nap.ma
1 include "ground/relocation/tr_uni_pap.ma".
2 include "ground/relocation/tr_compose_pap.ma".
3 include "ground/notation/functions/applysucc_2.ma".
4 include "ground/arith/nat_lt.ma".
5 include "ground/arith/nat_plus_rplus.ma".
6 include "ground/arith/nat_pred_succ.ma".
7
8 lemma nlt_npsucc_bi (n1) (n2):
9       n1 < n2 → npsucc n1 < npsucc n2.
10 #n1 #n2 #Hn elim Hn -n2 //
11 #n2 #_ #IH /2 width=1 by plt_succ_dx_trans/
12 qed.
13
14 definition tr_nap (f) (l:nat): nat ≝
15            ↓(f@⧣❨↑l❩).
16
17 interpretation
18   "functional non-negative application (total relocation maps)"
19   'ApplySucc f l = (tr_nap f l).
20
21 lemma tr_nap_unfold (f) (l):
22       ↓(f@⧣❨↑l❩) = f@↑❨l❩.
23 // qed.
24
25 lemma tr_compose_nap (f2) (f1) (l):
26       f2@↑❨f1@↑❨l❩❩ = (f2∘f1)@↑❨l❩.
27 #f2 #f1 #l
28 <tr_nap_unfold <tr_nap_unfold <tr_nap_unfold
29 <tr_compose_pap <npsucc_pred //
30 qed.
31
32 lemma tr_uni_nap (n) (m):
33       m + n = 𝐮❨n❩@↑❨m❩.
34 #n #m
35 <tr_nap_unfold
36 <tr_uni_pap <nrplus_npsucc_sn //
37 qed.
38
39 lemma tr_nap_push (f):
40       ∀l. ↑(f@↑❨l❩) = (⫯f)@↑❨↑l❩.
41 #f #l
42 <tr_nap_unfold <tr_nap_unfold
43 <tr_pap_push <pnpred_psucc //
44 qed.
45
46 lemma tr_nap_pushs_lt (f) (n) (m):
47       m < n → m = (⫯*[n]f)@↑❨m❩.
48 #f #n #m #Hmn
49 <tr_nap_unfold <tr_pap_pushs_le
50 /2 width=1 by nlt_npsucc_bi/
51 qed-.