:: FACIRC_2 semantic presentation
theorem Th1: :: FACIRC_2:1
for
b1,
b2,
b3 being
set st
b1 <> b3 &
b2 <> b3 holds
{b1,b2} \ {b3} = {b1,b2}
theorem Th2: :: FACIRC_2:2
canceled;
theorem Th3: :: FACIRC_2:3
:: deftheorem Def1 defines SingleMSS FACIRC_2:def 1 :
:: deftheorem Def2 defines SingleMSA FACIRC_2:def 2 :
theorem Th4: :: FACIRC_2:4
theorem Th5: :: FACIRC_2:5
theorem Th6: :: FACIRC_2:6
definition
let c1 be
Nat;
let c2,
c3 be
FinSequence;
E4:
(
1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) is
unsplit &
1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) is
gate`1=arity &
1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) is
gate`2isBoolean & not
1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) is
void & not
1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) is
empty &
1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) is
strict )
;
func c1 -BitAdderStr c2,
c3 -> non
empty strict non
void unsplit gate`1=arity gate`2isBoolean ManySortedSign means :
Def3:
:: FACIRC_2:def 3
ex
b1,
b2 being
ManySortedSet of
NAT st
(
a4 = b1 . a1 &
b1 . 0
= 1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b2 . 0
= [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for
b3 being
Nat for
b4 being non
empty ManySortedSign for
b5 being
set st
b4 = b1 . b3 &
b5 = b2 . b3 holds
(
b1 . (b3 + 1) = b4 +* (BitAdderWithOverflowStr (a2 . (b3 + 1)),(a3 . (b3 + 1)),b5) &
b2 . (b3 + 1) = MajorityOutput (a2 . (b3 + 1)),
(a3 . (b3 + 1)),
b5 ) ) );
uniqueness
for b1, b2 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign st ex b3, b4 being ManySortedSet of NAT st
( b1 = b3 . c1 & b3 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b4 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b5 being Nat
for b6 being non empty ManySortedSign
for b7 being set st b6 = b3 . b5 & b7 = b4 . b5 holds
( b3 . (b5 + 1) = b6 +* (BitAdderWithOverflowStr (c2 . (b5 + 1)),(c3 . (b5 + 1)),b7) & b4 . (b5 + 1) = MajorityOutput (c2 . (b5 + 1)),(c3 . (b5 + 1)),b7 ) ) ) & ex b3, b4 being ManySortedSet of NAT st
( b2 = b3 . c1 & b3 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b4 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b5 being Nat
for b6 being non empty ManySortedSign
for b7 being set st b6 = b3 . b5 & b7 = b4 . b5 holds
( b3 . (b5 + 1) = b6 +* (BitAdderWithOverflowStr (c2 . (b5 + 1)),(c3 . (b5 + 1)),b7) & b4 . (b5 + 1) = MajorityOutput (c2 . (b5 + 1)),(c3 . (b5 + 1)),b7 ) ) ) holds
b1 = b2
existence
ex b1 being non empty strict non void unsplit gate`1=arity gate`2isBoolean ManySortedSign ex b2, b3 being ManySortedSet of NAT st
( b1 = b2 . c1 & b2 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b3 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b4 being Nat
for b5 being non empty ManySortedSign
for b6 being set st b5 = b2 . b4 & b6 = b3 . b4 holds
( b2 . (b4 + 1) = b5 +* (BitAdderWithOverflowStr (c2 . (b4 + 1)),(c3 . (b4 + 1)),b6) & b3 . (b4 + 1) = MajorityOutput (c2 . (b4 + 1)),(c3 . (b4 + 1)),b6 ) ) )
end;
:: deftheorem Def3 defines -BitAdderStr FACIRC_2:def 3 :
definition
let c1 be
Nat;
let c2,
c3 be
FinSequence;
func c1 -BitAdderCirc c2,
c3 -> strict gate`2=den Boolean Circuit of
a1 -BitAdderStr a2,
a3 means :
Def4:
:: FACIRC_2:def 4
ex
b1,
b2,
b3 being
ManySortedSet of
NAT st
(
a1 -BitAdderStr a2,
a3 = b1 . a1 &
a4 = b2 . a1 &
b1 . 0
= 1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b2 . 0
= 1GateCircuit <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b3 . 0
= [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for
b4 being
Nat for
b5 being non
empty ManySortedSign for
b6 being
non-empty MSAlgebra of
b5 for
b7 being
set st
b5 = b1 . b4 &
b6 = b2 . b4 &
b7 = b3 . b4 holds
(
b1 . (b4 + 1) = b5 +* (BitAdderWithOverflowStr (a2 . (b4 + 1)),(a3 . (b4 + 1)),b7) &
b2 . (b4 + 1) = b6 +* (BitAdderWithOverflowCirc (a2 . (b4 + 1)),(a3 . (b4 + 1)),b7) &
b3 . (b4 + 1) = MajorityOutput (a2 . (b4 + 1)),
(a3 . (b4 + 1)),
b7 ) ) );
uniqueness
for b1, b2 being strict gate`2=den Boolean Circuit of c1 -BitAdderStr c2,c3 st ex b3, b4, b5 being ManySortedSet of NAT st
( c1 -BitAdderStr c2,c3 = b3 . c1 & b1 = b4 . c1 & b3 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b4 . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b5 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b6 being Nat
for b7 being non empty ManySortedSign
for b8 being non-empty MSAlgebra of b7
for b9 being set st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6 holds
( b3 . (b6 + 1) = b7 +* (BitAdderWithOverflowStr (c2 . (b6 + 1)),(c3 . (b6 + 1)),b9) & b4 . (b6 + 1) = b8 +* (BitAdderWithOverflowCirc (c2 . (b6 + 1)),(c3 . (b6 + 1)),b9) & b5 . (b6 + 1) = MajorityOutput (c2 . (b6 + 1)),(c3 . (b6 + 1)),b9 ) ) ) & ex b3, b4, b5 being ManySortedSet of NAT st
( c1 -BitAdderStr c2,c3 = b3 . c1 & b2 = b4 . c1 & b3 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b4 . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b5 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b6 being Nat
for b7 being non empty ManySortedSign
for b8 being non-empty MSAlgebra of b7
for b9 being set st b7 = b3 . b6 & b8 = b4 . b6 & b9 = b5 . b6 holds
( b3 . (b6 + 1) = b7 +* (BitAdderWithOverflowStr (c2 . (b6 + 1)),(c3 . (b6 + 1)),b9) & b4 . (b6 + 1) = b8 +* (BitAdderWithOverflowCirc (c2 . (b6 + 1)),(c3 . (b6 + 1)),b9) & b5 . (b6 + 1) = MajorityOutput (c2 . (b6 + 1)),(c3 . (b6 + 1)),b9 ) ) ) holds
b1 = b2
existence
ex b1 being strict gate`2=den Boolean Circuit of c1 -BitAdderStr c2,c3ex b2, b3, b4 being ManySortedSet of NAT st
( c1 -BitAdderStr c2,c3 = b2 . c1 & b1 = b3 . c1 & b2 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b3 . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & b4 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b5 being Nat
for b6 being non empty ManySortedSign
for b7 being non-empty MSAlgebra of b6
for b8 being set st b6 = b2 . b5 & b7 = b3 . b5 & b8 = b4 . b5 holds
( b2 . (b5 + 1) = b6 +* (BitAdderWithOverflowStr (c2 . (b5 + 1)),(c3 . (b5 + 1)),b8) & b3 . (b5 + 1) = b7 +* (BitAdderWithOverflowCirc (c2 . (b5 + 1)),(c3 . (b5 + 1)),b8) & b4 . (b5 + 1) = MajorityOutput (c2 . (b5 + 1)),(c3 . (b5 + 1)),b8 ) ) )
end;
:: deftheorem Def4 defines -BitAdderCirc FACIRC_2:def 4 :
for
b1 being
Nat for
b2,
b3 being
FinSequence for
b4 being
strict gate`2=den Boolean Circuit of
b1 -BitAdderStr b2,
b3 holds
(
b4 = b1 -BitAdderCirc b2,
b3 iff ex
b5,
b6,
b7 being
ManySortedSet of
NAT st
(
b1 -BitAdderStr b2,
b3 = b5 . b1 &
b4 = b6 . b1 &
b5 . 0
= 1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b6 . 0
= 1GateCircuit <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b7 . 0
= [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for
b8 being
Nat for
b9 being non
empty ManySortedSign for
b10 being
non-empty MSAlgebra of
b9 for
b11 being
set st
b9 = b5 . b8 &
b10 = b6 . b8 &
b11 = b7 . b8 holds
(
b5 . (b8 + 1) = b9 +* (BitAdderWithOverflowStr (b2 . (b8 + 1)),(b3 . (b8 + 1)),b11) &
b6 . (b8 + 1) = b10 +* (BitAdderWithOverflowCirc (b2 . (b8 + 1)),(b3 . (b8 + 1)),b11) &
b7 . (b8 + 1) = MajorityOutput (b2 . (b8 + 1)),
(b3 . (b8 + 1)),
b11 ) ) ) );
definition
let c1 be
Nat;
let c2,
c3 be
FinSequence;
set c4 =
[<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )];
func c1 -BitMajorityOutput c2,
c3 -> Element of
InnerVertices (a1 -BitAdderStr a2,a3) means :
Def5:
:: FACIRC_2:def 5
ex
b1 being
ManySortedSet of
NAT st
(
a4 = b1 . a1 &
b1 . 0
= [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for
b2 being
Nat for
b3 being
set st
b3 = b1 . b2 holds
b1 . (b2 + 1) = MajorityOutput (a2 . (b2 + 1)),
(a3 . (b2 + 1)),
b3 ) );
uniqueness
for b1, b2 being Element of InnerVertices (c1 -BitAdderStr c2,c3) st ex b3 being ManySortedSet of NAT st
( b1 = b3 . c1 & b3 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b4 being Nat
for b5 being set st b5 = b3 . b4 holds
b3 . (b4 + 1) = MajorityOutput (c2 . (b4 + 1)),(c3 . (b4 + 1)),b5 ) ) & ex b3 being ManySortedSet of NAT st
( b2 = b3 . c1 & b3 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b4 being Nat
for b5 being set st b5 = b3 . b4 holds
b3 . (b4 + 1) = MajorityOutput (c2 . (b4 + 1)),(c3 . (b4 + 1)),b5 ) ) holds
b1 = b2
existence
ex b1 being Element of InnerVertices (c1 -BitAdderStr c2,c3)ex b2 being ManySortedSet of NAT st
( b1 = b2 . c1 & b2 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for b3 being Nat
for b4 being set st b4 = b2 . b3 holds
b2 . (b3 + 1) = MajorityOutput (c2 . (b3 + 1)),(c3 . (b3 + 1)),b4 ) )
end;
:: deftheorem Def5 defines -BitMajorityOutput FACIRC_2:def 5 :
theorem Th7: :: FACIRC_2:7
for
b1,
b2 being
FinSequence for
b3,
b4,
b5 being
ManySortedSet of
NAT st
b3 . 0
= 1GateCircStr <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b4 . 0
= 1GateCircuit <*> ,
((0 -tuples_on BOOLEAN ) --> FALSE ) &
b5 . 0
= [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for
b6 being
Nat for
b7 being non
empty ManySortedSign for
b8 being
non-empty MSAlgebra of
b7 for
b9 being
set st
b7 = b3 . b6 &
b8 = b4 . b6 &
b9 = b5 . b6 holds
(
b3 . (b6 + 1) = b7 +* (BitAdderWithOverflowStr (b1 . (b6 + 1)),(b2 . (b6 + 1)),b9) &
b4 . (b6 + 1) = b8 +* (BitAdderWithOverflowCirc (b1 . (b6 + 1)),(b2 . (b6 + 1)),b9) &
b5 . (b6 + 1) = MajorityOutput (b1 . (b6 + 1)),
(b2 . (b6 + 1)),
b9 ) ) holds
for
b6 being
Nat holds
(
b6 -BitAdderStr b1,
b2 = b3 . b6 &
b6 -BitAdderCirc b1,
b2 = b4 . b6 &
b6 -BitMajorityOutput b1,
b2 = b5 . b6 )
theorem Th8: :: FACIRC_2:8
theorem Th9: :: FACIRC_2:9
for
b1,
b2 being
FinSequence for
b3 being
set st
b3 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] holds
( 1
-BitAdderStr b1,
b2 = (1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE )) +* (BitAdderWithOverflowStr (b1 . 1),(b2 . 1),b3) & 1
-BitAdderCirc b1,
b2 = (1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE )) +* (BitAdderWithOverflowCirc (b1 . 1),(b2 . 1),b3) & 1
-BitMajorityOutput b1,
b2 = MajorityOutput (b1 . 1),
(b2 . 1),
b3 )
theorem Th10: :: FACIRC_2:10
for
b1,
b2,
b3 being
set st
b3 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] holds
( 1
-BitAdderStr <*b1*>,
<*b2*> = (1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE )) +* (BitAdderWithOverflowStr b1,b2,b3) & 1
-BitAdderCirc <*b1*>,
<*b2*> = (1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE )) +* (BitAdderWithOverflowCirc b1,b2,b3) & 1
-BitMajorityOutput <*b1*>,
<*b2*> = MajorityOutput b1,
b2,
b3 )
theorem Th11: :: FACIRC_2:11
for
b1 being
Nat for
b2,
b3 being
FinSeqLen of
b1 for
b4,
b5,
b6,
b7 being
FinSequence holds
(
b1 -BitAdderStr (b2 ^ b4),
(b3 ^ b6) = b1 -BitAdderStr (b2 ^ b5),
(b3 ^ b7) &
b1 -BitAdderCirc (b2 ^ b4),
(b3 ^ b6) = b1 -BitAdderCirc (b2 ^ b5),
(b3 ^ b7) &
b1 -BitMajorityOutput (b2 ^ b4),
(b3 ^ b6) = b1 -BitMajorityOutput (b2 ^ b5),
(b3 ^ b7) )
theorem Th12: :: FACIRC_2:12
for
b1 being
Nat for
b2,
b3 being
FinSeqLen of
b1 for
b4,
b5 being
set holds
(
(b1 + 1) -BitAdderStr (b2 ^ <*b4*>),
(b3 ^ <*b5*>) = (b1 -BitAdderStr b2,b3) +* (BitAdderWithOverflowStr b4,b5,(b1 -BitMajorityOutput b2,b3)) &
(b1 + 1) -BitAdderCirc (b2 ^ <*b4*>),
(b3 ^ <*b5*>) = (b1 -BitAdderCirc b2,b3) +* (BitAdderWithOverflowCirc b4,b5,(b1 -BitMajorityOutput b2,b3)) &
(b1 + 1) -BitMajorityOutput (b2 ^ <*b4*>),
(b3 ^ <*b5*>) = MajorityOutput b4,
b5,
(b1 -BitMajorityOutput b2,b3) )
theorem Th13: :: FACIRC_2:13
for
b1 being
Nat for
b2,
b3 being
FinSequence holds
(
(b1 + 1) -BitAdderStr b2,
b3 = (b1 -BitAdderStr b2,b3) +* (BitAdderWithOverflowStr (b2 . (b1 + 1)),(b3 . (b1 + 1)),(b1 -BitMajorityOutput b2,b3)) &
(b1 + 1) -BitAdderCirc b2,
b3 = (b1 -BitAdderCirc b2,b3) +* (BitAdderWithOverflowCirc (b2 . (b1 + 1)),(b3 . (b1 + 1)),(b1 -BitMajorityOutput b2,b3)) &
(b1 + 1) -BitMajorityOutput b2,
b3 = MajorityOutput (b2 . (b1 + 1)),
(b3 . (b1 + 1)),
(b1 -BitMajorityOutput b2,b3) )
theorem Th14: :: FACIRC_2:14
theorem Th15: :: FACIRC_2:15
definition
let c1,
c2 be
Nat;
assume E13:
(
c1 >= 1 &
c1 <= c2 )
;
let c3,
c4 be
FinSequence;
func c1,
c2 -BitAdderOutput c3,
c4 -> Element of
InnerVertices (a2 -BitAdderStr a3,a4) means :
Def6:
:: FACIRC_2:def 6
ex
b1 being
Nat st
(
a1 = b1 + 1 &
a5 = BitAdderOutput (a3 . a1),
(a4 . a1),
(b1 -BitMajorityOutput a3,a4) );
uniqueness
for b1, b2 being Element of InnerVertices (c2 -BitAdderStr c3,c4) st ex b3 being Nat st
( c1 = b3 + 1 & b1 = BitAdderOutput (c3 . c1),(c4 . c1),(b3 -BitMajorityOutput c3,c4) ) & ex b3 being Nat st
( c1 = b3 + 1 & b2 = BitAdderOutput (c3 . c1),(c4 . c1),(b3 -BitMajorityOutput c3,c4) ) holds
b1 = b2
;
existence
ex b1 being Element of InnerVertices (c2 -BitAdderStr c3,c4)ex b2 being Nat st
( c1 = b2 + 1 & b1 = BitAdderOutput (c3 . c1),(c4 . c1),(b2 -BitMajorityOutput c3,c4) )
end;
:: deftheorem Def6 defines -BitAdderOutput FACIRC_2:def 6 :
theorem Th16: :: FACIRC_2:16
theorem Th17: :: FACIRC_2:17
theorem Th18: :: FACIRC_2:18
for
b1,
b2,
b3 being
set holds
InnerVertices (MajorityIStr b1,b2,b3) = {[<*b1,b2*>,'&' ],[<*b2,b3*>,'&' ],[<*b3,b1*>,'&' ]}
theorem Th19: :: FACIRC_2:19
for
b1,
b2,
b3 being
set st
b1 <> [<*b2,b3*>,'&' ] &
b2 <> [<*b3,b1*>,'&' ] &
b3 <> [<*b1,b2*>,'&' ] holds
InputVertices (MajorityIStr b1,b2,b3) = {b1,b2,b3}
theorem Th20: :: FACIRC_2:20
for
b1,
b2,
b3 being
set holds
InnerVertices (MajorityStr b1,b2,b3) = {[<*b1,b2*>,'&' ],[<*b2,b3*>,'&' ],[<*b3,b1*>,'&' ]} \/ {(MajorityOutput b1,b2,b3)}
theorem Th21: :: FACIRC_2:21
for
b1,
b2,
b3 being
set st
b1 <> [<*b2,b3*>,'&' ] &
b2 <> [<*b3,b1*>,'&' ] &
b3 <> [<*b1,b2*>,'&' ] holds
InputVertices (MajorityStr b1,b2,b3) = {b1,b2,b3}
theorem Th22: :: FACIRC_2:22
theorem Th23: :: FACIRC_2:23
for
b1,
b2,
b3 being
set st
b1 <> [<*b2,b3*>,'&' ] &
b2 <> [<*b3,b1*>,'&' ] &
b3 <> [<*b1,b2*>,'&' ] &
b3 <> [<*b1,b2*>,'xor' ] holds
InputVertices (BitAdderWithOverflowStr b1,b2,b3) = {b1,b2,b3}
theorem Th24: :: FACIRC_2:24
for
b1,
b2,
b3 being
set holds
InnerVertices (BitAdderWithOverflowStr b1,b2,b3) = ({[<*b1,b2*>,'xor' ],(2GatesCircOutput b1,b2,b3,'xor' )} \/ {[<*b1,b2*>,'&' ],[<*b2,b3*>,'&' ],[<*b3,b1*>,'&' ]}) \/ {(MajorityOutput b1,b2,b3)}
theorem Th25: :: FACIRC_2:25
theorem Th26: :: FACIRC_2:26
theorem Th27: :: FACIRC_2:27
theorem Th28: :: FACIRC_2:28
Lemma26:
for b1, b2, b3 being set
for b4 being State of (MajorityCirc b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3 holds
( (Following b4) . [<*b1,b2*>,'&' ] = b5 '&' b6 & (Following b4) . [<*b2,b3*>,'&' ] = b6 '&' b7 & (Following b4) . [<*b3,b1*>,'&' ] = b7 '&' b5 )
theorem Th29: :: FACIRC_2:29
for
b1,
b2,
b3 being
set for
b4 being
State of
(MajorityCirc b1,b2,b3) for
b5,
b6,
b7 being
Element of
BOOLEAN st
b5 = b4 . [<*b1,b2*>,'&' ] &
b6 = b4 . [<*b2,b3*>,'&' ] &
b7 = b4 . [<*b3,b1*>,'&' ] holds
(Following b4) . (MajorityOutput b1,b2,b3) = (b5 'or' b6) 'or' b7
Lemma28:
for b1, b2, b3 being set st b1 <> [<*b2,b3*>,'&' ] & b2 <> [<*b3,b1*>,'&' ] & b3 <> [<*b1,b2*>,'&' ] holds
for b4 being State of (MajorityCirc b1,b2,b3)
for b5, b6, b7 being Element of BOOLEAN st b5 = b4 . b1 & b6 = b4 . b2 & b7 = b4 . b3 holds
( (Following b4,2) . (MajorityOutput b1,b2,b3) = ((b5 '&' b6) 'or' (b6 '&' b7)) 'or' (b7 '&' b5) & (Following b4,2) . [<*b1,b2*>,'&' ] = b5 '&' b6 & (Following b4,2) . [<*b2,b3*>,'&' ] = b6 '&' b7 & (Following b4,2) . [<*b3,b1*>,'&' ] = b7 '&' b5 )
theorem Th30: :: FACIRC_2:30
for
b1,
b2,
b3 being
set st
b1 <> [<*b2,b3*>,'&' ] &
b2 <> [<*b3,b1*>,'&' ] &
b3 <> [<*b1,b2*>,'&' ] &
b3 <> [<*b1,b2*>,'xor' ] holds
for
b4 being
State of
(MajorityCirc b1,b2,b3) holds
Following b4,2 is
stable
theorem Th31: :: FACIRC_2:31
for
b1,
b2,
b3 being
set st
b1 <> [<*b2,b3*>,'&' ] &
b2 <> [<*b3,b1*>,'&' ] &
b3 <> [<*b1,b2*>,'&' ] &
b3 <> [<*b1,b2*>,'xor' ] holds
for
b4 being
State of
(BitAdderWithOverflowCirc b1,b2,b3) for
b5,
b6,
b7 being
Element of
BOOLEAN st
b5 = b4 . b1 &
b6 = b4 . b2 &
b7 = b4 . b3 holds
(
(Following b4,2) . (BitAdderOutput b1,b2,b3) = (b5 'xor' b6) 'xor' b7 &
(Following b4,2) . (MajorityOutput b1,b2,b3) = ((b5 '&' b6) 'or' (b6 '&' b7)) 'or' (b7 '&' b5) )
theorem Th32: :: FACIRC_2:32
for
b1,
b2,
b3 being
set st
b1 <> [<*b2,b3*>,'&' ] &
b2 <> [<*b3,b1*>,'&' ] &
b3 <> [<*b1,b2*>,'&' ] &
b3 <> [<*b1,b2*>,'xor' ] holds
for
b4 being
State of
(BitAdderWithOverflowCirc b1,b2,b3) holds
Following b4,2 is
stable
Lemma31:
for b1 being Nat ex b2 being Function of NAT , NAT st
( b2 . 0 = 1 & b2 . 1 = 2 & b2 . 2 = b1 )
theorem Th33: :: FACIRC_2:33
theorem Th34: :: FACIRC_2:34
theorem Th35: :: FACIRC_2:35
canceled;
theorem Th36: :: FACIRC_2:36
theorem Th37: :: FACIRC_2:37