reserve a,b,r for Real;
reserve A,B for non empty set;
reserve f,g,h for Element of PFuncs(A,REAL);

theorem Th6:
  h = (addpfunc A).(f,g) iff (dom h= dom f /\ dom g & for x being
  Element of A st x in dom h holds h.x = f.x + g.x)
proof
  hereby
    assume
A1: h = (addpfunc A).(f,g);
    then dom h = dom(f+g) by RFUNCT_3:def 4;
    hence dom h = dom f /\ dom g by VALUED_1:def 1;
    let x be Element of A;
    assume x in dom h;
    then
A2: x in dom (f+g) by A1,RFUNCT_3:def 4;
    h.x = (f+g).x by A1,RFUNCT_3:def 4;
    hence h.x = f.x + g.x by A2,VALUED_1:def 1;
  end;
  assume that
A3: dom h = dom f /\ dom g and
A4: for x being Element of A st x in dom h holds h.x=f.x + g.x;
  set k=(addpfunc A).(f,g);
A5: now
    let x be Element of A;
A6: k.x = (f+g).x by RFUNCT_3:def 4;
    assume
A7: x in dom h;
    then x in dom(f+g) by A3,VALUED_1:def 1;
    hence k.x = f.x + g.x by A6,VALUED_1:def 1
      .= h.x by A4,A7;
  end;
  dom k = dom (f+g) by RFUNCT_3:def 4
    .= dom h by A3,VALUED_1:def 1;
  hence thesis by A5,PARTFUN1:5;
end;
