let x, y be FinSequence; :: thesis: for f, g, h being ManySortedSet of st f . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & g . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & h . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for n being Nat
for S being non empty ManySortedSign
for A being non-empty MSAlgebra of S
for z being set st S = f . n & A = g . n & z = h . n holds
( f . (n + 1) = S +* (BitAdderWithOverflowStr (x . (n + 1)),(y . (n + 1)),z) & g . (n + 1) = A +* (BitAdderWithOverflowCirc (x . (n + 1)),(y . (n + 1)),z) & h . (n + 1) = MajorityOutput (x . (n + 1)),(y . (n + 1)),z ) ) holds
for n being Nat holds
( n -BitAdderStr x,y = f . n & n -BitAdderCirc x,y = g . n & n -BitMajorityOutput x,y = h . n )

let f, g, h be ManySortedSet of ; :: thesis: ( f . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & g . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & h . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for n being Nat
for S being non empty ManySortedSign
for A being non-empty MSAlgebra of S
for z being set st S = f . n & A = g . n & z = h . n holds
( f . (n + 1) = S +* (BitAdderWithOverflowStr (x . (n + 1)),(y . (n + 1)),z) & g . (n + 1) = A +* (BitAdderWithOverflowCirc (x . (n + 1)),(y . (n + 1)),z) & h . (n + 1) = MajorityOutput (x . (n + 1)),(y . (n + 1)),z ) ) implies for n being Nat holds
( n -BitAdderStr x,y = f . n & n -BitAdderCirc x,y = g . n & n -BitMajorityOutput x,y = h . n ) )

deffunc H1( set , Nat) -> Element of InnerVertices (MajorityStr (x . ($2 + 1)),(y . ($2 + 1)),$1) = MajorityOutput (x . ($2 + 1)),(y . ($2 + 1)),$1;
deffunc H2( Nat, set ) -> Element of InnerVertices (MajorityStr (x . ($1 + 1)),(y . ($1 + 1)),$2) = MajorityOutput (x . ($1 + 1)),(y . ($1 + 1)),$2;
deffunc H3( non empty ManySortedSign , set , Nat) -> ManySortedSign = $1 +* (BitAdderWithOverflowStr (x . ($3 + 1)),(y . ($3 + 1)),$2);
deffunc H4( non empty ManySortedSign , non-empty MSAlgebra of $1, set , Nat) -> MSAlgebra of $1 +* (BitAdderWithOverflowStr (x . ($4 + 1)),(y . ($4 + 1)),$3) = $2 +* (BitAdderWithOverflowCirc (x . ($4 + 1)),(y . ($4 + 1)),$3);
assume that
A1: ( f . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & g . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) ) and
A2: h . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] and
A3: for n being Nat
for S being non empty ManySortedSign
for A being non-empty MSAlgebra of S
for z being set st S = f . n & A = g . n & z = h . n holds
( f . (n + 1) = H3(S,z,n) & g . (n + 1) = H4(S,A,z,n) & h . (n + 1) = H1(z,n) ) ; :: thesis: for n being Nat holds
( n -BitAdderStr x,y = f . n & n -BitAdderCirc x,y = g . n & n -BitMajorityOutput x,y = h . n )

let n be Nat; :: thesis: ( n -BitAdderStr x,y = f . n & n -BitAdderCirc x,y = g . n & n -BitMajorityOutput x,y = h . n )
consider f1, g1, h1 being ManySortedSet of such that
A4: ( n -BitAdderStr x,y = f1 . n & n -BitAdderCirc x,y = g1 . n ) and
A5: ( f1 . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & g1 . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & h1 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] ) and
A6: for n being Nat
for S being non empty ManySortedSign
for A being non-empty MSAlgebra of S
for z being set st S = f1 . n & A = g1 . n & z = h1 . n holds
( f1 . (n + 1) = H3(S,z,n) & g1 . (n + 1) = H4(S,A,z,n) & h1 . (n + 1) = H1(z,n) ) by Def4;
A7: ex S being non empty ManySortedSign ex A being non-empty MSAlgebra of S st
( S = f . 0 & A = g . 0 ) by A1;
A8: ( f . 0 = f1 . 0 & g . 0 = g1 . 0 & h . 0 = h1 . 0 ) by A1, A2, A5;
A9: for S being non empty ManySortedSign
for A being non-empty MSAlgebra of S
for z being set
for n being Nat holds H4(S,A,z,n) is non-empty MSAlgebra of H3(S,z,n) ;
( f = f1 & g = g1 & h = h1 ) from CIRCCMB2:sch 14(A7, A8, A3, A6, A9);
hence ( n -BitAdderStr x,y = f . n & n -BitAdderCirc x,y = g . n ) by A4; :: thesis: n -BitMajorityOutput x,y = h . n
A10: for n being Nat
for S being non empty ManySortedSign
for z being set st S = f . n & z = h . n holds
( f . (n + 1) = H3(S,z,n) & h . (n + 1) = H1(z,n) ) from CIRCCMB2:sch 15(A1, A3, A9);
A11: f . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) by A1;
X: for n being Nat
for z being set st z = h . n holds
h . (n + 1) = H1(z,n) from CIRCCMB2:sch 3(A11, A10);
A12: dom h = NAT by PARTFUN1:def 4;
B12: h . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] by A2;
C12: for n being Nat holds h . (n + 1) = H2(n,h . n) by X;
consider h1 being ManySortedSet of such that
A13: n -BitMajorityOutput x,y = h1 . n and
A14: ( h1 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] & ( for n being Nat
for z being set st z = h1 . n holds
h1 . (n + 1) = MajorityOutput (x . (n + 1)),(y . (n + 1)),z ) ) by Def5;
A15: dom h1 = NAT by PARTFUN1:def 4;
B15: h1 . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )] by A14;
C15: for n being Nat holds h1 . (n + 1) = H2(n,h1 . n) by A14;
h = h1 from NAT_1:sch 15(A12, B12, C12, A15, B15, C15);
hence n -BitMajorityOutput x,y = h . n by A13; :: thesis: verum