reserve x,y,z,c for object,
  f for Function of 2-tuples_on BOOLEAN, BOOLEAN;
reserve s for State of 2GatesCircuit(x,y,c,f);

theorem Th84:
  for x,y,c being non pair object for s being State of MajorityCirc(x
  ,y,c) holds Following(s,2) is stable
proof
  let x,y,c be non pair object;
  set S = MajorityStr(x,y,c);
  reconsider xx = x, yy = y, cc = c as Vertex of S by Th72;
  let s be State of MajorityCirc(x,y,c);
  set a1 = s.xx, a2 = s.yy, a3 = s.cc;
  set ffs = Following(s,2), fffs = Following ffs;
A1: ffs = Following Following s by Th15;
A2: y in InputVertices S by Th74;
  then (Following s).y = a2 by CIRCUIT2:def 5;
  then
A3: ffs.y = a2 by A1,A2,CIRCUIT2:def 5;
  a2 = s.y;
  then
A4: ffs.[<*c,x*>,'&'] = a3 '&' a1 by Lm3;
A5: x in InputVertices S by Th74;
  then (Following s).x = a1 by CIRCUIT2:def 5;
  then
A6: ffs.x = a1 by A1,A5,CIRCUIT2:def 5;
  a1 = s.x;
  then
A7: ffs.[<*y,c*>,'&'] = a2 '&' a3 by Lm3;
A8: c in InputVertices S by Th74;
  then (Following s).c = a3 by CIRCUIT2:def 5;
  then
A9: ffs.c = a3 by A1,A8,CIRCUIT2:def 5;
  a3 = s.c;
  then
A10: ffs.[<*x,y*>,'&'] = a1 '&' a2 by Lm3;
A11: ffs.MajorityOutput(x,y,c) = a1 '&' a2 'or' a2 '&' a3 'or' a3 '&' a1 by Lm3
;
A12: now
    let a be object;
    assume
A13: a in the carrier of S;
    then reconsider v = a as Vertex of S;
A14: v in InputVertices S \/ InnerVertices S by A13,XBOOLE_1:45;
    thus ffs.a = (fffs).a
    proof
      per cases by A14,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*>,'&'], [<*y,c*>,'&'], [<*c,x*>,'&']} \/ {
        MajorityOutput(x,y,c)} by Th75;
        then v in {[<*x,y*>,'&'], [<*y,c*>,'&'], [<*c,x*>,'&']} or v in {
        MajorityOutput(x,y,c)} by XBOOLE_0:def 3;
        then v = [<*x,y*>,'&'] or v = [<*y,c*>,'&'] or v = [<*c,x*>,'&'] or v
        = MajorityOutput(x,y,c) by ENUMSET1:def 1,TARSKI:def 1;
        hence thesis by A11,A10,A7,A4,A6,A3,A9,Lm2,Th79;
      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 A12,FUNCT_1:2;
end;
