reserve x,y, X,Y,Z for set,
        D for non empty set,
        n,k for Nat,
        i,i1,i2 for Integer;
reserve K for SimplicialComplexStr;
reserve KX for SimplicialComplexStr of X,
        SX for SubSimplicialComplex of KX;
reserve SC for SimplicialComplex of X;
reserve K for non void subset-closed SimplicialComplexStr;
reserve P for Function;

theorem
  for KX be subset-closed SimplicialComplexStr of X
  for P st dom P is with_non-empty_elements &
           for n st n <= degree KX ex S be Subset of KX st
             S is simplex-like & card S = n+1 & BOOL S c=dom P &
             P.:BOOL S is Subset of KX & P|BOOL S is one-to-one
    holds degree subdivision(P,KX) = degree KX
 proof
  let K be subset-closed SimplicialComplexStr of X;
  let P be Function such that
   A1: dom P is with_non-empty_elements and
   A2: for n st n<=degree K ex S be Subset of K st S is simplex-like & card S=n
+1 & BOOL S c=dom P & P.:BOOL S is Subset of K & P|BOOL S is one-to-one;
  set PP=subdivision(P,K);
  A3: degree PP<=degree K by A1,Th52;
  A4: for n st n<=degree K ex S be Simplex of PP st card S=n+1
  proof
   let n;
   A5: [#]K=[#]PP by Def20;
   assume n<=degree K;
   then consider A be Subset of K such that
    A6: A is simplex-like and
    A7: card A=n+1 and
    A8: BOOL A c=dom P and
    A9: P.:BOOL A is Subset of K and
    A10: P|BOOL A is one-to-one by A2;
   A11: dom(P|BOOL A)=BOOL A by A8,RELAT_1:62;
   A is non empty by A7;
   then consider S be Subset-Family of A such that
    A12: S is with_non-empty_elements c=-linear and
    A in S and
    A13: card A=card S and
    for Z st Z in S & card Z<>1 ex x st x in Z & Z\{x} in S by Th12;
   bool A c=bool the carrier of K by ZFMISC_1:67;
   then reconsider SS=S as Subset-Family of K by XBOOLE_1:1;
   A14: S c=BOOL A
   proof
    let x be object;
    assume x in S;
    then x in bool A\{{}} by A12,ZFMISC_1:56;
    hence thesis by ORDERS_1:def 3;
   end;
   then P.:S c=P.:BOOL A by RELAT_1:123;
   then reconsider PS=P.:SS as Subset of PP by A5,A9,XBOOLE_1:1;
   A15: A in the_family_of K by A6;
   SS is simplex-like
   proof
    let B be Subset of K;
    assume B in SS;
    then B in the_family_of K by A15,CLASSES1:def 1;
    hence thesis;
   end;
   then SS is c=-linear finite simplex-like Subset-Family of K by A7,A12,A13;
   then reconsider PS as Simplex of PP by Def20;
   P.:S=(P|BOOL A).:S by A14,RELAT_1:129;
   then card PS=n+1 by A7,A10,A11,A13,A14,COMBGRAS:4;
   hence thesis;
  end;
  per cases;
  suppose A16: K is empty-membered;
   A17: degree PP>=-1 by Th23;
   degree K=-1 by A16,Th22;
   hence thesis by A3,A17,XXREAL_0:1;
  end;
  suppose A18: K is with_non-empty_element finite-degree;
   then reconsider d=degree K,dPP=degree PP as Integer;
   A19: -1<=d by Th23;
   d<>-1 by A18,Th22;
   then -1<d by A19,XXREAL_0:1;
   then 0<=d by INT_1:8;
   then reconsider d as Element of NAT by INT_1:3;
   ex S be Simplex of PP st card S=d+1 by A4;
   then dPP+1>=d+1 by A18,Def12;
   then dPP>=d by XREAL_1:6;
   hence thesis by A3,XXREAL_0:1;
  end;
  suppose K is non void non finite-degree;
   then A20: degree K=+infty by Def12;
   PP is non finite-degree
   proof
    assume A21: PP is finite-degree;
    then reconsider d=degree PP+1 as Nat by TARSKI:1;
    consider S be Subset of PP such that
     A22: S is simplex-like and
     A23: card S=d by A21,Def12;
    reconsider S as finite Subset of PP by A22;
    ex S1 be Simplex of PP st card S1=card S+1 by A4,A20,XXREAL_0:3;
    then d+1<=d by A21,A23,Def12;
    hence contradiction by NAT_1:13;
   end;
   hence thesis by A20,Def12;
  end;
 end;
