
theorem Th23:
  for x,y,c being set st
  x <> [<*y,c*>, and2] & y <> [<*x,c*>, and2a] & c <> [<*x,y*>, and2a]
  for s being State of BorrowCirc(x,y,c)
  holds Following(s,2) is stable
proof
  let x,y,c be set;
  set S = BorrowStr(x,y,c);
  assume that
A1: x <> [<*y,c*>, and2] and
A2: y <> [<*x,c*>, and2a] and
A3: c <> [<*x,y*>, and2a];
  let s be State of BorrowCirc(x,y,c);
A4: dom Following Following(s,2) = the carrier of S by CIRCUIT1:3;
A5: dom Following(s,2) = the carrier of S by CIRCUIT1:3;
  reconsider xx = x, yy = y, cc = c as Vertex of S by FSCIRC_1:6;
  set a1 = s.xx, a2 = s.yy, a3 = s.cc;
  set ffs = Following(s,2), fffs = Following ffs;
A6: a1 = s.x;
A7: a2 = s.y;
A8: a3 = s.c;
A9: ffs.BorrowOutput(x,y,c) = 'not' a1 '&' a2 'or' a2 '&' a3 'or' 'not' a1
  '&' a3 by A1,A2,A3,Lm2;
A10: ffs.[<*x,y*>,and2a] = 'not' a1 '&' a2 by A1,A2,A3,A8,Lm2;
A11: ffs.[<*y,c*>,and2] = a2 '&' a3 by A1,A2,A3,A6,Lm2;
A12: ffs.[<*x,c*>,and2a] = 'not' a1 '&' a3 by A1,A2,A3,A7,Lm2;
A13: ffs = Following Following s by FACIRC_1:15;
A14: InputVertices S = {x,y,c} by A1,A2,A3,Th15;
  then
A15: x in InputVertices S by ENUMSET1:def 1;
A16: y in InputVertices S by A14,ENUMSET1:def 1;
A17: c in InputVertices S by A14,ENUMSET1:def 1;
A18: (Following s).x = a1 by A15,CIRCUIT2:def 5;
A19: (Following s).y = a2 by A16,CIRCUIT2:def 5;
A20: (Following s).c = a3 by A17,CIRCUIT2:def 5;
A21: ffs.x = a1 by A13,A15,A18,CIRCUIT2:def 5;
A22: ffs.y = a2 by A13,A16,A19,CIRCUIT2:def 5;
A23: ffs.c = a3 by A13,A17,A20,CIRCUIT2:def 5;
  now
    let a be object;
    assume
A24: a in the carrier of S;
    then reconsider v = a as Vertex of S;
A25: v in InputVertices S \/ InnerVertices S by A24,XBOOLE_1:45;
    thus ffs.a = (fffs).a proof per cases by A25,XBOOLE_0:def 3;
      suppose v in InputVertices S;
        hence thesis by CIRCUIT2:def 5;
      end;
      suppose v in InnerVertices S;
        then v in {[<*x,y*>,and2a], [<*y,c*>,and2], [<*x,c*>,and2a]} \/
        {BorrowOutput(x,y,c)} by Th14;
        then v in {[<*x,y*>,and2a], [<*y,c*>,and2], [<*x,c*>,and2a]} or
        v in {BorrowOutput(x,y,c)} by XBOOLE_0:def 3;
        then v = [<*x,y*>,and2a] or v = [<*y,c*>,and2] or v = [<*x,c*>,and2a]
        or v = BorrowOutput(x,y,c) by ENUMSET1:def 1,TARSKI:def 1;
        hence thesis by A9,A10,A11,A12,A21,A22,A23,Lm1,Th22;
      end;
    end;
  end;
  hence ffs = fffs by A4,A5,FUNCT_1:2;
end;
