80 likes | 171 Views
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.
E N D
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. y2x x<(y+1)2 k,x,y. x-y<k y2x 0y n. yn n2x x<(n+1)2 Base Case x,y. x-y<0 y2x 0y n. yn n2x x<(n+1)2 Step Case x,y. x-y<k-1 y2x 0y n. yn n2x x<(n+1)2 x,y. x-y<k y2x 0y n. yn n2x x<(n+1)2 Perform induction on k Step Case Formula needs normalization Base Case holds trivially (x-y<0 y2x is contradictory) Introduce auxiliary variable to force output induction Basic Specification
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
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
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
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 }
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 y2x 0y n. yn n2x x<(n+1)2 x,y. x-y<k y2x 0y n. yn n2x x<(n+1)2
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