reserve x,y for set,
        r,s for Real,
        n for Nat,
        V for RealLinearSpace,
        v,u,w,p for VECTOR of V,
        A,B for Subset of V,
        Af for finite Subset of V,
        I for affinely-independent Subset of V,
        If for finite affinely-independent Subset of V,
        F for Subset-Family of V,
        L1,L2 for Linear_Combination of V;

theorem Th28:
  Af c= I & v in Af implies
     I\{v}\/{(center_of_mass V).Af} is affinely-independent Subset of V
  proof
    assume that
    A1: Af c=I and
    A2: v in Af;
    set Iv=I\{v},Av=Af\{v};
    A3: Iv\/{v}=I by A1,A2,ZFMISC_1:116;
    set BA=(center_of_mass V)/.Af;
    A4: (center_of_mass V).Af=1/card Af*Sum Af by A2,Def2;
    A5: dom(center_of_mass V)=BOOL the carrier of V by FUNCT_2:def 1;
    then Af in dom(center_of_mass V) by A2,ZFMISC_1:56;
    then A6: (center_of_mass V).Af=(center_of_mass V)/.Af by PARTFUN1:def 6;
    per cases;
    suppose Af={v};
      then Sum Af=v & card Af=1 by CARD_1:30,RLVECT_2:9;
      hence thesis by A3,A4,RLVECT_1:def 8;
    end;
    suppose A7: Af<>{v};
      A8: not BA in Affin Iv
      proof
        A9: Av is non empty
        proof
          assume Av is empty;
          then Af c={v} by XBOOLE_1:37;
          hence contradiction by A2,A7,ZFMISC_1:33;
        end;
        then Av in dom(center_of_mass V) by A5,ZFMISC_1:56;
        then A10: (center_of_mass V).Av=(center_of_mass V)/.Av
          by PARTFUN1:def 6;
        Av c=Iv by A1,XBOOLE_1:33;
        then A11: Affin Av c=Affin Iv by RLAFFIN1:52;
        reconsider c =card Af as Real;
        A12: c/c =c*(1/c) by XCMPLX_1:99;
        conv Av c=Affin Av & (center_of_mass V).Av in conv Av
          by A9,Th16,RLAFFIN1:65;
        then A13: (center_of_mass V).Av in Affin Av;
        assume BA in Affin Iv;
        then A14:not v in Iv &
          (1-c)*(center_of_mass V)/.Av+c*((center_of_mass V)/.Af)
          in Affin Iv by A10,A11,A13,RUSUB_4:def 4,ZFMISC_1:56;
        (center_of_mass V)/.Af-(1-1/c)*(center_of_mass V)/.Av =
          (1-1/c)*(center_of_mass V)/.Av+1/c*v-(1-1/c)*(center_of_mass V)/.Av
            by A2,A6,A9,Th22;
        then A15: 1/c*v=(center_of_mass V)/.Af-(1-1/c)*(center_of_mass V)/.Av
                by RLVECT_4:1
            .=(center_of_mass V)/.Af+-(1-1/c)*(center_of_mass V)/.Av
                by RLVECT_1:def 11
            .=(-(1-1/c))*(center_of_mass V)/.Av+(center_of_mass V)/.Af
                by RLVECT_4:3;
        A16: 1=c/c by A2,XCMPLX_1:60;
        (1-c)*(center_of_mass V)/.Av+c*((center_of_mass V)/.Af)
          =1*((1-c)*(center_of_mass V)/.Av+c*((center_of_mass V)/.Af))
             by RLVECT_1:def 8
         .=c*(1/c*((1-c)*(center_of_mass V)/.Av+c*(center_of_mass V)/.Af))
            by A12,A16,RLVECT_1:def 7
         .=c*(1/c*((1-c)*(center_of_mass V)/.Av)+
              1/c*(c*(center_of_mass V)/.Af))
            by RLVECT_1:def 5
         .=c*(1/c*((1-c)*(center_of_mass V)/.Av)+1*(center_of_mass V)/.Af)
            by A12,A16,RLVECT_1:def 7
         .=c*(1/c*((1-c)*(center_of_mass V)/.Av)+(center_of_mass V)/.Af)
            by RLVECT_1:def 8
         .=c*(1/c*(1-c)*(center_of_mass V)/.Av+(center_of_mass V)/.Af)
            by RLVECT_1:def 7
         .=1*v by A16,A15,A12,RLVECT_1:def 7
         .=v by RLVECT_1:def 8;
         hence contradiction by A3,A14,Th27;
       end;
       Iv is affinely-independent by RLAFFIN1:43,XBOOLE_1:36;
       hence thesis by A6,A8,Th27;
     end;
   end;
