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;

theorem Th35:
  S is with_non-empty_elements & union S c= Aff & card S+n+1 <= card Aff
implies (
    Bf is Simplex of n+card S,BCS Complex_of{Aff} & (center_of_mass V).:S c=Bf
iff
    ex T st T misses S & T\/S is c=-linear with_non-empty_elements &
            card T=n+1 & union T c= Aff &
            Bf = (center_of_mass V).:S\/(center_of_mass V).:T)
 proof
  set B=center_of_mass V,U=union S;
  assume that
   A1: S is with_non-empty_elements and
   A2: U c=Aff and
   A3: card S+n+1<=card Aff;
  set C=Complex_of{Aff};
  reconsider c =card Aff as ExtReal;
  set BTC=B|the topology of C;
  set BC=BCS C;
  A4: the topology of C=bool Aff by SIMPLEX0:4;
  A5: degree C=c-1 by SIMPLEX0:26
   .=card Aff+-1 by XXREAL_3:def 2;
  reconsider c =card S+n as ExtReal;
  A6: |.C.|c=[#]C;
  then A7: BC=subdivision(B,C) by Def5;
  card S+n<=card Aff-1 by A3,XREAL_1:19;
  then A8: card S+n<=degree BC by A5,A6,Th31;
  hereby A9: S c=the topology of C
   proof
    let x be object;
    reconsider xx=x as set by TARSKI:1;
    assume x in S;
    then xx c=U by ZFMISC_1:74;
    then xx c=Aff by A2;
    hence thesis by A4;
   end;
   then A10: B.:S=BTC.:S by RELAT_1:129;
   dom B=(bool the carrier of V)\{{}} & not{} in S by A1,FUNCT_2:def 1;
   then dom BTC=dom B/\the topology of C & S c=dom B by RELAT_1:61,ZFMISC_1:34;
   then A11: S c=dom BTC by A9,XBOOLE_1:19;
   assume that
    A12: Bf is Simplex of n+card S,BCS Complex_of{Aff} and
    A13: B.:S c=Bf;
   consider a be c=-linear finite simplex-like Subset-Family of C such that
    A14: Bf=B.:a by A7,A12,SIMPLEX0:def 20;
   a/\dom B c=a by XBOOLE_1:17;
   then reconsider AA=a/\dom B as c=-linear finite simplex-like Subset-Family
of C by TOPS_2:11,XBOOLE_1:1;
   A15: B.:S c=B.:AA by A13,A14,RELAT_1:112;
   reconsider T=AA\S as Subset-Family of V;
   A16: AA c=the topology of C by SIMPLEX0:14;
   then A17: B.:AA=BTC.:AA by RELAT_1:129;
   A18: S\/T=AA\/S by XBOOLE_1:39
    .=AA by A10,A11,A15,A17,FUNCT_1:87,XBOOLE_1:12;
   T c=AA by XBOOLE_1:36;
   then A19: T c=bool Aff by A4,A16;
   A20: not{} in AA by ZFMISC_1:56;
   then B.:a=B.:(a/\(dom B)) & AA is with_non-empty_elements by RELAT_1:112;
   then A21: card Bf=card AA by A14,Th33;
   A22: Bf=B.:AA by A14,RELAT_1:112
    .=B.:S\/B.:T by A18,RELAT_1:120;
   reconsider T as finite Subset-Family of V;
   take T;
   card Bf=c+1 by A8,A12,SIMPLEX0:def 18
    .=card S+n+1 by XXREAL_3:def 2;
   then union bool Aff=Aff & card S+card(AA\S)=card S+n+1 by A18,A21,CARD_2:40
,XBOOLE_1:79,ZFMISC_1:81;
   hence T misses S & T\/S is c=-linear with_non-empty_elements & card T=n+
1 & union T c=Aff & Bf=B.:S\/B.:T by A18,A19,A20,A22,XBOOLE_1:79
,ZFMISC_1:77;
  end;
  given T be finite Subset-Family of V such that
   A23: T misses S and
   A24: T\/S is c=-linear with_non-empty_elements and
   A25: card T=n+1 and
   A26: union T c=Aff and
   A27: Bf=(center_of_mass V).:S\/(center_of_mass V).:T;
  reconsider TS=T\/S as Subset-Family of C;
  reconsider t=T as finite Subset-Family of V;
  A28: card TS=card t+card S by A23,CARD_2:40
   .=card S+n+1 by A25;
  union(T\/S)=union T\/union S by ZFMISC_1:78;
  then union(T\/S)c=Aff by A2,A26,XBOOLE_1:8;
  then T\/S c=bool union(T\/S) & bool union(T\/S)c=bool Aff by ZFMISC_1:67,82;
  then A29: T\/S c=the topology of C by A4;
  A30: TS is simplex-like
  proof
   let a be Subset of C;
   thus thesis by A29;
  end;
  [#]BC=[#]C by A7,SIMPLEX0:def 20;
  then reconsider BTS=B.:TS as Simplex of BC by A7,A24,A30,SIMPLEX0:def 20;
  card TS=card(B.:TS) by A24,A30,Th33;
  then A31: card BTS=c+1 by A28,XXREAL_3:def 2;
  BTS=Bf by A27,RELAT_1:120;
  hence thesis by A8,A27,A31,SIMPLEX0:def 18,XBOOLE_1:7;
 end;
