::
deftheorem Def18 defines
AND5 GATE_1:def 18 :
for a, b, c, d, e being set holds
( ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty implies AND5 (a,b,c,d,e) = NOT1 {} ) & ( ( a is empty or b is empty or c is empty or d is empty or e is empty ) implies AND5 (a,b,c,d,e) = {} ) );
::
deftheorem Def19 defines
OR5 GATE_1:def 19 :
for a, b, c, d, e being set holds
( ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty ) implies OR5 (a,b,c,d,e) = NOT1 {} ) & ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or OR5 (a,b,c,d,e) = {} ) );
::
deftheorem Def20 defines
NAND5 GATE_1:def 20 :
for a, b, c, d, e being set holds
( ( ( a is empty or b is empty or c is empty or d is empty or e is empty ) implies NAND5 (a,b,c,d,e) = NOT1 {} ) & ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty implies NAND5 (a,b,c,d,e) = {} ) );
::
deftheorem Def21 defines
NOR5 GATE_1:def 21 :
for a, b, c, d, e being set holds
( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or NOR5 (a,b,c,d,e) = NOT1 {} ) & ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty ) implies NOR5 (a,b,c,d,e) = {} ) );
::
deftheorem Def22 defines
AND6 GATE_1:def 22 :
for a, b, c, d, e, f being set holds
( ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty & not f is empty implies AND6 (a,b,c,d,e,f) = NOT1 {} ) & ( ( a is empty or b is empty or c is empty or d is empty or e is empty or f is empty ) implies AND6 (a,b,c,d,e,f) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f being
set holds
( not
AND6 (
a,
b,
c,
d,
e,
f) is
empty iff ( not
a is
empty & not
b is
empty & not
c is
empty & not
d is
empty & not
e is
empty & not
f is
empty ) )
by Def22;
::
deftheorem Def23 defines
OR6 GATE_1:def 23 :
for a, b, c, d, e, f being set holds
( ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty ) implies OR6 (a,b,c,d,e,f) = NOT1 {} ) & ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or OR6 (a,b,c,d,e,f) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f being
set holds
( ( not
a is
empty or not
b is
empty or not
c is
empty or not
d is
empty or not
e is
empty or not
f is
empty ) iff not
OR6 (
a,
b,
c,
d,
e,
f) is
empty )
by Def23;
::
deftheorem Def24 defines
NAND6 GATE_1:def 24 :
for a, b, c, d, e, f being set holds
( ( ( a is empty or b is empty or c is empty or d is empty or e is empty or f is empty ) implies NAND6 (a,b,c,d,e,f) = NOT1 {} ) & ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty & not f is empty implies NAND6 (a,b,c,d,e,f) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f being
set holds
( not
NAND6 (
a,
b,
c,
d,
e,
f) is
empty & not
a is
empty & not
b is
empty & not
c is
empty & not
d is
empty & not
e is
empty iff
f is
empty )
by Def24;
::
deftheorem Def25 defines
NOR6 GATE_1:def 25 :
for a, b, c, d, e, f being set holds
( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or NOR6 (a,b,c,d,e,f) = NOT1 {} ) & ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty ) implies NOR6 (a,b,c,d,e,f) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f being
set holds
( not
NOR6 (
a,
b,
c,
d,
e,
f) is
empty iff (
a is
empty &
b is
empty &
c is
empty &
d is
empty &
e is
empty &
f is
empty ) )
by Def25;
::
deftheorem Def26 defines
AND7 GATE_1:def 26 :
for a, b, c, d, e, f, g being set holds
( ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty & not f is empty & not g is empty implies AND7 (a,b,c,d,e,f,g) = NOT1 {} ) & ( ( a is empty or b is empty or c is empty or d is empty or e is empty or f is empty or g is empty ) implies AND7 (a,b,c,d,e,f,g) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g being
set holds
( not
AND7 (
a,
b,
c,
d,
e,
f,
g) is
empty iff ( not
a is
empty & not
b is
empty & not
c is
empty & not
d is
empty & not
e is
empty & not
f is
empty & not
g is
empty ) )
by Def26;
::
deftheorem Def27 defines
OR7 GATE_1:def 27 :
for a, b, c, d, e, f, g being set holds
( ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty ) implies OR7 (a,b,c,d,e,f,g) = NOT1 {} ) & ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty or OR7 (a,b,c,d,e,f,g) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g being
set holds
( ( not
a is
empty or not
b is
empty or not
c is
empty or not
d is
empty or not
e is
empty or not
f is
empty or not
g is
empty ) iff not
OR7 (
a,
b,
c,
d,
e,
f,
g) is
empty )
by Def27;
::
deftheorem Def28 defines
NAND7 GATE_1:def 28 :
for a, b, c, d, e, f, g being set holds
( ( ( a is empty or b is empty or c is empty or d is empty or e is empty or f is empty or g is empty ) implies NAND7 (a,b,c,d,e,f,g) = NOT1 {} ) & ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty & not f is empty & not g is empty implies NAND7 (a,b,c,d,e,f,g) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g being
set holds
( not
NAND7 (
a,
b,
c,
d,
e,
f,
g) is
empty & not
a is
empty & not
b is
empty & not
c is
empty & not
d is
empty & not
e is
empty & not
f is
empty iff
g is
empty )
by Def28;
::
deftheorem Def29 defines
NOR7 GATE_1:def 29 :
for a, b, c, d, e, f, g being set holds
( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty or NOR7 (a,b,c,d,e,f,g) = NOT1 {} ) & ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty ) implies NOR7 (a,b,c,d,e,f,g) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g being
set holds
( not
NOR7 (
a,
b,
c,
d,
e,
f,
g) is
empty iff (
a is
empty &
b is
empty &
c is
empty &
d is
empty &
e is
empty &
f is
empty &
g is
empty ) )
by Def29;
::
deftheorem Def30 defines
AND8 GATE_1:def 30 :
for a, b, c, d, e, f, g, h being set holds
( ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty & not f is empty & not g is empty & not h is empty implies AND8 (a,b,c,d,e,f,g,h) = NOT1 {} ) & ( ( a is empty or b is empty or c is empty or d is empty or e is empty or f is empty or g is empty or h is empty ) implies AND8 (a,b,c,d,e,f,g,h) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g,
h being
set holds
( not
AND8 (
a,
b,
c,
d,
e,
f,
g,
h) is
empty iff ( not
a is
empty & not
b is
empty & not
c is
empty & not
d is
empty & not
e is
empty & not
f is
empty & not
g is
empty & not
h is
empty ) )
by Def30;
::
deftheorem Def31 defines
OR8 GATE_1:def 31 :
for a, b, c, d, e, f, g, h being set holds
( ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty or not h is empty ) implies OR8 (a,b,c,d,e,f,g,h) = NOT1 {} ) & ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty or not h is empty or OR8 (a,b,c,d,e,f,g,h) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g,
h being
set holds
( ( not
a is
empty or not
b is
empty or not
c is
empty or not
d is
empty or not
e is
empty or not
f is
empty or not
g is
empty or not
h is
empty ) iff not
OR8 (
a,
b,
c,
d,
e,
f,
g,
h) is
empty )
by Def31;
::
deftheorem Def32 defines
NAND8 GATE_1:def 32 :
for a, b, c, d, e, f, g, h being set holds
( ( ( a is empty or b is empty or c is empty or d is empty or e is empty or f is empty or g is empty or h is empty ) implies NAND8 (a,b,c,d,e,f,g,h) = NOT1 {} ) & ( not a is empty & not b is empty & not c is empty & not d is empty & not e is empty & not f is empty & not g is empty & not h is empty implies NAND8 (a,b,c,d,e,f,g,h) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g,
h being
set holds
( not
NAND8 (
a,
b,
c,
d,
e,
f,
g,
h) is
empty & not
a is
empty & not
b is
empty & not
c is
empty & not
d is
empty & not
e is
empty & not
f is
empty & not
g is
empty iff
h is
empty )
by Def32;
::
deftheorem Def33 defines
NOR8 GATE_1:def 33 :
for a, b, c, d, e, f, g, h being set holds
( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty or not h is empty or NOR8 (a,b,c,d,e,f,g,h) = NOT1 {} ) & ( ( not a is empty or not b is empty or not c is empty or not d is empty or not e is empty or not f is empty or not g is empty or not h is empty ) implies NOR8 (a,b,c,d,e,f,g,h) = {} ) );
theorem
for
a,
b,
c,
d,
e,
f,
g,
h being
set holds
( not
NOR8 (
a,
b,
c,
d,
e,
f,
g,
h) is
empty iff (
a is
empty &
b is
empty &
c is
empty &
d is
empty &
e is
empty &
f is
empty &
g is
empty &
h is
empty ) )
by Def33;
theorem
for
c1,
x1,
x2,
x3,
x4,
y1,
y2,
y3,
y4,
c2,
c3,
c4,
c5,
n1,
n2,
n3,
n4,
n,
c5b being
set st ( not
MAJ3 (
x1,
y1,
c1) is
empty implies not
c2 is
empty ) & ( not
MAJ3 (
x2,
y2,
c2) is
empty implies not
c3 is
empty ) & ( not
MAJ3 (
x3,
y3,
c3) is
empty implies not
c4 is
empty ) & ( not
MAJ3 (
x4,
y4,
c4) is
empty implies not
c5 is
empty ) & ( not
n1 is
empty implies not
OR2 (
x1,
y1) is
empty ) & ( not
n2 is
empty implies not
OR2 (
x2,
y2) is
empty ) & ( not
n3 is
empty implies not
OR2 (
x3,
y3) is
empty ) & ( not
n4 is
empty implies not
OR2 (
x4,
y4) is
empty ) & ( not
n is
empty implies not
AND5 (
c1,
n1,
n2,
n3,
n4) is
empty ) & ( not
c5b is
empty implies not
OR2 (
c5,
n) is
empty ) & ( not
OR2 (
c5,
n) is
empty implies not
c5b is
empty ) holds
( not
c5 is
empty iff not
c5b is
empty )
notation
let a,
b,
c be
set ;
synonym ADD1 (
a,
b,
c)
for XOR3 (
a,
b,
c);
synonym CARR1 (
a,
b,
c)
for MAJ3 (
a,
b,
c);
end;
::
deftheorem defines
ADD2 GATE_1:def 35 :
for a1, b1, a2, b2, c being set holds ADD2 (a2,b2,a1,b1,c) = XOR3 (a2,b2,(CARR1 (a1,b1,c)));
::
deftheorem defines
CARR2 GATE_1:def 36 :
for a1, b1, a2, b2, c being set holds CARR2 (a2,b2,a1,b1,c) = MAJ3 (a2,b2,(CARR1 (a1,b1,c)));
definition
let a1,
b1,
a2,
b2,
a3,
b3,
c be
set ;
func ADD3 (
a3,
b3,
a2,
b2,
a1,
b1,
c)
-> set equals
XOR3 (
a3,
b3,
(CARR2 (a2,b2,a1,b1,c)));
coherence
XOR3 (a3,b3,(CARR2 (a2,b2,a1,b1,c))) is set
;
end;
::
deftheorem defines
ADD3 GATE_1:def 37 :
for a1, b1, a2, b2, a3, b3, c being set holds ADD3 (a3,b3,a2,b2,a1,b1,c) = XOR3 (a3,b3,(CARR2 (a2,b2,a1,b1,c)));
definition
let a1,
b1,
a2,
b2,
a3,
b3,
c be
set ;
func CARR3 (
a3,
b3,
a2,
b2,
a1,
b1,
c)
-> set equals
MAJ3 (
a3,
b3,
(CARR2 (a2,b2,a1,b1,c)));
coherence
MAJ3 (a3,b3,(CARR2 (a2,b2,a1,b1,c))) is set
;
end;
::
deftheorem defines
CARR3 GATE_1:def 38 :
for a1, b1, a2, b2, a3, b3, c being set holds CARR3 (a3,b3,a2,b2,a1,b1,c) = MAJ3 (a3,b3,(CARR2 (a2,b2,a1,b1,c)));
definition
let a1,
b1,
a2,
b2,
a3,
b3,
a4,
b4,
c be
set ;
func ADD4 (
a4,
b4,
a3,
b3,
a2,
b2,
a1,
b1,
c)
-> set equals
XOR3 (
a4,
b4,
(CARR3 (a3,b3,a2,b2,a1,b1,c)));
coherence
XOR3 (a4,b4,(CARR3 (a3,b3,a2,b2,a1,b1,c))) is set
;
end;
::
deftheorem defines
ADD4 GATE_1:def 39 :
for a1, b1, a2, b2, a3, b3, a4, b4, c being set holds ADD4 (a4,b4,a3,b3,a2,b2,a1,b1,c) = XOR3 (a4,b4,(CARR3 (a3,b3,a2,b2,a1,b1,c)));
definition
let a1,
b1,
a2,
b2,
a3,
b3,
a4,
b4,
c be
set ;
func CARR4 (
a4,
b4,
a3,
b3,
a2,
b2,
a1,
b1,
c)
-> set equals
MAJ3 (
a4,
b4,
(CARR3 (a3,b3,a2,b2,a1,b1,c)));
coherence
MAJ3 (a4,b4,(CARR3 (a3,b3,a2,b2,a1,b1,c))) is set
;
end;
::
deftheorem defines
CARR4 GATE_1:def 40 :
for a1, b1, a2, b2, a3, b3, a4, b4, c being set holds CARR4 (a4,b4,a3,b3,a2,b2,a1,b1,c) = MAJ3 (a4,b4,(CARR3 (a3,b3,a2,b2,a1,b1,c)));
theorem
for
c1,
x1,
y1,
x2,
y2,
x3,
y3,
x4,
y4,
c4,
q1,
p1,
sd1,
q2,
p2,
sd2,
q3,
p3,
sd3,
q4,
p4,
sd4,
cb1,
cb2,
l2,
t2,
l3,
m3,
t3,
l4,
m4,
n4,
t4,
l5,
m5,
n5,
o5,
s1,
s2,
s3,
s4 being
set holds
not ( ( not
q1 is
empty implies not
NOR2 (
x1,
y1) is
empty ) & ( not
NOR2 (
x1,
y1) is
empty implies not
q1 is
empty ) & ( not
p1 is
empty implies not
NAND2 (
x1,
y1) is
empty ) & ( not
NAND2 (
x1,
y1) is
empty implies not
p1 is
empty ) & ( not
sd1 is
empty implies not
MODADD2 (
x1,
y1) is
empty ) & ( not
MODADD2 (
x1,
y1) is
empty implies not
sd1 is
empty ) & ( not
q2 is
empty implies not
NOR2 (
x2,
y2) is
empty ) & ( not
NOR2 (
x2,
y2) is
empty implies not
q2 is
empty ) & ( not
p2 is
empty implies not
NAND2 (
x2,
y2) is
empty ) & ( not
NAND2 (
x2,
y2) is
empty implies not
p2 is
empty ) & ( not
sd2 is
empty implies not
MODADD2 (
x2,
y2) is
empty ) & ( not
MODADD2 (
x2,
y2) is
empty implies not
sd2 is
empty ) & ( not
q3 is
empty implies not
NOR2 (
x3,
y3) is
empty ) & ( not
NOR2 (
x3,
y3) is
empty implies not
q3 is
empty ) & ( not
p3 is
empty implies not
NAND2 (
x3,
y3) is
empty ) & ( not
NAND2 (
x3,
y3) is
empty implies not
p3 is
empty ) & ( not
sd3 is
empty implies not
MODADD2 (
x3,
y3) is
empty ) & ( not
MODADD2 (
x3,
y3) is
empty implies not
sd3 is
empty ) & ( not
q4 is
empty implies not
NOR2 (
x4,
y4) is
empty ) & ( not
NOR2 (
x4,
y4) is
empty implies not
q4 is
empty ) & ( not
p4 is
empty implies not
NAND2 (
x4,
y4) is
empty ) & ( not
NAND2 (
x4,
y4) is
empty implies not
p4 is
empty ) & ( not
sd4 is
empty implies not
MODADD2 (
x4,
y4) is
empty ) & ( not
MODADD2 (
x4,
y4) is
empty implies not
sd4 is
empty ) & ( not
cb1 is
empty implies not
NOT1 c1 is
empty ) & ( not
NOT1 c1 is
empty implies not
cb1 is
empty ) & ( not
cb2 is
empty implies not
NOT1 cb1 is
empty ) & ( not
NOT1 cb1 is
empty implies not
cb2 is
empty ) & ( not
s1 is
empty implies not
XOR2 (
cb2,
sd1) is
empty ) & ( not
XOR2 (
cb2,
sd1) is
empty implies not
s1 is
empty ) & ( not
l2 is
empty implies not
AND2 (
cb1,
p1) is
empty ) & ( not
AND2 (
cb1,
p1) is
empty implies not
l2 is
empty ) & ( not
t2 is
empty implies not
NOR2 (
l2,
q1) is
empty ) & ( not
NOR2 (
l2,
q1) is
empty implies not
t2 is
empty ) & ( not
s2 is
empty implies not
XOR2 (
t2,
sd2) is
empty ) & ( not
XOR2 (
t2,
sd2) is
empty implies not
s2 is
empty ) & ( not
l3 is
empty implies not
AND2 (
q1,
p2) is
empty ) & ( not
AND2 (
q1,
p2) is
empty implies not
l3 is
empty ) & ( not
m3 is
empty implies not
AND3 (
p2,
p1,
cb1) is
empty ) & ( not
AND3 (
p2,
p1,
cb1) is
empty implies not
m3 is
empty ) & ( not
t3 is
empty implies not
NOR3 (
l3,
m3,
q2) is
empty ) & ( not
NOR3 (
l3,
m3,
q2) is
empty implies not
t3 is
empty ) & ( not
s3 is
empty implies not
XOR2 (
t3,
sd3) is
empty ) & ( not
XOR2 (
t3,
sd3) is
empty implies not
s3 is
empty ) & ( not
l4 is
empty implies not
AND2 (
q2,
p3) is
empty ) & ( not
AND2 (
q2,
p3) is
empty implies not
l4 is
empty ) & ( not
m4 is
empty implies not
AND3 (
q1,
p3,
p2) is
empty ) & ( not
AND3 (
q1,
p3,
p2) is
empty implies not
m4 is
empty ) & ( not
n4 is
empty implies not
AND4 (
p3,
p2,
p1,
cb1) is
empty ) & ( not
AND4 (
p3,
p2,
p1,
cb1) is
empty implies not
n4 is
empty ) & ( not
t4 is
empty implies not
NOR4 (
l4,
m4,
n4,
q3) is
empty ) & ( not
NOR4 (
l4,
m4,
n4,
q3) is
empty implies not
t4 is
empty ) & ( not
s4 is
empty implies not
XOR2 (
t4,
sd4) is
empty ) & ( not
XOR2 (
t4,
sd4) is
empty implies not
s4 is
empty ) & ( not
l5 is
empty implies not
AND2 (
q3,
p4) is
empty ) & ( not
AND2 (
q3,
p4) is
empty implies not
l5 is
empty ) & ( not
m5 is
empty implies not
AND3 (
q2,
p4,
p3) is
empty ) & ( not
AND3 (
q2,
p4,
p3) is
empty implies not
m5 is
empty ) & ( not
n5 is
empty implies not
AND4 (
q1,
p4,
p3,
p2) is
empty ) & ( not
AND4 (
q1,
p4,
p3,
p2) is
empty implies not
n5 is
empty ) & ( not
o5 is
empty implies not
AND5 (
p4,
p3,
p2,
p1,
cb1) is
empty ) & ( not
AND5 (
p4,
p3,
p2,
p1,
cb1) is
empty implies not
o5 is
empty ) & ( not
c4 is
empty implies not
NOR5 (
q4,
l5,
m5,
n5,
o5) is
empty ) & ( not
NOR5 (
q4,
l5,
m5,
n5,
o5) is
empty implies not
c4 is
empty ) & not ( ( not
s1 is
empty implies not
ADD1 (
x1,
y1,
c1) is
empty ) & ( not
ADD1 (
x1,
y1,
c1) is
empty implies not
s1 is
empty ) & ( not
s2 is
empty implies not
ADD2 (
x2,
y2,
x1,
y1,
c1) is
empty ) & ( not
ADD2 (
x2,
y2,
x1,
y1,
c1) is
empty implies not
s2 is
empty ) & ( not
s3 is
empty implies not
ADD3 (
x3,
y3,
x2,
y2,
x1,
y1,
c1) is
empty ) & ( not
ADD3 (
x3,
y3,
x2,
y2,
x1,
y1,
c1) is
empty implies not
s3 is
empty ) & ( not
s4 is
empty implies not
ADD4 (
x4,
y4,
x3,
y3,
x2,
y2,
x1,
y1,
c1) is
empty ) & ( not
ADD4 (
x4,
y4,
x3,
y3,
x2,
y2,
x1,
y1,
c1) is
empty implies not
s4 is
empty ) & ( not
c4 is
empty implies not
CARR4 (
x4,
y4,
x3,
y3,
x2,
y2,
x1,
y1,
c1) is
empty ) & ( not
CARR4 (
x4,
y4,
x3,
y3,
x2,
y2,
x1,
y1,
c1) is
empty implies not
c4 is
empty ) ) )
:: is equivalent to an MSB carry of a normal 4 bit adder.
:: We assume that there is no feedback loop in adders.