reserve x,y,X for set,
        r for Real,
        n,k for Nat;
reserve RLS for non empty RLSStruct,
        Kr,K1r,K2r for SimplicialComplexStr of RLS,
        V for RealLinearSpace,
        Kv for non void SimplicialComplex of V;

theorem Th15:
  for K be with_empty_element SimplicialComplex of V st |.K.| c= [#]K
    for B be Function of BOOL the carrier of V,the carrier of V st
      for S be Simplex of K st S is non empty holds B.S in conv @S
    holds subdivision(B,K) is SubdivisionStr of K
 proof
  let K be with_empty_element SimplicialComplex of V such that
   A1: |.K.|c=[#]K;
  let B be Function of BOOL the carrier of V,the carrier of V such that
   A2: for S be Simplex of K st S is non empty holds B.S in conv@S;
  set P=subdivision(B,K);
  defpred P[Nat] means
   for x for A be Simplex of K st x in conv@A & card A=$1ex S be c=-linear
finite simplex-like Subset-Family of K,BS be Subset of P st BS=B.:S & x in conv
@BS & union S c=A;
  A3: dom B=BOOL the carrier of V by FUNCT_2:def 1;
  A4: for n be Nat st P[n] holds P[n+1]
  proof
   let n be Nat such that
    A5: P[n];
   let x be set,A be Simplex of K such that
    A6: x in conv@A and
    A7: card A=n+1;
   reconsider A1=@A as non empty Subset of V by A6;
   A8: union{A}=A by ZFMISC_1:25;
   A9: for P be Subset of K holds P in {A} implies P is simplex-like by
TARSKI:def 1;
   then A10: {A} is simplex-like;
   A11: B.A1 in conv@A by A2;
   then reconsider BA=B.A as Element of V;
   A1=A;
   then A12: A in dom B by A3,ZFMISC_1:56;
   A13: B.:{A}=Im(B,A) by RELAT_1:def 16;
   then A14: B.:{A}={BA} by A12,FUNCT_1:59;
   BA in conv A1 & conv A1 c=|.K.| by A2,Th5;
   then BA in |.K.|;
   then [#]P=[#]K & {BA} is Subset of K by A1,SIMPLEX0:def 20,ZFMISC_1:31;
   then reconsider BY=B.:{A} as Subset of P by A12,A13,FUNCT_1:59;
   per cases;
   suppose A15: x=B.A;
    now let x1,x2 be set;
     assume that
      A16: x1 in {A} and
      A17: x2 in {A};
     x1=A by A16,TARSKI:def 1;
     hence x1,x2 are_c=-comparable by A17,TARSKI:def 1;
    end;
    then reconsider Y={A} as c=-linear finite simplex-like Subset-Family of K
by A9,ORDINAL1:def 8,TOPS_2:def 1;
    take Y,BY;
    conv{BA}={BA} by RLAFFIN1:1;
    hence thesis by A14,A15,TARSKI:def 1,ZFMISC_1:25;
   end;
   suppose x<>B.A;
    then consider p,w be Element of V,r such that
     A18: p in A and
     A19: w in conv(A1\{p}) and
     A20: 0<=r & r<1 & r*BA+(1-r)*w=x by A6,A11,RLAFFIN2:26;
    @(A\{p})=A1\{p} & card(A\{p})=n by A7,A18,STIRL2_1:55;
    then consider S be c=-linear finite simplex-like Subset-Family of K,BS be
Subset of P such that
     A21: BS=B.:S and
     A22: w in conv@BS and
     A23: union S c=A\{p} by A5,A19;
    set S1=S\/{A};
    A24: A\{p}c=A by XBOOLE_1:36;
    then A25: union S c=A by A23;
    for x1,x2 be set st x1 in S1 & x2 in S1 holds x1,x2 are_c=-comparable
    proof
     let x1,x2 be set such that
      A26: x1 in S1 & x2 in S1;
     per cases by A26,XBOOLE_0:def 3;
     suppose x1 in S & x2 in S;
      hence thesis by ORDINAL1:def 8;
     end;
     suppose x1 in S & x2 in {A};
      then x1 c=union S & x2=A by TARSKI:def 1,ZFMISC_1:74;
      then x1 c=x2 by A25;
      hence thesis;
     end;
     suppose x2 in S & x1 in {A};
      then x2 c=union S & x1=A by TARSKI:def 1,ZFMISC_1:74;
      then x2 c=x1 by A25;
      hence thesis;
     end;
     suppose A27: x1 in {A} & x2 in {A};
      then x1=A by TARSKI:def 1;
      hence thesis by A27,TARSKI:def 1;
     end;
    end;
    then reconsider S1 as c=-linear finite simplex-like Subset-Family of K by
A10,ORDINAL1:def 8,TOPS_2:13;
    A28: B.:S1=BS\/BY by A21,RELAT_1:120;
    then reconsider BS1=B.:S1 as Subset of P;
    A29: conv@BS c=conv@BS1 by A28,RLTOPSP1:20,XBOOLE_1:7;
    BA in BY by A14,TARSKI:def 1;
    then A30: BA in @BS1 by A28,XBOOLE_0:def 3;
    take S1,BS1;
    A31: @BS1 c=conv@BS1 by CONVEX1:41;
    union S1=union S\/A by A8,ZFMISC_1:78
     .=A by A23,A24,XBOOLE_1:1,12;
    hence thesis by A20,A22,A29,A30,A31,RLTOPSP1:def 1;
   end;
  end;
  A32: P[0 qua Nat]
  proof
   let x;
   let A be Simplex of K;
   assume that
    A33: x in conv@A and
    A34: card A=0;
   @A is non empty by A33;
   hence thesis by A34;
  end;
  A35: for n be Nat holds P[n] from NAT_1:sch 2(A32,A4);
  thus|.K.|c=|.P.|
  proof
   let x be object;
   assume x in |.K.|;
   then consider A be Subset of K such that
    A36: A is simplex-like and
    A37: x in conv@A by Def3;
   reconsider A as Simplex of K by A36;
   P[card A] by A35;
   then consider S be c=-linear finite simplex-like Subset-Family of K,BS be
Subset of P such that
    A38: BS=B.:S and
    A39: x in conv@BS and
    union S c=A by A37;
   BS is simplex-like by A38,SIMPLEX0:def 20;
   then conv@BS c=|.P.| by Th5;
   hence thesis by A39;
  end;
  for A be Subset of P st A is simplex-like ex B be Subset of K st B is
simplex-like & conv@A c=conv@B
  proof
   let A be Subset of P;
   assume A is simplex-like;
   then consider S be c=-linear finite simplex-like Subset-Family of K such
that
    A40: A=B.:S by SIMPLEX0:def 20;
   per cases;
   suppose A41: S is empty;
    take{}K;
    thus thesis by A40,A41;
   end;
   suppose A42: S is non empty;
    take U=union S;
    A43: A c=conv@U
    proof
     let x be object;
     assume x in A;
     then consider y being object such that
      A44: y in dom B and
      A45: y in S and
      A46: B.y=x by A40,FUNCT_1:def 6;
     reconsider y as Simplex of K by A45,TOPS_2:def 1;
     y<>{} by A44,ZFMISC_1:56;
     then A47: B.y in conv@y by A2;
     conv@y c=conv@U by A45,RLTOPSP1:20,ZFMISC_1:74;
     hence thesis by A46,A47;
    end;
    U in S by A42,SIMPLEX0:9;
    hence thesis by A43,CONVEX1:30,TOPS_2:def 1;
   end;
  end;
  hence thesis;
 end;
