Step * of Lemma integer-sqrt-bin-search

x:ℕ(∃r:ℕ [(((r r) ≤ x) ∧ x < (r 1) (r 1))])
BY
TACTIC:((D THENA Auto) THEN UseWitness ⌜if (x) < (2)  then x  else binary-search(λr.x <r;0;x)⌝⋅}

1
1. : ℕ@i
⊢ if (x) < (2)  then x  else binary-search(λr.x <r;0;x) ∈ ∃r:ℕ [(((r r) ≤ x) ∧ x < (r 1) (r 1))]


Latex:


Latex:
\mforall{}x:\mBbbN{}.  (\mexists{}r:\mBbbN{}  [(((r  *  r)  \mleq{}  x)  \mwedge{}  x  <  (r  +  1)  *  (r  +  1))])


By


Latex:
TACTIC:((D  0  THENA  Auto)
                THEN  UseWitness  \mkleeneopen{}if  (x)  <  (2)    then  x    else  binary-search(\mlambda{}r.x  <z  r  *  r;0;x)\mkleeneclose{}\mcdot{}
                )




Home Index