Mercurial > hg > Papers > 2021 > soto-prosym
diff Paper/src/AgdaPushPopProof.agda.replaced @ 5:339fb67b4375
INIT rbt.agda
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Nov 2021 00:51:16 +0900 |
parents | c59202657321 |
children |
line wrap: on
line diff
--- a/Paper/src/AgdaPushPopProof.agda.replaced Sat Nov 06 20:06:24 2021 +0900 +++ b/Paper/src/AgdaPushPopProof.agda.replaced Sun Nov 07 00:51:16 2021 +0900 @@ -1,11 +1,11 @@ -id-meta : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ SingleLinkedStack @$\mathbb{N}$@ @$\rightarrow$@ Meta +id-meta : !$\mathbb{N}$! !$\rightarrow$! !$\mathbb{N}$! !$\rightarrow$! SingleLinkedStack !$\mathbb{N}$! !$\rightarrow$! Meta id-meta n e s = record { context = record {n = n ; element = just e} ; nextCS = (N.cs id) ; stack = s} -push-pop-type : @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ @$\mathbb{N}$@ @$\rightarrow$@ Element @$\mathbb{N}$@ @$\rightarrow$@ Set@$\_{1}$@ -push-pop-type n e x s = M.exec (M.csComp {meta} (M.cs popOnce) (M.cs pushOnce)) meta @$\equiv$@ meta +push-pop-type : !$\mathbb{N}$! !$\rightarrow$! !$\mathbb{N}$! !$\rightarrow$! !$\mathbb{N}$! !$\rightarrow$! Element !$\mathbb{N}$! !$\rightarrow$! Set!$\_{1}$! +push-pop-type n e x s = M.exec (M.csComp {meta} (M.cs popOnce) (M.cs pushOnce)) meta !$\equiv$! meta where meta = id-meta n e record {top = just (cons x (just s))} -push-pop : (n e x : @$\mathbb{N}$@) @$\rightarrow$@ (s : Element @$\mathbb{N}$@) @$\rightarrow$@ push-pop-type n e x s +push-pop : (n e x : !$\mathbb{N}$!) !$\rightarrow$! (s : Element !$\mathbb{N}$!) !$\rightarrow$! push-pop-type n e x s push-pop n e x s = refl