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

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

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

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

assume B: for v being Element of R holds
( not v in c or ex d being Element of C st
( d <> c & ( for w being Element of R holds
( not w in Adjacent v or not w in d ) ) ) ) ; :: thesis: contradiction
set cR = the carrier of R;
AA3: union C = the carrier of R by EQREL_1:def 6;
reconsider c = c as Subset of the carrier of R by AA;
AA1: c <> {} by AA, EQREL_1:def 6;
set Cc = C \ {c};
AA2a: c in {c} by TARSKI:def 1;
per cases ( C \ {c} is empty or not C \ {c} is empty ) ;
suppose S1: C \ {c} is empty ; :: thesis: contradiction
consider v being set such that
A1: v in c by AA1, XBOOLE_0:def 1;
reconsider v = v as Element of R by A1;
consider d being Element of C such that
B1: d <> c and
for w being Element of R holds
( not w in Adjacent v or not w in d ) by A1, B;
0 = (card C) - (card {c}) by AA, EULER_1:5, S1, CARD_1:47;
then 0 + 1 = ((card C) - 1) + 1 by CARD_1:50;
then consider x being set such that
D1: C = {x} by CARD_2:60;
( c = x & d = x ) by AA, D1, TARSKI:def 1;
hence contradiction by B1; :: thesis: verum
end;
suppose not C \ {c} is empty ; :: thesis: contradiction
then reconsider Cc = C \ {c} as non empty set ;
defpred S1[ set , set ] means for vv being Element of the carrier of R st $1 = vv holds
( $2 <> c & $2 in C & ( for w being Element of R holds
( not w in Adjacent vv or not w in $2 ) ) );
P1: for e being set st e in c holds
ex u being set st S1[e,u]
proof
let v be set ; :: thesis: ( v in c implies ex u being set st S1[v,u] )
assume A1: v in c ; :: thesis: ex u being set st S1[v,u]
reconsider vv = v as Element of the carrier of R by A1;
consider d being Element of C such that
B1: d <> c and
C1: for w being Element of R holds
( not w in Adjacent vv or not w in d ) by A1, B;
take d ; :: thesis: S1[v,d]
thus S1[v,d] by B1, C1, AA; :: thesis: verum
end;
consider r being Function such that
D: dom r = c and
E: for e being set st e in c holds
S1[e,r . e] from CLASSES1:sch 1(P1);
defpred S2[ set ] means verum;
deffunc H1( set ) -> set = $1 \/ (r " {$1});
reconsider Cc = Cc as non empty finite set ;
set D = { H1(d) where d is Element of Cc : S2[d] } ;
consider d being set such that
Dd: d in Cc by XBOOLE_0:def 1;
Dee: d \/ (r " {d}) in { H1(d) where d is Element of Cc : S2[d] } by Dd;
F: { H1(d) where d is Element of Cc : S2[d] } c= bool the carrier of R
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in { H1(d) where d is Element of Cc : S2[d] } or x in bool the carrier of R )
assume x in { H1(d) where d is Element of Cc : S2[d] } ; :: thesis: x in bool the carrier of R
then consider d being Element of Cc such that
A1: x = d \/ (r " {d}) ;
B1: r " {d} c= c by D, RELAT_1:167;
B1a: r " {d} c= the carrier of R by B1, XBOOLE_1:1;
d in C by XBOOLE_0:def 5;
then x c= the carrier of R by A1, B1a, XBOOLE_1:8;
hence x in bool the carrier of R ; :: thesis: verum
end;
G: union { H1(d) where d is Element of Cc : S2[d] } = the carrier of R
proof
thus union { H1(d) where d is Element of Cc : S2[d] } c= the carrier of R :: according to XBOOLE_0:def 10 :: thesis: the carrier of R c= union { H1(d) where d is Element of Cc : S2[d] }
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in union { H1(d) where d is Element of Cc : S2[d] } or x in the carrier of R )
assume x in union { H1(d) where d is Element of Cc : S2[d] } ; :: thesis: x in the carrier of R
then consider Y being set such that
A1: x in Y and
B1: Y in { H1(d) where d is Element of Cc : S2[d] } by TARSKI:def 4;
thus x in the carrier of R by A1, B1, F; :: thesis: verum
end;
thus the carrier of R c= union { H1(d) where d is Element of Cc : S2[d] } :: thesis: verum
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in the carrier of R or x in union { H1(d) where d is Element of Cc : S2[d] } )
assume A1a: x in the carrier of R ; :: thesis: x in union { H1(d) where d is Element of Cc : S2[d] }
then consider d being set such that
A1: x in d and
B1: d in C by AA3, TARSKI:def 4;
reconsider xp1 = x as Element of the carrier of R by A1a;
per cases ( d = c or d <> c ) ;
suppose S2: d = c ; :: thesis: x in union { H1(d) where d is Element of Cc : S2[d] }
then r . xp1 <> c by A1, E;
then A2: not r . xp1 in {c} by TARSKI:def 1;
r . xp1 in C by A1, S2, E;
then B2: r . xp1 in Cc by A2, XBOOLE_0:def 5;
r . xp1 in {(r . xp1)} by TARSKI:def 1;
then x in r " {(r . xp1)} by A1, S2, D, FUNCT_1:def 13;
then C2: 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 B2;
hence x in union { H1(d) where d is Element of Cc : S2[d] } by C2, 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 B1, XBOOLE_0:def 5;
then A2: d \/ (r " {d}) in { H1(d) where d is Element of Cc : S2[d] } ;
x in d \/ (r " {d}) by A1, XBOOLE_0:def 3;
hence x in union { H1(d) where d is Element of Cc : S2[d] } by A2, TARSKI:def 4; :: thesis: verum
end;
end;
end;
end;
H: for A being Subset of the carrier of R st A in { H1(d) where d is Element of Cc : S2[d] } holds
( A <> {} & ( for B being Subset of the carrier of R 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 the carrier of R; :: thesis: ( A in { H1(d) where d is Element of Cc : S2[d] } implies ( A <> {} & ( for B being Subset of the carrier of R 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 the carrier of R 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
B1: A = da \/ (r " {da}) ;
B1a: da in C by XBOOLE_0:def 5;
then not da is empty by EQREL_1:def 6;
hence A <> {} by B1; :: thesis: for B being Subset of the carrier of R 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 the carrier of R; :: 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
D1: B = db \/ (r " {db}) ;
E1: 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 B1, D1; :: thesis: verum
end;
suppose S1: da <> db ; :: thesis: ( A = B or A misses B )
then A2a: da misses db by B1a, E1, EQREL_1:def 6;
A2b: r " {da} misses r " {db} by S1, ZFMISC_1:17, FUNCT_1:141;
assume A <> B ; :: thesis: A misses B
assume A meets B ; :: thesis: contradiction
then consider x being set such that
B2: x in A and
C2: 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 B2, C2, B1, D1, XBOOLE_0:def 3;
end;
end;
end;
end;
reconsider D = { H1(d) where d is Element of Cc : S2[d] } as a_partition of the carrier of R by F, G, H, EQREL_1:def 6;
now
let x be set ; :: thesis: ( x in D implies x is StableSet of R )
assume A1: x in D ; :: thesis: x is StableSet of R
then reconsider S = x as Subset of R ;
consider d being Element of Cc such that
B1: x = d \/ (r " {d}) by A1;
C1: r " {d} c= c by D, RELAT_1:167;
D1: d in C by XBOOLE_0:def 5;
E1: d is StableSet of R by D1, DILWORTH:def 12;
F1: c is StableSet of R by AA, DILWORTH:def 12;
S is stable
proof
let a, b be Element of R; :: according to DILWORTH:def 2 :: thesis: ( not a in S or not b in S or a = b or ( not a <= b & not b <= a ) )
assume that
A2: a in S and
B2: b in S and
C2: a <> b ; :: thesis: ( not a <= b & not b <= a )
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 A2, B2, B1, XBOOLE_0:def 3;
suppose ( a in d & b in d ) ; :: thesis: ( not a <= b & not b <= a )
hence ( not a <= b & not b <= a ) by E1, C2, DILWORTH:def 2; :: thesis: verum
end;
suppose that A3: a in d and
B3: b in r " {d} ; :: thesis: ( not a <= b & not b <= a )
end;
suppose that A3: a in r " {d} and
B3: b in d ; :: thesis: ( not a <= b & not b <= a )
end;
suppose ( a in r " {d} & b in r " {d} ) ; :: thesis: ( not a <= b & not b <= a )
hence ( not a <= b & not b <= a ) by C1, F1, C2, DILWORTH:def 2; :: thesis: verum
end;
end;
end;
hence x is StableSet of R ; :: thesis: verum
end;
then reconsider D = D as Coloring of R by DILWORTH:def 12;
card Cc = (card C) - (card {c}) by AA, EULER_1:5;
then (card Cc) + 1 = ((card C) - 1) + 1 by CARD_1:50;
then I: card Cc < card C by NAT_1:13;
deffunc H2( set ) -> set = $1 \/ (r " {$1});
consider s being Function such that
sA: dom s = Cc and
sB: for x being set st x in Cc holds
s . x = H2(x) from FUNCT_1:sch 3();
sr: rng s c= D
proof
let y be set ; :: 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 set such that
A1: d in dom s and
B1: y = s . d by FUNCT_1:def 5;
y = d \/ (r " {d}) by sA, sB, A1, B1;
hence y in D by A1, sA; :: thesis: verum
end;
then reconsider s = s as Function of Cc,D by sA, FUNCT_2:4;
s1: s is one-to-one
proof
let x1, x2 be set ; :: according to FUNCT_1:def 8 :: thesis: ( not x1 in proj1 s or not x2 in proj1 s or not s . x1 = s . x2 or x1 = x2 )
assume that
A1: x1 in dom s and
B1: x2 in dom s and
C1: s . x1 = s . x2 ; :: thesis: x1 = x2
D1: s . x1 = x1 \/ (r " {x1}) by A1, sB;
E1: s . x2 = x2 \/ (r " {x2}) by B1, sB;
thus x1 c= x2 :: according to XBOOLE_0:def 10 :: thesis: x2 c= x1
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in x1 or x in x2 )
assume A2: x in x1 ; :: thesis: x in x2
then B2: x in s . x1 by D1, XBOOLE_0:def 3;
per cases ( x in x2 or x in r " {x2} ) by B2, C1, E1, XBOOLE_0:def 3;
suppose x in x2 ; :: thesis: x in x2
hence x in x2 ; :: thesis: verum
end;
suppose S3: x in r " {x2} ; :: thesis: x in x2
A3a: r " {x2} c= dom r by RELAT_1:167;
B3: x1 in C by A1, XBOOLE_0:def 5;
then reconsider x1 = x1 as Subset of the carrier of R ;
x1 meets c by A3a, S3, D, A2, XBOOLE_0:3;
then x1 = c by B3, AA, EQREL_1:def 6;
hence x in x2 by AA2a, A1, XBOOLE_0:def 5; :: thesis: verum
end;
end;
end;
thus x2 c= x1 :: thesis: verum
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in x2 or x in x1 )
assume A2: x in x2 ; :: thesis: x in x1
then B2: x in s . x2 by E1, XBOOLE_0:def 3;
per cases ( x in x1 or x in r " {x1} ) by B2, C1, D1, XBOOLE_0:def 3;
suppose x in x1 ; :: thesis: x in x1
hence x in x1 ; :: thesis: verum
end;
suppose S3: x in r " {x1} ; :: thesis: x in x1
A3a: r " {x1} c= dom r by RELAT_1:167;
B3: x2 in C by B1, XBOOLE_0:def 5;
then reconsider x2 = x2 as Subset of the carrier of R ;
x2 meets c by A3a, S3, D, A2, XBOOLE_0:3;
then x2 = c by B3, AA, EQREL_1:def 6;
hence x in x1 by AA2a, XBOOLE_0:def 5, B1; :: thesis: verum
end;
end;
end;
end;
D c= rng s
proof
let x be set ; :: 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
A1: x = d \/ (r " {d}) ;
s . d = d \/ (r " {d}) by sB;
hence x in rng s by A1, sA, FUNCT_1:def 5; :: thesis: verum
end;
then D = rng s by sr, XBOOLE_0:def 10;
then s is onto by FUNCT_2:def 3;
then J: card Cc = card D by s1, Dee, EULER_1:12;
then D is finite ;
hence contradiction by I, J, A, Lchro; :: thesis: verum
end;
end;