We show that array-with-pointer implementation of stack is correct.
We want to prove
            pop empty = empty and
                  ( A : Arr, N I : Nat) top push(N , I || A) = N and
                        ( A : Arr, N I : Nat) pop push(N , I || A) = I || A
We use coinduction to prove that it is a behavioral property of the input specification. For this, we must define the following:
  1. the observation relation R for A1,A2 : Arr I1,I2 : Nat , by
  2. the cobasis  : { top,pop } .
Coinduction now requires us to do the following:
This page was generated by Kumo on Wed Oct 13 18:03:25 PDT 1999.