reserve T,T1,T2 for TopSpace,
  A,B for Subset of T,
  F for Subset of T|A,
  G,G1, G2 for Subset-Family of T,
  U,W for open Subset of T|A,
  p for Point of T|A,
  n for Nat,
  I for Integer;
reserve Af for finite-ind Subset of T,
  Tf for finite-ind TopSpace;

theorem Th31:
  T is finite-ind & ind T <= n iff ex Bas be Basis of T st for A
  st A in Bas holds Fr A is finite-ind & ind Fr A <= n-1
proof
  set TOP=the topology of T;
  set cT=the carrier of T;
  hereby
    defpred P[object,object] means
    for p be Point of T,A be Subset of T st$1=[p,A]
    holds$2 in TOP & (not p in A implies $2={}T) & (p in A implies ex W be open
    Subset of T st W=$2 & p in W & W c=A & ind Fr W<=n-1);
    assume that
A1: T is finite-ind and
A2: ind T<=n;
A3: for x be object st x in [:cT,TOP:]ex y be object st P[x,y]
    proof
      let x be object;
      assume x in [:cT,TOP:];
      then consider p9,A9 be object such that
A4:   p9 in cT and
A5:   A9 in TOP and
A6:   x=[p9,A9] by ZFMISC_1:def 2;
      reconsider p9 as Point of T by A4;
      reconsider A9 as open Subset of T by A5,PRE_TOPC:def 2;
      per cases;
      suppose
A7:     not p9 in A9;
        take{}T;
        let p be Point of T,A such that
A8:     x=[p,A];
        p=p9 by A6,A8,XTUPLE_0:1;
        hence thesis by A6,A7,A8,PRE_TOPC:def 2,XTUPLE_0:1;
      end;
      suppose
        p9 in A9;
        then consider W be open Subset of T such that
A9:     p9 in W & W c=A9 and
        Fr W is finite-ind and
A10:    ind Fr W<=n-1 by A1,A2,Th16;
        take W;
        let p be Point of T,A;
        assume x=[p,A];
        then p=p9 & A=A9 by A6,XTUPLE_0:1;
        hence thesis by A9,A10,PRE_TOPC:def 2;
      end;
    end;
    consider f be Function such that
A11: dom f=[:cT,TOP:] and
A12: for x be object st x in [:cT,TOP:] holds P[x,f.x]
    from CLASSES1:sch
    1(A3);
A13: rng f c=TOP
    proof
      let y be object;
      assume y in rng f;
      then consider x be object such that
A14:  x in dom f and
A15:  f.x=y by FUNCT_1:def 3;
      ex p,A be object st p in cT & A in TOP & x=[p,A]
by A11,A14,ZFMISC_1:def 2;
      hence thesis by A11,A12,A14,A15;
    end;
    then reconsider RNG=rng f as Subset-Family of T by XBOOLE_1:1;
    now
      let A be Subset of T;
      assume A is open;
      then
A16:  A in TOP by PRE_TOPC:def 2;
      let p be Point of T such that
A17:  p in A;
A18:  [p,A] in [:cT,TOP:] by A16,A17,ZFMISC_1:87;
      then consider W be open Subset of T such that
A19:  W=f.[p,A] & p in W & W c=A and
      ind Fr W<=n-1 by A12,A17;
      reconsider W as Subset of T;
      take W;
      thus W in RNG & p in W & W c=A by A11,A18,A19,FUNCT_1:def 3;
    end;
    then reconsider RNG as Basis of T by A13,YELLOW_9:32;
    take RNG;
    let B be Subset of T;
    assume B in RNG;
    then consider x be object such that
A20: x in dom f and
A21: f.x=B by FUNCT_1:def 3;
    consider p,A be object such that
A22: p in cT and
A23: A in TOP and
A24: x=[p,A] by A11,A20,ZFMISC_1:def 2;
    reconsider A as set by TARSKI:1;
    per cases;
    suppose
      p in A;
      then
      ex W be open Subset of T st W=f.[p,A] & p in W & W c=A & ind Fr W<=
      n-1 by A11,A12,A20,A23,A24;
      hence Fr B is finite-ind & ind Fr B<=n-1 by A1,A21,A24;
    end;
    suppose
A25:  not p in A;
A26:  T is non empty by A22;
      B={}T by A11,A12,A20,A21,A22,A23,A24,A25;
      then
A27:  Fr B={}T by A26,TOPGEN_1:39;
      0-1<=n-1 by XREAL_1:9;
      hence Fr B is finite-ind & ind Fr B<=n-1 by A27,Th6;
    end;
  end;
  given B be Basis of T such that
A28: for A be Subset of T st A in B holds Fr A is finite-ind & ind Fr A <=n-1;
A29: now
    let p be Point of T,U be open Subset of T;
    assume p in U;
    then consider W be Subset of T such that
A30: W in B and
A31: p in W & W c=U by YELLOW_9:31;
    B c=TOP by TOPS_2:64;
    then reconsider W as open Subset of T by A30,PRE_TOPC:def 2;
    take W;
    thus p in W & W c=U & Fr W is finite-ind & ind Fr W<=n-1 by A28,A30,A31;
  end;
  then T is finite-ind by Th15;
  hence thesis by A29,Th16;
end;
