reserve n,m for Nat,
  x,X,X1 for set,
  s,g,r,p for Real,
  S,T for RealNormSpace,
  f,f1,f2 for PartFunc of S, T,
  s1,s2,q1 for sequence of S,
  x0,x1, x2 for Point of S,
  Y for Subset of S;

theorem
  f1 is_uniformly_continuous_on X & f2 is_uniformly_continuous_on X1
  implies f1-f2 is_uniformly_continuous_on X/\X1
proof
  assume that
A1: f1 is_uniformly_continuous_on X and
A2: f2 is_uniformly_continuous_on X1;
A3: f2 is_uniformly_continuous_on X /\ X1 by A2,Th1,XBOOLE_1:17;
  then
A4: X /\ X1 c= dom f2;
A5: f1 is_uniformly_continuous_on X /\ X1 by A1,Th1,XBOOLE_1:17;
  then X /\ X1 c= dom f1;
  then X /\ X1 c= dom f1 /\ dom f2 by A4,XBOOLE_1:19;
  hence
A6: X /\ X1 c= dom (f1-f2) by VFUNCT_1:def 2;
  let r;
  assume 0<r;
  then
A7: 0<r/2 by XREAL_1:215;
  then consider s such that
A8: 0<s and
A9: for x1,x2 st x1 in X /\ X1 & x2 in X /\X1 & ||.x1-x2.||<s holds ||.
  f1/.x1-f1/.x2.||<r/2 by A5;
  consider g such that
A10: 0<g and
A11: for x1,x2 st x1 in X /\ X1 & x2 in X /\ X1 & ||.x1-x2.||<g holds
  ||.f2/.x1-f2/.x2.||<r/2 by A3,A7;
  take p=min(s,g);
  thus 0<p by A8,A10,XXREAL_0:15;
  let x1,x2;
  assume that
A12: x1 in X/\X1 and
A13: x2 in X/\X1 and
A14: ||.x1-x2.||<p;
  p <= g by XXREAL_0:17;
  then ||.x1-x2.||<g by A14,XXREAL_0:2;
  then
A15: ||.f2/.x1-f2/.x2.||<r/2 by A11,A12,A13;
  p <= s by XXREAL_0:17;
  then ||.x1-x2.||<s by A14,XXREAL_0:2;
  then ||.f1/.x1-f1/.x2.||<r/2 by A9,A12,A13;
  then
A16: ||.f1/.x1-f1/.x2.||+||.f2/.x1-f2/.x2.||<r/2+r/2 by A15,XREAL_1:8;
A17: ||.f1/.x1 - f1/.x2 - (f2/.x1-f2/.x2).|| <= ||.f1/.x1-f1/.x2.|| + ||.f2
  /.x1-f2/.x2.|| by NORMSP_1:3;
  ||.(f1-f2)/.x1-(f1-f2)/.x2.|| = ||.f1/.x1 - f2/.x1-(f1-f2)/.x2.|| by A6,A12,
VFUNCT_1:def 2
    .= ||.f1/.x1 - f2/.x1 - (f1/.x2-f2/.x2).|| by A6,A13,VFUNCT_1:def 2
    .= ||.f1/.x1 - (f2/.x1 + (f1/.x2-f2/.x2)).|| by RLVECT_1:27
    .= ||.f1/.x1 - (f1/.x2 + f2/.x1-f2/.x2).|| by RLVECT_1:def 3
    .= ||.f1/.x1 - (f1/.x2 + (f2/.x1-f2/.x2)).|| by RLVECT_1:def 3
    .= ||.f1/.x1 - f1/.x2 - (f2/.x1-f2/.x2).|| by RLVECT_1:27;
  hence thesis by A16,A17,XXREAL_0:2;
end;
