
theorem Th20:
  for x,y,c being set st
  x <> [<*y,c*>, '&'] & y <> [<*c,x*>, '&'] & c <> [<*x,y*>, '&']
  holds InputVertices MajorityStr(x,y,c) = {x,y,c}
proof
  let x,y,c be set;
  set xy = [<*x,y*>, '&'], yc = [<*y,c*>, '&'], cx = [<*c,x*>, '&'];
  set S = 1GateCircStr(<*xy, yc, cx*>, or3);
A1: InnerVertices S = {[<*xy, yc, cx*>, or3]} by CIRCCOMB:42;
A2: InputVertices S = rng <*xy, yc, cx*> by CIRCCOMB:42
    .= {xy, yc, cx} by FINSEQ_2:128;
  set MI = MajorityIStr(x,y,c);
  assume that
A3: x <> yc and
A4: y <> cx and
A5: c <> xy;
  rng <*c,x*> = {c,x} by FINSEQ_2:127;
  then
A6: x in rng <*c,x*> by TARSKI:def 2;
  len <*xy, yc, cx*> = 3 by FINSEQ_1:45;
  then
A7: Seg 3 = dom <*xy, yc, cx*> by FINSEQ_1:def 3;
  then
A8: 3 in dom <*xy, yc, cx*> by FINSEQ_1:1;
  <*xy, yc, cx*>.3 = cx;
  then [3,cx] in <*xy, yc, cx*> by A8,FUNCT_1:1;
  then cx in rng <*xy, yc, cx*> by XTUPLE_0:def 13;
  then
A9: the_rank_of cx in the_rank_of [<*xy, yc, cx*>, or3] by CLASSES1:82;
  rng <*x,y*> = {x,y} by FINSEQ_2:127;
  then
A10: y in rng <*x,y*> by TARSKI:def 2;
A11: 1 in dom <*xy, yc, cx*> by A7,FINSEQ_1:1;
  <*xy, yc, cx*>.1 = xy;
  then [1,xy] in <*xy, yc, cx*> by A11,FUNCT_1:1;
  then xy in rng <*xy, yc, cx*> by XTUPLE_0:def 13;
  then
A12: the_rank_of xy in the_rank_of [<*xy, yc, cx*>, or3] by CLASSES1:82;
  rng <*y,c*> = {y,c} by FINSEQ_2:127;
  then
A13: c in rng <*y,c*> by TARSKI:def 2;
A14: 2 in dom <*xy, yc, cx*> by A7,FINSEQ_1:1;
  <*xy, yc, cx*>.2 = yc;
  then [2,yc] in <*xy, yc, cx*> by A14,FUNCT_1:1;
  then yc in rng <*xy, yc, cx*> by XTUPLE_0:def 13;
  then
A15: the_rank_of yc in the_rank_of [<*xy, yc, cx*>, or3] by CLASSES1:82;
A16: {xy, yc, cx} \ {xy, yc, cx} = {} by XBOOLE_1:37;
A17: {x, y, c} \ {[<*xy, yc, cx*>, or3]} = {x, y, c}
  proof
    thus {x,y,c} \ {[<*xy, yc, cx*>, or3]} c= {x,y,c};
    let a be object;
    assume
A18: a in {x,y,c};
    then a = x or a = y or a = c by ENUMSET1:def 1;
    then a <> [<*xy, yc, cx*>, or3] by A6,A9,A10,A12,A13,A15,CLASSES1:82;
    then not a in {[<*xy, yc, cx*>, or3]} by TARSKI:def 1;
    hence thesis by A18,XBOOLE_0:def 5;
  end;
  thus InputVertices MajorityStr(x,y,c)
  = ((InputVertices MI) \ InnerVertices S) \/
  ((InputVertices S) \ InnerVertices MI) by CIRCCMB2:5,CIRCCOMB:47
    .= {x,y,c} \/ ({xy, yc, cx} \ InnerVertices MI) by A1,A2,A3,A4,A5,A17,Th18
    .= {x,y,c} \/ {} by A16,Th17
    .= {x,y,c};
end;
