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 Th24:
dom f is compact & f|(dom f) is continuous implies rng f is compact
proof
  assume that
A1: dom f is compact and
A2: f|(dom f) is continuous;
  now
   let s1 be sequence of S such that
A3: rng s1 c= rng f;
   defpred P[set,set] means $2 in dom f & f/.$2=s1.$1;
A4:for n being Element of NAT ex p being Element of REAL st P[n,p]
   proof
    let n be Element of NAT;
    dom s1 = NAT by FUNCT_2:def 1; then
    s1.n in rng s1 by FUNCT_1:3; then
    consider p be Element of REAL such that
A5:  p in dom f & s1.n =f.p by A3,PARTFUN1:3;
    take p;
    thus thesis by A5,PARTFUN1:def 6;
   end;
   consider q1 be Real_Sequence such that
A6: for n being Element of NAT holds P[n,q1.n] from FUNCT_2:sch 3(A4);
   now let x be object;
    assume x in rng q1; then
    ex n being Element of NAT st x = q1.n by FUNCT_2:113;
    hence x in dom f by A6;
   end; then
A7:rng q1 c= dom f by TARSKI:def 3; then
   consider s2 such that
A8: s2 is subsequence of q1 and
A9: s2 is convergent and
A10:lim s2 in dom f by A1,RCOMP_1:def 3;
   take q2 = f/*s2;
   rng s2 c= rng q1 by A8,VALUED_0:21; then
A11: rng s2 c= dom f by A7,XBOOLE_1:1;
   now
    let n be Element of NAT;
    f/.(q1.n)=s1.n by A6;
    hence (f/*q1).n= s1.n by A7,FUNCT_2:109;
   end; then
A12: f/*q1=s1 by FUNCT_2:63;
   lim s2 in dom(f|(dom f)) by A10; then
   f|(dom f) is_continuous_in (lim s2) by A2; then
A13: f is_continuous_in (lim s2); then
   f/.(lim s2) = lim (f/*s2) by A9,A11;
   hence
    q2 is subsequence of s1 & q2 is convergent & (lim q2) in rng f
      by A7,A12,A8,A9,A13,A11,PARTFUN2:2,VALUED_0:22;
  end;
  hence thesis by NFCONT_1:def 2;
end;
