
theorem MES57: ::: move theorems from MESFUNC5 to XXREAL_0
  for x,y,k being Real st k <= 0 holds
    k*min(x,y) = max(k*x,k*y) & k*max(x,y) = min(k*x,k*y)
proof
  let x,y,k be Real;
  assume
A1: k <= 0;
  hereby
    per cases by XXREAL_0:16;
    suppose
      max(x,y) = x; then
A2:   y <= x by XXREAL_0:def 10;
      then max(k*x,k*y) = k*y by XXREAL_0:def 10,A1,XREAL_1:65;
      hence k*min(x,y) = max(k*x,k*y) by A2,XXREAL_0:def 9;
    end;
    suppose
      max(x,y) = y; then
A3:   x <= y by XXREAL_0:def 10;
      then max(k*x,k*y) = k*x by XXREAL_0:def 10,A1,XREAL_1:65;
      hence k*min(x,y) = max(k*x,k*y) by A3,XXREAL_0:def 9;
    end;
  end;
  per cases by XXREAL_0:15;
  suppose
    min(x,y) = x; then
A4: x <= y by XXREAL_0:def 9;
    then min(k*x,k*y) = k*y by XXREAL_0:def 9,A1,XREAL_1:65;
    hence thesis by A4,XXREAL_0:def 10;
  end;
  suppose
    min(x,y) = y; then
A5: y <= x by XXREAL_0:def 9;
    then min(k*y,k*x) = k*x by XXREAL_0:def 9,A1,XREAL_1:65;
    hence thesis by A5,XXREAL_0:def 10;
  end;
end;
