reserve X for set,
        D for a_partition of X,
        TG for non empty TopologicalGroup;
reserve A for Subset of X;
reserve US for UniformSpace;

theorem Th7:
  for X being set,cB being Subset-Family of [:X,X:] st
  cB is quasi_basis axiom_UP1 axiom_UP2 axiom_UP3 holds
  ex US being strict UniformSpace st
  the carrier of US = X & the entourages of US = <.cB.]
  proof
    let X be set,cB be Subset-Family of [:X,X:];
    assume that
A1: cB is quasi_basis and
A2: cB is axiom_UP1 and
A3: cB is axiom_UP2 and
A4: cB is axiom_UP3;
    set US = UniformSpaceStr(# X,<.cB.] #);
A5: <.cB.] = {x where x is Subset of [:X,X:]: ex b be Element of cB st
    b c= x} by CARDFIL2:14;
    now
      for Y1,Y2 being Subset of [:X,X:] st Y1 in <.cB.] & Y1 c= Y2 holds
      Y2 in <.cB.]
      proof
        let Y1,Y2 be Subset of [:X,X:];
        assume that
A6:     Y1 in <.cB.] and
A7:     Y1 c= Y2;
        consider x be Subset of [:X,X:] such that
A8:     Y1 = x and
A9:     ex b be Element of cB st b c= x by A5,A6;
        consider B be Element of cB such that
A10:    B c= x by A9;
        B c= Y2 by A10,A8,A7;
        hence thesis by A5;
      end;
      then <.cB.] is upper;
      hence US is upper;
      for Y1,Y2 be set st Y1 in <.cB.] & Y2 in <.cB.] holds Y1 /\ Y2 in <.cB.]
      proof
        let Y1,Y2 be set;
        assume that
A11:    Y1 in <.cB.] and
A12:    Y2 in <.cB.];
        consider x be Subset of [:X,X:] such that
A13:    Y1 = x and
A14:    ex b be Element of cB st b c= x by A5,A11;
        consider B1 be Element of cB such that
A15:    B1 c= x by A14;
        Y2 in {x where x is Subset of [:X,X:]: ex b be Element of cB st
        b c= x} by CARDFIL2:14,A12;
        then consider y be Subset of [:X,X:] such that
A16:    Y2 = y and
A17:    ex b be Element of cB st b c= y;
        consider B2 be Element of cB such that
A18:    B2 c= y by A17;
A19:    B1 /\ B2 c= Y1 /\ Y2 by A13,A15,A18,A16,XBOOLE_1:27;
        consider B3 be Element of cB such that
A20:    B3 c= B1 /\ B2 by A1;
A21:    Y1 /\ Y2 c= [:X,X:] /\ [:X,X:] by A11,A12,XBOOLE_1:27;
        B3 c= Y1 /\ Y2 by A20,A19;
        hence thesis by A5,A21;
      end;
      hence US is cap-closed by FINSUB_1:def 2;
      for S being Element of <.cB.] holds id X c= S
      proof
        let S be Element of <.cB.];
        S in {x where x is Subset of [:X,X:]: ex b be Element of cB st
        b c= x} by A5;
        then consider x be Subset of [:X,X:] such that
A22:    S = x and
A23:    ex b be Element of cB st b c= x;
        consider B be Element of cB such that
A24:    B c= x by A23;
        id X c= B by A2;
        hence thesis by A24,A22;
      end;
      hence US is axiom_U1;
      for S being Element of <.cB.] holds S~ in <.cB.]
      proof
        let S be Element of <.cB.];
        reconsider S1 = S as Subset of [:X,X:];
        consider B be Element of cB such that
A27:    B c= S1 by CARDFIL2:def 8;
A29:    B~ c= S1~ by A27,SYSREL:11;
        consider B2 be Element of cB such that
A30:    B2 c= B~ by A3;
        B2 c= S1~ by A29,A30;
        hence thesis by CARDFIL2:def 8;
      end;
      hence US is axiom_U2;
      for S being Element of the entourages of US holds ex W being
        Element of the entourages of US st W * W c= S
      proof
        let S be Element of the entourages of US;
        S in <.cB.];
        then consider B1 be Element of cB such that
A31:    B1 c= S by CARDFIL2:def 8;
        consider B2 be Element of cB such that
A32:    B2 * B2 c= B1 by A4;
        per cases;
        suppose
A34:      cB is empty; then
A35:      B2 = {} by SUBSET_1:def 1;
          {} c= [:X,X:];
          then reconsider B2 as Element of the entourages of US
            by A35,A34,CARDFIL2:15;
          B2 [*] B2 c= S by A35;
          hence thesis;
        end;
        suppose
A36:      cB is non empty;
          cB c= <.cB.] by CARDFIL2:18;
          then reconsider W = B2 as Element of the entourages of US by A36;
          W [*] W c= S by A31,A32;
          hence thesis;
        end;
      end;
      hence US is axiom_U3;
    end;
    then reconsider US as strict UniformSpace;
    take US;
    thus the carrier of US = X;
    thus the entourages of US = <.cB.];
  end;
