 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;
reserve pnA for Element of(TOP-REAL n)|Affin Affn;

theorem Th27:
  for EN for B be Subset of (TOP-REAL n)|Affin Affn st
    k < card Affn & B = {pnA: (pnA|--EN) |k in Ak}
  holds Ak is open iff B is open
 proof
  let EN;
  set E=EN;
  set Tn=TOP-REAL n,Tk=TOP-REAL k;
  set A=Affn;
  set cA=card A-' 1;
  set TcA=TOP-REAL cA;
  set AA=Affin A;
  let B be Subset of Tn|AA such that
   A1: k<card A and
   A2: B={v where v is Element of Tn|AA:(v|--E)|k in Ak};
  set BB={u where u is Element of Tn:u in AA & (u|--E)|k in Ak};
  A3: [#](Tn|AA)=AA by PRE_TOPC:def 5;
  A4: BB c=B
  proof
   let x be object;
   assume x in BB;
   then consider u be Element of Tn such that
    A5: x=u & u in AA & (u|--E)|k in Ak;
   thus thesis by A2,A3,A5;
  end;
  A6: A is non empty by A1;
  B c=BB
  proof
   let x be object;
   assume x in B;
   then consider u be Element of Tn|AA such that
    A7: x=u & (u|--E)|k in Ak by A2;
   AA is non empty by A6;
   then u in AA by A3;
   hence thesis by A7;
  end;
  then A8: BB=B by A4;
  A9: rng E=A by Def1;
  then A10: len E=card A by FINSEQ_4:62;
  then A11: len E>=1 by A1,NAT_1:14;
  then A12: len E in dom E by FINSEQ_3:25;
  then E.(len E) in A by A9,FUNCT_1:def 3;
  then reconsider EL=E.(len E) as Element of Tn;
  len E in Seg card A by A10,A11;
  then A13: (card A|->-EL).len E=-EL by FINSEQ_2:57;
  A14: k<card(-EL+A) by A1,RLAFFIN1:7;
  set T=transl(-EL,Tn);
  set TAA=T.:AA;
  A15: [#](Tn|TAA)=TAA by PRE_TOPC:def 5;
  A16: rng(T|AA)=T.:AA by RELAT_1:115;
  A17: dom T=[#]Tn by FUNCT_2:52;
  then dom(T|AA)=AA by RELAT_1:62;
  then reconsider TA=T|AA as Function of Tn|AA,Tn|TAA by A3,A15,A16,FUNCT_2:1;
  reconsider TAB=TA.:B as Subset of Tn|TAA;
  A18: TA is being_homeomorphism by METRIZTS:2;
  reconsider Ev=E+(card A|->-EL) as Enumeration of-EL+A by Th13;
  A19: card(-EL+A)=card A by RLAFFIN1:7;
  then A20: (-EL+A) is non empty by A1;
  A21: rng Ev=-EL+A by Def1;
  then len Ev=card A by A19,FINSEQ_4:62;
  then dom E=dom Ev by A10,FINSEQ_3:29;
  then Ev.len E=EL+(-EL) by A12,A13,FVSUM_1:17
   .=0.Tn by RLVECT_1:5
   .=0*n by EUCLID:70;
  then A22: Ev.len Ev=0*n by A10,A19,A21,FINSEQ_4:62;
  set Tab={w where w is Element of Tn|TAA:(w|--Ev)|k in Ak};
  A23: -EL+AA=Affin(-EL+A) by RLAFFIN1:53;
  then A24: T.:AA=Affin(-EL+A) by RLTOPSP1:33;
  TA.:B=T.:B by A3,RELAT_1:129;
  then A25: TAB={w where w is Element of Tn:w in Affin(-EL+A) & (w|--Ev)|k in
Ak} by A8,Lm6;
  A26: TAB c=Tab
  proof
   let x be object;
   assume x in TAB;
   then consider w be Element of Tn such that
    A27: x=w and
    A28: w in Affin(-EL+A) and
    A29: (w|--Ev)|k in Ak by A25;
   w in TAA by A23,A28,RLTOPSP1:33;
   hence thesis by A15,A27,A29;
  end;
  A30: T.:AA is non empty by A6,A17,RELAT_1:119;
  Tab c=TAB
  proof
   let x be object;
   assume x in Tab;
   then consider w be Element of Tn|TAA such that
    A31: x=w & (w|--Ev)|k in Ak;
   w in TAA by A15,A30;
   hence thesis by A24,A25,A31;
  end;
  then TAB=Tab by A26;
  then TAB is open iff Ak is open by A24,A22,A14,A20,Lm8;
  hence thesis by A6,A18,A30,TOPGRP_1:25;
 end;
