
theorem Th15:
  for M be non empty MetrSpace, S be non empty compact TopSpace,
      T be non empty MetrSpace
   st S = TopSpaceMetr(M) holds
  for G be Subset of Funcs(the carrier of M, the carrier of T),
      H be non empty Subset of
    MetricSpace_of_ContinuousFunctions(S,T) st
     G = H & (MetricSpace_of_ContinuousFunctions(S,T))
       | H is totally_bounded holds
   G is equicontinuous
  proof
    let M be non empty MetrSpace,S be non empty compact TopSpace,
        T be non empty MetrSpace;
    assume A1: S = TopSpaceMetr(M);
    let G be Subset of Funcs(the carrier of M, the carrier of T),
        H be non empty Subset of MetricSpace_of_ContinuousFunctions(S,T);
    assume A2: G = H;
    set Z = MetricSpace_of_ContinuousFunctions(S,T);
    set MZH = Z | H;
A3: the carrier of MZH = H by TOPMETR:def 2;
    assume
A4: Z | H is totally_bounded;
    defpred P1[object,object] means
      ex w be Point of MZH st $2 = w & $1 = Ball(w,1);
    for e be Real st 0 < e
      ex d be Real st 0 < d &
      for f be Function of the carrier of M, the carrier of T
             st f in G holds
      for x1,x2 be Point of M
          st dist(x1,x2) < d holds dist(f.x1,f.x2) < e
    proof
      let e be Real;
      assume A10:0 < e; then
      consider L being Subset-Family of MZH such that
A11:  L is finite & the carrier of MZH = union L
        & for C being Subset of MZH st C in L holds
      ex w being Element of MZH st C = Ball (w,e/3) by A4;
      defpred P1[object,object] means
      ex w be Point of MZH st $2 = w & $1 = Ball(w,e/3);
A12:  for D be object st D in L
        ex w be object st w in the carrier of MZH & P1[D,w]
      proof
        let D be object;
        assume A13: D in L; then
        reconsider D0=D as Subset of MZH;
        consider w being Element of MZH such that
   A14: D0 = Ball (w,e/3) by A11,A13;
        take w;
        thus w in the carrier of MZH & P1[D,w] by A14;
      end;
      consider U being Function of L,the carrier of MZH such that
 A15: for D being object st D in L
        holds P1[D,U.D] from FUNCT_2:sch 1(A12);
A16:  for D being object st D in L holds D = Ball(U/.D,e/3)
      proof
        let D be object;
        assume A17: D in L; then
A18:    ex x0 be Point of MZH st U.D = x0 & D = Ball(x0,e/3) by A15;
        dom U = L by FUNCT_2:def 1;
        hence D = Ball(U/.D,e/3) by A18,A17,PARTFUN1:def 6;
      end;
      defpred P1[Element of MZH,Real] means
      ex f be Function of the carrier of S,the carrier of T
       st $1=f & 0 < $2
       & for x1,x2 be Point of M st dist(x1,x2) < $2
        holds dist(f/.x1,f/.x2) < e/3;
 A19: for x0 being Element of the carrier of MZH
        ex d being Element of REAL st P1[x0,d]
      proof
        let x0 be Element of the carrier of MZH;
        x0 in H by A3; then
        x0 in Z; then
   A20: ex f be Function of S, TopSpaceMetr T
          st x0 = f & f is continuous; then
        reconsider f=x0 as Function of the carrier of S,
          the carrier of T;
        consider d be Real such that
   A21: 0 < d &
        for x1,x2 be Point of M st dist(x1,x2) < d holds
          dist(In(f/.x1,T),In(f/.x2,T)) < e/3 by A10,Lm1,A1,A20;
        reconsider d0=d as Element of REAL by XREAL_0:def 1;
        take d0;
        now let x1,x2 be Point of M;
          assume dist(x1,x2) < d; then
          dist(In(f/.x1,T),In(f/.x2,T)) < e/3 by A21;
          hence dist(f/.x1,f/.x2) < e/3;
        end;
        hence thesis by A21;
      end;
      consider NF being Function of the carrier of MZH,REAL such that
A22:  for f being Element of the carrier of MZH
        holds P1[f,NF.f] from FUNCT_2:sch 3(A19);
A23:  dom U = L by FUNCT_2:def 1;
      reconsider NFU = NF.:(rng U) as finite Subset of REAL by A11;
      consider xx be object such that
A24:  xx in L by XBOOLE_0:def 1,A11,ZFMISC_1:2;
      rng U <> {} by A23,A24,FUNCT_1:3; then
      consider xx be object such that
A25:  xx in rng U by XBOOLE_0:def 1;
      reconsider xx as Point of MZH by A25;
A26:  NFU is bounded_below & lower_bound NFU in NFU by SEQ_4:133,A25;
      set d = lower_bound NFU;
      consider xx being object such that
 A27: xx in dom NF & xx in rng U & d = NF.xx by FUNCT_1:def 6,A26;
      reconsider xx as Point of MZH by A27;
