
theorem Th25:
  for x,y,c being set st
  x <> [<*y,c*>, and2] & y <> [<*x,c*>, and2a] & c <> [<*x,y*>, and2a] &
  c <> [<*x,y*>, 'xor']
  for s being State of BitSubtracterWithBorrowCirc(x,y,c)
  holds Following(s,2) is stable
proof
  let x,y,c be set such that
A1: x <> [<*y,c*>, and2] and
A2: y <> [<*x,c*>, and2a] and
A3: c <> [<*x,y*>, and2a] and
A4: c <> [<*x,y*>, 'xor'];
  set S = BitSubtracterWithBorrowStr(x,y,c);
  set S1 = 2GatesCircStr(x,y,c, 'xor'), S2 = BorrowStr(x,y,c);
  set A = BitSubtracterWithBorrowCirc(x,y,c);
  set A1 = BitSubtracterCirc(x,y,c), A2 = BorrowCirc(x,y,c);
  let s be State of A;
  reconsider s1 = s|the carrier of S1 as State of A1 by FACIRC_1:26;
  reconsider s2 = s|the carrier of S2 as State of A2 by FACIRC_1:26;
  reconsider t = s as State of A1+*A2;
A5: InputVertices S2 = {x,y,c} by A1,A2,A3,Th15;
A6: InnerVertices S1 misses InputVertices S1 by XBOOLE_1:79;
A7: InnerVertices S2 misses InputVertices S2 by XBOOLE_1:79;
A8: InnerVertices S1 misses InputVertices S2 by A4,A5,A6,FACIRC_1:57;
A9: InnerVertices S2 misses InputVertices S1 by A4,A5,A7,FACIRC_1:57;
  then
A10: Following(s1,2) = Following(t,2)|the carrier of S1 by FACIRC_1:30;
A11: Following(s1,3) = Following(t,3)|the carrier of S1 by A9,FACIRC_1:30;
A12: Following(s2,2) = Following(t,2)|the carrier of S2 by A8,FACIRC_1:31;
A13: Following(s2,3) = Following(t,3)|the carrier of S2 by A8,FACIRC_1:31;
  Following(s1,2) is stable by A4,FACIRC_1:63;
  then
A14: Following(s1,2) = Following Following(s1,2)
    .= Following(s1,2+1) by FACIRC_1:12;
  Following(s2,2) is stable by A1,A2,A3,Th23;
  then
A15: Following(s2,2) = Following Following(s2,2)
    .= Following(s2,2+1) by FACIRC_1:12;
A16: Following(s,2+1) = Following Following(s,2) by FACIRC_1:12;
A17: dom Following(s,2) = the carrier of S by CIRCUIT1:3;
A18: dom Following(s,3) = the carrier of S by CIRCUIT1:3;
A19: dom Following(s1,2) = the carrier of S1 by CIRCUIT1:3;
A20: dom Following(s2,2) = the carrier of S2 by CIRCUIT1:3;
A21: the carrier of S = (the carrier of S1) \/ the carrier of S2
  by CIRCCOMB:def 2;
  now
    let a be object;
    assume a in the carrier of S;
    then a in the carrier of S1 or a in the carrier of S2 by A21,XBOOLE_0:def 3
;
    then (Following(s,2)).a = (Following(s1,2)).a &
    (Following(s,3)).a = (Following(s1,3)).a or
    (Following(s,2)).a = (Following(s2,2)).a &
    (Following(s,3)).a = (Following(s2,3)).a by A10,A11,A12,A13,A14,A15,A19,A20
,FUNCT_1:47;
    hence (Following(s,2)).a = (Following Following(s,2)).a
    by A14,A15,FACIRC_1:12;
  end;
  hence Following(s,2) = Following Following(s,2) by A16,A17,A18,FUNCT_1:2;
end;
