reserve X for set;
reserve X,X1,X2 for non empty set;

theorem Th29:
for f being PartFunc of X,ExtREAL, x being Element of X
holds (max+f).x <= (|.f.|).x & (max-f).x <= (|.f.|).x
proof
    let f be PartFunc of X,ExtREAL, x be Element of X;
A1: -(f.x) <= --|. f.x .| by XXREAL_3:38,EXTREAL1:20;
    ((max+f).x = f.x or (max+f).x = 0)
  & ((max-f).x = -(f.x) or (max-f).x = 0) by MESFUNC2:18; then
A2: (max+f).x <= |. f.x .| & (max-f).x <= |. f.x .| by A1,EXTREAL1:14,20;
    per cases;
    suppose x in dom |.f.|;
     hence (max+f).x <= (|.f.|).x & (max-f).x <= (|.f.|).x
       by A2,MESFUNC1:def 10;
    end;
    suppose A3: not x in dom |.f.|; then
     not x in dom f by MESFUNC1:def 10; then
     f.x = 0 & (|.f.|).x = 0 by A3,FUNCT_1:def 2;
     hence (max+f).x <= (|.f.|).x & (max-f).x <= (|.f.|).x by A1,MESFUNC2:18;
    end;
end;
