reserve x,y,y1,y2 for set;
reserve C for non empty set;
reserve c for Element of C;
reserve f,h,g,h1 for Membership_Func of C;

theorem
  for a,b,c be Real holds  c + max(a,b) = max(c+a,c+b) & c + min(a,b) =
  min(c+a,c+b)
proof
  let a,b,c be Real;
A1: c + min(a,b) = min(c+a,c+b)
  proof
    per cases by XXREAL_0:15;
    suppose
A2:   min(a,b) = a;
      then a <= b by XXREAL_0:def 9;
      then a+c <= c+b by XREAL_1:6;
      hence thesis by A2,XXREAL_0:def 9;
    end;
    suppose
A3:   min(a,b) = b;
      then a >= b by XXREAL_0:def 9;
      then a+c >= b+c by XREAL_1:6;
      hence thesis by A3,XXREAL_0:def 9;
    end;
  end;
  c + max(a,b) = max(c+a,c+b)
  proof
    per cases by XXREAL_0:16;
    suppose
A4:   max(a,b) = b;
      then a <= b by XXREAL_0:def 10;
      then c+a <= c+b by XREAL_1:6;
      hence thesis by A4,XXREAL_0:def 10;
    end;
    suppose
A5:   max(a,b) = a;
      then a >= b by XXREAL_0:def 10;
      then a+c >= b+c by XREAL_1:6;
      hence thesis by A5,XXREAL_0:def 10;
    end;
  end;
  hence thesis by A1;
end;
