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;
reserve Ks for simplex-join-closed SimplicialComplex of V,
        As,Bs for Subset of Ks,
        Ka for non void affinely-independent SimplicialComplex of V,
        Kas for non void affinely-independent simplex-join-closed
                 SimplicialComplex of V,
        K for non void affinely-independent simplex-join-closed total
                 SimplicialComplex of V;
reserve Aff for finite affinely-independent Subset of V,
        Af,Bf for finite Subset of V,
        B for Subset of V,
        S,T for finite Subset-Family of V,
        Sf for c=-linear finite finite-membered Subset-Family of V,
        Sk,Tk for finite simplex-like Subset-Family of K,
        Ak for Simplex of K;
reserve v for Vertex of BCS(k,Complex_of{Aff}),
        F for Function of Vertices BCS(k,Complex_of{Aff}),Aff;

theorem Th46:
  for F st for v,B st B c= Aff & v in conv B holds F.v in B
    ex n st card {S where S is Simplex of card Aff-1,BCS(k,Complex_of{Aff}):
                  F.:S = Aff} = 2*n+1
 proof
  reconsider O=1 as ExtReal;
  reconsider Z=0 as ExtReal;
  defpred P[Nat] means
   for A be finite affinely-independent Subset of V st card A=$1
     for F be Function of Vertices BCS(k,Complex_of{A}),A st
