reserve n,m for Element of NAT;
reserve x, X,X1,Z,Z1 for set;
reserve s,g,r,t,p,x0,x1,x2 for Real;
reserve s1,s2,q1 for Real_Sequence;
reserve Y for Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem Th5:
  X c= dom f & f|X is uniformly_continuous implies (p(#)f)|X is
  uniformly_continuous
proof
  assume X c= dom f;
  then
A1: X c= dom (p(#)f) by VALUED_1:def 5;
  assume
A2: f|X is uniformly_continuous;
  per cases;
  suppose
A3: p=0;
    now
      let r;
      assume
A4:   0<r;
      then consider s such that
A5:   0<s and
      for x1,x2 st x1 in dom(f|X) & x2 in dom(f|X) & |.x1-x2.|<s holds
      |.f.x1-f.x2.|<r by A2,Th1;
      take s;
      thus 0<s by A5;
      let x1,x2;
      assume that
A6:   x1 in dom((p(#)f)|X) and
A7:   x2 in dom((p(#)f)|X) and
      |.x1-x2.|<s;
A8:   x2 in X by A7,RELAT_1:57;
      x1 in X by A6,RELAT_1:57;
      then |.(p(#)f).x1-(p(#)f).x2.| = |.p*(f.x1)-(p(#)f).x2.| by A1,
VALUED_1:def 5
        .= |.0 - p*(f.x2).| by A1,A3,A8,VALUED_1:def 5
        .= 0 by A3,ABSVALUE:2;
      hence |.(p(#)f).x1-(p(#)f).x2.| <r by A4;
    end;
    hence thesis by Th1;
  end;
  suppose
A9: p<>0;
    then
A10: 0<|.p.| by COMPLEX1:47;
A11: 0 <> |.p.| by A9,COMPLEX1:47;
    now
      let r;
      assume 0<r;
      then 0 < r/|.p.| by A10,XREAL_1:139;
      then consider s such that
A12:  0<s and
A13:  for x1,x2 st x1 in dom(f|X) & x2 in dom(f|X) & |.x1-x2.|<s
      holds |.f.x1-f.x2.|<r/|.p.| by A2,Th1;
      take s;
      thus 0<s by A12;
      let x1,x2;
      assume that
A14:  x1 in dom((p(#)f)|X) and
A15:  x2 in dom((p(#)f)|X) and
A16:  |.x1-x2.|<s;
A17:  x2 in X by A15,RELAT_1:57;
A18:  x1 in X by A14,RELAT_1:57;
      then
A19:  |.(p(#)f).x1-(p(#)f).x2.| = |.p*(f.x1)-(p(#)f).x2.| by A1,
VALUED_1:def 5
        .= |.p*(f.x1) - p*(f.x2).| by A1,A17,VALUED_1:def 5
        .= |.p*(f.x1 - f.x2).|
        .= |.p.|*|.f.x1-f.x2.| by COMPLEX1:65;
      x2 in dom(p(#)f) by A15,RELAT_1:57;
      then x2 in dom f by VALUED_1:def 5;
      then
A20:  x2 in dom(f|X) by A17,RELAT_1:57;
      x1 in dom(p(#)f) by A14,RELAT_1:57;
      then x1 in dom f by VALUED_1:def 5;
      then x1 in dom(f|X) by A18,RELAT_1:57;
      then |.p.|*|.f.x1-f.x2.|<r/|.p.|*|.p.| by A10,A13,A16,A20,XREAL_1:68;
      hence |.(p(#)f).x1-(p(#)f).x2.| <r by A11,A19,XCMPLX_1:87;
    end;
    hence thesis by Th1;
  end;
end;
