
theorem Th25: :: Pmaxmax:
for R being transitive RelStr, x being Element of R, S being Subset of R
 st x is_maximal_in Upper S holds x is_maximal_in [#]R
proof
 let R be transitive RelStr, x be Element of R, S be Subset of R such that
A1: x is_maximal_in Upper S;
   set cR = the carrier of R;
A2: x in Upper S by A1,WAYBEL_4:55;
 assume not x is_maximal_in [#]R;
 then consider y being Element of R such that y in cR and
A3: x < y by A2,WAYBEL_4:55;
 per cases by A2,XBOOLE_0:def 3;
 suppose A4: x in S;
   x <= y by A3;
   then y in uparrow S by A4,WAYBEL_0:def 16;
   then y in Upper S by XBOOLE_0:def 3;
   hence thesis by A1,A3,WAYBEL_4:55;
 end;
 suppose x in uparrow S;
   then consider x99 being Element of R such that
A5: x99 <= x and
A6: x99 in S by WAYBEL_0:def 16;
   x <= y by A3;
   then x99 <= y by A5,YELLOW_0:def 2;
   then y in uparrow S by A6,WAYBEL_0:def 16;
   then y in Upper S by XBOOLE_0:def 3;
  hence contradiction by A1,A3,WAYBEL_4:55;
 end;
end;
