Quelle gate_5.miz
Sprache: Mizar
|
|
:: Correctness of the High Speed Array Multiplier Circuits
:: by Hiroshi Yamazaki and Katsumi Wasaki
::
:: Received August 28, 2000
:: Copyright (c) 2000-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies GATE_1, XBOOLE_0, GATE_5;
notations XBOOLE_0, GATE_1;
constructors XBOOLE_0, GATE_1;
registrations XBOOLE_0, GATE_1;
theorems GATE_1;
begin
::The following 4 definitions are for normal 2-by-2 bit multiplier.
definition
let x0,x1,y0,y1 be set;
func MULT210(x1,y1,x0,y0) -> set equals
AND2( 3< & 2< java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds fo r length 32
correctness;
func MULT211(x1,y1,x0java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
ADD1(AND2(x1,y0),AND2(x0,y1),{});
correctness;
func MULT212(x1, A4
ADD2({},AND2(x1,y1),AND2(x1,y0),AND2
(x0,y1),{});
correctness;
func MULT213(x1,y1,x0,y0) -> set equals
CARR2({},AND2(x1,y1) A7 x |j) ;
AND2(x0,y1),{});
correctness;
end;
::
:: Logical Equivalence of 2-by-2 bit Plain Array Multiplier.
::
::The following theorem shows that
:: outputs of '2-by-2 bit plain Array Multiplier' are equivalent to
:: outputs of '2-by-2 normal Multiplier'
:: We assume that there is no feedback loop in multiplier.
theorem
for x0,x1,y0,y1,z0,z1,z2,z3,q00,q01,c01,q11,c11 being set holds (q00
is not empty iff AND2(x0,y0) is not empty)& (q01 is not empty iff XOR3(AND2(x1,
y0),AND2(x0,y1),{} ) is not empty)& (c01 is not empty iff MAJ3(AND2(x1,y0),AND2
(x0,y1),{} ) is not empty)& (q11 is not empty iff XOR3(AND2(x1,y1),{} ,c01) is
notproof
is not empty iff q00 is not empty)& (z1 is not empty iff q01 is not empty)& (z2
is not empty iff q11 is not empty)& (z3 is not empty iff c11 is not empty)
implies (z0 is iff MULT210(,y1,x0,y0) is not&(1is
empty iff MULT211(x1,y1,x0,y0) is not empty)& (z2 is not empty iff MULT212(x1,
y1,x0,y0) is not empty)& (z3 is : x| 2=1( )
)
proof
let x0,x1,y0,y1,z0,z1,z2,z3,q00,q01,c01,q11,c11 be set;
assume that
A1: q00 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
:q01is emptyXOR3(x1,0,x0y){ not
A3: c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty and
A4: q11 is not empty iff XOR3(AND2(x1,y1),{} ,c01) is not empty and
java.lang.StringIndexOutOfBoundsException: Range [7, 2) out of bounds for length 67
A6: z0 is not empty iff q00 is not empty and
A7: z1 is not empty iff q01 is not empty and
A8: z2 is not empty iff q11 is not empty and
A9: z3 is not empty iff c11 is not empty;
thus z0 is not empty iff MULT210(x1,y1,x0,y0) is not empty by A1,A6;
thus z1 is not empty iff MULT211(x1,y1,x0,y0) is not empty by A2,A7;
set m212 = MULT212(x1,y1,x0,y0);
set x1y1 = AND2(x1,y1);
set x0y1 = AND2(x0,y1);
set x1y0 = AND2(x1,y0);
m212 = XOR3({},x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35;
then
m212 is not empty iff x1y1 is not empty & not MAJ3(x1y0,x0y1,{}) is not
empty or not x1y1 is not empty & MAJ3(x1y0,x0y1,{}) is not empty;
hence z2 is not empty iff MULT212(x1,y1,(x|^( +j -1) x| 1+j)*y by B1,java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
set m213 = MULT213 then :x^( -1 =x|^ 1+j GROUP_16
m213 = MAJ3({},x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 36;
then m213 is not empty iff x1y1 is not empty & MAJ3(x1y0,x0y1,{}) is not
empty;
hence thesis by A3,A5,A9;
end;
::
:: Logical Equivalence of 3-by-3 bit Plain Array Multiplier.
::
::[sequence 1]
::The following 5 definitions are for normal 3-by-2 bit multiplier.
definition
let x0,x1,x2,y0,y1 be set;
func MULT310(x2,x1,y1,x0,y0) -> set equals
AND2(x0,y0);
correctness;
func MULT311(x2,x1,y1,x0,y0) -> set equals
ADD1(AND2(x1,y0),AND2(x0,y1),{});
correctness;
func MULT312(x2,x1,y1,x0,y0) -> set equals
ADD2((x2,,(x1,1)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
AND2(x1,y0),AND2(x0,y1),{});
correctness;
func MULT313(x2,x1,y1,x0,y0) -> set equals
ADD3({} ,AND2(x2,y1) =(_Dihedral_group )* ( ^( 1) by Th101
,AND2(x1,y1), AND2(x1,y0),AND2(x0,y1),{});
correctness;
func MULT314(x2,x1,y1,x0,y0) -> set equals
CARR3({} ,AND2(x2,y1), AND2(x2,y0j 1 GROUP_1: 4
),AND2(x1,y1), AND2(x1,y0),AND2(x0,y1),{});
correctness;
end;
::[sequence 2]
::The following 4 definitions are for normal 3-by-3 bit multiplier.
definition
let x0,x1,x2,y0,y1,y2 be .=x|^ j+( 1)
func MULT321(x2,y2,x1,y1,x0,y0) -> set equals
ADD1(MULT312(x2,x1,y1,x0,y0),
AND2(x0,y2),{});
correctness;
func MULT322(x2,y2,x1,y1,x0,y0) -> set equals
ADD2(MULT313(x2,x1,y1,x0,y0),
AND2(x1,y2), MULT312(x2,x1,y1,x0,y0),AND2(x0,y2),{});
correctness;
funcMULT323x2,y2,x1,y1,x0,
ADD3(MULT314(x2,x1,y1,x0,y0),
AND2(x2,y2), MULT313(x2,x1,y1,x0,y0),AND2(x1,y2), MULT312(x2,x1,y1,x0,y0),AND2(
x0,y2),{});
correctness;
func MULT324(x2,y2,x1,y1,x0,y0) -> set equals
CARR3(MULT314(x2,x1,y1,x0,y0),
AND2(x2,y2), MULT313(x2,x1,y1,x0,y0),AND2(x1,y2), then (x |^ j) * (x |^ (- 1)) = x |^ (1 + j) by
x0,y2),{});
correctness;
end;
::The following theorem shows that
:: outputs of '3-by-3 bit plain Array Multiplier' are equivalent to
:: outputs of '3-by-3 normal (sequencial) Multiplier'
:: We assume that there is no feedback loop in multiplier.
theorem ::3AM:
for x0,x1 = ( | j)* (x |^1 by GROUP_1:33;
c11,c12,q21,q22,c21,c22 being set holds (q00 is not empty iff AND2(x0,y0) is
not empty)& (q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{} ) is not
empty)& (c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty)&
(q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty)& (c02 is
not empty iff MAJ3(AND2(x2 then x|^ ( 1) =x| 1 by GROUP_1:java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
empty iff XOR3(q02,AND2(x0,y2),c01) is not empty)& (c11 is not empty iff MAJ3(
q02,AND2(x0,y2),c01) is not empty)& (q12 is not empty iff XOR3(AND2(x2,y1),AND2 =x by GROUP_1:6;
(x1,y2),c02) is not empty)& (c12 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),
c02) is not empty)& (q21 is not empty iff XOR3(q12,{} ,c11) is not empty)& (c21
is notemptyiff (q12{},c11) is not empty)&(q22 is not empty iff XOR3(
AND2(x2,y2),c21,c12) is not empty)& (c22 is not empty iff MAJ3(AND2(x2,y2),c21,
c12) is not empty)& (z0 is not empty iff q00 is not empty)& (z1 is not empty
iff q01 is not empty)& (z2 is not empty iff q11 is not empty)& (z3 is not empty
iff q21 is not empty)& (z4 is not empty iff q22 is not empty)& (z5 is not empty
iff empty iff MULT310(x2,x1y1,x0,)is
not empty)& (z1 is not empty iff MULT311(x2, x1,y1,x0,y0) is not empty)& (z2 is
not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty)& (z3 is not empty iff
MULT322x2,2x1,1x0y0) isnotempty)&(z4 isnotemptyiffMULT323(x2,y2,x1
,y1,x0,y0) is not empty)& (z5 is not empty iff MULT324(x2,y2,x1,y1,x0,y0) is
not empty)
proof
let x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,c01,c02,q11,q12,c11,c12
,q21,q22,c21,c22 be ;
assume that
A1: q00 is not empty iff AND2(x0,y0) is not empty and
A2: q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{} ) is not empty and
A3: (c01 is notemptyiffMAJ3(AND2(1,),AND2(,y1){ isnot
empty)&( q02 is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty)
and
A4: c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),{} ) is not empty and
A5: q11 is not empty iff XOR3(q02,AND2(x0,y2),c01) is not empty and
A6:c11isnotempty iff MAJ3(q02,AND2(x0,y2),c01) is not empty and
A7: q12 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),c02) is not empty and
A8: c12 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),c02) is not empty and
A9: q21 is notempty iff XOR3(12,} ,c11)isnot empty and
A10: c21 is not empty iff MAJ3(q12,{} ,c11) is not empty and
A11: q22 is not empty iff XOR3(AND2(x2,y2),c21,c12) is not empty and
A12: c22 is not empty iff MAJ3(AND2(x2,y2),c21,c12) is not empty and
A13: z0 is not empty iff q00 is not empty and
A14: z1 is not empty iff q01 is not empty and
A15: z2 is not empty iff q11 is not empty and
A16: z3 is not empty iff thesis by ,GROUP_5:77;
A17: z4 is not empty iff q22 is not empty and
A18: z5 is not empty iff c22 is not empty;
set x0y2 = AND2(x0,y2);
A19: c11 is not empty iff q02 is not empty & x0y2 is not empty or x0y2 is
not empty & c01 is not empty or c01 is not empty & q02 is not empty by end;
thus z0 is not empty iff MULT310(x2,x1,y1,x0,y0) is not empty by A1,A13;
z1 isnot iffMULT311(2x1y1,) is empty by ,A14;
set m312 = MULT312(x2,x1,y1,x0,y0);
set x1y1 = AND2(x1,y1);
set x0y1 = AND2(x0,y1);
set x2y0 = setk1=j n;
set x1y0 = AND2(x1,y0);
A20: m312 = XOR3(x2y0,x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35;
then
A21: m312 is not empty iff ( x2y0 is not empty & not x1y1 A9: j= * +j modn) j n) < n by NAT_D:1,2;
not x2y0 is not empty & x1y1 is not empty ) & not MAJ3(x1y0,x0y1,{}) is not
r mod n as Nat;
empty & x1y1 is not empty ) & MAJ3(x1y0,x0y1,{}) is not empty;
A22: m312 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or
not x2y0 is not empty & x1y1 is not empty ) & not (x1y0 is not empty & x0y1 is
not empty) or not ( x2y0 is not empty & not x1y1 is not empty or not x2y0 is
not empty & x1y1 is not empty ) & x1y0 is not empty & x0y1 is not empty by :z ^jby A8
q11 is not empty iff ( q02 is not empty & not x0y2 is not empty or not
q02 is not empty & x0y2 is not |^((n )+ (j modn) A9
not empty & not x0y2 is not empty or not q02 is not empty & x0y2 is not empty )
& =(x ^(n* ) x| (jmod n)) :java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
hence z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty .= ( | n)|^k1 * (x ^(jmod n))by GROUP_1:35
,A21;
set x1y2 = AND2(x1,y2);
set x2y1 = AND2(x2,y1);
A23: q12 is not empty iff ( x2y1 is not empty & not x1y2 is not empty or not
x2y1 is not empty & x1y2 is not empty ) & not c02 is not empty or not ( x2y1 is
not empty & not x1y2 is not empty or not x2y1 is not empty & x1y2 is not empty
1_n)) x | jmodn)by:
set m324 = MULT324(x2,y2,x1,y1,x0,y0);
set m323 = MULT323(x2,y2,x1,y1,x0,y0);
set m314 = MULT314(x2 =(| java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 42
set x2y2 = AND2(x2,y2);
24 {,CARR2{)) GATE_1:
.= MAJ3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36;
set m322 = MULT322(x2,y2,x1,y1,x0,y0);
set m313 = MULT313(x2,x1,y1,x0,y0);
A25: m313 = XOR3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 37
.= XOR3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1B1 * =y*x ^ java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
m322 = XOR3(m313,x1y2,MAJ3(m312,x0y2,{})) by GATE_1:def 35;
z3 x2,x1,,x0,)isnot A3A4,A9
,A16,A19,A23,A22,A25;
A26: m323 = XOR3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 37
.= XOR3(m314,x2y2,MAJ3 ( ^) = by java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
q22 =y :java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
x2y2 is not empty & c21 is not empty ) & not c12 x|^n ) byB1java.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
not empty & not c21 is not empty or not x2y2 is not empty & c21 is not empty )
& c12 is not empty by A11;
hence
z4 is not empty iff MULT323(x2,y2;
,A17,A19,A23,A22,A25,A24,A26;
A27: m324 = MAJ3(m314,x2y2,CARR2(m313,x1y2,java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 16
.= MAJ3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36;
c22 is not empty iff x2y2 is not empty & c21 is not empty or c21 is not
empty & c12 is not empty or c12 is not empty & x2y2 is not empty by A12;
hence thesis by A3,A4,A8,A10,A18,A19,A23,A22,A25,A24,A27;
end;
begin :: Logical Equivalence of Wallace tree Multiplier.
::
:: Logical Equivalence of 3-by-3 bit Wallace tree Multiplier.
::
::The following theorem shows that
:: outputs of '3-by-3 bit Wallace tree Multiplier' are equivalent to
:: outputs of '3-by-3 normal (sequencial) Multiplier'
:: We assume that there is no feedback loop in multiplier.
theorem
for x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03,
q11,q12,q13,c11,c12,c13 being set holds (q00 is not empty iff AND2(x0,y0) is
not empty)& (q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not empty
)& end;
is not empty iff XOR3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (c02
is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (q03
suppose j1<> 0;
empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),{}) is not empty)& (q11 is not empty iff
XOR3(q02,c01,{}) is not empty)& (c11 is not empty iff MAJ3(q02,c01,{}) is not
empty)& q12 is not iff (,,c11 java.lang.StringIndexOutOfBoundsException: Range [57, 52) out of bounds for length 76
empty iff MAJ3(q03,c02,c11) is not empty)& (q13 is not empty iff XOR3(AND2(x2,
y2),c03,c12) is not empty) hence thesis;
not empty)& (z0 is not empty iff q00 is not empty)& (z1 is not empty iff q01 is
not empty)& (z2 is not empty iff q11 is not empty)& (z3 is not empty iff q12 is
not empty)& (z4 is not empty iff q13 is not empty)& (z5 is not empty iff c13 is
not empty) implies (z0 is not empty iff MULT310(x2, x1,y1,x0,y0) is not empty)&
(z1 is not empty end;
iff MULT321(x2,y2,x1,y1,x0,y0) is not empty)& (z3 is not empty iff MULT322(x2,
end;
is not empty)& (z5 is not empty iff MULT324(x2,y2,x1,y1,x0,y0) is not empty)
proof
let x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03,q11,q12
,q13,c11,c12,c13 be set;
assume that
A1: q00 is not empty iff AND2(x0,y0) is not empty and
A2: q01 is not empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 0
A3: c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{}) is not empty and
A4: q02 is not hence center Dihedral_group n is trivial by Th78;
not empty and
A5: c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is
not empty and
A6: q03 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and
A7: c03 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and
A8: q11 is not empty iff XOR3(q02,c01,{}) is not empty and
A9: c11 is not empty iff MAJ3(q02,c01,{}) is not empty and
A10: q12 is not empty iff XOR3(q03,c02,c11) is not empty and
A11: c12 is not empty iff MAJ3(q03,c02,c11) is
A12: q13 is not empty iff XOR3(AND2(x2,y2),c03,c12) is not empty and
A13: c13 is not empty iff MAJ3(AND2(x2,y2),c03,c12) is not empty and
A14: theorem :: TH119
A15: z1 is not empty iff q01 is not empty and
A16: z2 is not empty iff q11 is not empty and
A17: z3 is not empty iff q12 is not empty and
A18: z4 is not empty iff q13 is not for Nat
A19: z5 is not empty iff c13 is not empty;
thus z0 is not empty iff MULT310(x2,x1,y1,x0,y0) is not empty by A1,A14;
z1 iffMULT311x2,1,y1,,y0 not ,;
set m312 = MULT312(x2,x1,y1,x0,y0);
set x0y2 = AND2(x0,y2);
set x1y1 = AND2(x1,y1);
set x0y1 = AND2(x0,y1);
set x2y0 = AND2(x2,y0);
set x1y0 = AND2(x1,y0);
A20: m312 = XOR3(x2y0,x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35;
set m323 = MULT323(x2,y2,x1,y1,x0,y0);
= x2,,,,y0;
set x2y2 = AND2(x2,y2);
set m322 = MULT322(x2,y2,x1,y1,x0,y0);
set m313 = MULT313(x2,x1,y1,x0,y0);
set x1y2 for x nstx *g1 _INT2) >
set x2y1 = AND2(x2,y1);
A21: q03 is not empty iff x2y1 is not empty & not x1y2 is not empty or not
x2y1 is not empty & x1y2 is not empty by A6;
A22: q02 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not
x2y0 is not empty & x1y1 is not empty ) & not x0y2 is not empty or not ( x2y0
is not empty & etn nonNatjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
empty ) & x0y2 is not empty by A4;
hence z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty by A3,A8
,A16,A20;
A23: =XOR3({}x2y1,ARR2(x2y0,1,y,{) by GATE_1:def 37
.= XOR3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36;
m322 = XOR3(m313,x1y2,MAJ3(m312,x0y2,{})) by GATE_1:def 35;
hence
z3 is not empty iff MULT322(x2,y2,x1,y1,x0,y0) is not empty by A3,A5,A9let be Element .n;
,A17,A22,A21,A20,A23;
A24: m314 = MAJ3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 38
.= assume A2g1=1;
set m324 = MULT324(x2,y2,x1,y1,x0,y0);
A25: m324 = MAJ3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 38
=m314xy2,1,(,,})d 36
A26: m323 = XOR3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 37
.= XOR3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{}))) by GATE_1:def 36;
q13 is not empty iff ( x2y2 is not empty & not c03 is not empty or not
x2y2 is not empty & c03 is not empty ) & not c12 is not empty or g ^n mod
not empty & not c03 is not empty or not x2y2 is not empty & c03 is not empty )
notA12;
hence
z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty by A3,A5,A7,A9
,A11, =1(INT.Group ) by 14java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
c13 is not empty iff x2y2 is not empty & c03 is not empty or c03 is not
empty & c12 is not empty or c12 is not empty & x2y2 is not empty by A13;
hence thesis by A3,A5, . *1_I.Group) _Group2) * byA4
end;
::
:: Carry Look-up Ahead (CLA) Adder
:: (This eqivalency has been checked out by the theorem GATE_1:44.)
::
::The following two definitions are for CLA 1 bit adder.
notation
let a1,b1,c be set;
synonym (a1,1c (a1,1,)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
synonym CLACARR1(a1,b1,c) for MAJ3(a1, x | )| x| k )by GROUP_135
end;
::The following two definitions are for CLA 2 bit adder.
definition
let a1,b1,a2,b2,c =x|^n by A1
func CLAADD2(a2,b2,a1,b1,c) -> set equals
XOR3(,b2MAJ3(b1,c)
correctness;
func CLACARR2(a2,b2,a1,b1,c) -> set equals
OR2(AND2(a2,b2),AND2(OR2(a2,b2),
MAJ3(a1,b1,c)));
correctness;
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 4
::The following two definitions are for CLA 3 bit adder.
definition
let a1,b1,a2,b2,a3,b3,c be set;
func CLAADD3(a3,java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14
XOR3(a3,b3,CLACARR2(a2,b2,a1
,b1,c));
for n being Nat
func CLACARR3(a3,b3,a2,b2,a1,b1,c) -> set equals
OR3(AND2(a3,b3),AND2(OR2(a3
,b3),AND2(a2,b2)), AND3(OR2(a3,b3),OR2(a2,b2),MAJ3(a1,b1,c)));
correctness;
end;
::The following two definitions are for CLA 4 bit adder.
definition
let a1,b1,a2,b2,a3,b3,a4,b4,c be set;
func CLAADD4(a4,b4,a3,b3,a2,b2,a1,b1,c) -> set equals
(a3
,b3,a2,b2,a1,b1,c));
correctness;
func CLACARR4(a4,b4,a3,b3,a2,b2,a1,b1,c) -> set equals
OR4(AND2(a4,b4),AND2(
(4b4),AND2(a3b3),AND3O(a4b4),(a3b3,a2b2) (4java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
b4),OR2(a3,b3),OR2(a2,b2),MAJ3(a1,b1,c)));
correctness;
end;
::The following theorem shows that
:: outputs of '3-by-3 bit Wallace tree Multiplier' by using Carry Look-up
:: Ahead Adder are equivalent to outputs of '3-by-3 normal (sequencial)
:: Multiplier'.
:: We assume that there is no feedback loop in multiplier.
theorem ::3WTMCLA:
for x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03
being set holds (q00java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
empty iff XOR3(AND2(x1,y0),AND2(x0,y1),{}) is not empty)& (c01 is not empty iff
MAJ3AND2(1),(,y1,} ) q02 is not empty XOR3(ND2
(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (c02 is not empty iff MAJ3(AND2
(x2,y0),AND2(x1,y1),AND2(x0,y2)) is not empty)& (q03 is not empty iff XOR3(AND2
(x2,y1),AND2(x1,y2),{}) is not empty)& (c03 is not empty iff MAJ3(AND2(x2,y1),
AND2(x1,y2),{}) is not empty)& (z0 is not empty iff q00 is not empty)& (z1 is
not empty iff q01 java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 21
not empty)& (z3 is not empty iff CLAADD2( q03,c02,q02,c01,{}) is not empty)& (
z4 is iffCLAADD3((x2,y2),c03q03,c02,q02,c01,}) notempty)&
(z5 is not empty iff CLACARR3(AND2(x2,y2),c03,q03,c02,q02,c01,{}) is not empty)
implies (z0 is not empty iff MULT310(x2, x1,y1,x0,y0) is not empty)& (z1 is not
empty iff MULT311(x2, x1,y1,x0,y0) is not empty)& (z2 is not empty iff MULT321(
x2,y2,x1,y1,x0,y0) is not empty x Element Dihedral_groupn;
y0) is not empty)& (z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not empty
)& (z5 is not empty iff MULT324(x2,y2,x1,y1,x0,y0) is not empty)
proof
let x0,x1,x2,y0,y1,y2,z0,z1,z2,z3,z4,z5, q00,q01,q02,q03,c01,c02,c03 be set;
A1: q00 is not empty iff AND2(x0,y0) is not empty and
A2: q01 is not empty iff XOR3(AND2(x1, . by
A3: c01 is not empty iff MAJ3(AND2(x1,y0),AND2(x0,y1),{}) is not empty and
A4: q02 is not empty iff XOR3(AND2(x2,y0), hen a2=1as Group2
not empty and
A5: c02 is not empty iff MAJ3(AND2(x2,y0),AND2(x1,y1),AND2(x0,y2)) is
not empty and
A6: q03 is not empty iff XOR3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and
A7: c03 is not empty iff MAJ3(AND2(x2,y1),AND2(x1,y2),{}) is not empty and
isnotemptyiffq00
A9: z1 is not empty iff q01 is not empty and
A10: z2 is not empty iff CLAADD1( q02,c01,{}) is not empty and
A11: z3 is not empty iff CLAADD2( q03,c02,q02,c01,{}) is not empty and
A12: z4 is not empty iff . x| (*)- k) *yby java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
not empty and
A13 =z*yjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
not empty;
set x0y2 = AND2(x0,y2);
set x1y1 = AND2(x1,y1); for ibeingNat ( |^i)z x| i)
set x2y0 = AND2(x2,y0);
thus z0 is not empty iff MULT310(x2,x1,y1,x0,y0) is not empty by A1,A8;
thus z1 proof
set m312 = MULT312(x2,x1,y1,x0,y0);
set x0y1 = AND2(x0,y1);
l i Nat
A14: m312 = XOR3(x2y0,x1y1,MAJ3(x1y0,x0y1,{})) by GATE_1:def 35;
then
A15: m312 is not empty iff ( thus x| i)z=x ^( + k)byGROUP_133
not x2y0 is not empty & x1y1 is not empty ) & not (x1y0 is not empty & x0y1 is
not empty .=(| *x | i) by GROUP_1:33
not empty & x1y1 is not empty ) & x1y0 is not empty & x0y1 is not empty;
set x1y2 = AND2(x1,y2);
set x2y1 = AND2(x2,y1);
A16: q03 is not empty iff x2y1 is not empty & not x1y2 is not empty or not
x2y1 is not empty & x1y2 is not empty by A6;
set m324 = MULT324(x2,y2,x1,y1,x0,y0);
set m323 = MULT323(x2,y2,x1,y1,x0,y0);
set m314 = MULT314( ;
set x2y2 = AND2(x2,y2);
A17: m314 = MAJ3({},x2y1,CARR2(x2y0,x1y1,x1y0,x0y1,{})) by GATE_1:def 38
,MAJ3(,x1y1,x1y0,0y1{))byGATE_1:def 36;
set m322 = MULT322(x2,y2,x1,y1,x0,y0);
set m313 = MULT313(x2,x1,y1,x0,y0);
A18: m313 = XOR3({},x2y1;
.= XOR3({},x2y1,MAJ3(x2y0,x1y1,MAJ3(x1y0,x0y1,{}))) by GATE_1:def 36;
q02 is not empty iff ( x2y0 is not empty & not x1y1 is not empty or not
x2y0 is not empty & x1y1 is not empty ) & java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 14
is not empty & not x1y1 or nonzeroNat
empty ) & x0y2 is not empty by A4;
hence z2 is not empty iff MULT321(x2,y2,x1,y1,x0,y0) is not empty java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 36
,A14;
A19: c02 is not empty iff x2y0 is not empty & x1y1 is not empty or x1y1 is
not empty & x0y2 is not empty or x0y2 is not empty & x2y0 is not empty by A5;
m322 = XOR3(m313,x1y2,MAJ3(m312,x0y2,{})) by GATE_1:def 35;
then m322 is x of nst x *g1 (Group2 java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
is isnotempty)¬ m312isnot&x0y2is
not empty) or not ( m313 is not empty & not x1y2 is not empty or not m313 is
not empty & x1y2 is not empty ) & m312 is not empty & x0y2 is not empty;
is iff (2y2,y1,0,y0) is not empty by ,
,A11,A19,A16,A15,A18;
m323 = XOR3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 37
.= XOR3(m314,x2y2,MAJ3(m313java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
then m323 is not empty iff ( m314 is not empty & not x2y2 is not empty or
not m314 is not empty & x2y2 is not empty ) & not ( m313 is not empty & x1y2 is
notempty or x1y2 is empty & m312 is empty &x0y2 is not empty or m312
is not empty & x0y2 is not empty & m313 is not empty ) or not ( m314 is not
empty & not x2y2 is not empty or not m314 is not empty & x2y2 is not empty ) &
( m313 is not empty & x1y2 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 21
empty & x0y2 is not empty or m312 is not empty & x0y2 is >2;
not empty );
g1o Groupjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
z4 is not empty iff MULT323(x2,y2,x1,y1,x0,y0) is not java.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 20
,A19,A16,A15,A18,A17;
m324 = MAJ3(m314,x2y2,CARR2(m313,x1y2,m312,x0y2,{})) by GATE_1:def 38
.= MAJ3(m314,x2y2,MAJ3(m313,x1y2,MAJ3(m312,x0y2,{})) x java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 39
then m324 is not empty iff m314 is not empty & x2y2 is not empty or x2y2 is
&( m313 is not & is not orx1y2 not
is not empty & x0y2 is not empty or m312 is not empty & x0y2 is not empty &
not empty isnot o not
empty & m312 is not empty & x0y2 is not empty or m312 is not empty & x0y2 is
& m313 is notempty )&m314 isnotempty;
hence thesis by A3,A4,A7,A13,A19,A16,A15,A18,A17;
end;
¤ Dauer der Verarbeitung: 0.14 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|