
theorem Th70:
for G being finitely_colorable SimpleGraph,
    C being finite Coloring of G, c being set
 st c in C & card C = chromatic# G
  ex v being Element of Vertices G st v in c &
   for d being Element of C st d <> c
    ex w being Element of Vertices G st w in Adjacent(v) & w in d
proof
 let G be finitely_colorable SimpleGraph,
     C be finite Coloring of G, c be set such that
A1: c in C and
A2: card C = chromatic# G;
   assume
A3: not thesis;
   set uG = Vertices G;
A4: union C = uG by EQREL_1:def 4;
   reconsider c as Subset of uG by A1;
   set Cc = C\{c};
A5: c in {c} by TARSKI:def 1;
   per cases;
   suppose A6: Cc is empty;
     consider v being object such that
   A7: v in c by A1,XBOOLE_0:def 1;
     reconsider v as Element of uG by A7;
     consider d being Element of C such that
   A8: d <> c and for w being Element of uG
                        holds not (w in Adjacent(v) & w in d) by A7,A3;
     0 = card C - card{c} by A1,A6,CARD_1:27,EULER_1:4;
     then 0+1 = card C - 1 +1 by CARD_1:30;
     then consider x being object such that
   A9: C = {x} by CARD_2:42;
      c = x & d = x by A1,A9,TARSKI:def 1;
     hence thesis by A8;
   end;
   suppose Cc is non empty;
     then reconsider Cc as non empty set;
   defpred P[object, object] means
   ex A being set st A = $2 &
   for vv being Element of uG st $1 = vv
    holds $2 <> c & $2 in C &
    for w being Element of uG holds not (w in Adjacent(vv) & w in A);
A10: for e being object st e in c ex u being object st P[e,u]
proof
      let v be object such that
    A11: v in c;
        reconsider vv = v as Element of uG by A11;
        consider d being Element of C such that
    A12: d <> c and
    A13: for w being Element of uG
         holds not (w in Adjacent(vv) & w in d) by A11,A3;
         take d,d;
         thus thesis by A12,A13,A1;
    end;
   consider r being Function such that
A14: dom r = c and
A15: for e being object st e in c holds P[e,r.e] from CLASSES1:sch 1(A10);
   deffunc DF(set) = $1 \/ r"{$1};
   reconsider Cc as finite non empty set;
   defpred P[set] means not contradiction;
   set D = { DF(d) where d is Element of Cc : P[d] };
   consider d being object such that
A16: d in Cc by XBOOLE_0:def 1;
   reconsider d as set by TARSKI:1;
A17: d \/ r"{d} in D by A16;
A18: D c= bool uG proof
    let x be object;
    assume x in D;
      then consider d being Element of Cc such that
    A19: x = d \/ r"{d};
    A20: r"{d} c= c by A14,RELAT_1:132;
    A21: r"{d} c= uG by A20,XBOOLE_1:1;
        d in C by XBOOLE_0:def 5;
        then d \/ r"{d} c= uG by A21,XBOOLE_1:8;
     hence x in bool uG by A19;
   end;
A22: union D = uG proof
     thus union D c= uG proof
       let x be object;
       assume x in union D;
        then consider Y being set such that
     A23: x in Y and
     A24: Y in D by TARSKI:def 4;
        thus x in uG by A23,A24,A18;
     end;
     thus uG c= union D proof
       let x be object;
       assume A25: x in uG;
       then consider d being set such that
     A26: x in d and
     A27: d in C by A4,TARSKI:def 4;
         reconsider xp1 = x as Element of uG by A25;
       per cases;
       suppose A28: d = c;
         P[xp1,r.xp1] by A26,A15,A28;
         then r.xp1 <> c;
         then A29: not r.xp1 in {c} by TARSKI:def 1;
         P[xp1,r.xp1] by A26,A28,A15;
         then r.xp1 in C; then
         A30: r.xp1 in Cc by A29,XBOOLE_0:def 5;
           r.xp1 in {r.xp1} by TARSKI:def 1;
           then x in r"{r.xp1} by A26,A28,A14,FUNCT_1:def 7;
           then A31: x in r.xp1 \/ r"{r.xp1} by XBOOLE_0:def 3;
           r.xp1 \/ r"{r.xp1} in D by A30;
         hence x in union D by A31,TARSKI:def 4;
       end;
       suppose d <> c;
         then not d in {c} by TARSKI:def 1;
         then d in Cc by A27,XBOOLE_0:def 5;
         then A32: d \/ r"{d} in D;
           x in d \/ r"{d} by A26,XBOOLE_0:def 3;
         hence x in union D by A32,TARSKI:def 4;
       end;
     end;
   end;
