annotate Paper/pic/AgdaStackTest.agda.replaced @ 1:df1552e4ac7a

add mindmap, some figs
author ryokka
date Wed, 12 Dec 2018 18:44:19 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
1 -- after push 1 and 2, pop2 get 1 and 2
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
2
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
3 testStack02 : {m : Level } @$\rightarrow$@ ( Stack @$\mathbb{N}$@ (SingleLinkedStack @$\mathbb{N}$@) @$\rightarrow$@ Bool {m} ) @$\rightarrow$@ Bool {m}
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
4 testStack02 cs = pushStack createSingleLinkedStack 1 (\s @$\rightarrow$@ pushStack s 2 cs)
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
5
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
6
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
7 testStack031 : (d1 d2 : $\mathbb{N}$ ) @$\rightarrow$@ Bool {Zero}
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
8 testStack031 2 1 = True
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
9 testStack031 _ _ = False
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
10
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
11 testStack032 : (d1 d2 : Maybe @$\mathbb{N}$@) @$\rightarrow$@ Bool {Zero}
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
12 testStack032 (Just d1) (Just d2) = testStack031 d1 d2
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
13 testStack032 _ _ = False
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
14
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
15 testStack03 : {m : Level } @$\rightarrow$@ Stack @$\mathbb{N}$@ (SingleLinkedStack @$\mathbb{N}$@) @$\rightarrow$@ ((Maybe @$\mathbb{N}$@) @$\rightarrow$@ (Maybe @$\mathbb{N}$@) @$\rightarrow$@ Bool {m} ) @$\rightarrow$@ Bool {m}
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
16 testStack03 s cs = pop2Stack s (\s d1 d2 @$\rightarrow$@ cs d1 d2 )
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
17
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
18 testStack04 : Bool
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
19 testStack04 = testStack02 (\s @$\rightarrow$@ testStack03 s testStack032)
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
20
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
21 testStack05 : testStack04 @$\equiv$@ True
df1552e4ac7a add mindmap, some figs
ryokka
parents:
diff changeset
22 testStack05 = refl