1 / 8

Integer Square Root Problem

 x,y. x-y<k- 1  ( x < y 2 )   (y< 0 )   n.  (n<y)   (x<n 2 )  x<(n+ 1 ) 2   x,y. x-y<k  ( x < y 2 )   (y< 0 )   n.  (n<y)   (x<n 2 )  x<(n+ 1 ) 2. Part I: Initialize the Induction. Integer Square Root Problem.  x.  y. y 2  x  x<(y+ 1 ) 2.

kamala
Download Presentation

Integer Square Root Problem

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. x,y. x-y<k-1 (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2  x,y. x-y<k  (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2 Part I: Initialize the Induction Integer Square Root Problem x.y. y2x  x<(y+1)2 k,x,y. x-y<k  y2x 0y  n. yn  n2x  x<(n+1)2 Base Case x,y. x-y<0 y2x 0y  n. yn  n2x  x<(n+1)2 Step Case x,y. x-y<k-1 y2x 0y  n. yn  n2x  x<(n+1)2  x,y. x-y<k  y2x 0y  n. yn  n2x  x<(n+1)2 Perform induction on k Step Case Formula needs normalization Base Case holds trivially (x-y<0 y2x is contradictory) Introduce auxiliary variable to force output induction Basic Specification

  2. T  F  (N<y) F(x<N2) F x<(N+1)2 (N<y) F(x<N2) F x<(N+1)2 Fn. (n<y) (x<n2)  x<(n+1)2 F      X-Y<k F (X<Y2) F(Y<0) X-Y<k F(X<Y2) F(Y<0) X-Y<Fk F(X<Y2) F(Y<0) X-Y<Fk F(X<Y2) F(Y<0) X-Y<Fk X<TY2 Y<T0  F F F X-Y<k  (X<Y2) (Y<0) T  n. (n<Y) (X<n2)  X<(n+1)2 Tx,y. x-y<k-1 (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2 F F x-y<k  (x<y2) (y<0) F  n. (n<y) (x<n2)  x<(n+1)2 Fx,y. x-y<k  (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2 T T F(N<y) F(x<N2) x<F(N+1)2 N<Ty x<TN2 x<F(N+1)2 F(N<y) F(x<N2) x<F(N+1)2   T F    T  F     F T x-y<k T (x<y2) T(y<0) x-y<k T(x<y2) T(y<0) F T T T T   F x-y<Tk T(x<y2) T(y<0) x-y<Tk T(x<y2) T(y<0) x-y<Tk x<Fy2 y<F0 T F F F T      Tn. (n<Y) (X<n2)  X<(n+1)2 (n<Y) T(X<n2) T X<(n+1)2 (n<Y) T(X<n2) T X<(n+1)2 T T T T T T(n<Y) T(X<n2) X<T(n+1)2 n<FY X<Fn2 X<T(n+1)2 T(n<Y) T(X<n2) X<T(n+1)2 F F Part II: Creating The Matrix Integer Square Root Problem  x,y. x-y<k-1 (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2   x,y. x-y<k  (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2   F

  3. Integer Square Root Problem Part III: Proof along orthogonal Connections X-Y <Fk-1 N <Ty X <TY2 x <TN2 x-y <Tk x <Fy2 y <F 0 x <T(N+1)2 Y <T0 X <Fn2 X <F(n+1)2 n <FY

  4. Integer Square Root Problem Part III: Proof along orthogonal Connections X-Y <Fk-1 N <Ty U <F(V+1)2 x<F(y+1)2 X <TY2 x <TN2 x-y <Tk x <Fy2 y <F 0 x <T(N+1)2 Y <T0 X <Fn2 X <F(n+1)2 n <FY Add Constraint Arithmetic Decision Procedure Instantiated terms are equal Unify x <(y+1)2 x <y2 invalid Arithmetic Decision Procedure Rippling / Reverse Rippling  = { X\x, Y\y+1, U\x, V\y }  = {X\x, Y\y+1} Arithmetic Decision Procedure Generalize to Lemma  = { X\x, Y\y+1, U\x, V\y, N\n } First Subproof Complete

  5. Integer Square Root Problem U <T(V+1)2 Part IV:Proof for the Other Constraint X-Y <Fk-1 N <Ty U <F(V+1)2 X <TY2 x <TN2 x-y <Tk x <Fy2 y <F 0 U <T(V+1)2 x <T(N+1)2 Y <T0 X <Fn2 X <F(n+1)2 n <FY Proof Complete Second Subproof Complete Arithmetic Decision Procedure Instantiated atoms are equal  = {U\x, V\y }  = {U\x, V\y, N\y } Unify  = { X1\x, Y1\y+1, N1\n, U\x, V\y, N2\y }

  6. x,y. x-y<k-1 (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2  x,y. x-y<k  (x<y2) (y<0)  n. (n<y) (x<n2)  x<(n+1)2 Part I: Generating the Step Case Formula Integer Square Root Problem x,y. x-y<k-1 y2x 0y  n. yn  n2x  x<(n+1)2  x,y. x-y<k  y2x 0y  n. yn  n2x  x<(n+1)2

  7. Integer Square Root Problem X-Y <Fk-1 N <Ty X <TY2 x <TN2 x-y <Tk x <Fy2 y <F 0 x <T(N+1)2 Y <T0 X <Fn2 X <F(n+1)2 n <FY

  8. Testing the animation

More Related