
theorem Th4:
  for X be non empty set, f be PartFunc of X,ExtREAL,c be Real st
  f is nonpositive holds
  (0 <= c implies c(#)f is nonpositive) &
  (c <= 0 implies c(#)f is nonnegative)
proof
  let X be non empty set;
  let f be PartFunc of X,ExtREAL;
  let c be Real;
  set g = c(#)f;
  assume
A1: f is nonpositive;
  hereby
    set g = c(#)f;
    assume
A2: 0 <= c;
    for x be set st x in dom g holds g.x <= 0
    proof
      let x be set;
      f.x <= 0 by A1,MESFUNC5:8; then
A3:   c*f.x <= 0 by A2;
      assume x in dom g;
      hence thesis by A3,MESFUNC1:def 6;
    end;
    hence c(#)f is nonpositive by MESFUNC5:9;
  end;
  assume
A4: c <= 0;
  now
    let x be object;
    f.x <= 0 by A1,MESFUNC5:8; then
A5: 0 <= c*f.x by A4;
    assume x in dom g;
    hence 0 <= g.x by A5,MESFUNC1:def 6;
  end;
  hence thesis by SUPINF_2:52;
end;
