class List module Collections { var contents: seq; method init() requires acc(contents); ensures valid && size(100)==0; { contents := nil; fold valid; } method add(x: int) requires valid; ensures valid && size(100) == old(size(100)+1) && get(size(100)-1, 100) == x; ensures forall i in [0..size(100)-1] :: get(i, 100) == old(get(i, 100)); { unfold valid; contents := contents ++ [x]; fold valid; } function get(index: int, f: int): int requires 0