for v be Vertex of BCS(k,Complex_of{A})
for B be Subset of V st B c=A & v in conv B holds F.v in B ex n st card{S
where S is Simplex of card A-1,BCS(k,Complex_of{A}):F.:S=A}=2*n+1;
  A1: for m be Nat st P[m] holds P[m+1]
  proof
   let m be Nat such that
    A2: P[m];
   let A be finite affinely-independent Subset of V such that
    A3: card A=m+1;
   A is non empty by A3;
   then consider a be object such that
    A4: a in A;
   reconsider a as Element of V by A4;
   A5: card(A\{a})=m by A3,A4,STIRL2_1:55;
   reconsider Aa=A\{a} as finite affinely-independent Subset of V
     by RLAFFIN1:43,XBOOLE_1:36;
   set CAa=Complex_of{Aa};
   the topology of CAa=bool Aa by SIMPLEX0:4;
   then A6: Vertices CAa=union bool Aa by SIMPLEX0:16
    .=Aa by ZFMISC_1:81;
   A7: [#]CAa=[#]V & |.CAa.|c=[#]V;
   then A8: Vertices CAa c=Vertices BCS(k,CAa) by Th24;
   set CA=Complex_of{A};
   let F be Function of Vertices BCS(k,CA),A such that
    A9: for v be Vertex of BCS(k,CA)for B be Subset of V st B c=A & v in conv
B holds F.v in B;
   set XX={S where S is Simplex of card A-1,BCS(k,CA):F.:S=A};
   A10: XX c=the topology of BCS(k,CA)
   proof
    let x be object;
    assume x in XX;
    then ex S be Simplex of card A-1,BCS(k,CA) st S=x & A=F.:S;
    hence thesis by PRE_TOPC:def 2;
   end;
   then reconsider XX as Subset-Family of BCS(k,CA) by XBOOLE_1:1;
   reconsider XX as simplex-like Subset-Family of BCS(k,CA) by A10,SIMPLEX0:14;
   A11: [#]CA=[#]V & |.CA.|c=[#]V;
   A12: A\{a}c=A by XBOOLE_1:36;
   for x st x in {Aa}ex y st y in {A} & x c=y
   proof
    let x;
    assume A13: x in {Aa};
    take A;
    thus thesis by A12,A13,TARSKI:def 1;
   end;
   then {Aa}is_finer_than{A};
   then CAa is SubSimplicialComplex of CA by SIMPLEX0:30;
   then A14: BCS(k,CAa) is SubSimplicialComplex of BCS(k,CA) by A11,A7,Th23;
   then A15: Vertices BCS(k,CAa)c=Vertices BCS(k,CA) by SIMPLEX0:31;
   A16: the topology of CA=bool A by SIMPLEX0:4;
   then A17: Vertices CA=union bool A by SIMPLEX0:16
    .=A by ZFMISC_1:81;
   A18: dom F=Vertices BCS(k,CA) by A4,FUNCT_2:def 1;
   per cases;
   suppose A19: m=0;
    A20: O-1=0 by XXREAL_3:7;
    then A21: degree CA=0 by A3,A19,SIMPLEX0:26;
    k=0 or k>0;
    then A22: BCS(k,CA)=CA by A11,A21,Th16,Th22;
    then A23: dom F=Vertices CA by A4,FUNCT_2:def 1;
    take 0;
    A in bool A by ZFMISC_1:def 1;
    then reconsider A1=A as Simplex of CA by A16,PRE_TOPC:def 2;
    A24: A1 is Simplex of 0,CA by A3,A19,A20,SIMPLEX0:48;
    ex x being object st A={x} by A3,A19,CARD_2:42;
    then A25: A={a} by A4,TARSKI:def 1;
    then conv A=A by RLAFFIN1:1;
    then F.a in A by A4,A9,A17,A22;
    then A26: F.a=a by A25,TARSKI:def 1;
    A27: XX c={A}
    proof
     let x be object;
     assume x in XX;
     then consider S be Simplex of 0,CA such that
      A28: x=S and
      F.:S=A by A3,A19,A22;
     A29: S in the topology of CA by PRE_TOPC:def 2;
     card S=Z+1 by A21,SIMPLEX0:def 18
      .=1 by XXREAL_3:4;
     then S=A by A3,A16,A19,A29,CARD_2:102;
     hence thesis by A28,TARSKI:def 1;
    end;
    F.:A=Im(F,a) by A25,RELAT_1:def 16
     .=A by A4,A17,A23,A25,A26,FUNCT_1:59;
    then A in XX by A3,A19,A24,A22;
    then XX={A} by A27,ZFMISC_1:33;
    hence thesis by CARD_1:30;
   end;
   suppose A30: m>0;
    defpred P[object,object] means
     ex D1,D2 being set st D1 = $1 & D2 = $2 & D1 c= D2;
    set XXA={S where S is Simplex of m-1,BCS(k,CA):F.:S=Aa & conv@S misses Int
A};
    reconsider m1=m-1 as ExtReal;
    reconsider M=m as ExtReal;
    reconsider cA=card A as ExtReal;
    set YA={S where S is Simplex of m,BCS(k,CA):Aa=F.:S};
    A31: YA c=the topology of BCS(k,CA)
    proof
     let x be object;
     assume x in YA;
     then ex S be Simplex of m,BCS(k,CA) st S=x & Aa=F.:S;
     hence thesis by PRE_TOPC:def 2;
    end;
    then reconsider YA as Subset-Family of BCS(k,CA) by XBOOLE_1:1;
    reconsider YA as simplex-like Subset-Family of BCS(k,CA)
    by A31,SIMPLEX0:14;
    defpred P1[object,object] means
     ex D1,D2 being set st D1 = $1 & D2 = $2 & D2 c= D1;
    set Xm1={S where S is Simplex of m-1,BCS(k,CA):Aa=F.:S};
    set Xm=the set of all S where S is Simplex of m,BCS(k,CA);
    consider R1 be Relation such that
     A32: for x,y being object
     holds[x,y] in R1 iff x in Xm & y in Xm1 & P1[x,y] from
RELAT_1:sch 1;
    set DY=dom R1\YA;
    A33: DY c=XX
    proof
     let x be object;
    reconsider xx=x as set by TARSKI:1;
     assume A34: x in DY;
     then consider y being object such that
      A35: [x,y] in R1 by XTUPLE_0:def 12;
    reconsider yy=y as set by TARSKI:1;
     x in Xm by A32,A35;
     then consider S be Simplex of m,BCS(k,CA) such that
      A36: x=S and
      not contradiction;
     not x in YA by A34,XBOOLE_0:def 5;
     then A37: F.:S<>Aa by A36;
     y in Xm1 by A32,A35;
     then A38: ex W be Simplex of m-1,BCS(k,CA) st y=W & Aa=F.:W;
     P1[xx,yy] by A32,A35;
     then yy c=xx;
     then Aa c=F.:S by A36,A38,RELAT_1:123;
     then Aa c<F.:S by A37;
     then m<card(F.:S) by A5,CARD_2:48;
     then A39: m+1<=card(F.:S) by NAT_1:13;
     card(F.:S)<=m+1 by A3,NAT_1:43;
     then F.:S=A by A3,A39,CARD_2:102,XXREAL_0:1;
     hence thesis by A3,A36;
    end;
    set RDY=R1|DY;
    A40: RDY|(dom RDY\DY)={}
    proof
     assume RDY|(dom RDY\DY)<>{};
     then consider xy be object such that
      A41: xy in RDY|(dom RDY\DY) by XBOOLE_0:def 1;
     consider x,y being object such that
      A42: xy=[x,y] by A41,RELAT_1:def 1;
     A43: x in dom RDY\DY by A41,A42,RELAT_1:def 11;
     then dom RDY c=DY & x in dom RDY by RELAT_1:58;
     hence contradiction by A43,XBOOLE_0:def 5;
    end;
    A44: 2*`card YA=card 2*`card card YA
     .=card(2*card YA) by CARD_2:39;
    cA-1=m+1+-1 by A3,XXREAL_3:def 2;
    then A45: degree CA=m by SIMPLEX0:26;
    consider R be Relation such that
A46: for x,y being object holds[x,y] in R iff x in Xm1 & y in Xm & P[x,y]
from RELAT_1:
sch 1;
    A47: card R=card R1
    proof
     deffunc F(object)=[$1`2,$1`1];
     A48: for x being object st x in R holds F(x) in R1
     proof
      let z be object;
      assume A49: z in R;
      then ex x,y being object st z=[x,y] by RELAT_1:def 1;
      then A50: z=[z`1,z`2];
      then A51: z`2 in Xm by A46,A49;
      (P[z`1,z`2]) & z`1 in Xm1 by A46,A49,A50;
      hence thesis by A32,A51;
     end;
     consider f be Function of R,R1 such that
A52: for x being object st x in R holds f.x=F(x) from FUNCT_2:sch 2(A48);
     per cases;
     suppose A53: R1 is empty;
      R is empty
      by A48,A53;
      hence thesis by A53;
     end;
     suppose R1 is non empty;
      then A54: dom f=R by FUNCT_2:def 1;
      R1 c=rng f
      proof
       let z be object;
       assume A55: z in R1;
       then ex x,y being object st z=[x,y] by RELAT_1:def 1;
       then A56: z=[z`1,z`2];
       then A57: z`2 in Xm1 by A32,A55;
       (P1[z`1,z`2]) & z`1 in Xm by A32,A55,A56;
       then A58: [z`2,z`1] in R by A46,A57;
       F([z`2,z`1])=z by A56;
       then z=f.([z`2,z`1]) by A52,A58;
       hence thesis by A54,A58,FUNCT_1:def 3;
      end;
      then A59: rng f=R1;
      now let x1,x2 be object such that
        A60: x1 in R and
        A61: x2 in R and
        A62: f.x1=f.x2;
       f.x1=F(x1) & f.x2=F(x2) by A52,A60,A61;
       then A63: x1`2=x2`2 & x1`1=x2`1 by A62,XTUPLE_0:1;
       A64: ex x,y being object st x2=[x,y] by A61,RELAT_1:def 1;
       ex x,y being object st x1=[x,y] by A60,RELAT_1:def 1;
       hence x1=[x2`1,x2`2] by A63
        .=x2 by A64;
      end;
      then f is one-to-one by A54,FUNCT_1:def 4;
      then R,R1 are_equipotent by A54,A59,WELLORD2:def 4;
      hence thesis by CARD_1:5;
     end;
    end;
    A65: |.BCS(k,CAa).|=|.CAa.| & |.CAa.|=conv Aa by Th8,Th10;
    set DX=dom R\XXA;
    A66: DX c=the topology of BCS(k,CA)
    proof
     let x be object;
     assume x in DX;
     then ex y being object st[x,y] in R by XTUPLE_0:def 12;
     then x in Xm1 by A46;
     then ex S be Simplex of m-1,BCS(k,CA) st S=x & Aa=F.:S;
     hence thesis by PRE_TOPC:def 2;
    end;
    set RDX=R|DX;
    reconsider DX as Subset-Family of BCS(k,CA) by A66,XBOOLE_1:1;
    reconsider DX as simplex-like Subset-Family of BCS(k,CA) by A66,SIMPLEX0:14
;
    A67: RDX|(dom RDX\DX)={}
    proof
     assume RDX|(dom RDX\DX)<>{};
     then consider xy be object such that
      A68: xy in RDX|(dom RDX\DX) by XBOOLE_0:def 1;
     consider x,y being object such that
      A69: xy=[x,y] by A68,RELAT_1:def 1;
     A70: x in dom RDX\DX by A68,A69,RELAT_1:def 11;
     then dom RDX c=DX & x in dom RDX by RELAT_1:58;
     hence contradiction by A70,XBOOLE_0:def 5;
    end;
    A71: m1+1=m-1+1 by XXREAL_3:def 2
     .=m;
    set FA=F|Vertices BCS(k,CAa);
    A72: dom FA=Vertices BCS(k,CAa) by A18,A14,RELAT_1:62,SIMPLEX0:31;
    A73: Vertices BCS(k,CAa) is non empty by A5,A6,A8,A30;
    A74: for v be Vertex of BCS(k,CAa)for B be Subset of V st B c=Aa & v in
conv B holds FA.v in B
    proof
     let v be Vertex of BCS(k,CAa);
     let B be Subset of V;
     assume A75: B c=Aa & v in conv B;
     v in Vertices BCS(k,CAa) by A73;
     then F.v in B by A9,A12,A15,A75,XBOOLE_1:1;
     hence thesis by A72,A73,FUNCT_1:47;
    end;
    rng FA c=Aa
    proof
     let y be object;
     assume y in rng FA;
     then consider x being object such that
      A76: x in dom FA and
      A77: FA.x=y by FUNCT_1:def 3;
     reconsider v=x as Element of BCS(k,CAa) by A72,A76;
     v is vertex-like by A72,A76,SIMPLEX0:def 4;
     then consider S be Subset of BCS(k,CAa) such that
      A78: S is simplex-like and
      A79: v in S;
     A80: conv@S c=|.BCS(k,CAa).| by A78,Th5;
     S c=conv@S by RLAFFIN1:2;
     then A81: v in conv@S by A79;
     x in Vertices BCS(k,CAa) by A18,A14,A76,RELAT_1:62,SIMPLEX0:31;
     hence thesis by A65,A74,A77,A80,A81;
    end;
    then reconsider FA as Function of Vertices BCS(k,CAa),Aa by A72,FUNCT_2:2;
    set XXa={S where S is Simplex of m-1,BCS(k,CAa):FA.:S=Aa};
    consider n such that
     A82: card XXa=2*n+1 by A2,A5,A74;
    A83: m-1<=m-0 & -1<=m+-1 by XREAL_1:10,31;
    A84: for x being object st x in XXA holds card Im(R,x)=1
    proof
     let x be object;
     assume x in XXA;
     then consider S be Simplex of m-1,BCS(k,CA) such that
      A85: x=S and
      A86: F.:S=Aa and
      A87: conv@S misses Int A;
     set XX={S1 where S1 is Simplex of m,BCS(k,CA):S c=S1};
     A88: R.:{S}c=XX
     proof
      let w be object;
    reconsider ww=w as set by TARSKI:1;
      assume w in R.:{S};
      then consider s be object such that
       A89: [s,w] in R and
       A90: s in {S} by RELAT_1:def 13;
      reconsider ss = s as set by TARSKI:1;
      w in Xm by A46,A89;
      then A91: ex W be Simplex of m,BCS(k,CA) st w=W;
      P[ss,ww] by A46,A89;
      then s=S & ss c=ww by A90,TARSKI:def 1;
      hence thesis by A91;
     end;
     XX c=R.:{S}
     proof
      let w be object;
      assume w in XX;
      then consider W be Simplex of m,BCS(k,CA) such that
       A92: w=W and
       A93: S c=W;
      W in Xm & S in Xm1 by A86;
      then S in {S} & [S,W] in R by A46,A93,TARSKI:def 1;
      hence thesis by A92,RELAT_1:def 13;
     end;
     then A94: R.:{S}=XX by A88;
     card XX=1 by A3,A87,Th45;
     hence thesis by A85,A94,RELAT_1:def 16;
    end;
    A95: degree CA=degree BCS(k,CA) by A11,Th32;
    A96: M+1=m+1 by XXREAL_3:def 2;
    A97: for x being object st x in YA holds card Im(R1,x)=2
    proof
     let x be object;
     assume x in YA;
     then consider S be Simplex of m,BCS(k,CA) such that
      A98: x=S and
      A99: Aa=F.:S;
     set FS=F|S;
     A100: rng FS=Aa by A99,RELAT_1:115;
     A101: Aa is non empty by A5,A30;
     A102: S in {x} by A98,TARSKI:def 1;
     A103: dom FS=S by A18,RELAT_1:62,SIMPLEX0:17;
     A104: card S=m+1 by A95,A45,A96,SIMPLEX0:def 18;
     reconsider FS as Function of S,Aa by A100,A103,FUNCT_2:1;
     FS is onto by A100,FUNCT_2:def 3;
     then consider b be set such that
      A105: b in Aa and
      A106: card(FS"{b})=2 and
      A107: for x st x in Aa & x<>b holds card(FS"{x})=1 by A5,A101,A104,Th2;
     consider a1,a2 be object such that
      A108: a1<>a2 and
      A109: FS"{b}={a1,a2} by A106,CARD_2:60;
     reconsider S1=S\{a1},S2=S\{a2} as Simplex of BCS(k,CA);
     A110: a1 in {a1,a2} by TARSKI:def 2;
     then A111: a1 in S2 by A108,A109,ZFMISC_1:56;
     A112: card S1=m by A104,A109,A110,STIRL2_1:55;
     A113: a2 in {a1,a2} by TARSKI:def 2;
     then A114: card S2=m by A104,A109,STIRL2_1:55;
     then reconsider S1,S2 as Simplex of m-1,BCS(k,CA) by A95,A83,A71,A45,A112,
SIMPLEX0:def 18;
     A115: {a1}c=S by A109,A110,ZFMISC_1:31;
     A116: FS.a2=F.a2 by A103,A109,A113,FUNCT_1:47;
     A117: {a2}c=S by A109,A113,ZFMISC_1:31;
     A118: R1.:{x}c={S1,S2}
     proof
      let Y be object;
      assume Y in R1.:{x};
      then consider X be object such that
       A119: [X,Y] in R1 and
       A120: X in {x} by RELAT_1:def 13;
      Y in Xm1 by A32,A119;
      then consider W be Simplex of m-1,BCS(k,CA) such that
       A121: Y=W and
       A122: Aa=F.:W;
      X=x by A120,TARSKI:def 1;
      then P1[S,W] by A32,A98,A119,A121;
      then W c=S;
      then A123: Aa=FS.:W by A122,RELAT_1:129;
      then consider w be object such that
       A124: w in dom FS and
       A125: w in W and
       A126: FS.w=b by A105,FUNCT_1:def 6;
      A127: {w}c=W by A125,ZFMISC_1:31;
      A128: S\{a1,a2}c=W
      proof
       let s be object;
       assume A129: s in S\{a1,a2};
       then A130: s in dom FS by A103,XBOOLE_0:def 5;
       then A131: FS.s in Aa by A100,FUNCT_1:def 3;
       then consider w be object such that
        A132: w in dom FS and
        A133: w in W and
        A134: FS.w=FS.s by A123,FUNCT_1:def 6;
       not s in FS"{b} by A109,A129,XBOOLE_0:def 5;
       then not FS.s in {b} by A130,FUNCT_1:def 7;
       then FS.s<>b by TARSKI:def 1;
       then card(FS"{FS.s})=1 by A107,A131;
       then consider z be object such that
        A135: FS"{FS.s}={z} by CARD_2:42;
       A136: FS.s in {FS.s} by TARSKI:def 1;
       then A137: s in FS"{FS.s} by A130,FUNCT_1:def 7;
       w in FS"{FS.s} by A132,A134,A136,FUNCT_1:def 7;
       then w=z by A135,TARSKI:def 1;
       hence thesis by A133,A135,A137,TARSKI:def 1;
      end;
      b in {b} by TARSKI:def 1;
      then A138: w in FS"{b} by A124,A126,FUNCT_1:def 7;
      A139: card W=m by A95,A83,A71,A45,SIMPLEX0:def 18;
      A140: S/\{a1}={a1} by A115,XBOOLE_1:28;
      A141: S/\{a2}={a2} by A117,XBOOLE_1:28;
      per cases by A109,A138,TARSKI:def 2;
      suppose w=a1;
       then (S\{a1,a2})\/{w}=S\({a1,a2}\{a1}) by A140,XBOOLE_1:52
        .=S2 by A108,ZFMISC_1:17;
       then S2=W by A114,A127,A128,A139,CARD_2:102,XBOOLE_1:8;
       hence thesis by A121,TARSKI:def 2;
      end;
      suppose w=a2;
       then (S\{a1,a2})\/{w}=S\({a1,a2}\{a2}) by A141,XBOOLE_1:52
        .=S1 by A108,ZFMISC_1:17;
       then S1=W by A112,A127,A128,A139,CARD_2:102,XBOOLE_1:8;
       hence thesis by A121,TARSKI:def 2;
      end;
     end;
     A142: S c=dom F by A18,SIMPLEX0:17;
     A143: FS.a1=F.a1 by A103,A109,A110,FUNCT_1:47;
     A144: FS.a1 in {b} by A109,A110,FUNCT_1:def 7;
     then A145: FS.a1=b by TARSKI:def 1;
     A146: FS.a2 in {b} by A109,A113,FUNCT_1:def 7;
     then A147: FS.a2=b by TARSKI:def 1;
     A148: a2 in S & a2 in S1 by A108,A109,A113,ZFMISC_1:56;
     A149: Aa c=F.:S1
     proof
      let z be object;
      assume A150: z in Aa;
      per cases;
      suppose A151: z=b;
       FS.a2 in F.:S1 by A142,A116,A148,FUNCT_1:def 6;
       hence thesis by A146,A151,TARSKI:def 1;
      end;
      suppose A152: z<>b;
       consider c be object such that
        A153: c in dom F and
        A154: c in S and
        A155: z=F.c by A99,A150,FUNCT_1:def 6;
       c in S1 by A143,A145,A152,A154,A155,ZFMISC_1:56;
       hence thesis by A153,A155,FUNCT_1:def 6;
      end;
     end;
     A156: S in Xm;
     A157: a1 in S & a1 in S2 by A108,A109,A110,ZFMISC_1:56;
     A158: Aa c=F.:S2
     proof
      let z be object;
      assume A159: z in Aa;
      per cases;
      suppose A160: z=b;
       FS.a1 in F.:S2 by A143,A142,A157,FUNCT_1:def 6;
       hence thesis by A144,A160,TARSKI:def 1;
      end;
      suppose A161: z<>b;
       consider c be object such that
        A162: c in dom F and
        A163: c in S and
        A164: z=F.c by A99,A159,FUNCT_1:def 6;
       c in S2 by A116,A147,A161,A163,A164,ZFMISC_1:56;
       hence thesis by A162,A164,FUNCT_1:def 6;
      end;
     end;
     F.:S1 c=Aa by A99,RELAT_1:123,XBOOLE_1:36;
     then Aa=F.:S1 by A149;
     then S\{a1}c=S & S1 in Xm1 by XBOOLE_1:36;
     then [S,S1] in R1 by A32,A156;
     then A165: S1 in R1.:{x} by A102,RELAT_1:def 13;
     F.:S2 c=Aa by A99,RELAT_1:123,XBOOLE_1:36;
     then Aa=F.:S2 by A158;
     then S\{a2}c=S & S2 in Xm1 by XBOOLE_1:36;
     then [S,S2] in R1 by A32,A156;
     then S2 in R1.:{x} by A102,RELAT_1:def 13;
     then {S1,S2}c=R1.:{x} by A165,ZFMISC_1:32;
     then A166: R1.:{x}={S1,S2} by A118;
     S1<>S2 by A111,ZFMISC_1:56;
     then card(R1.:{x})=2 by A166,CARD_2:57;
     hence thesis by RELAT_1:def 16;
    end;
    A167: M-1=m+-1 by XXREAL_3:def 2;
    XX c=DY
    proof
     let x be object;
     assume x in XX;
     then consider S be Simplex of m,BCS(k,CA) such that
      A168: x=S and
      A169: F.:S=A by A3;
     set FS=F|S;
     A170: rng FS=A by A169,RELAT_1:115;
     A171: card A=card S by A3,A95,A45,A96,SIMPLEX0:def 18;
     A172: dom FS=S by A18,RELAT_1:62,SIMPLEX0:17;
     then reconsider FS as Function of S,A by A170,FUNCT_2:1;
     consider s be object such that
      A173: s in dom FS & FS.s=a by A4,A170,FUNCT_1:def 3;
     set Ss=S\{s};
     FS is onto by A170,FUNCT_2:def 3;
     then A174: FS is one-to-one by A171,FINSEQ_4:63;
     then A175: FS.:Ss=FS.:S\FS.:{s} by FUNCT_1:64
      .=A\FS.:{s} by A170,A172,RELAT_1:113
      .=A\Im(FS,s) by RELAT_1:def 16
      .=Aa by A173,FUNCT_1:59;
     Ss,FS.:Ss are_equipotent by A172,A174,CARD_1:33,XBOOLE_1:36;
     then A176: card Ss=m by A5,A175,CARD_1:5;
     reconsider Ss as Simplex of BCS(k,CA);
     reconsider Ss as Simplex of m-1,BCS(k,CA) by A167,A176,SIMPLEX0:48;
     FS.:Ss=F.:Ss by RELAT_1:129,XBOOLE_1:36;
     then A177: Ss in Xm1 by A175;
     Ss c=S & S in Xm by XBOOLE_1:36;
     then [S,Ss] in R1 by A32,A177;
     then A178: S in dom R1 by XTUPLE_0:def 12;
     for W be Simplex of m,BCS(k,CA) st S=W holds Aa<>F.:W by A4,A169,
ZFMISC_1:56;
     then not S in YA;
     hence thesis by A168,A178,XBOOLE_0:def 5;
    end;
    then A179: DY=XX by A33;
    for x being object st x in DY holds card Im(RDY,x)=1
    proof
     let x be object;
     assume A180: x in DY;
     then consider y being object such that
      A181: [x,y] in R1 by XTUPLE_0:def 12;
     A182: ex W be Simplex of m,BCS(k,CA) st x=W & F.:W=A by A3,A179,A180;
     x in Xm by A32,A181;
     then consider S be Simplex of m,BCS(k,CA) such that
      A183: x=S and
      not contradiction;
     y in Xm1 by A32,A181;
     then consider W be Simplex of m-1,BCS(k,CA) such that
      A184: y=W and
      A185: Aa=F.:W;
     A186: card S=m+1 by A95,A45,A96,SIMPLEX0:def 18;
     A187: RDY.:{x}c={y}
     proof
      let u be object;
      set FS=F|S;
      assume u in RDY.:{x};
      then consider s be object such that
       A188: [s,u] in RDY and
       A189: s in {x} by RELAT_1:def 13;
      A190: [s,u] in R1 by A188,RELAT_1:def 11;
      then u in Xm1 by A32;
      then consider U be Simplex of m-1,BCS(k,CA) such that
       A191: u=U and
       A192: Aa=F.:U;
      A193: dom FS=S by A18,RELAT_1:62,SIMPLEX0:17;
      A194: rng FS=A by A182,A183,RELAT_1:115;
      then reconsider FS as Function of S,A by A193,FUNCT_2:1;
      P1[S,W] by A32,A181,A183,A184;
      then
      A195: W c=S;
      then A196: FS.:W=F.:W by RELAT_1:129;
      s=S by A183,A189,TARSKI:def 1;
      then P1[S,U] by A32,A190,A191;
      then A197: U c=S;
      then A198: FS.:U=F.:U by RELAT_1:129;
      FS is onto by A194,FUNCT_2:def 3;
      then A199: FS is one-to-one by A3,A186,FINSEQ_4:63;
      then A200: U c=W by A185,A192,A193,A196,A197,A198,FUNCT_1:87;
      W c=U by A185,A192,A193,A195,A196,A198,A199,FUNCT_1:87;
      then u=y by A184,A191,A200,XBOOLE_0:def 10;
      hence thesis by TARSKI:def 1;
     end;
     x in {x} & [x,y] in RDY by A180,A181,RELAT_1:def 11,TARSKI:def 1;
     then y in RDY.:{x} by RELAT_1:def 13;
     then RDY.:{x}={y} by A187,ZFMISC_1:33;
     then Im(RDY,x)={y} by RELAT_1:def 16;
     hence thesis by CARD_1:30;
    end;
    then card RDY=card{}+`1*`card DY by A40,Th1
     .=1*`card DY by CARD_2:18
     .=card DY by CARD_2:21;
    then A201: card R1=card card XX+`card(2*card YA) by A44,A97,A179,Th1
     .=card(card XX+2*card YA) by CARD_2:38
     .=card XX+2*card YA;
    A202: |.BCS(k,CA).|=|.CA.| & |.CA.|=conv A by Th8,Th10;
    A203: XXA c=XXa
    proof
     let x be object;
     assume x in XXA;
     then consider S be Simplex of m-1,BCS(k,CA) such that
      A204: x=S and
      A205: F.:S=Aa and
      A206: conv@S misses Int A;
     conv@S c=conv A by A202,Th5;
     then consider B be Subset of V such that
      A207: B c<A and
      A208: conv@S c=conv B by A4,A206,RLAFFIN2:23;
     A209: B c=A by A207;
     then reconsider B as finite Subset of V;
     card B<m+1 by A3,A207,CARD_2:48;
     then A210: card B<=m by NAT_1:13;
     A211: Aa c=B
     proof
      let y be object;
      assume y in Aa;
      then consider v be object such that
       A212: v in dom F and
       A213: v in S and
       A214: F.v=y by A205,FUNCT_1:def 6;
      S c=conv@S by RLAFFIN1:2;
      then v in conv@S by A213;
      hence thesis by A9,A208,A209,A212,A214;
     end;
     then card Aa<=card B by NAT_1:43;
     then A215: Aa=B by A5,A210,A211,CARD_2:102,XXREAL_0:1;
     A216: the topology of BCS(k,CAa)c=the topology of BCS(k,CA) by A14,
SIMPLEX0:def 13;
     A217: card S=m by A95,A83,A71,A45,SIMPLEX0:def 18;
     then S is non empty by A30;
     then A218: (center_of_mass V).S in Int@S by RLAFFIN2:20;
     Int@S c=conv@S by RLAFFIN2:5;
     then (center_of_mass V).S in conv@S by A218;
     then consider w be Subset of BCS(k,CAa) such that
      A219: w is simplex-like and
      A220: (center_of_mass V).S in conv@w by A65,A208,A215,Def3;
     w in the topology of BCS(k,CAa) by A219;
     then w in the topology of BCS(k,CA) by A216;
     then reconsider W=w as Simplex of BCS(k,CA) by PRE_TOPC:def 2;
     Int@S meets conv@W by A218,A220,XBOOLE_0:3;
     then A221: S c=w by Th26;
     then reconsider s=S as Subset of BCS(k,CAa) by XBOOLE_1:1;
     reconsider s as Simplex of BCS(k,CAa) by A219,A221,MATROID0:1;
     A222: FA.:s=Aa by A205,RELAT_1:129,SIMPLEX0:17;
     s is Simplex of m-1,BCS(k,CAa) by A167,A217,SIMPLEX0:48;
     hence thesis by A204,A222;
    end;
    A223: degree CAa=m-1 by A5,A167,SIMPLEX0:26;
    XXa c=XXA
    proof
     A<>Aa by A3,A5;
     then A224: Aa c<A by A12;
     let x be object;
     assume x in XXa;
     then consider S be Simplex of m-1,BCS(k,CAa) such that
      A225: x=S and
      A226: FA.:S=Aa;
     m-1<=degree BCS(k,CAa) by A7,A223,Th32;
     then reconsider S1=x as Simplex of m-1,BCS(k,CA) by A14,A225,SIMPLEX0:49;
     A227: FA.:S=F.:S by RELAT_1:129,SIMPLEX0:17;
     conv@S c=conv Aa by A65,Th5;
     then conv@S1 misses Int A by A224,A225,RLAFFIN2:7,XBOOLE_1:63;
     hence thesis by A225,A226,A227;
    end;
    then A228: XXa=XXA by A203;
    for x being object st x in DX holds card Im(RDX,x)=2
    proof
     let x be object;
     assume A229: x in DX;
     then ex y being object st[x,y] in R by XTUPLE_0:def 12;
     then A230: x in Xm1 by A46;
     then consider S be Simplex of m-1,BCS(k,CA) such that
      A231: x=S and
      A232: Aa=F.:S;
     set XX={S1 where S1 is Simplex of m,BCS(k,CA):S c=S1};
     not x in XXA by A229,XBOOLE_0:def 5;
     then conv@S meets Int A by A231,A232;
     then A233: card XX=2 by A3,Th45;
     A234: RDX.:{S}c=XX
     proof
      let w be object;
    reconsider ww=w as set by TARSKI:1;
      assume w in RDX.:{S};
      then consider s be object such that
       A235: [s,w] in RDX and
       A236: s in {S} by RELAT_1:def 13;
      A237: [s,w] in R by A235,RELAT_1:def 11;
      then w in Xm by A46;
      then A238: ex W be Simplex of m,BCS(k,CA) st w=W;
      s=S by A236,TARSKI:def 1;
      then P[S,ww] by A46,A237;
      then S c=ww;
      hence thesis by A238;
     end;
     XX c=RDX.:{S}
     proof
      let w be object;
      assume w in XX;
      then consider W be Simplex of m,BCS(k,CA) such that
       A239: w=W and
       A240: S c=W;
      W in Xm;
      then [S,W] in R by A46,A230,A231,A240;
      then A241: [S,W] in RDX by A229,A231,RELAT_1:def 11;
      S in {S} by TARSKI:def 1;
      hence thesis by A239,A241,RELAT_1:def 13;
     end;
     then XX=RDX.:{S} by A234;
     hence thesis by A231,A233,RELAT_1:def 16;
    end;
    then card RDX=card(RDX|(dom RDX\DX))+`2*`card DX by Th1
     .=0+`2*`card DX by A67
     .=2*`card DX by CARD_2:18;
    then A242: card R=2*`card DX+`1*`card XXA by A84,Th1
     .=2*`card DX+`(2*n+1) by A82,A228,CARD_2:21
     .=(card 2)*`card card DX+`(2*n+1)
     .=card(2*card DX)+`(2*n+1) by CARD_2:39
     .=card(2*card DX)+`card(2*n+1)
     .=card(2*card DX+(2*n+1)) by CARD_2:38
     .=2*card DX+(2*n+1);
    then card XX=2*(card DX+n-card YA)+1 by A47,A201;
    then 2*(card DX+n-card YA)>=-1 by INT_1:7;
    then card DX+n-card YA>=(-1)/2 by XREAL_1:79;
    then card DX+n-card YA>-1 by XXREAL_0:2;
    then card DX+n-card YA>=0 by INT_1:8;
    then reconsider cnc=card DX+n-card YA as Element of NAT by INT_1:3;
    take cnc;
    thus thesis by A47,A201,A242;
   end;
  end;
  A243: P[0 qua Nat]
  proof
   let A be finite affinely-independent Subset of V such that
    A244: card A=0;
   A245: A={} by A244;
   set C=Complex_of{A};
   A246: |.C.|c=[#]V & [#]C=[#]V;
   let F be Function of Vertices BCS(k,C),A such that
    for v be Vertex of BCS(k,C)for B be Subset of V st B c=A & v in conv B
holds F.v in B;
   set X={S where S is Simplex of card A-1,BCS(k,C):F.:S=A};
   take 0;
   A247: k=0 or k>0;
   A248: Z-1=-1 by XXREAL_3:4;
   then degree C=-1 by A244,SIMPLEX0:26;
   then A249: C=BCS(k,C) by A246,A247,Th16,Th22;
   A250: the topology of C=bool A by SIMPLEX0:4;
   A251: X c={A}
   proof
    let x be object such that
     A252: x in X;
    consider S be Simplex of card A-1,BCS(k,C) such that
     A253: S=x and
     F.:S=A by A252;
    S in the topology of C by A249,PRE_TOPC:def 2;
    then S is empty by A245,A250;
    hence thesis by A245,A253,TARSKI:def 1;
   end;
   A in bool A by ZFMISC_1:def 1;
   then reconsider A1=A as Simplex of C by A250,PRE_TOPC:def 2;
   A254: F.:A1=A by A245;
   A1 is Simplex of-1,C by A244,A248,SIMPLEX0:48;
   then A in X by A249,A254;
   then X={A} by A251,ZFMISC_1:33;
   hence thesis by CARD_1:30;
  end;
  for k holds P[k] from NAT_1:sch 2(A243,A1);
  hence thesis;
 end;
