reserve i,j,k,n,n1,n2,m for Nat;
reserve a,r,x,y for Real;
reserve A for non empty closed_interval Subset of REAL;
reserve C for non empty set;
reserve X for set;

theorem Th14:
  for f being PartFunc of C,REAL st f|X is bounded_above holds (
  max+f)|X is bounded_above
proof
  let f be PartFunc of C,REAL;
  assume f|X is bounded_above;
  then consider b being Real such that
A1: for c being object st c in X /\ dom f holds f.c <= b by RFUNCT_1:70;
A2: dom max+(f) = dom f by RFUNCT_3:def 10;
  ex r st for c being object st c in X /\ dom max+(f) holds max+(f).c <= r
  proof
    now
      per cases;
      suppose
A3:     b < 0;
        for c being object st c in X /\ dom max+(f) holds max+(f).c <= 0
        proof
          let c be object;
          assume c in X /\ dom max+(f);
          then
A4:       c in X /\ dom f by RFUNCT_3:def 10;
          then f.c <= b by A1;
          then max(f.c,0) = 0 by A3,XXREAL_0:def 10;
          then
A5:       max+(f.c) = 0 by RFUNCT_3:def 1;
          c in dom f by A4,XBOOLE_0:def 4;
          hence thesis by A2,A5,RFUNCT_3:def 10;
        end;
        hence thesis;
      end;
      suppose
A6:     b >= 0;
        for c being object st c in X /\ dom max+(f) holds max+(f).c <= b
        proof
          let c be object;
          assume c in X /\ dom max+(f);
          then
A7:       c in X /\ dom f by RFUNCT_3:def 10;
          then f.c <= b by A1;
          then max(f.c,0) <= b by A6,XXREAL_0:28;
          then
A8:       max+(f.c) <= b by RFUNCT_3:def 1;
          c in dom f by A7,XBOOLE_0:def 4;
          hence thesis by A2,A8,RFUNCT_3:def 10;
        end;
        then consider r be Real such that
        r = b and
A9:     for c being object st c in X /\ dom max+(f) holds max+(f).c <= r;
        thus thesis by A9;
      end;
    end;
    hence thesis;
  end;
  hence thesis by RFUNCT_1:70;
end;
