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 ;

theorem Th30:
  max+(R_EAL f) = max+f & max-(R_EAL f) = max-f
proof
A1: dom max+(R_EAL f) = dom R_EAL f by MESFUNC2:def 2
    .= dom max+f by RFUNCT_3:def 10;
  now
    let x be object;
    assume
A2: x in dom max+(R_EAL f);
    then (max+(R_EAL f)).x = max+(f.x) by MESFUNC2:def 2;
    hence (max+(R_EAL f)).x = (max+f).x by A1,A2,RFUNCT_3:def 10;
  end;
  hence max+(R_EAL f) = max+f by A1,FUNCT_1:2;
A3: dom max-(R_EAL f) = dom R_EAL f by MESFUNC2:def 3
    .=dom max-f by RFUNCT_3:def 11;
  now
    let x be object;
    assume
A4: x in dom max-(R_EAL f);
    (max-(R_EAL f)).x = max(-(((R_EAL f).x)),0.) by MESFUNC2:def 3,A4;
    then (max-(R_EAL f)).x = max-(f.x) by SUPINF_2:2;
    hence (max-(R_EAL f)).x = (max-f).x by A3,A4,RFUNCT_3:def 11;
  end;
  hence thesis by A3,FUNCT_1:2;
end;
