let R be non empty transitive antisymmetric RelStr ; :: thesis: for X being finite Subset of R st X <> {} holds
ex x being Element of R st
( x in X & x is_maximal_wrt X, the InternalRel of R )

let X be finite Subset of R; :: thesis: ( X <> {} implies ex x being Element of R st
( x in X & x is_maximal_wrt X, the InternalRel of R ) )

set IR = the InternalRel of R;
set CR = the carrier of R;
A1: the InternalRel of R is_transitive_in the carrier of R by ORDERS_2:def 3;
A2: the InternalRel of R is_antisymmetric_in the carrier of R by ORDERS_2:def 4;
A3: X is finite ;
defpred S1[ set ] means ( $1 <> {} implies ex x being Element of R st
( x in $1 & x is_maximal_wrt $1, the InternalRel of R ) );
A4: S1[ {} ] ;
now :: thesis: for y, B being set st y in X & B c= X & ( B <> {} implies ex x being Element of R st
( x in B & x is_maximal_wrt B, the InternalRel of R ) ) & B \/ {y} <> {} holds
ex y9 being Element of R st
( y9 in B \/ {y} & y9 is_maximal_wrt B \/ {y}, the InternalRel of R )
let y, B be set ; :: thesis: ( y in X & B c= X & ( B <> {} implies ex x being Element of R st
( x in B & x is_maximal_wrt B, the InternalRel of R ) ) & B \/ {y} <> {} implies ex y9 being Element of R st
( b3 in b2 \/ {y9} & b3 is_maximal_wrt b2 \/ {y9}, the InternalRel of R ) )

assume that
A5: y in X and
B c= X and
A6: ( B <> {} implies ex x being Element of R st
( x in B & x is_maximal_wrt B, the InternalRel of R ) ) ; :: thesis: ( B \/ {y} <> {} implies ex y9 being Element of R st
( b3 in b2 \/ {y9} & b3 is_maximal_wrt b2 \/ {y9}, the InternalRel of R ) )

reconsider y9 = y as Element of R by A5;
assume B \/ {y} <> {} ; :: thesis: ex y9 being Element of R st
( b3 in b2 \/ {y9} & b3 is_maximal_wrt b2 \/ {y9}, the InternalRel of R )

per cases ( B = {} or B <> {} ) ;
suppose A7: B = {} ; :: thesis: ex y9 being Element of R st
( b3 in b2 \/ {y9} & b3 is_maximal_wrt b2 \/ {y9}, the InternalRel of R )

take y9 = y9; :: thesis: ( y9 in B \/ {y} & y9 is_maximal_wrt B \/ {y}, the InternalRel of R )
thus y9 in B \/ {y} by A7, TARSKI:def 1; :: thesis: y9 is_maximal_wrt B \/ {y}, the InternalRel of R
A8: y9 in B \/ {y} by A7, TARSKI:def 1;
for z being set holds
( not z in B \/ {y9} or not z <> y9 or not [y9,z] in the InternalRel of R ) by A7, TARSKI:def 1;
hence y9 is_maximal_wrt B \/ {y}, the InternalRel of R by A8, WAYBEL_4:def 23; :: thesis: verum
end;
suppose B <> {} ; :: thesis: ex x being Element of R st
( b3 in b2 \/ {x} & b3 is_maximal_wrt b2 \/ {x}, the InternalRel of R )

then consider x being Element of R such that
A9: x in B and
A10: x is_maximal_wrt B, the InternalRel of R by A6;
now :: thesis: ex y9 being Element of R st
( y9 in B \/ {y} & y9 is_maximal_wrt B \/ {y}, the InternalRel of R )
per cases ( [x,y] in the InternalRel of R or [y,x] in the InternalRel of R or ( not [x,y] in the InternalRel of R & not [y,x] in the InternalRel of R ) ) ;
suppose A11: [x,y] in the InternalRel of R ; :: thesis: ex y9 being Element of R st
( y9 in B \/ {y} & y9 is_maximal_wrt B \/ {y}, the InternalRel of R )

take y9 = y9; :: thesis: ( y9 in B \/ {y} & y9 is_maximal_wrt B \/ {y}, the InternalRel of R )
A12: y in {y} by TARSKI:def 1;
hence y9 in B \/ {y} by XBOOLE_0:def 3; :: thesis: y9 is_maximal_wrt B \/ {y}, the InternalRel of R
A13: now :: thesis: for z being set holds
( not z in B \/ {y} or not z <> y or not [y,z] in the InternalRel of R )
given z being set such that A14: z in B \/ {y} and
A15: z <> y and
A16: [y,z] in the InternalRel of R ; :: thesis: contradiction
A17: y9 in the carrier of R ;
z in the carrier of R by A16, ZFMISC_1:87;
then A18: [x,z] in the InternalRel of R by A1, A11, A16, A17;
end;
y9 in B \/ {y} by A12, XBOOLE_0:def 3;
hence y9 is_maximal_wrt B \/ {y}, the InternalRel of R by A13, WAYBEL_4:def 23; :: thesis: verum
end;
suppose A21: [y,x] in the InternalRel of R ; :: thesis: ex x being Element of R st
( x in B \/ {y} & x is_maximal_wrt B \/ {y}, the InternalRel of R )

take x = x; :: thesis: ( x in B \/ {y} & x is_maximal_wrt B \/ {y}, the InternalRel of R )
thus x in B \/ {y} by A9, XBOOLE_0:def 3; :: thesis: x is_maximal_wrt B \/ {y}, the InternalRel of R
A22: now :: thesis: for z being set holds
( not z in B \/ {y} or not z <> x or not [x,z] in the InternalRel of R )
assume ex z being set st
( z in B \/ {y} & z <> x & [x,z] in the InternalRel of R ) ; :: thesis: contradiction
then consider z being set such that
A23: z in B \/ {y} and
A24: z <> x and
A25: [x,z] in the InternalRel of R ;
end;
x in B \/ {y} by A9, XBOOLE_0:def 3;
hence x is_maximal_wrt B \/ {y}, the InternalRel of R by A22, WAYBEL_4:def 23; :: thesis: verum
end;
suppose A27: ( not [x,y] in the InternalRel of R & not [y,x] in the InternalRel of R ) ; :: thesis: ex x being Element of R st
( x in B \/ {y} & x is_maximal_wrt B \/ {y}, the InternalRel of R )

take x = x; :: thesis: ( x in B \/ {y} & x is_maximal_wrt B \/ {y}, the InternalRel of R )
thus x in B \/ {y} by A9, XBOOLE_0:def 3; :: thesis: x is_maximal_wrt B \/ {y}, the InternalRel of R
A28: now :: thesis: for z being set holds
( not z in B \/ {y} or not z <> x or not [x,z] in the InternalRel of R )
assume ex z being set st
( z in B \/ {y} & z <> x & [x,z] in the InternalRel of R ) ; :: thesis: contradiction
then consider z being set such that
A29: z in B \/ {y} and
A30: z <> x and
A31: [x,z] in the InternalRel of R ;
end;
x in B \/ {y} by A9, XBOOLE_0:def 3;
hence x is_maximal_wrt B \/ {y}, the InternalRel of R by A28, WAYBEL_4:def 23; :: thesis: verum
end;
end;
end;
hence ex x being Element of R st
( x in B \/ {y} & x is_maximal_wrt B \/ {y}, the InternalRel of R ) ; :: thesis: verum
end;
end;
end;
then A32: for y, B being set st y in X & B c= X & S1[B] holds
S1[B \/ {y}] ;
thus S1[X] from FINSET_1:sch 2(A3, A4, A32); :: thesis: verum