reserve E,V for set, G,G1,G2 for _Graph, c,c1,c2 for Cardinal, n for Nat;
reserve f for VColoring of G;

theorem Th30:
  G is edgeless iff G is 1-vcolorable
proof
  hereby
    set x = the object;
    set f = the_Vertices_of G --> x;
    reconsider f as VColoring of G;
    assume G is edgeless;
    then for e,v,w being object st e Joins v,w,G holds f.v<>f.w by GLIB_008:50;
    then A1: f is proper by Th10;
    card rng f c= card {x} by CARD_1:11, FUNCOP_1:13;
    then card rng f c= 1 by CARD_1:30;
    hence G is 1-vcolorable by A1;
  end;
  assume G is 1-vcolorable;
  then consider f such that
    A2: f is proper & card rng f c= 1;
  0 in card rng f by ORDINAL1:14;
  then 1 c= card rng f by ZFMISC_1:31, CARD_1:49;
  then card rng f = 1 by A2, XBOOLE_0:def 10
    .= card {the object} by CARD_1:30;
  then consider x being object such that
    A3: rng f = {x} by CARD_1:29;
  A4: f = dom f --> x by A3, FUNCOP_1:9;
  now
    set e = the Element of the_Edges_of G;
    set v = (the_Source_of G).e, w = (the_Target_of G).e;
    assume the_Edges_of G <> {};
    then A5: e Joins v,w,G by GLIB_000:def 13;
    then v in the_Vertices_of G & w in the_Vertices_of G by GLIB_000:13;
    then v in dom f & w in dom f by PARTFUN1:def 2;
    then f.v = x & f.w = x by A4, FUNCOP_1:7;
    hence contradiction by A2, A5, Th10;
  end;
  hence thesis;
end;
