reserve X for set;
reserve n,i for Element of NAT;
reserve a,b,c,d,e,r,x0 for Real;
reserve A for non empty closed_interval Subset of REAL;
reserve f,g,h for PartFunc of REAL,REAL n;
reserve E for Element of REAL n;

theorem Th10:
  a <= c & c <= d & d <= b &
  f is_integrable_on ['a,b'] & g is_integrable_on ['a,b'] &
  f| ['a,b'] is bounded & g| ['a,b'] is bounded &
  ['a,b'] c= dom f & ['a,b'] c= dom g
  implies
  f + g is_integrable_on ['c,d'] & (f + g) | ['c,d'] is bounded
  proof
    assume that
A1: a <= c & c <= d & d <= b and
A2: f is_integrable_on ['a,b'] & g is_integrable_on ['a,b'] &
    f| ['a,b'] is bounded & g| ['a,b'] is bounded and
A3: ['a,b'] c= dom f & ['a,b'] c= dom g;
A4: now let i;
      set P = proj(i,n);
      assume
A5:   i in Seg n; then
A6:   P*f is_integrable_on ['a,b'] by A2;
      (P*(f| ['a,b'])) is bounded by A5,A2; then
A7:   (P*f) | ['a,b'] is bounded by RELAT_1:83;
A8:   dom (P)=REAL n by FUNCT_2:def 1; then
      rng f c= dom(P); then
A9:  dom (P*f) = dom f by RELAT_1:27;
A10:  P*g is_integrable_on ['a,b'] by A5,A2;
      (P*(g| ['a,b'])) is bounded by A5,A2; then
A11:  (P*g) | ['a,b'] is bounded by RELAT_1:83;
      rng g c= dom(P) by A8; then
      dom (P*g) = dom g by RELAT_1:27; then
A12:  (P*f)+(P*g) is_integrable_on ['c,d'] &
      ((P*f)+(P*g)) | ['c,d'] is bounded
      by A1,A3,A6,A7,A9,A10,A11,INTEGRA6:19;
      ((P*f) + (P*g)) | ['c,d'] = (P*(f+g)) | ['c,d'] by INTEGR15:15
      .= P*((f+g) | ['c,d']) by RELAT_1:83;
      hence P*(f+g) is_integrable_on ['c,d'] &
      P*((f+g) | ['c,d']) is bounded by A12,INTEGR15:15;
    end; then
    for i be Element of NAT st i in Seg n
    holds ((proj(i,n))*(f + g)) is_integrable_on ['c,d'];
    hence f + g is_integrable_on ['c,d'];
    for i be Element of NAT st i in Seg n
    holds (proj(i,n))*((f + g) | ['c,d']) is bounded by A4;
    hence thesis;
  end;
