binsearch(x, S.0..m-1, present) is
{@$x \in Int \land  m$@@$>$@@$0 \land S.0..m-1 \in Int \land ordered.S(0..m-1)$@} 

@$\bb$@ Var i @$\in$@ Int
  initially i=1@$ \land $@j=m      

  do 
    B @$\rightarrow$@ shrink(i,j)
  od
  @$\{P\land \neg B\}$@
  @$\{R\}$@
  present:= x=S.i
@$\be$@