A33: for A being Subset of uG st A in D holds A <> {} &
    for B being Subset of uG st B in D holds A = B or A misses B proof
     let A be Subset of uG;
     assume A in D;
       then consider da being Element of Cc such that
     A34: A = da \/ r"{da};
     A35: da in C by XBOOLE_0:def 5;
     hence A <> {} by A34;
     let B be Subset of uG;
     assume B in D;
       then consider db being Element of Cc such that
     A36: B = db \/ r"{db};
     A37: db in C by XBOOLE_0:def 5;
     per cases;
     suppose da = db;
      hence A = B or A misses B by A34,A36;
     end;
     suppose A38: da <> db;
       then A39: da misses db by A35,A37,EQREL_1:def 4;
       A40: r"{da} misses r"{db} by A38,FUNCT_1:71,ZFMISC_1:11;
      assume A <> B;
      assume A meets B;
        then consider x being object such that
      A41: x in A and
      A42: x in B by XBOOLE_0:3;
      per cases by A41,A42,A34,A36,XBOOLE_0:def 3;
      suppose x in da & x in db;
        hence contradiction by A39,XBOOLE_0:3;
      end;
      suppose that A43: x in da and A44: x in r"{db};
      A45: da <> c by A5,XBOOLE_0:def 5;
        r"{db} c= c by A14,RELAT_1:132;
        then da meets c by A43,A44,XBOOLE_0:3;
        hence contradiction by A45,A35,A1,EQREL_1:def 4;
      end;
      suppose that A46: x in r"{da} and A47: x in db;
      A48: db <> c by A5,XBOOLE_0:def 5;
        r"{da} c= c by A14,RELAT_1:132;
        then db meets c by A46,A47,XBOOLE_0:3;
        hence contradiction by A48,A37,A1,EQREL_1:def 4;
      end;
      suppose x in r"{da} & x in r"{db};
        hence contradiction by A40,XBOOLE_0:3;
      end;
     end;
   end;
   reconsider D as a_partition of uG by A18,A22,A33,EQREL_1:def 4;
   now
     let x be set;
     assume A49: x in D;
     then reconsider S = x as Subset of uG;
       consider d being Element of Cc such that
   A50: x = d \/ r"{d} by A49;
   A51: r"{d} c= c by A14,RELAT_1:132;
   A52: d in C by XBOOLE_0:def 5;
   A53: d is StableSet of G by A52,Def20;
   A54: c is StableSet of G by A1,Def20;
     S is stable proof
       let a, b be set such that
     A55: a <> b and
     A56: a in S and
     A57: b in S;
          reconsider aa = a, bb = b as Vertex of G by A56,A57;
       per cases by A56,A57,A50,XBOOLE_0:def 3;
       suppose a in d & b in d;
         hence not {a,b} in G by A53,A55,Def19;
       end;
       suppose that A58: a in d and A59: b in r"{d};
             r.b in {d} by A59,FUNCT_1:def 7;
             then
A60: r.b = d by TARSKI:def 1;
          P[b,r.b] by A51,A59,A15;
             then not a in Adjacent(bb) by A58,A60;
             then not {aa,bb} in Edges G by Def8;
         hence not {a,b} in G by A55,Th12;
       end;
       suppose that A61: a in r"{d} and A62: b in d;
             r.a in {d} by A61,FUNCT_1:def 7;
             then
