let G be finitely_colorable SimpleGraph; :: thesis: for C being finite Coloring of G
for c being set st c in C & card C = chromatic# G holds
ex v being Element of Vertices G st
( v in c & ( for d being Element of C st d <> c holds
ex w being Element of Vertices G st
( w in Adjacent v & w in d ) ) )

let C be finite Coloring of G; :: thesis: for c being set st c in C & card C = chromatic# G holds
ex v being Element of Vertices G st
( v in c & ( for d being Element of C st d <> c holds
ex w being Element of Vertices G st
( w in Adjacent v & w in d ) ) )

let c be set ; :: thesis: ( c in C & card C = chromatic# G implies ex v being Element of Vertices G st
( v in c & ( for d being Element of C st d <> c holds
ex w being Element of Vertices G st
( w in Adjacent v & w in d ) ) ) )

assume that
A1: c in C and
A2: card C = chromatic# G ; :: thesis: ex v being Element of Vertices G st
( v in c & ( for d being Element of C st d <> c holds
ex w being Element of Vertices G st
( w in Adjacent v & w in d ) ) )

assume A3: for v being Element of Vertices G holds
( not v in c or ex d being Element of C st
( d <> c & ( for w being Element of Vertices G holds
( not w in Adjacent v or not w in d ) ) ) ) ; :: thesis: contradiction
set uG = Vertices G;
A4: union C = Vertices G by EQREL_1:def 4;
reconsider c = c as Subset of (Vertices G) by A1;
set Cc = C \ {c};
A5: c in {c} by TARSKI:def 1;
per cases ( C \ {c} is empty or not C \ {c} is empty ) ;
suppose A6: C \ {c} is empty ; :: thesis: contradiction
consider v being object such that
A7: v in c by A1, XBOOLE_0:def 1;
reconsider v = v as Element of Vertices G by A7;
consider d being Element of C such that
A8: d <> c and
for w being Element of Vertices G holds
( not w in Adjacent v or not 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 contradiction by A8; :: thesis: verum
end;
suppose not C \ {c} is empty ; :: thesis: contradiction
then reconsider Cc = C \ {c} as non empty set ;
defpred S1[ object , object ] means ex A being set st
( A = $2 & ( for vv being Element of Vertices G st $1 = vv holds
( $2 <> c & $2 in C & ( for w being Element of Vertices G holds
( not w in Adjacent vv or not w in A ) ) ) ) );
A10: for e being object st e in c holds
ex u being object st S1[e,u]
proof
let v be object ; :: thesis: ( v in c implies ex u being object st S1[v,u] )
assume A11: v in c ; :: thesis: ex u being object st S1[v,u]
reconsider vv = v as Element of Vertices G by A11;
consider d being Element of C such that
A12: d <> c and
A13: for w being Element of Vertices G holds
( not w in Adjacent vv or not w in d ) by A11, A3;
take d ; :: thesis: S1[v,d]
take d ; :: thesis: ( d = d & ( for vv being Element of Vertices G st v = vv holds
( d <> c & d in C & ( for w being Element of Vertices G holds
( not w in Adjacent vv or not w in d ) ) ) ) )

thus ( d = d & ( for vv being Element of Vertices G st v = vv holds
( d <> c & d in C & ( for w being Element of Vertices G holds
( not w in Adjacent vv or not w in d ) ) ) ) ) by A12, A13, A1; :: thesis: verum
end;
consider r being Function such that
A14: dom r = c and
A15: for e being object st e in c holds
S1[e,r . e] from CLASSES1:sch 1(A10);
deffunc H1( set ) -> set = $1 \/ (r " {$1});
reconsider Cc = Cc as non empty finite set ;
defpred S2[ set ] means verum;
set D = { H1(d) where d is Element of Cc : S2[d] } ;
consider d being object such that
A16: d in Cc by XBOOLE_0:def 1;
reconsider d = d as set by TARSKI:1;
A17: d \/ (r " {d}) in { H1(d) where d is Element of Cc : S2[d] } by A16;
A18: { H1(d) where d is Element of Cc : S2[d] } c= bool (Vertices G)
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in { H1(d) where d is Element of Cc : S2[d] } or x in bool (Vertices G) )
assume x in { H1(d) where d is Element of Cc : S2[d] } ; :: thesis: x in bool (Vertices G)
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= Vertices G by A20, XBOOLE_1:1;
d in C by XBOOLE_0:def 5;
then d \/ (r " {d}) c= Vertices G by A21, XBOOLE_1:8;
hence x in bool (Vertices G) by A19; :: thesis: verum
end;
A22: union { H1(d) where d is Element of Cc : S2[d] } = Vertices G
proof
thus union { H1(d) where d is Element of Cc : S2[d] } c= Vertices G :: according to XBOOLE_0:def 10 :: thesis: Vertices G c= union { H1(d) where d is Element of Cc : S2[d] }
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in union { H1(d) where d is Element of Cc : S2[d] } or x in Vertices G )
assume x in union { H1(d) where d is Element of Cc : S2[d] } ; :: thesis: x in Vertices G
then consider Y being set such that
A23: x in Y and
A24: Y in { H1(d) where d is Element of Cc : S2[d] } by TARSKI:def 4;
thus x in Vertices G by A23, A24, A18; :: thesis: verum
end;
thus Vertices G c= union { H1(d) where d is Element of Cc : S2[d] } :: thesis: verum
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in Vertices G or x in union { H1(d) where d is Element of Cc : S2[d] } )
assume A25: x in Vertices G ; :: thesis: x in union { H1(d) where d is Element of Cc : S2[d] }
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 Vertices G by A25;
per cases ( d = c or d <> c ) ;
suppose A28: d = c ; :: thesis: x in union { H1(d) where d is Element of Cc : S2[d] }
S1[xp1,r . xp1] by A26, A15, A28;
then r . xp1 <> c ;
then A29: not r . xp1 in {c} by TARSKI:def 1;
S1[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 { H1(d) where d is Element of Cc : S2[d] } by A30;
hence x in union { H1(d) where d is Element of Cc : S2[d] } by A31, TARSKI:def 4; :: thesis: verum
end;
suppose d <> c ; :: thesis: x in union { H1(d) where d is Element of Cc : S2[d] }
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 { H1(d) where d is Element of Cc : S2[d] } ;
x in d \/ (r " {d}) by A26, XBOOLE_0:def 3;
hence x in union { H1(d) where d is Element of Cc : S2[d] } by A32, TARSKI:def 4; :: thesis: verum
end;
end;
end;
end;
A33: for A being Subset of (Vertices G) st A in { H1(d) where d is Element of Cc : S2[d] } holds
( A <> {} & ( for B being Subset of (Vertices G) holds
( not B in { H1(d) where d is Element of Cc : S2[d] } or A = B or A misses B ) ) )
proof
let A be Subset of (Vertices G); :: thesis: ( A in { H1(d) where d is Element of Cc : S2[d] } implies ( A <> {} & ( for B being Subset of (Vertices G) holds
( not B in { H1(d) where d is Element of Cc : S2[d] } or A = B or A misses B ) ) ) )

assume A in { H1(d) where d is Element of Cc : S2[d] } ; :: thesis: ( A <> {} & ( for B being Subset of (Vertices G) holds
( not B in { H1(d) where d is Element of Cc : S2[d] } or A = B or A misses B ) ) )

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; :: thesis: for B being Subset of (Vertices G) holds
( not B in { H1(d) where d is Element of Cc : S2[d] } or A = B or A misses B )

let B be Subset of (Vertices G); :: thesis: ( not B in { H1(d) where d is Element of Cc : S2[d] } or A = B or A misses B )
assume B in { H1(d) where d is Element of Cc : S2[d] } ; :: thesis: ( A = B or A misses B )
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 ( da = db or da <> db ) ;
suppose da = db ; :: thesis: ( A = B or A misses B )
hence ( A = B or A misses B ) by A34, A36; :: thesis: verum
end;
suppose A38: da <> db ; :: thesis: ( A = B or A misses B )
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 ; :: thesis: A misses B
assume A meets B ; :: thesis: contradiction
then consider x being object such that
A41: x in A and
A42: x in B by XBOOLE_0:3;
per cases ( ( x in da & x in db ) or ( x in da & x in r " {db} ) or ( x in r " {da} & x in db ) or ( x in r " {da} & x in r " {db} ) ) by A41, A42, A34, A36, XBOOLE_0:def 3;
end;
end;
end;
end;
reconsider D = { H1(d) where d is Element of Cc : S2[d] } as a_partition of Vertices G by A18, A22, A33, EQREL_1:def 4;
now :: thesis: for x being set st x in D holds
x is StableSet of G
let x be set ; :: thesis: ( x in D implies x is StableSet of G )
assume A49: x in D ; :: thesis: x is StableSet of G
then reconsider S = x as Subset of (Vertices G) ;
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 ; :: according to SCMYCIEL:def 19 :: thesis: ( a <> b & a in S & b in S implies {a,b} nin G )
assume that
A55: a <> b and
A56: a in S and
A57: b in S ; :: thesis: {a,b} nin G
reconsider aa = a, bb = b as Vertex of G by A56, A57;
per cases ( ( a in d & b in d ) or ( a in d & b in r " {d} ) or ( a in r " {d} & b in d ) or ( a in r " {d} & b in r " {d} ) ) by A56, A57, A50, XBOOLE_0:def 3;
end;
end;
hence x is StableSet of G ; :: thesis: verum
end;
then reconsider D = 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 H2( set ) -> 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 = H2(x) from FUNCT_1:sch 5();
A67: rng s c= D
proof
let y be object ; :: according to TARSKI:def 3 :: thesis: ( not y in rng s or y in D )
assume y in rng s ; :: thesis: y in D
then consider d being object such that
A68: d in dom s and
A69: y = s . d by FUNCT_1:def 3;
reconsider d = d as set by TARSKI:1;
y = d \/ (r " {d}) by A65, A66, A68, A69;
hence y in D by A68, A65; :: thesis: verum
end;
then reconsider s = s as Function of Cc,D by A65, FUNCT_2:2;
A70: s is one-to-one
proof
let x1, x2 be object ; :: according to FUNCT_1:def 4 :: thesis: ( not x1 in dom s or not x2 in dom s or not s . x1 = s . x2 or x1 = x2 )
assume that
A71: x1 in dom s and
A72: x2 in dom s and
A73: s . x1 = s . x2 ; :: thesis: x1 = x2
reconsider x1 = x1, x2 = 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 ; :: according to TARSKI:def 3 :: thesis: ( not x in x1 or x in x2 )
assume A77: x in x1 ; :: thesis: x in x2
then A78: x in s . x1 by A74, XBOOLE_0:def 3;
end;
x2 c= x1
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in x2 or x in x1 )
assume A82: x in x2 ; :: thesis: x in x1
then A83: x in s . x2 by A75, XBOOLE_0:def 3;
end;
hence x1 = x2 by A76, XBOOLE_0:def 10; :: thesis: verum
end;
D c= rng s
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in D or x in rng s )
assume x in D ; :: thesis: x in rng s
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; :: thesis: verum
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; :: thesis: verum
end;
end;