let n be Element of NAT ; for x, y being FinSequence holds
( (n + 1) -BitSubtracterStr x,y = (n -BitSubtracterStr x,y) +* (BitSubtracterWithBorrowStr (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y)) & (n + 1) -BitSubtracterCirc x,y = (n -BitSubtracterCirc x,y) +* (BitSubtracterWithBorrowCirc (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y)) & (n + 1) -BitBorrowOutput x,y = BorrowOutput (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y) )
let x, y be FinSequence; ( (n + 1) -BitSubtracterStr x,y = (n -BitSubtracterStr x,y) +* (BitSubtracterWithBorrowStr (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y)) & (n + 1) -BitSubtracterCirc x,y = (n -BitSubtracterCirc x,y) +* (BitSubtracterWithBorrowCirc (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y)) & (n + 1) -BitBorrowOutput x,y = BorrowOutput (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y) )
set c = [<*> ,((0 -tuples_on BOOLEAN ) --> TRUE )];
consider f, g, h being ManySortedSet of NAT such that
A1:
n -BitSubtracterStr x,y = f . n
and
A2:
n -BitSubtracterCirc x,y = g . n
and
A3:
f . 0 = 1GateCircStr <*> ,((0 -tuples_on BOOLEAN ) --> TRUE )
and
A4:
g . 0 = 1GateCircuit <*> ,((0 -tuples_on BOOLEAN ) --> TRUE )
and
A5:
h . 0 = [<*> ,((0 -tuples_on BOOLEAN ) --> TRUE )]
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 = f . n & A = g . n & z = h . n holds
( f . (n + 1) = S +* (BitSubtracterWithBorrowStr (x . (n + 1)),(y . (n + 1)),z) & g . (n + 1) = A +* (BitSubtracterWithBorrowCirc (x . (n + 1)),(y . (n + 1)),z) & h . (n + 1) = BorrowOutput (x . (n + 1)),(y . (n + 1)),z )
by Def2;
A7:
n -BitBorrowOutput x,y = h . n
by A3, A4, A5, A6, Th1;
A8:
(n + 1) -BitSubtracterStr x,y = f . (n + 1)
by A3, A4, A5, A6, Th1;
A9:
(n + 1) -BitSubtracterCirc x,y = g . (n + 1)
by A3, A4, A5, A6, Th1;
(n + 1) -BitBorrowOutput x,y = h . (n + 1)
by A3, A4, A5, A6, Th1;
hence
( (n + 1) -BitSubtracterStr x,y = (n -BitSubtracterStr x,y) +* (BitSubtracterWithBorrowStr (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y)) & (n + 1) -BitSubtracterCirc x,y = (n -BitSubtracterCirc x,y) +* (BitSubtracterWithBorrowCirc (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y)) & (n + 1) -BitBorrowOutput x,y = BorrowOutput (x . (n + 1)),(y . (n + 1)),(n -BitBorrowOutput x,y) )
by A1, A2, A6, A7, A8, A9; verum