type List = {bool value; data next:List;} proc search(data x:List):List pointer X:List; [X=x] { pointer p:List; p = x; while [X=x & (xp | p=null) & (p=null => allpos q of List: xq => q.value=false) & allpos q of List: qp => q.value=false] (p!=null & p.value!=true) { p = p.next; } return p; } [(existpos q of List: Xq) => X<([!pos.value].next)*.[pos.value]>return]