reserve a,b,c for set;

theorem Th9:
  for X being set, i being Function of bool X, bool X st i.X = X &
(for A being Subset of X holds i.A c= A) & (for A,B being Subset of X holds i.(
A /\ B) = (i.A) /\ (i.B)) & (for A being Subset of X holds i.(i.A) = i.A) for T
being TopStruct st the carrier of T = X & the topology of T = rng i holds T is
  TopSpace & for A being Subset of T holds Int A = i.A
proof
  let X be set;
  let c be Function of bool X, bool X such that
A1: c.X = X and
A2: for A being Subset of X holds c.A c= A and
A3: for A,B being Subset of X holds c.(A /\ B) = (c.A) /\ (c.B) and
A4: for A being Subset of X holds c.(c.A) = c.A;
  set F = rng c;
  let T be TopStruct such that
A5: the carrier of T = X and
A6: the topology of T = rng c;
A7: dom c = bool X by FUNCT_2:def 1;
A8: now
    let A,B be Subset of T;
    assume that
A9: A in F and
A10: B in F;
    consider a being object such that
A11: a in dom c and
A12: A = c.a by A9,FUNCT_1:def 3;
    consider b being object such that
A13: b in dom c and
A14: B = c.b by A10,FUNCT_1:def 3;
    reconsider a,b as Subset of X by A11,A13;
    A/\B = (c.A)/\B by A4,A11,A12
      .= (c.A)/\(c.B) by A4,A13,A14
      .= c.((c.a)/\(c.b)) by A3,A12,A14;
    hence A /\ B in F by A7,FUNCT_1:def 3;
  end;
A15: now
    let A,B be Subset of X;
    assume A c= B;
    then A/\B = A by XBOOLE_1:28;
    then c.A = (c.A)/\(c.B) by A3;
    hence c.A c= c.B by XBOOLE_1:17;
  end;
A16: now
    let G be Subset-Family of X such that
A17: G c= F;
    now
      let a;
      assume
A18:  a in G;
      then reconsider A = a as Subset of X;
A19:  c.A c= c.union G by A15,A18,ZFMISC_1:74;
      ex b being object st b in dom c & A = c.b by A17,A18,FUNCT_1:def 3;
      hence a c= c.union G by A19,A4;
    end;
    then
A20: union G c= c.union G by ZFMISC_1:76;
    c.union G c= union G by A2;
    then c.union G = union G by A20;
    hence union G in F by A7,FUNCT_1:def 3;
  end;
  X in F by A1,A7,FUNCT_1:def 3;
  hence
A21: T is TopSpace by A16,A5,A6,A8,PRE_TOPC:def 1;
  let A be Subset of T;
  reconsider B = A, IntA = Int A as Subset of X by A5;
  IntA in F by A21,A6,PRE_TOPC:def 2;
  then ex a being object st a in dom c & IntA = c.a by FUNCT_1:def 3;
  then c.IntA = IntA by A4;
  hence Int A c= c.A by A5,A15,TOPS_1:16;
  reconsider cB = c.B as Subset of T by A5;
  cB in F by A7,FUNCT_1:def 3;
  then cB is open by A6;
  hence thesis by A2,TOPS_1:24;
end;