A63: r.a = d by TARSKI:def 1;
          P[a,r.a] by A51,A61,A15;
             then not b in Adjacent(aa) by A62,A63;
             then not {bb,aa} in Edges G by Def8;
         hence not {a, b} in G by A55,Th12;
       end;
       suppose a in r"{d} & b in r"{d};
         hence not {a,b} in G by A51,A54,A55,Def19;
       end;
     end;
     hence x is StableSet of G;
   end;
   then reconsider D as Coloring of G by Def20;
   card Cc = card C - card{c} by A1,EULER_1:4;
   then card Cc + 1 = card C -1+1 by CARD_1:30;
   then A64: card Cc < card C by NAT_1:13;

   deffunc FS(set) = $1 \/ r"{$1};
   consider s being Function such that
A65: dom s = Cc and
A66: for x being set st x in Cc holds s.x = FS(x) from FUNCT_1:sch 5;
A67:  rng s c= D proof
      let y be object;
      assume y in rng s;
      then consider d being object such that
    A68: d in dom s and
    A69: y = s.d by FUNCT_1:def 3;
    reconsider d as set by TARSKI:1;
        y = d \/ r"{d} by A65,A66,A68,A69;
      hence y in D by A68,A65;
    end;
   then reconsider s as Function of Cc, D by A65,FUNCT_2:2;
A70: s is one-to-one proof
      let x1, x2 be object such that
    A71: x1 in dom s and
    A72: x2 in dom s and
    A73: s.x1 = s.x2;
     reconsider x1,x2 as set by TARSKI:1;
    A74: s.x1 = x1 \/ r"{x1} by A71,A66,A65;
    A75: s.x2 = x2 \/ r"{x2} by A72,A66,A65;
A76: x1 c= x2 proof
          let x be object;
          assume A77: x in x1;
            then A78: x in s.x1 by A74,XBOOLE_0:def 3;
          per cases by A78,A73,A75,XBOOLE_0:def 3;
          suppose x in x2;
            hence thesis;
          end;
          suppose A79: x in r"{x2};
            A80: r"{x2} c= dom r by RELAT_1:132;
            A81: x1 in C by A65,A71,XBOOLE_0:def 5;
             reconsider x1 as Subset of uG by A65,A71;
            x1 meets c by A80,A79,A14,A77,XBOOLE_0:3;
            then x1 = c by A81,A1,EQREL_1:def 4;
          hence thesis by A5,A65,A71,XBOOLE_0:def 5;
          end;
        end;
        x2 c= x1 proof
          let x be object;
          assume A82: x in x2;
            then A83: x in s.x2 by A75,XBOOLE_0:def 3;
          per cases by A83,A73,A74,XBOOLE_0:def 3;
          suppose x in x1;
            hence thesis;
          end;
          suppose A84: x in r"{x1};
            A85:  r"{x1} c= dom r by RELAT_1:132;
          A86: x2 in C by A65,A72,XBOOLE_0:def 5;
             reconsider x2 as Subset of uG by A65,A72;
            x2 meets c by A85,A84,A14,A82,XBOOLE_0:3;
            then x2 = c by A86,A1,EQREL_1:def 4;
          hence thesis by A5,A65,A72,XBOOLE_0:def 5;
          end;
        end;
     hence thesis by A76,XBOOLE_0:def 10;
    end;
    D c= rng s proof
     let x be object;
     assume x in D;
     then consider d being Element of Cc such that
    A87: x = d \/ r"{d};
        s.d = d \/ r"{d} by A66;
     hence x in rng s by A87,A65,FUNCT_1:def 3;
    end;
    then D = rng s by A67;
    then s is onto by FUNCT_2:def 3;
   then A88: card Cc = card D by A70,A17,EULER_1:11;
   then D is finite;
  hence contradiction by A64,A88,A2,Def22;
 end;
end;
