annotate paper/src/AgdaPushPopProof.agda @ 116:ed6719c301fc

Update slide
author atton <atton@cr.ie.u-ryukyu.ac.jp>
date Mon, 13 Feb 2017 17:31:45 +0900
parents 40ae32725e55
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 id-meta : ℕ -> ℕ -> SingleLinkedStack ℕ -> Meta
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 id-meta n e s = record { context = record {n = n ; element = just e}
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 ; nextCS = (N.cs id) ; stack = s}
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 push-pop-type : ℕ -> ℕ -> ℕ -> Element ℕ -> Set₁
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 push-pop-type n e x s = M.exec (M.csComp {meta} (M.cs popOnce) (M.cs pushOnce)) meta ≡ meta
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 where
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 meta = id-meta n e record {top = just (cons x (just s))}
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 push-pop : (n e x : ℕ) -> (s : Element ℕ) -> push-pop-type n e x s
40ae32725e55 Add push/pop description
atton <atton@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 push-pop n e x s = refl