
theorem Th23:
  for x,y,z being set st x <> [<*y,z*>,and2] & y <> [<*z,x*>,and2]
& z <> [<*x,y*>,and2] for s being State of GFA0CarryCirc(x,y,z) holds Following
  (s,2) is stable
proof
  set f1 = and2, f2 = and2, f3 = and2;
  let x,y,z be set such that
A1: x <> [<*y,z*>,f2] & y <> [<*z,x*>,f3] & z <> [<*x,y*>,f1];
  set S = GFA0CarryStr(x,y,z);
  reconsider xx = x, yy = y, zz = z as Vertex of S by Th16;
  let s be State of GFA0CarryCirc(x,y,z);
  set a1 = s.xx, a2 = s.yy, a3 = s.zz;
  set ffs = Following(s,2), fffs = Following ffs;
  set xy = [<*x,y*>,f1], yz = [<*y,z*>,f2], zx = [<*z,x*>,f3];
A2: ffs = Following Following s by FACIRC_1:15;
A3: z in InputVertices S by A1,Th18;
  then (Following s).z = a3 by CIRCUIT2:def 5;
  then
A4: ffs.z = a3 by A2,A3,CIRCUIT2:def 5;
A5: y in InputVertices S by A1,Th18;
  then (Following s).y = a2 by CIRCUIT2:def 5;
  then
A6: ffs.y = a2 by A2,A5,CIRCUIT2:def 5;
A7: x in InputVertices S by A1,Th18;
  then (Following s).x = a1 by CIRCUIT2:def 5;
  then
A8: ffs.x = a1 by A2,A7,CIRCUIT2:def 5;
  a3 = s.z;
  then
A9: ffs.xy = a1 '&' a2 by A1,Th22;
  a2 = s.y;
  then
A10: ffs.zx = a1 '&' a3 by A1,Th22;
  a1 = s.x;
  then
A11: ffs.yz = a2 '&' a3 by A1,Th22;
A12: ffs.GFA0CarryOutput(x,y,z) = a1 '&' a2 'or' a2 '&' a3 'or' a3 '&' a1 by A1
,Th22;
A13: now
    let a be object;
    assume
A14: a in the carrier of S;
    then reconsider v = a as Vertex of S;
A15: v in InputVertices S \/ InnerVertices S by A14,XBOOLE_1:45;
    thus ffs.a = (fffs).a
    proof
      per cases by A15,XBOOLE_0:def 3;
      suppose
        v in InputVertices S;
        hence thesis by CIRCUIT2:def 5;
      end;
      suppose
        v in InnerVertices S;
        then v in {xy, yz, zx} \/ {GFA0CarryOutput(x,y,z)} by Th11;
        then v in {xy, yz, zx} or v in {GFA0CarryOutput(x,y,z)} by
XBOOLE_0:def 3;
        then v = xy or v = yz or v = zx or v = GFA0CarryOutput(x,y,z) by
ENUMSET1:def 1,TARSKI:def 1;
        hence thesis by A12,A9,A11,A10,A8,A6,A4,Th20,Th21;
      end;
    end;
  end;
  dom Following Following(s,2) = the carrier of S & dom Following(s,2) =
  the carrier of S by CIRCUIT1:3;
  hence ffs = fffs by A13,FUNCT_1:2;
end;
