reserve n,m,k for Nat;
reserve x,X,X1 for set;
reserve r,p for Real;
reserve s,g,x0,x1,x2 for Real;
reserve S,T for RealNormSpace;
reserve f,f1,f2 for PartFunc of REAL,the carrier of S;
reserve s1,s2 for Real_Sequence;
reserve Y for Subset of REAL;

theorem
x0 in dom f1 /\ dom f2 & f1 is_continuous_in x0 & f2 is_continuous_in x0
  implies f1+f2 is_continuous_in x0 & f1-f2 is_continuous_in x0
proof
   assume A1: x0 in dom f1 /\ dom f2;
   assume that
A2: f1 is_continuous_in x0 & f2 is_continuous_in x0;
A3:dom (f1+f2) = dom f1 /\ dom f2 by VFUNCT_1:def 1;
A4:x0 in dom (f1+f2) by A1,VFUNCT_1:def 1;
   now let s1;
    assume that
A5:  rng s1 c= dom(f1+f2) and
A6:  s1 is convergent & lim s1=x0;
A7: rng s1 c= dom f1 /\ dom f2 by A5,VFUNCT_1:def 1;
    dom (f1+f2) c= dom f1 & dom (f1+f2) c= dom f2 by A3,XBOOLE_1:17; then
A8: rng s1 c= dom f1 & rng s1 c= dom f2 by A5,XBOOLE_1:1; then
A9: f1/*s1 is convergent & f2/*s1 is convergent by A2,A6; then
    f1/*s1+f2/*s1 is convergent by NORMSP_1:19;
    hence (f1+f2)/*s1 is convergent by A7,Th2;
A10: f1/.x0 = lim (f1/*s1) & f2/.x0 = lim (f2/*s1) by A2,A6,A8;
    thus (f1+f2)/.x0 = f1/.x0 + f2/.x0 by A4,VFUNCT_1:def 1
      .= lim (f1/*s1 + f2/*s1) by A9,A10,NORMSP_1:25
      .= lim ((f1+f2)/*s1) by A7,Th2;
   end;
   hence f1+f2 is_continuous_in x0 by A4;
A11:dom (f1-f2) = dom f1 /\ dom f2 by VFUNCT_1:def 2;
A12:x0 in dom (f1-f2) by A1,VFUNCT_1:def 2;
   now let s1;
    assume that
A13: rng s1 c= dom(f1-f2) and
A14: s1 is convergent & lim s1=x0;
A15:rng s1 c= dom f1 /\ dom f2 by A13,VFUNCT_1:def 2;
    dom (f1-f2) c= dom f1 & dom (f1-f2) c= dom f2 by A11,XBOOLE_1:17; then
A16:rng s1 c= dom f1 & rng s1 c= dom f2 by A13,XBOOLE_1:1; then
A17:f1/*s1 is convergent & f2/*s1 is convergent by A2,A14; then
    f1/*s1-f2/*s1 is convergent by NORMSP_1:20;
    hence (f1-f2)/*s1 is convergent by A15,Th2;
A18:f1/.x0 = lim (f1/*s1) & f2/.x0 = lim (f2/*s1) by A2,A14,A16;
    thus (f1-f2)/.x0 = f1/.x0 - f2/.x0 by A12,VFUNCT_1:def 2
      .= lim (f1/*s1 - f2/*s1) by A18,A17,NORMSP_1:26
      .= lim ((f1-f2)/*s1) by A15,Th2;
   end;
   hence f1-f2 is_continuous_in x0 by A12;
end;
