let L be RelStr ; :: thesis: for X being set
for x being Element of L holds
( x is_maximal_in X iff ( x in X & ( for y being Element of L holds
( not y in X or not x < y ) ) ) )

let X be set ; :: thesis: for x being Element of L holds
( x is_maximal_in X iff ( x in X & ( for y being Element of L holds
( not y in X or not x < y ) ) ) )

let x be Element of L; :: thesis: ( x is_maximal_in X iff ( x in X & ( for y being Element of L holds
( not y in X or not x < y ) ) ) )

hereby :: thesis: ( x in X & ( for y being Element of L holds
( not y in X or not x < y ) ) implies x is_maximal_in X )
assume x is_maximal_in X ; :: thesis: ( x in X & ( for y being Element of L holds
( not b2 in X or not x < b2 ) ) )

then A1: x is_maximal_wrt X, the InternalRel of L ;
hence x in X ; :: thesis: for y being Element of L holds
( not b2 in X or not x < b2 )

let y be Element of L; :: thesis: ( not b1 in X or not x < b1 )
per cases ( not y in X or y = x or not [x,y] in the InternalRel of L ) by A1;
suppose not y in X ; :: thesis: ( not b1 in X or not x < b1 )
hence ( not y in X or not x < y ) ; :: thesis: verum
end;
suppose y = x ; :: thesis: ( not b1 in X or not x < b1 )
hence ( not y in X or not x < y ) ; :: thesis: verum
end;
suppose not [x,y] in the InternalRel of L ; :: thesis: ( not b1 in X or not x < b1 )
end;
end;
end;
assume that
A2: x in X and
A3: for y being Element of L holds
( not y in X or not x < y ) ; :: thesis: x is_maximal_in X
assume not x is_maximal_in X ; :: thesis: contradiction
then not x is_maximal_wrt X, the InternalRel of L ;
then consider y being set such that
A4: y in X and
A5: y <> x and
A6: [x,y] in the InternalRel of L by A2;
reconsider y = y as Element of L by A6, ZFMISC_1:87;
x <= y by A6, ORDERS_2:def 5;
then x < y by A5, ORDERS_2:def 6;
hence contradiction by A3, A4; :: thesis: verum