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 Th16:
  for f being PartFunc of C,REAL st f|X is bounded_below holds (
  max-f)|X is bounded_above
proof
  let f be PartFunc of C,REAL;
  assume f|X is bounded_below;
  then consider b be Real such that
A1: for c being object st c in X /\ dom f holds f.c >= b by RFUNCT_1:71;
A2: dom max-(f) = dom f by RFUNCT_3:def 11;
  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 11;
          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 2;
          c in dom f by A4,XBOOLE_0:def 4;
          hence thesis by A2,A5,RFUNCT_3:def 11;
        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 11;
          then f.c >= b by A1;
          then -f.c <= -b by XREAL_1:24;
          then max(-f.c,0) <= -b by A6,XXREAL_0:28;
          then
A8:       max-(f.c) <= -b by RFUNCT_3:def 2;
          c in dom f by A7,XBOOLE_0:def 4;
          hence thesis by A2,A8,RFUNCT_3:def 11;
        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;
