reserve x,y,c for set;

theorem
  for s being State of BorrowICirc(x,y,c), a,b being Element of BOOLEAN
  st a = s.x & b = s.y holds (Following s).[<*x,y*>,and2a] = 'not' a '&' b
proof
  set xy = <*x,y*>, yc = <*y,c*>, xc = <*x,c*>;
  set S1 = 1GateCircStr(xy, and2a), A1 = 1GateCircuit(x,y, and2a);
  set S2 = 1GateCircStr(yc, and2 ), A2 = 1GateCircuit(y,c, and2 );
  set S3 = 1GateCircStr(xc, and2a), A3 = 1GateCircuit(x,c, and2a);
  set S = BorrowIStr(x,y,c), A = BorrowICirc(x,y,c);
  set v1 = [xy, and2a];
  let s be State of A;
  let a,b be Element of BOOLEAN such that
A1: a = s.x & b = s.y;
  reconsider xx = x, yy = y as Vertex of S1 by FACIRC_1:43;
  reconsider v1 as Element of InnerVertices S1 by FACIRC_1:47;
A2: S = S1+*(S2+*S3) by CIRCCOMB:6;
  then reconsider v = v1 as Element of InnerVertices S by FACIRC_1:21;
A3: A = A1+*(A2+*A3) by FACIRC_1:25;
  then reconsider s1 = s|the carrier of S1 as State of A1 by FACIRC_1:26;
  reconsider xx, yy as Vertex of S by A2,FACIRC_1:20;
A4: dom s1 = the carrier of S1 by CIRCUIT1:3;
  thus (Following s).[xy, and2a] = (Following s1).v by A2,A3,CIRCCOMB:64
    .= and2a.<*s1.xx,s1.yy*> by FACIRC_1:50
    .= and2a.<*s.xx,s1.yy*> by A4,FUNCT_1:47
    .= and2a.<*s.xx,s.yy*> by A4,FUNCT_1:47
    .= 'not' a '&' b by A1,TWOSCOMP:def 2;
end;
