
theorem Th117:
  for x,y,z being set st x <> [<*y,z*>,nor2] & y <> [<*z,x*>,
nor2] & z <> [<*x,y*>,nor2] for s being State of GFA3CarryCirc(x,y,z) for a1,
  a2,a3 being Element of BOOLEAN st a1 = s.x & a2 = s.y & a3 = s.z holds
  Following(s,2).GFA3CarryOutput(x,y,z) = 'not' (('not' a1 '&' 'not' a2) 'or' (
'not' a2 '&' 'not' a3) 'or' ('not' a3 '&' 'not' a1)) & Following(s,2).[<*x,y*>,
nor2] = 'not' a1 '&' 'not' a2 & Following(s,2).[<*y,z*>,nor2] = 'not' a2 '&'
  'not' a3 & Following(s,2).[<*z,x*>,nor2] = 'not' a3 '&' 'not' a1
proof
  set f1 = nor2, f2 = nor2, f3 = nor2;
  let x,y,z be set such that
A1: x <> [<*y,z*>,f2] & y <> [<*z,x*>,f3] & z <> [<*x,y*>,f1];
  set S = GFA3CarryStr(x,y,z);
  reconsider x9 = x, y9 = y, z9 = z as Vertex of S by Th111;
  let s be State of GFA3CarryCirc(x,y,z);
  y in InputVertices S by A1,Th113;
  then
A2: (Following s).y9 = s.y by CIRCUIT2:def 5;
  z in InputVertices S by A1,Th113;
  then
A3: (Following s).z9 = s.z by CIRCUIT2:def 5;
  set xy = [<*x,y*>,f1], yz = [<*y,z*>,f2], zx = [<*z,x*>,f3];
A4: Following(s,2) = Following Following s by FACIRC_1:15;
  let a1,a2,a3 be Element of BOOLEAN such that
A5: a1 = s.x & a2 = s.y & a3 = s.z;
A6: (Following s).zx = 'not' a3 '&' 'not' a1 by A5,Th115;
  (Following s).xy = 'not' a1 '&' 'not' a2 & (Following s).yz = 'not' a2
  '&' 'not' a3 by A5,Th115;
  hence Following(s,2).GFA3CarryOutput(x,y,z) = 'not'(('not' a1 '&' 'not' a2)
  'or' ('not' a2 '&' 'not' a3) 'or' ('not' a3 '&' 'not' a1)) by A4,A6,Th116;
  x in InputVertices S by A1,Th113;
  then (Following s).x9 = s.x by CIRCUIT2:def 5;
  hence thesis by A5,A2,A3,A4,Th115;
end;
