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 Th62:
  c <> [<*x,y*>, f] implies (Following(s,2)).2GatesCircOutput(x,y,
c,f) = f.<*f.<*s.x, s.y*>, s.c*> & (Following(s,2)).[<*x,y*>,f] = f.<*s.x, s.y
*> & (Following(s,2)).x = s.x & (Following(s,2)).y = s.y & (Following(s,2)).c =
  s.c
proof
  set S = 2GatesCircStr(x,y,c,f);
A1: rng <*x,y*> = {x,y} by FINSEQ_2:127;
  reconsider xx = x, yy = y, cc = c as Vertex of S by Th60;
  set p = <*[<*x,y*>, f], c*>;
  set xyf = [<*x,y*>,f];
  set S1 = 1GateCircStr(<*x,y*>, f), A1 = 1GateCircuit(x,y, f);
  set S2 = 1GateCircStr(p, f), A2 = 1GateCircuit(xyf,c, f);
A2: x in {x,y} by TARSKI:def 2;
  assume c <> [<*x,y*>, f];
  then
A3: InputVertices S = {x,y,c} by Th57;
  then
A4: x in InputVertices S by ENUMSET1:def 1;
  then
A5: (Following s).xx = s.x by CIRCUIT2:def 5;
  InnerVertices S = {[<*x,y*>, f], 2GatesCircOutput(x,y,c,f)} by Th56;
  then reconsider xyf as Element of InnerVertices S by TARSKI:def 2;
A6: rng p = {xyf,c} by FINSEQ_2:127;
  then c in rng p by TARSKI:def 2;
  then
A7: c in InputVertices S2 by CIRCCOMB:42;
  xyf in rng p by A6,TARSKI:def 2;
  then xyf in InputVertices S2 by CIRCCOMB:42;
  then reconsider xyf9 = xyf, c9 = c as Vertex of S2 by A7;
  reconsider vx = x, vy = y as Vertex of S1 by Th43;
  set fs = Following s;
  reconsider fs1 = fs|the carrier of S1 as State of A1 by Th26;
A8: y in {x,y} by TARSKI:def 2;
  reconsider fs2 = fs|the carrier of S2 as State of A2 by Th26;
  reconsider s1 = s|the carrier of S1 as State of A1 by Th26;
A9: dom fs2 = the carrier of S2 by CIRCUIT1:3;
A10: c in InputVertices S by A3,ENUMSET1:def 1;
  then (Following s).cc = s.c by CIRCUIT2:def 5;
  then
A11: (Following Following s).cc = s.c by A10,CIRCUIT2:def 5;
  reconsider xyf1 = xyf as Element of InnerVertices S1 by Th47;
A12: dom fs1 = the carrier of S1 by CIRCUIT1:3;
  reconsider v2 = [p,f] as Element of InnerVertices S2 by Th47;
A13: xyf in InnerVertices S1 by Th47;
A14: dom s1 = the carrier of S1 & InputVertices S1 = rng <*x,y*> by CIRCCOMB:42
,CIRCUIT1:3;
A15: Following(s,1+1) = Following Following s by Th15;
  hence (Following(s,2)).2GatesCircOutput(x,y,c,f) = (Following fs2).v2 by
CIRCCOMB:64
    .= f.<*fs2.xyf9, fs2.c9*> by Th48
    .= f.<*(Following s).xyf, fs2.c*> by A9,FUNCT_1:47
    .= f.<*(Following s).xyf, (Following s).c9*> by A9,FUNCT_1:47
    .= f.<*(Following s).xyf, s.cc*> by A10,CIRCUIT2:def 5
    .= f.<*(Following s1).xyf, s.cc*> by A13,CIRCCOMB:64
    .= f.<*f.<*s1.x, s1.y*>, s.cc*> by Th48
    .= f.<*f.<*s.x,s1.y*>, s.cc*> by A2,A14,A1,FUNCT_1:47
    .= f.<*f.<*s.x,s.y*>, s.c*> by A8,A14,A1,FUNCT_1:47;
A16: y in InputVertices S by A3,ENUMSET1:def 1;
  then
A17: (Following s).yy = s.y by CIRCUIT2:def 5;
  then
A18: (Following Following s).yy = s.y by A16,CIRCUIT2:def 5;
  thus (Following(s,2)).[<*x,y*>,f] = (Following fs1).xyf1 by A15,CIRCCOMB:64
    .= f.<*fs1.vx, fs1.vy*> by Th48
    .= f.<*s.x, fs1.vy*> by A5,A12,FUNCT_1:47
    .= f.<*s.x, s.y*> by A17,A12,FUNCT_1:47;
  (Following Following s).xx = s.x by A4,A5,CIRCUIT2:def 5;
  hence thesis by A18,A11,Th15;
end;
