annotate Paper/src/stackTest.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 open import Level renaming (suc to succ ; zero to Zero )
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 module stackTest where
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 open import stack
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 open import Relation.Binary.PropositionalEquality
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 open import Relation.Binary.Core
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 open import Data.Nat
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 open import Function
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 open SingleLinkedStack
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 open Stack
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 ----
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 --
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 -- proof of properties ( concrete cases )
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 --
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
20 test01 : {n : Level } {a : Set n} !$\rightarrow$! SingleLinkedStack a !$\rightarrow$! Maybe a !$\rightarrow$! Bool {n}
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 test01 stack _ with (top stack)
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 ... | (Just _) = True
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 ... | Nothing = False
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
26 test02 : {n : Level } {a : Set n} !$\rightarrow$! SingleLinkedStack a !$\rightarrow$! Bool
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 test02 stack = popSingleLinkedStack stack test01
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
29 test03 : {n : Level } {a : Set n} !$\rightarrow$! a !$\rightarrow$! Bool
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 test03 v = pushSingleLinkedStack emptySingleLinkedStack v test02
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 -- after a push and a pop, the stack is empty
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
33 lemma : {n : Level} {A : Set n} {a : A} !$\rightarrow$! test03 a !$\equiv$! False
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 lemma = refl
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
36 testStack01 : {n m : Level } {a : Set n} !$\rightarrow$! a !$\rightarrow$! Bool {m}
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 testStack01 v = pushStack createSingleLinkedStack v (
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
38 \s !$\rightarrow$! popStack s (\s1 d1 !$\rightarrow$! True))
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 -- after push 1 and 2, pop2 get 1 and 2
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
42 testStack02 : {m : Level } !$\rightarrow$! ( Stack !$\mathbb{N}$! (SingleLinkedStack !$\mathbb{N}$!) !$\rightarrow$! Bool {m} ) !$\rightarrow$! Bool {m}
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 testStack02 cs = pushStack createSingleLinkedStack 1 (
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
44 \s !$\rightarrow$! pushStack s 2 cs)
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
47 testStack031 : (d1 d2 : !$\mathbb{N}$! ) !$\rightarrow$! Bool {Zero}
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 testStack031 2 1 = True
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 testStack031 _ _ = False
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
51 testStack032 : (d1 d2 : Maybe !$\mathbb{N}$!) !$\rightarrow$! Bool {Zero}
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 testStack032 (Just d1) (Just d2) = testStack031 d1 d2
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 testStack032 _ _ = False
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
55 testStack03 : {m : Level } !$\rightarrow$! Stack !$\mathbb{N}$! (SingleLinkedStack !$\mathbb{N}$!) !$\rightarrow$! ((Maybe !$\mathbb{N}$!) !$\rightarrow$! (Maybe !$\mathbb{N}$!) !$\rightarrow$! Bool {m} ) !$\rightarrow$! Bool {m}
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 testStack03 s cs = pop2Stack s (
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
57 \s d1 d2 !$\rightarrow$! cs d1 d2 )
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 testStack04 : Bool
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
60 testStack04 = testStack02 (\s !$\rightarrow$! testStack03 s testStack032)
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
62 testStack05 : testStack04 !$\equiv$! True
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 testStack05 = refl
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
65 testStack06 : {m : Level } !$\rightarrow$! Maybe (Element !$\mathbb{N}$!)
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 testStack06 = pushStack createSingleLinkedStack 1 (
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
67 \s !$\rightarrow$! pushStack s 2 (\s !$\rightarrow$! top (stack s)))
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
69 testStack07 : {m : Level } !$\rightarrow$! Maybe (Element !$\mathbb{N}$!)
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 testStack07 = pushSingleLinkedStack emptySingleLinkedStack 1 (
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
71 \s !$\rightarrow$! pushSingleLinkedStack s 2 (\s !$\rightarrow$! top s))
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 testStack08 = pushSingleLinkedStack emptySingleLinkedStack 1
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
74 $ \s !$\rightarrow$! pushSingleLinkedStack s 2
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
75 $ \s !$\rightarrow$! pushSingleLinkedStack s 3
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
76 $ \s !$\rightarrow$! pushSingleLinkedStack s 4
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
77 $ \s !$\rightarrow$! pushSingleLinkedStack s 5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
78 $ \s !$\rightarrow$! top s
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 ------
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 --
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 -- proof of properties with indefinite state of stack
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 --
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 -- this should be proved by properties of the stack inteface, not only by the implementation,
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 -- and the implementation have to provides the properties.
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 --
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
87 -- we cannot write "s !$\equiv$! s3", since level of the Set does not fit , but use stack s !$\equiv$! stack s3 is ok.
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 -- anyway some implementations may result s != s3
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 --
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
91 stackInSomeState : {l m : Level } {D : Set l} {t : Set m } (s : SingleLinkedStack D ) !$\rightarrow$! Stack {l} {m} D {t} ( SingleLinkedStack D )
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 stackInSomeState s = record { stack = s ; stackMethods = singleLinkedStackSpec }
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
93
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
94 push!$\rightarrow$!push!$\rightarrow$!pop2 : {l : Level } {D : Set l} (x y : D ) (s : SingleLinkedStack D ) !$\rightarrow$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
95 pushStack ( stackInSomeState s ) x ( \s1 !$\rightarrow$! pushStack s1 y ( \s2 !$\rightarrow$! pop2Stack s2 ( \s3 y1 x1 !$\rightarrow$! (Just x !$\equiv$! x1 ) !$\wedge$! (Just y !$\equiv$! y1 ) ) ))
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
96 push!$\rightarrow$!push!$\rightarrow$!pop2 {l} {D} x y s = record { pi1 = refl ; pi2 = refl }
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
99 -- id : {n : Level} {A : Set n} !$\rightarrow$! A !$\rightarrow$! A
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 -- id a = a
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
101
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 -- push a, n times
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
104 n-push : {n : Level} {A : Set n} {a : A} !$\rightarrow$! !$\mathbb{N}$! !$\rightarrow$! SingleLinkedStack A !$\rightarrow$! SingleLinkedStack A
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 n-push zero s = s
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
106 n-push {l} {A} {a} (suc n) s = pushSingleLinkedStack (n-push {l} {A} {a} n s) a (\s !$\rightarrow$! s )
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
108 n-pop : {n : Level}{A : Set n} {a : A} !$\rightarrow$! !$\mathbb{N}$! !$\rightarrow$! SingleLinkedStack A !$\rightarrow$! SingleLinkedStack A
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 n-pop zero s = s
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
110 n-pop {_} {A} {a} (suc n) s = popSingleLinkedStack (n-pop {_} {A} {a} n s) (\s _ !$\rightarrow$! s )
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
111
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
112 open !$\equiv$!-Reasoning
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
113
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
114 push-pop-equiv : {n : Level} {A : Set n} {a : A} (s : SingleLinkedStack A) !$\rightarrow$! (popSingleLinkedStack (pushSingleLinkedStack s a (\s !$\rightarrow$! s)) (\s _ !$\rightarrow$! s) ) !$\equiv$! s
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 push-pop-equiv s = refl
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
116
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
117 push-and-n-pop : {n : Level} {A : Set n} {a : A} (n : !$\mathbb{N}$!) (s : SingleLinkedStack A) !$\rightarrow$! n-pop {_} {A} {a} (suc n) (pushSingleLinkedStack s a id) !$\equiv$! n-pop {_} {A} {a} n s
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 push-and-n-pop zero s = refl
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 push-and-n-pop {_} {A} {a} (suc n) s = begin
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 n-pop {_} {A} {a} (suc (suc n)) (pushSingleLinkedStack s a id)
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
121 !$\equiv$!!$\langle$! refl !$\rangle$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
122 popSingleLinkedStack (n-pop {_} {A} {a} (suc n) (pushSingleLinkedStack s a id)) (\s _ !$\rightarrow$! s)
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
123 !$\equiv$!!$\langle$! cong (\s !$\rightarrow$! popSingleLinkedStack s (\s _ !$\rightarrow$! s )) (push-and-n-pop n s) !$\rangle$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
124 popSingleLinkedStack (n-pop {_} {A} {a} n s) (\s _ !$\rightarrow$! s)
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
125 !$\equiv$!!$\langle$! refl !$\rangle$!
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 n-pop {_} {A} {a} (suc n) s
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
127 !$\blacksquare$!
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
129
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
130 n-push-pop-equiv : {n : Level} {A : Set n} {a : A} (n : !$\mathbb{N}$!) (s : SingleLinkedStack A) !$\rightarrow$! (n-pop {_} {A} {a} n (n-push {_} {A} {a} n s)) !$\equiv$! s
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 n-push-pop-equiv zero s = refl
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 n-push-pop-equiv {_} {A} {a} (suc n) s = begin
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 n-pop {_} {A} {a} (suc n) (n-push (suc n) s)
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
134 !$\equiv$!!$\langle$! refl !$\rangle$!
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
135 n-pop {_} {A} {a} (suc n) (pushSingleLinkedStack (n-push n s) a (\s !$\rightarrow$! s))
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
136 !$\equiv$!!$\langle$! push-and-n-pop n (n-push n s) !$\rangle$!
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 n-pop {_} {A} {a} n (n-push n s)
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
138 !$\equiv$!!$\langle$! n-push-pop-equiv n s !$\rangle$!
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 s
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
140 !$\blacksquare$!
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142
5
339fb67b4375 INIT rbt.agda
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
143 n-push-pop-equiv-empty : {n : Level} {A : Set n} {a : A} !$\rightarrow$! (n : !$\mathbb{N}$!) !$\rightarrow$! n-pop {_} {A} {a} n (n-push {_} {A} {a} n emptySingleLinkedStack) !$\equiv$! emptySingleLinkedStack
0
soto <soto@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 n-push-pop-equiv-empty n = n-push-pop-equiv n emptySingleLinkedStack