reserve S, R for 1-sorted,
  X for Subset of R,
  T for TopStruct,
  x for set;
reserve H for non empty multMagma,
  P, Q, P1, Q1 for Subset of H,
  h for Element of H;
reserve G for Group,
  A, B for Subset of G,
  a for Element of G;

theorem Th24:
  for S, T being non empty TopStruct, f being Function of S, T
  holds f is being_homeomorphism iff dom f = [#]S & rng f = [#]T & f is
  one-to-one & for P being Subset of S holds P is open iff f.:P is open
proof
  let S, T be non empty TopStruct, f be Function of S, T;
A1: [#]T <> {};
A2: [#]S <> {};
  hereby
    assume
A3: f is being_homeomorphism;
    hence
A4: dom f = [#]S & rng f = [#]T & f is one-to-one;
    let P be Subset of S;
A5: f"(f.:P) c= P & P c= f"(f.:P) by A4,FUNCT_1:76,82;
A6: f/" is continuous by A3;
    hereby
      assume
A7:   P is open;
      f is onto by A4;
      then (f/")"P = ((f qua Function)")"P by A4,TOPS_2:def 4
        .= f.:P by A4,FUNCT_1:84;
      hence f.:P is open by A2,A6,A7,TOPS_2:43;
    end;
    assume
A8: f.:P is open;
    f is continuous by A3;
    then f"(f.:P) is open by A1,A8,TOPS_2:43;
    hence P is open by A5,XBOOLE_0:def 10;
  end;
  assume that
A9: dom f = [#]S and
A10: rng f = [#]T and
A11: f is one-to-one and
A12: for P being Subset of S holds P is open iff f.:P is open;
  now
    let B be Subset of T such that
A13: B is open;
    B = f.:f"B by A10,FUNCT_1:77;
    hence f"B is open by A12,A13;
  end;
  then
A14: f is continuous by A1,TOPS_2:43;
  now
    let B be Subset of S such that
A15: B is open;
     f is onto by A10;
     then (f/")"B = ((f qua Function)")"B by A11,TOPS_2:def 4
      .= f.:B by A11,FUNCT_1:84;
    hence f/""B is open by A12,A15;
  end;
  then f/" is continuous by A2,TOPS_2:43;
  hence thesis by A9,A10,A11,A14;
end;
