
theorem Th81:
  for X be non empty set, S be SigmaField of X, M be sigma_Measure
of S, f be PartFunc of X,ExtREAL, A,B be Element of S st (ex E be Element of S
  st E = dom f & f is E-measurable) & f is nonnegative & A misses B holds
  integral+(M,f|(A\/B)) = integral+(M,f|A)+integral+(M,f|B)
proof
  let X be non empty set, S be SigmaField of X, M be sigma_Measure of S, f be
  PartFunc of X,ExtREAL, A,B be Element of S;
  assume that
A1: ex E be Element of S st E = dom f & f is E-measurable and
A2: f is nonnegative and
A3: A misses B;
  consider F0 be Functional_Sequence of X,ExtREAL, K0 be ExtREAL_sequence such
  that
A4: for n be Nat holds F0.n is_simple_func_in S & dom(F0.n) = dom f and
A5: for n be Nat holds F0.n is nonnegative and
A6: for n,m be Nat st n <=m holds for x be Element of X st x in dom f
  holds (F0.n).x <= (F0.m).x and
A7: for x be Element of X st x in dom f holds F0#x is convergent & lim
  (F0#x) = f.x and
  for n be Nat holds K0.n=integral'(M,F0.n) and
  K0 is convergent and
  integral+(M,f)=lim K0 by A1,A2,Def15;
  deffunc PFB(Nat) = F0.$1|B;
  deffunc PFA(Nat) = F0.$1|A;
  consider FA be Functional_Sequence of X,ExtREAL such that
A8: for n be Nat holds FA.n=PFA(n) from SEQFUNC:sch 1;
  consider E be Element of S such that
A9: E = dom f and
A10: f is E-measurable by A1;
  consider FB be Functional_Sequence of X,ExtREAL such that
A11: for n be Nat holds FB.n=PFB(n) from SEQFUNC:sch 1;
  set DB = E /\ B;
A12: DB = dom(f|B) by A9,RELAT_1:61;
  then
A13: dom f /\ DB = DB by RELAT_1:60,XBOOLE_1:28;
  then
A14: dom(f|DB) = dom(f|B) by A12,RELAT_1:61;
  for x be object st x in dom(f|DB) holds (f|DB).x = (f|B).x
  proof
    let x be object;
    assume
A15: x in dom(f|DB);
    then f|B.x = f.x by A14,FUNCT_1:47;
    hence thesis by A15,FUNCT_1:47;
  end;
  then
A16: f|DB = f|B by A12,A13,FUNCT_1:2,RELAT_1:61;
  set DA = E /\ A;
A17: DA = dom(f|A) by A9,RELAT_1:61;
  then
A18: dom f /\ DA = DA by RELAT_1:60,XBOOLE_1:28;
  then
A19: dom(f|DA) = dom(f|A) by A17,RELAT_1:61;
  for x be object st x in dom(f|DA) holds (f|DA).x = (f|A).x
  proof
    let x be object;
    assume
A20: x in dom(f|DA);
    then f|A.x = f.x by A19,FUNCT_1:47;
    hence thesis by A20,FUNCT_1:47;
  end;
  then
A21: f|DA = f|A by A17,A18,FUNCT_1:2,RELAT_1:61;
A22: for n be Nat holds FA.n is_simple_func_in S & FB.n is_simple_func_in S
  & dom(FA.n) = dom(f|A) & dom(FB.n) = dom(f|B)
  proof
    let n be Nat;
    reconsider n1=n as Element of NAT by ORDINAL1:def 12;
A23: FB.n1=F0.n1|B by A11;
    then
A24: dom(FB.n) = dom(F0.n) /\ B by RELAT_1:61;
A25: FA.n1 = F0.n1|A by A8;
    hence FA.n is_simple_func_in S & FB.n is_simple_func_in S by A4,A23,Th34;
    dom(FA.n)=dom(F0.n) /\ A by A25,RELAT_1:61;
    hence thesis by A9,A4,A17,A12,A24;
  end;
A26: for x be Element of X st x in dom(f|A) holds FA#x is convergent & lim(
  FA#x) = f|A.x
  proof
    let x be Element of X;
    assume
A27: x in dom(f|A);
    now
      let n be Element of NAT;
      (FA#x).n = (FA.n).x by Def13;
      then
A28:  (FA#x).n = (F0.n|A).x by A8;
      dom(F0.n|A) = dom (FA.n) by A8
        .=dom(f|A) by A22;
      then (FA#x).n = (F0.n).x by A27,A28,FUNCT_1:47;
      hence (FA#x).n = (F0#x).n by Def13;
    end;
    then
A29: FA#x = F0#x by FUNCT_2:63;
    x in dom f /\ A by A27,RELAT_1:61;
    then
A30: x in dom f by XBOOLE_0:def 4;
    then lim(F0#x)=f.x by A7;
    hence thesis by A7,A27,A30,A29,FUNCT_1:47;
  end;
A31: for x be Element of X st x in dom(f|B) holds FB#x is convergent & lim(
  FB#x) = f|B.x
  proof
    let x be Element of X;
    assume
A32: x in dom(f|B);
    now
      let n be Element of NAT;
A33:  dom(F0.n|B) = dom(FB.n) by A11
        .=dom(f|B) by A22;
      thus (FB#x).n = (FB.n).x by Def13
        .=(F0.n|B).x by A11
        .=(F0.n).x by A32,A33,FUNCT_1:47
        .=(F0#x).n by Def13;
    end;
    then
A34: FB#x=F0#x by FUNCT_2:63;
    x in dom f /\ B by A32,RELAT_1:61;
    then
A35: x in dom f by XBOOLE_0:def 4;
    then lim(F0#x)=f.x by A7;
    hence thesis by A7,A32,A35,A34,FUNCT_1:47;
  end;
  set C = E/\(A\/B);
A36: C = dom f /\ C by A9,XBOOLE_1:17,28;
A37: dom(f|(A\/B)) = C by A9,RELAT_1:61;
  then
A38: dom(f|(A\/B)) = dom(f|C) by A36,RELAT_1:61;
  for x be object st x in dom(f|(A\/B)) holds f|(A\/B).x = f|C.x
  proof
    let x be object;
    assume
A39: x in dom(f|(A\/B));
    then f|(A\/B).x = f.x by FUNCT_1:47;
    hence thesis by A38,A39,FUNCT_1:47;
  end;
  then
A40: f|(A\/B) = f|C by A38,FUNCT_1:2;
  f is C-measurable by A10,MESFUNC1:30,XBOOLE_1:17;
  then
A41: f|(A\/B) is C-measurable by A36,A40,Th42;
  f is DB-measurable by A10,MESFUNC1:30,XBOOLE_1:17;
  then
A42: f|B is DB-measurable by A13,A16,Th42;
A43: f|B is nonnegative by A2,Th15;
  f is DA-measurable by A10,MESFUNC1:30,XBOOLE_1:17;
  then
A44: f|A is DA-measurable by A18,A21,Th42;
A45: f|A is nonnegative by A2,Th15;
  deffunc PFAB(Nat) = (F0.$1)|(A\/B);
  consider FAB be Functional_Sequence of X,ExtREAL such that
A46: for n be Nat holds FAB.n=PFAB(n) from SEQFUNC:sch 1;
A47: for n be Nat holds FA.n is nonnegative & FB.n is nonnegative
  proof
    let n be Nat;
    reconsider n as Element of NAT by ORDINAL1:def 12;
A48: F0.n|B is nonnegative by A5,Th15;
    F0.n|A is nonnegative by A5,Th15;
    hence thesis by A8,A11,A48;
  end;
A49: for n,m be Nat st n <=m holds for x be Element of X st x in dom(f|B)
  holds (FB.n).x <= (FB.m).x
  proof
    let n,m be Nat;
    assume
A50: n<=m;
    reconsider n,m as Element of NAT by ORDINAL1:def 12;
    let x be Element of X;
    assume
A51: x in dom(f|B);
    then x in dom f /\ B by RELAT_1:61;
    then
A52: x in dom f by XBOOLE_0:def 4;
    dom(F0.m|B) = dom(FB.m) by A11;
    then
A53: dom(F0.m|B) = dom(f|B) by A22;
    (FB.m).x =(F0.m|B).x by A11;
    then
A54: (FB.m).x = (F0.m).x by A51,A53,FUNCT_1:47;
    dom(F0.n|B) = dom(FB.n) by A11;
    then
A55: dom(F0.n|B) = dom(f|B) by A22;
    (FB.n).x =(F0.n|B).x by A11;
    then (FB.n).x =(F0.n).x by A51,A55,FUNCT_1:47;
    hence thesis by A6,A50,A52,A54;
  end;
  deffunc PKA(Nat) = integral'(M,FA.$1);
  consider KA be ExtREAL_sequence such that
A56: for n be Element of NAT holds KA.n = PKA(n) from FUNCT_2:sch 4;
  deffunc PKB(Nat) = integral'(M,FB.$1);
  consider KB be ExtREAL_sequence such that
A57: for n be Element of NAT holds KB.n = PKB(n) from FUNCT_2:sch 4;
A58: now
    let n be Nat;
    n in NAT by ORDINAL1:def 12;
    hence KB.n = PKB(n) by A57;
  end;
A59: now
    let n be Nat;
    n in NAT by ORDINAL1:def 12;
    hence KA.n = PKA(n) by A56;
  end;
A60: for n be set holds (n in dom KA implies -infty < KA.n) & (n in dom KB
  implies -infty < KB.n)
  proof
    let n be set;
    hereby
      assume n in dom KA;
      then reconsider n1 = n as Element of NAT;
A61:  FA.n1 is_simple_func_in S by A22;
      KA.n1 = integral'(M,FA.n1) by A59;
      hence -infty < KA.n by A47,A61,Th68;
    end;
    assume n in dom KB;
    then reconsider n1 = n as Element of NAT;
A62: FB.n1 is_simple_func_in S by A22;
    KB.n1 = integral'(M,FB.n1) by A58;
    hence thesis by A47,A62,Th68;
  end;
  then
A63: KB is without-infty by Th10;
  deffunc PK(Nat) = integral'(M,FAB.$1);
  consider KAB be ExtREAL_sequence such that
A64: for n be Element of NAT holds KAB.n = PK(n) from FUNCT_2:sch 4;
A65: now
    let n be Nat;
    n in NAT by ORDINAL1:def 12;
    hence KAB.n = PK(n) by A64;
  end;
A66: for n be Nat holds KAB.n=KA.n + KB.n
  proof
    let n be Nat;
    reconsider n as Element of NAT by ORDINAL1:def 12;
A67: FA.n=F0.n|A by A8;
A68: FB.n=F0.n|B by A11;
A69: KAB.n =integral'(M,FAB.n) by A65
      .=integral'(M,F0.n|(A\/B)) by A46;
A70: KA.n = integral'(M,FA.n) by A59;
    F0.n is_simple_func_in S by A4;
    then integral'(M,F0.n|(A\/B)) = integral'(M,FA.n)+integral'(M,FB.n) by A3
,A5,A67,A68,Th67;
    hence thesis by A58,A69,A70;
  end;
A71: for n,m be Nat st n <=m holds for x be Element of X st x in dom(f|A)
  holds (FA.n).x <= (FA.m).x
  proof
    let n,m be Nat;
    assume
A72: n<=m;
    reconsider n,m as Element of NAT by ORDINAL1:def 12;
    let x be Element of X;
    assume
A73: x in dom(f|A);
    then x in dom f /\ A by RELAT_1:61;
    then
A74: x in dom f by XBOOLE_0:def 4;
    dom(F0.m|A) = dom(FA.m) by A8;
    then
A75: dom(F0.m|A) = dom(f|A) by A22;
    (FA.m).x =(F0.m|A).x by A8;
    then
A76: (FA.m).x = (F0.m).x by A73,A75,FUNCT_1:47;
    dom(F0.n|A) = dom(FA.n) by A8;
    then
A77: dom(F0.n|A) = dom(f|A) by A22;
    (FA.n).x =(F0.n|A).x by A8;
    then (FA.n).x =(F0.n).x by A73,A77,FUNCT_1:47;
    hence thesis by A6,A72,A74,A76;
  end;
A78: for n,m be Nat st n<=m holds KA.n <= KA.m & KB.n <= KB.m
  proof
    let n,m be Nat;
A79: FA.m is_simple_func_in S by A22;
A80: dom(FA.m) = dom(f|A) by A22;
A81: KA.m = integral'(M,FA.m) by A59;
A82: dom(FA.n) = dom(f|A) by A22;
    assume
A83: n<=m;
A84: for x be object st x in dom(FA.m - FA.n) holds (FA.n).x <= (FA.m).x
    proof
      let x be object;
      assume x in dom(FA.m - FA.n);
      then x in (dom(FA.m) /\ dom(FA.n)) \( ((FA.m)"{+infty}/\(FA.n)"{+infty}
      ) \/((FA.m)"{-infty}/\(FA.n)"{-infty}) ) by MESFUNC1:def 4;
      then x in dom(FA.m) /\ dom(FA.n) by XBOOLE_0:def 5;
      hence thesis by A71,A83,A82,A80;
    end;
A85: FA.m is nonnegative by A47;
A86: FA.n is nonnegative by A47;
A87: FA.n is_simple_func_in S by A22;
    then
A88: dom(FA.m - FA.n) = dom(FA.m) /\ dom(FA.n) by A79,A86,A85,A84,Th69;
    then
A89: FA.m|dom(FA.m - FA.n) = FA.m by A82,A80,GRFUNC_1:23;
A90: FA.n|dom(FA.m - FA.n) = FA.n by A82,A80,A88,GRFUNC_1:23;
    integral'(M,FA.n|dom(FA.m - FA.n)) <= integral'(M,FA.m|dom(FA.m - FA
    .n)) by A87,A79,A86,A85,A84,Th70;
    hence KA.n <= KA.m by A59,A81,A89,A90;
A91: FB.m is_simple_func_in S by A22;
A92: FB.n is nonnegative by A47;
A93: FB.m is nonnegative by A47;
A94: KB.m = integral'(M,FB.m) by A58;
A95: dom(FB.m) = dom(f|B) by A22;
A96: dom(FB.n) = dom(f|B) by A22;
A97: for x be object st x in dom(FB.m - FB.n) holds (FB.n).x <= (FB.m).x
    proof
      let x be object;
      assume x in dom(FB.m - FB.n);
      then x in (dom(FB.m) /\ dom(FB.n)) \( ((FB.m)"{+infty}/\(FB.n)"{+infty}
      ) \/((FB.m)"{-infty}/\(FB.n)"{-infty}) ) by MESFUNC1:def 4;
      then x in dom(FB.m) /\ dom(FB.n) by XBOOLE_0:def 5;
      hence thesis by A49,A83,A96,A95;
    end;
A98: FB.n is_simple_func_in S by A22;
    then
A99: dom(FB.m - FB.n) = dom(FB.m) /\ dom(FB.n) by A91,A92,A93,A97,Th69;
    then
A100: FB.m|dom(FB.m - FB.n) = FB.m by A96,A95,GRFUNC_1:23;
A101: FB.n|dom(FB.m - FB.n) = FB.n by A96,A95,A99,GRFUNC_1:23;
    integral'(M,FB.n|dom(FB.m - FB.n)) <= integral'(M,FB.m|dom(FB.m - FB
    .n)) by A98,A91,A92,A93,A97,Th70;
    hence thesis by A58,A94,A100,A101;
  end;
  then
A102: for n,m be Nat st n<=m holds KA.n <= KA.m;
  then KA is convergent by Th54;
  then
A103: integral+(M,f|A) =lim KA by A17,A44,A45,A22,A47,A71,A26,A59,Def15;
A104: (for n be Nat holds FAB.n is_simple_func_in S & dom(FAB.n) = dom(f|(A\/
B))) & (for n be Nat holds for x be Element of X st x in dom(f|(A\/B)) holds (
FAB.n).x = (F0.n).x) & (for n be Nat holds FAB.n is nonnegative) & (for n,m be
Nat st n <=m holds for x be Element of X st x in dom(f|(A\/B)) holds (FAB.n).x
  <= (FAB.m).x ) & for x be Element of X st x in dom(f|(A\/B)) holds FAB#x is
  convergent & lim(FAB#x) = f|(A\/B).x
  proof
    thus
A105: now
      let n be Nat;
      FAB.n=(F0.n)|(A \/ B) by A46;
      hence FAB.n is_simple_func_in S by A4,Th34;
      thus dom(FAB.n) = dom(F0.n|(A\/B)) by A46
        .= dom(F0.n) /\ (A \/ B) by RELAT_1:61
        .= dom f /\ (A\/B) by A4
        .= dom(f|(A\/B)) by RELAT_1:61;
    end;
    thus
A106: now
      let n be Nat, x be Element of X;
      assume x in dom(f|(A\/B));
      then
A107: x in dom(FAB.n) by A105;
      FAB.n=F0.n|(A \/ B) by A46;
      hence (FAB.n).x = (F0.n).x by A107,FUNCT_1:47;
    end;
    hereby
      let n be Nat;
      reconsider n1=n as Element of NAT by ORDINAL1:def 12;
      F0.n1|(A\/B) is nonnegative by A5,Th15;
      hence FAB.n is nonnegative by A46;
    end;
    hereby
      let n,m be Nat such that
A108: n <= m;
      now
        let x be Element of X;
        assume
A109:   x in dom(f|(A\/B));
        then
A110:   (FAB.m).x = (F0.m).x by A106;
        x in dom f /\ (A\/B) by A109,RELAT_1:61;
        then
A111:   x in dom f by XBOOLE_0:def 4;
        (FAB.n).x = (F0.n).x by A106,A109;
        hence (FAB.n).x <= (FAB.m).x by A6,A108,A111,A110;
      end;
      hence
      for x be Element of X st x in dom(f|(A\/B)) holds (FAB.n).x <= (FAB
      . m).x;
    end;
    hereby
      let x be Element of X;
      assume
A112: x in dom(f|(A\/B));
      then x in dom f /\ (A\/B) by RELAT_1:61;
      then
A113: x in dom f by XBOOLE_0:def 4;
A114: now
        let n be Element of NAT;
        thus (FAB#x).n = (FAB.n).x by Def13
          .=(F0.n).x by A106,A112
          .=(F0#x).n by Def13;
      end;
      then FAB#x=F0#x by FUNCT_2:63;
      hence FAB#x is convergent by A7,A113;
      thus lim(FAB#x) = lim(F0#x) by A114,FUNCT_2:63
        .= f.x by A7,A113
        .= f|(A\/B).x by A112,FUNCT_1:47;
    end;
  end;
  for n,m be Nat st n<=m holds KAB.n <= KAB.m
  proof
    let n,m be Nat;
    assume
A115: n<=m;
    reconsider n,m as Element of NAT by ORDINAL1:def 12;
A116: dom(FAB.m) = dom(f|(A\/B)) by A104;
A117: dom(FAB.n) = dom (f|(A\/B)) by A104;
A118: for x be object st x in dom(FAB.m - FAB.n) holds (FAB.n).x <= (FAB.m).x
    proof
      let x be object;
      assume x in dom(FAB.m - FAB.n);
      then x in (dom(FAB.m) /\ dom(FAB.n)) \ ((FAB.m)"{+infty}/\(FAB.n)"{
      +infty } \/(FAB.m)"{-infty}/\(FAB.n)"{-infty}) by MESFUNC1:def 4;
      then x in dom(FAB.m) /\ dom(FAB.n) by XBOOLE_0:def 5;
      hence thesis by A104,A115,A117,A116;
    end;
A119: KAB.m = integral'(M,FAB.m) by A65;
A120: FAB.m is_simple_func_in S by A104;
A121: FAB.m is nonnegative by A104;
A122: FAB.n is nonnegative by A104;
A123: FAB.n is_simple_func_in S by A104;
    then
A124: dom(FAB.m - FAB.n) = dom(FAB.m) /\ dom(FAB.n) by A120,A122,A121,A118,Th69
;
    then
A125: FAB.m|dom(FAB.m - FAB.n) = FAB.m by A117,A116,GRFUNC_1:23;
A126: FAB.n|dom(FAB.m - FAB.n) = FAB.n by A117,A116,A124,GRFUNC_1:23;
    integral'(M,FAB.n|dom(FAB.m - FAB.n)) <= integral'(M,FAB.m|dom(FAB.m
    - FAB.n)) by A123,A120,A122,A121,A118,Th70;
    hence thesis by A65,A119,A125,A126;
  end;
  then
A127: KAB is convergent by Th54;
A128: for n,m be Nat st n<=m holds KB.n <= KB.m by A78;
  then KB is convergent by Th54;
  then
A129: integral+(M,f|B) =lim KB by A12,A42,A43,A22,A47,A49,A31,A58,Def15;
  f|(A\/B) is nonnegative by A2,Th15;
  then
A130: integral+(M,f|(A\/B)) = lim KAB by A37,A41,A65,A104,A127,Def15;
  KA is without-infty by A60,Th10;
  hence thesis by A130,A102,A128,A103,A129,A66,A63,Th61;
end;
