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 Th17:
X c= dom f implies
 (f|X is continuous
   iff for x0,r st x0 in X & 0 < r ex s
         st 0 < s & for x1 st x1 in X & |.x1-x0.| < s
                      holds ||. f/.x1 - f/.x0 .|| < r)
proof
   assume A1: X c= dom f;
   thus f|X is continuous implies for x0,r st x0 in X & 0<r ex s st 0<s & for
    x1 st x1 in X & |.x1-x0.| < s holds ||. f/.x1 - f/.x0 .|| < r
   proof
    assume A2: f|X is continuous;
    let x0,r;
    assume that
A3:  x0 in X and
A4:  0 < r;
    x0 in dom(f|X) by A1,A3,RELAT_1:62; then
    f|X is_continuous_in x0 by A2; then
    consider s such that
A5:  0 < s and
A6:  for x1 st x1 in dom(f|X) & |.x1-x0.| < s
        holds ||.(f|X)/.x1-(f|X)/.x0 .|| < r by A4,Th8;
    take s;
    thus 0<s by A5;
    let x1;
    assume that
A7:  x1 in X and
A8:  |.x1-x0.|<s;
A9:  x0 in REAL by XREAL_0:def 1;
A10:  x1 in REAL by XREAL_0:def 1;
A11: dom (f|X) = dom f /\ X by RELAT_1:61
       .= X by A1,XBOOLE_1:28; then
    ||. f/.x1 - f/.x0 .||
      = ||.(f|X)/.x1 - f/.x0 .|| by A7,A10,PARTFUN2:15
     .= ||.(f|X)/.x1 - (f|X)/.x0 .|| by A3,A11,A9,PARTFUN2:15;
    hence thesis by A6,A11,A7,A8;
   end;
   assume
A12:for x0,r st x0 in X & 0 <r
     ex s st 0 < s & for x1 st x1 in X & |.x1-x0.| < s
                         holds ||. f/.x1 - f/.x0 .|| < r;
   now let x0;
    assume A13: x0 in dom(f|X); then
A14:x0 in X;
    for r st 0 < r ex s st 0 < s & for x1 st x1 in dom(f|X) & |.x1-x0.| < s
      holds ||.(f|X)/.x1-(f|X)/.x0 .||<r
    proof
     let r;
     assume 0 < r; then
     consider s such that
A15:  0<s and
A16:  for x1 st x1 in X & |.x1-x0.| < s holds ||. f/.x1 - f/.x0 .|| < r
        by A12,A14;
     take s;
     thus 0<s by A15;
     let x1 such that
A17:  x1 in dom(f|X) and
A18:  |.x1-x0.|<s;
A19:  x0 in REAL by XREAL_0:def 1;
A20:  x1 in REAL by XREAL_0:def 1;
     ||.(f|X)/.x1-(f|X)/.x0 .||
       = ||.(f|X)/.x1 - f/.x0 .|| by A13,A19,PARTFUN2:15
      .= ||. f/.x1 - f/.x0 .|| by A17,A20,PARTFUN2:15;
     hence thesis by A16,A17,A18;
    end;
    hence f|X is_continuous_in x0 by Th8,A13;
   end;
   hence thesis;
end;
