[PostScript]
StackBasics (E, C): trait
  % Essential LIFO operators
  includes Integer
  introduces
    empty: -> C 
    push: E, C -> C
    top: C -> E
    pop: C -> C
  asserts
    C generated by empty, push
    forall e: E, stk: C
      top(push(e, stk)) == e;
      pop(push(e, stk)) == stk;
  implies converts top, pop
    exempting top(empty), pop(empty)
[Table of Contents] [Index]