reserve n,m for Element of NAT;
reserve r,s for Real;
reserve z for Complex;
reserve CNS,CNS1,CNS2 for ComplexNormSpace;
reserve RNS for RealNormSpace;
reserve X,X1 for set;

theorem Th42:
  for f be PartFunc of CNS,RNS holds f is_continuous_on X iff X c=
dom f & for s1 be sequence of CNS st rng s1 c= X & s1 is convergent & lim s1 in
  X holds f/*s1 is convergent & f/.(lim s1) = lim (f/*s1)
proof
  let f be PartFunc of CNS,RNS;
  thus f is_continuous_on X implies X c= dom f & for s1 be sequence of CNS st
  rng s1 c= X & s1 is convergent & lim s1 in X holds f/*s1 is convergent & f/.(
  lim s1) = lim (f/*s1)
  proof
    assume
A1: f is_continuous_on X;
    then
A2: X c= dom f;
    now
      let s1 be sequence of CNS such that
A3:   rng s1 c= X and
A4:   s1 is convergent and
A5:   lim s1 in X;
A6:   f|X is_continuous_in (lim s1) by A1,A5;
A7:   dom (f|X) = dom f /\ X by PARTFUN2:15
        .= X by A2,XBOOLE_1:28;
      now
        let n;
        dom s1 = NAT by FUNCT_2:def 1;
        then
A8:     s1.n in rng s1 by FUNCT_1:3;
        thus ((f|X)/*s1).n = (f|X)/.(s1.n) by A3,A7,FUNCT_2:109
          .= f/.(s1.n) by A3,A7,A8,PARTFUN2:15
          .= (f/*s1).n by A2,A3,FUNCT_2:109,XBOOLE_1:1;
      end;
      then
A9:   (f|X)/*s1 = f/*s1 by FUNCT_2:63;
      f/.(lim s1) = (f|X)/.(lim s1) by A5,A7,PARTFUN2:15
        .= lim (f/*s1) by A3,A4,A7,A6,A9;
      hence
      f/*s1 is convergent & f/.(lim s1) = lim (f/*s1) by A3,A4,A7,A6,A9;
    end;
    hence thesis by A1;
  end;
  assume that
A10: X c= dom f and
A11: for s1 be sequence of CNS st rng s1 c= X & s1 is convergent & lim
  s1 in X holds f/*s1 is convergent & f/.(lim s1) = lim (f/*s1);
  now
A12: dom (f|X) = dom f /\ X by PARTFUN2:15
      .= X by A10,XBOOLE_1:28;
    let x1 be Point of CNS such that
A13: x1 in X;
    now
      let s1 be sequence of CNS such that
A14:  rng s1 c= dom (f|X) and
A15:  s1 is convergent and
A16:  lim s1=x1;
      now
        let n;
        dom s1 = NAT by FUNCT_2:def 1;
        then
A17:    s1.n in rng s1 by FUNCT_1:3;
        thus ((f|X)/*s1).n = (f|X)/.(s1.n) by A14,FUNCT_2:109
          .= f/.(s1.n) by A14,A17,PARTFUN2:15
          .= (f/*s1).n by A10,A12,A14,FUNCT_2:109,XBOOLE_1:1;
      end;
      then
A18:  (f|X)/*s1 = f/*s1 by FUNCT_2:63;
      (f|X)/.(lim s1) = f/.(lim s1) by A13,A12,A16,PARTFUN2:15
        .= lim ((f|X)/*s1) by A11,A13,A12,A14,A15,A16,A18;
      hence (f|X)/*s1 is convergent & (f|X)/.x1 = lim ((f|X)/*s1) by A11,A13
,A12,A14,A15,A16,A18;
    end;
    hence f|X is_continuous_in x1 by A13,A12;
  end;
  hence thesis by A10;
end;
