reserve n,m,k for Element of NAT;
reserve x, X,X1,Z,Z1 for set;
reserve s,g,r,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 Th22:
  f|X is continuous & f"{0} = {} implies f^|X is continuous
proof
  assume that
A1: f|X is continuous and
A2: f"{0} = {};
A3: dom(f^) = dom f \ {} by A2,RFUNCT_1:def 2
    .= dom f;
  let r;
  assume
A4: r in dom(f^|X);
  then
A5: r in dom(f^) by RELAT_1:57;
  r in X by A4;
  then
A6: r in dom(f|X) by A3,A5,RELAT_1:57;
  then
A7: f|X is_continuous_in r by A1;
  now
A8: now
      assume f.r = 0;
      then f.r in {0} by TARSKI:def 1;
      hence contradiction by A2,A3,A5,FUNCT_1:def 7;
    end;
    let s1;
    assume that
A9: rng s1 c= dom((f^)|X) and
A10: s1 is convergent & lim s1= r;
    rng s1 c= dom(f^) /\ X by A9,RELAT_1:61;
    then
A11: rng s1 c= dom(f|X) by A3,RELAT_1:61;
    then
A12: (f|X)/*s1 is convergent by A7,A10;
    now
      let n be Nat;
A13:  s1.n in rng s1 by VALUED_0:28;
      rng s1 c= dom f /\ X & dom f /\ X c= dom f by A3,A9,RELAT_1:61
,XBOOLE_1:17;
      then
A14:  rng s1 c= dom f;
A15:  now
        assume f.(s1.n)=0;
        then f.(s1.n) in {0} by TARSKI:def 1;
        hence contradiction by A2,A14,A13,FUNCT_1:def 7;
      end;
      n in NAT by ORDINAL1:def 12;
      then ((f|X)/*s1).n = (f|X).(s1.n) by A11,FUNCT_2:108
        .= f.(s1.n) by A11,A13,FUNCT_1:47;
      hence ((f|X)/*s1).n <>0 by A15;
    end;
    then
A16: (f|X)/*s1 is non-zero by SEQ_1:5;
    now
      let n;
A17:  s1.n in rng s1 by VALUED_0:28;
      then s1.n in dom((f^)|X) by A9;
      then s1.n in dom (f^) /\ X by RELAT_1:61;
      then
A18:  s1.n in dom (f^) by XBOOLE_0:def 4;
      thus (((f^)|X)/*s1).n = ((f^)|X).(s1.n) by A9,FUNCT_2:108
        .= (f^).(s1.n) by A9,A17,FUNCT_1:47
        .= (f.(s1.n))" by A18,RFUNCT_1:def 2
        .= ((f|X).(s1.n))" by A11,A17,FUNCT_1:47
        .= (((f|X)/*s1).n)" by A11,FUNCT_2:108
        .= (((f|X)/*s1)").n by VALUED_1:10;
    end;
    then
A19: ((f^)|X)/*s1 = ((f|X)/*s1)" by FUNCT_2:63;
A20: (f|X).r = f.r by A6,FUNCT_1:47;
    then lim ((f|X)/*s1) <> 0 by A7,A10,A11,A8;
    hence ((f^)|X)/*s1 is convergent by A12,A16,A19,SEQ_2:21;
    (f|X).r = lim ((f|X)/*s1) by A7,A10,A11;
    hence lim (((f^)|X)/*s1) = ((f|X).r)" by A12,A20,A8,A16,A19,SEQ_2:22
      .= (f.r)" by A6,FUNCT_1:47
      .= (f^).r by A5,RFUNCT_1:def 2
      .= ((f^)|X).r by A4,FUNCT_1:47;
  end;
  hence thesis;
end;
