 reserve Omega for non empty set;
 reserve r for Real;
 reserve Sigma for SigmaField of Omega;
 reserve P for Probability of Sigma;

theorem Th13:
  for DX be non empty set, F be Function of DX,REAL,
  Y be finite Subset of DX st
  for x be set st x in Y holds 0<= F.x holds
  0 <= setopfunc(Y,DX,REAL,F,addreal)
  proof
    let DX be non empty set,
    F be Function of DX,REAL,
    Y be finite Subset of DX;
    assume A1:for x be set st x in Y holds 0<= F.x;
    consider p being FinSequence of DX such that
    A2: p is one-to-one & rng p = Y &
    setopfunc(Y,DX,REAL,F,addreal) =Sum(Func_Seq(F,p)) by Th9;
    now let i be Nat;
      assume A3: i in dom (Func_Seq(F,p));
      then
      A4: (Func_Seq(F,p)).i = F.(p.i) by FUNCT_1:12;
      i in dom p by A3,FUNCT_1:11;
      hence 0 <= (Func_Seq(F,p)).i by A4,A1,A2,FUNCT_1:3;
    end;
    hence thesis by A2,RVSUM_1:84;
  end;
