annotate paper/src/AgdaPushPopProof.agda.replaced @ 2:c7acb9211784

add code, figure. and paper fix content
author ryokka
date Mon, 27 Jan 2020 20:41:36 +0900
parents
children 196ba119ca89
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 id-meta : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ SingleLinkedStack @$\mathbb{N}$@ @$\rightarrow$@ Meta
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
2 id-meta n e s = record { context = record {n = n ; element = just e}
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
3 ; nextCS = (N.cs id) ; stack = s}
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 push-pop-type : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ Element @$\mathbb{N}$@ @$\rightarrow$@ Set@$\text{1}$@
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
6 push-pop-type n e x s = M.exec (M.csComp {meta} (M.cs popOnce) (M.cs pushOnce)) meta @$\equiv$@ meta
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
7 where
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
8 meta = id-meta n e record {top = just (cons x (just s))}
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
9
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
10 push-pop : (n e x : @$\mathbb{N}$@) @$\rightarrow$@ (s : Element @$\mathbb{N}$@) @$\rightarrow$@ push-pop-type n e x s
c7acb9211784 add code, figure. and paper fix content
ryokka
parents:
diff changeset
11 push-pop n e x s = refl