annotate paper/src/AgdaNPushNPop.agda.replaced @ 5:196ba119ca89

fix, and add mindmap->pdf
author ryokka
date Mon, 03 Feb 2020 21:47:43 +0900
parents c7acb9211784
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
1 n-push : {m : Meta} {{_ : M.DataSegment Meta}} (n : @$\mathbb{N}$@) @$\rightarrow$@ M.CodeSegment Meta Meta
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
2 n-push {{mm}} (zero) = M.cs {{mm}} {{mm}} id
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
3 n-push {m} {{mm}} (suc n) = M.cs {{mm}} {{mm}} (\m @$\rightarrow$@ M.exec {{mm}} {{mm}} (n-push {m} {{mm}} n) (pushOnce m))
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
4
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
5 n-pop : {m : Meta} {{_ : M.DataSegment Meta}} (n : @$\mathbb{N}$@) @$\rightarrow$@ M.CodeSegment Meta Meta
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
6 n-pop {{mm}} (zero) = M.cs {{mm}} {{mm}} id
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
7 n-pop {m} {{mm}} (suc n) = M.cs {{mm}} {{mm}} (\m @$\rightarrow$@ M.exec {{mm}} {{mm}} (n-pop {m} {{mm}} n) (popOnce m))
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
8
5
196ba119ca89 fix, and add mindmap->pdf
ryokka
parents: 2
diff changeset
9 pop-n-push-type : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ SingleLinkedStack @$\mathbb{N}$@ @$\rightarrow$@ Set@$\_{1}$@
2
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
10 pop-n-push-type n cn ce s = M.exec (M.csComp {meta} (M.cs popOnce) (n-push {meta} (suc n))) meta
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
11 @$\equiv$@ M.exec (n-push {meta} n) meta
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
12 where
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
13 meta = id-meta cn ce s