 reserve x for set,
         n,m,k for Nat,
         r for Real,
         V for RealLinearSpace,
         v,u,w,t for VECTOR of V,
         Av for finite Subset of V,
         Affv for finite affinely-independent Subset of V;
reserve pn for Point of TOP-REAL n,
        An for Subset of TOP-REAL n,
        Affn for affinely-independent Subset of TOP-REAL n,
        Ak for Subset of TOP-REAL k;
reserve EV for Enumeration of Affv,
        EN for Enumeration of Affn;

theorem Th20:
  for A be Subset of V st A c= Affv & x in Affin Affv holds
    x in Affin A
  iff
    for y be set st y in dom(x|--EV) & not EV.y in A holds (x|--EV).y = 0
 proof
  let B be Subset of V such that
   A1: B c=Affv;
  set xA=x|--Affv;
  set xB=x|--B;
  set cA=card Affv;
  set E=EV;
  assume A2: x in Affin Affv;
  set xE=x|--E;
  A3: len xE=cA by Th16;
  A4: rng E=Affv by Def1;
  then len E=cA by FINSEQ_4:62;
  then A5: dom xE=dom E by A3,FINSEQ_3:29;
  A6: Carrier xB c=B by RLVECT_2:def 6;
  hereby assume x in Affin B;
   then A7: xB=xA by A1,RLAFFIN1:77;
   let y be set;
   assume that
    A8: y in dom xE and
    A9: not E.y in B;
   y in dom E by A8,FUNCT_1:11;
   then E.y in Affv by A4,FUNCT_1:def 3;
   then reconsider Ey=E.y as Element of V;
   xE.y=(x|--Affv).(E.y) & not Ey in Carrier xB by A6,A8,A9,FUNCT_1:12;
   hence xE.y=0 by A7,RLVECT_2:19;
  end;
  assume A10: for y be set st y in dom xE & not E.y in B holds xE.y=0;
  A11: now let y be set;
   assume A12: y in Affv\B;
   then y in Affv by XBOOLE_0:def 5;
   then consider z be object such that
    A13: z in dom E & E.z=y by A4,FUNCT_1:def 3;
   not y in B by A12,XBOOLE_0:def 5;
   then xE.z=0 by A5,A10,A13;
   hence xA.y=0 by A5,A13,FUNCT_1:12;
  end;
  Affv\(Affv\B)=Affv/\B by XBOOLE_1:48
   .=B by A1,XBOOLE_1:28;
  hence thesis by A2,A11,RLAFFIN1:75;
 end;
