reserve X for non empty set,
  Y for set,
  S for SigmaField of X,
  F for sequence of S,
  f,g for PartFunc of X,REAL,
  A,B for Element of S,
  r,s for Real,
  a for Real,
  n for Nat;
reserve X for non empty set,
  S for SigmaField of X,
  f,g for PartFunc of X,REAL,
  A for Element of S,
  r for Real,
  p for Rational;
reserve X for non empty set,
  f,g for PartFunc of X,REAL,
  r for Real ;
reserve X for non empty set,
  S for SigmaField of X,
  f,g for PartFunc of X,REAL,
  A for Element of S;
reserve X for non empty set,
  Y for set,
  S for SigmaField of X,
  f,g,h for PartFunc of X,REAL,
  A for Element of S,
  r for Real;

theorem
  f is nonnegative implies (0 <= r implies r(#)f is nonnegative) & (r <=
  0 implies r(#)f is nonpositive)
proof
  assume
A1: f is nonnegative;
  hereby
    assume
A2: 0 <= r;
    now
      let x be object such that
A3:   x in dom(r(#)f);
      0 <= f.x by A1,Th51;
      then 0*r <= r*f.x by A2;
      hence 0 <= (r(#)f).x by A3,VALUED_1:def 5;
    end;
    hence r(#)f is nonnegative by Th52;
  end;
  assume
A4: r <= 0;
  now
    let x be object such that
A5: x in dom(r(#)f);
    0 <= f.x by A1,Th51;
    then r*f.x <= r*0 by A4;
    hence (r(#)f).x <= 0 by A5,VALUED_1:def 5;
  end;
  hence thesis by Th54;
end;
