let n be Element of NAT ; :: thesis: for x, y being FinSeqLen of
for a, b being set holds
( (n + 1) -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderStr x,y) +* (BitAdderWithOverflowStr a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderCirc x,y) +* (BitAdderWithOverflowCirc a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = MajorityOutput a,b,(n -BitMajorityOutput x,y) )
set c = [<*> ,((0 -tuples_on BOOLEAN ) --> FALSE )];
let x, y be FinSeqLen of ; :: thesis: for a, b being set holds
( (n + 1) -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderStr x,y) +* (BitAdderWithOverflowStr a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderCirc x,y) +* (BitAdderWithOverflowCirc a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = MajorityOutput a,b,(n -BitMajorityOutput x,y) )
let a, b be set ; :: thesis: ( (n + 1) -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderStr x,y) +* (BitAdderWithOverflowStr a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderCirc x,y) +* (BitAdderWithOverflowCirc a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = MajorityOutput a,b,(n -BitMajorityOutput x,y) )
set p = x ^ <*a*>;
set q = y ^ <*b*>;
consider f, g, h being ManySortedSet of such that
A1:
( n -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = f . n & n -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = g . n )
and
A2:
( f . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & g . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> FALSE ) & 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) = S +* (BitAdderWithOverflowStr ((x ^ <*a*>) . (n + 1)),((y ^ <*b*>) . (n + 1)),z) & g . (n + 1) = A +* (BitAdderWithOverflowCirc ((x ^ <*a*>) . (n + 1)),((y ^ <*b*>) . (n + 1)),z) & h . (n + 1) = MajorityOutput ((x ^ <*a*>) . (n + 1)),((y ^ <*b*>) . (n + 1)),z )
by Def4;
A4:
( n -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = h . n & (n + 1) -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = f . (n + 1) & (n + 1) -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = g . (n + 1) & (n + 1) -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = h . (n + 1) )
by A2, A3, Th7;
( len x = n & len y = n )
by FINSEQ_1:def 18;
then A5:
( (x ^ <*a*>) . (n + 1) = a & (y ^ <*b*>) . (n + 1) = b )
by FINSEQ_1:59;
( x ^ <*> = x & y ^ <*> = y )
by FINSEQ_1:47;
then
( n -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = n -BitAdderStr x,y & n -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = n -BitAdderCirc x,y & n -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = n -BitMajorityOutput x,y )
by Th11;
hence
( (n + 1) -BitAdderStr (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderStr x,y) +* (BitAdderWithOverflowStr a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitAdderCirc (x ^ <*a*>),(y ^ <*b*>) = (n -BitAdderCirc x,y) +* (BitAdderWithOverflowCirc a,b,(n -BitMajorityOutput x,y)) & (n + 1) -BitMajorityOutput (x ^ <*a*>),(y ^ <*b*>) = MajorityOutput a,b,(n -BitMajorityOutput x,y) )
by A1, A3, A4, A5; :: thesis: verum