A28:  ex f be Function of S,T st xx=f & 0 < NF.xx
         & for x1,x2 be Point of M st dist(x1,x2) < NF.xx
        holds dist(f/.x1,f/.x2) < e/3 by A22;
      take d;
      thus 0 < d by A28,A27;
      thus for f be Function of M,T st f in G holds
      for x1,x2 be Point of M
         st dist(x1,x2) < d holds dist(f.x1,f.x2) < e
      proof
        let f0 be Function of M, T;
        assume f0 in G; then
        consider C be set such that
  A29:  f0 in C & C in L by A11,TARSKI:def 4,A3,A2;
        reconsider f=f0 as Function of the carrier of S,the carrier of T by A1;
        reconsider pf=f0 as Element of MZH by A29;
A30:    pf in H by A3;
        reconsider pg = U/.C as Element of MZH;
A31:    C = Ball (pg,e/3) by A16,A29;
A32:    pg in H by A3; then
        pg in ContinuousFunctions(S,T); then
        ex f be Function of the carrier of S, TopSpaceMetr T
        st pg=f & f is continuous; then
        reconsider g=pg as Function of S,TopSpaceMetr  T;
        pf in { y where y is Point of MZH : dist(pg,y) < e/3 }
          by METRIC_1:def 14,A29,A31; then
A33:    ex y be Point of MZH st pf=y & dist(pg,y) < e/3;
        reconsider ppf=pf,ppg=pg as Element of Z by A30,A32;
        reconsider pppf=ppf,pppg=ppg as Point of Z;
A35:    dist(pppg,pppf) < e/3 by A33,TOPMETR:def 1;
A36:    C in dom U by FUNCT_2:def 1,A29;
        U.C in rng U by FUNCT_1:3,A23,A29; then
        pg in rng U by A36,PARTFUN1:def 6; then
A37:    NF.pppg in NF.: (rng U) by FUNCT_2:35;
        let x1,x2 be Element of M;
        reconsider x10 = x1,x20 = x2 as Point of S by A1;
        assume A38: dist(x1,x2) < d;
        d <=NF.pg by A37,SEQ_4:def 2; then
   A39: dist(x1,x2) < NF.pg by A38,XXREAL_0:2;
        ex f be Function of S, T st pg=f & 0 < NF.pg
           & for x1,x2 be Point of M st dist(x1,x2) < NF.pg
        holds dist(f/.x1,f/.x2) < e/3 by A22; then
A40:    dist(In(g/.x1,T),In(g/.x2,T)) < e/3 by A39;
A41:    dist(In(g.x20,T),In(f.x20,T)) <= dist(pppg,pppf) by Th11;
        f/.x20=f.x20 & g/.x20 =g.x20; then
A42:    dist(In(g/.x2,T),In(f/.x2,T)) < e/3 by A41,XXREAL_0:2,A35;
A43:    dist(In(f.x10,T),In(g.x10,T)) <= dist(pppf,pppg) by Th11;
        f/.x10=f.x10 & g/.x10 = g.x10; then
A44:    dist(In(f/.x1,T),In(g/.x1,T)) < e/3 by A43,XXREAL_0:2,A35;
A45:    dist(f/.x1,f/.x2) <= dist(f/.x1,In(g/.x1,T))
                     +dist(In(g/.x1,T),f/.x2 ) by METRIC_1:4;
        dist(In(g/.x1,T),f/.x2 )
          <=dist(In(g/.x1,T),In(g/.x2,T)) + dist(In(g/.x2,T),f/.x2 )
            by METRIC_1:4; then
        dist(f/.x1,In(g/.x1,T)) +dist(In(g/.x1,T),f/.x2 )
          <= dist(f/.x1,In(g/.x1,T))
          +(dist(In(g/.x1,T),In(g/.x2,T)) + dist(In(g/.x2,T),f/.x2 ))
            by XREAL_1:7; then
A46:    dist(f/.x1,f/.x2) <= dist(In(f/.x1,T),In(g/.x1,T))
          + dist(In(g/.x1,T),In(g/.x2,T))
            + dist(In(g/.x2,T),In(f/.x2,T)) by A45,XXREAL_0:2;
        dist(In(g/.x1,T),In(g/.x2,T)) + dist(In(g/.x2,T),In(f/.x2,T))
          < e/3 + e/3 by A40,A42,XREAL_1:8; then
A47:    dist(In(f/.x1,T),In(g/.x1,T)) + ( dist(In(g/.x1,T),In(g/.x2,T))
          + dist(In(g/.x2,T),In(f/.x2,T)))
            < e/3 + (e/3+e/3) by A44,XREAL_1:8;
        f/.x10=f.x10 & f/.x20 = f.x20;
        hence dist(f0.x1,f0.x2) < e by A47,A46,XXREAL_0:2;
      end;
    end;
    hence G is equicontinuous;
  end;
