reserve x,y for object,
  f for Function;

theorem Th40:
  for X,Y being non empty TopSpace for S being Scott
TopAugmentation of InclPoset the topology of Y for f being Function of X, S st
  *graph f is open Subset of [:X,Y:] holds f is continuous
proof
  let X,Y be non empty TopSpace;
  let S be Scott TopAugmentation of InclPoset the topology of Y;
  let f be Function of X, S;
A1: the RelStr of S = the RelStr of InclPoset the topology of Y by
YELLOW_9:def 4;
A2: dom f = the carrier of X by FUNCT_2:def 1;
  assume *graph f is open Subset of [:X,Y:];
  then consider AA being Subset-Family of [:X,Y:] such that
A3: *graph f = union AA and
A4: for e being set st e in AA ex X1 being Subset of X, Y1 being Subset
  of Y st e = [:X1,Y1:] & X1 is open & Y1 is open by BORSUK_1:5;
A5: the carrier of InclPoset the topology of Y = the topology of Y by
YELLOW_1:1;
A6: now
    let P be Subset of S;
    assume
A7: P is open;
    now
      let x be set;
      hereby
        defpred P[object,object] means
         x in $2`1 & $1 in $2`2 & [:$2`1,$2`2:] c= *graph f;
        assume
A8:     x in f"P;
        then reconsider y = x as Element of X;
A9:     now
          let e be object;
          assume e in f.x;
          then [x,e] in *graph f by A2,A8,Th38;
          then consider V being set such that
A10:      [x,e] in V and
A11:      V in AA by A3,TARSKI:def 4;
          consider A being Subset of X, B being Subset of Y such that
A12:      V = [:A,B:] and
A13:      A is open & B is open by A4,A11;
          reconsider u = [A,B] as object;
          take u;
          A in the topology of X & B in the topology of Y by A13,PRE_TOPC:def 2
;
          hence u in [:the topology of X, the topology of Y:] by ZFMISC_1:87;
          thus P[e,u] by A3,A10,A11,A12,ZFMISC_1:74,87;
        end;
        consider g being Function such that
A14:    dom g = f.x & rng g c= [:the topology of X, the topology of Y :] and
A15:    for a being object st a in f.x holds P[a,g.a] from FUNCT_1:sch 6(A9);
        set J = {union A where A is Subset of proj2 rng g: A is finite};
A16:    proj2 rng g c= the topology of Y by A14,FUNCT_5:11;
A17:    J c= the topology of Y
        proof
          let x be object;
          assume x in J;
          then consider A being Subset of proj2 rng g such that
A18:      x = union A and
          A is finite;
A19:      A c= the topology of Y by A16;
          then A is Subset-Family of Y by XBOOLE_1:1;
          hence thesis by A18,A19,PRE_TOPC:def 1;
        end;
        {}proj2 rng g in J by ZFMISC_1:2;
        then reconsider
        J as non empty Subset of InclPoset the topology of Y by A17,YELLOW_1:1;
        J is directed
        proof
          let a,b be Element of InclPoset the topology of Y;
          assume a in J;
          then consider A being Subset of proj2 rng g such that
A20:      a = union A and
A21:      A is finite;
          assume b in J;
          then consider B being Subset of proj2 rng g such that
A22:      b = union B and
A23:      B is finite;
          reconsider AB = A \/ B as finite Subset of proj2 rng g by A21,A23;
          take ab = a"\/"b;
A24:      a \/ b = ab by WAYBEL14:18;
          union AB = a \/ b by A20,A22,ZFMISC_1:78;
          hence ab in J by A24;
          a c= ab & b c= ab by A24,XBOOLE_1:7;
          hence thesis by YELLOW_1:3;
        end;
        then reconsider J9 = J as non empty directed Subset of S by A1,
WAYBEL_0:3;
A25:    proj2 rng g c= bool (f.x)
        proof
          let z be object;
           reconsider zz=z as set by TARSKI:1;
          assume z in proj2 rng g;
          then consider z1 being object such that
A26:      [z1,z] in rng g by XTUPLE_0:def 13;
A27:      [z1,z]`1 = z1;
          reconsider zz1=z1 as set by TARSKI:1;
A28:      ex a being object st a in dom g & [z1,z] = g.a by A26,FUNCT_1:def 3;
          then
A29:      x in zz1 by A14,A15,A27;
          [z1,z]`2 = z;
          then
A30:      [:zz1,zz:] c= *graph f by A14,A15,A28,A27;
          zz c= f.x
          proof
            let a be object;
            assume a in zz;
            then [x,a] in [:zz1,zz:] by A29,ZFMISC_1:87;
            hence thesis by A30,Th38;
          end;
          hence thesis;
        end;
        union J = f.y
        proof
          thus union J c= f.y
          proof
            let a be object;
            assume a in union J;
            then consider u being set such that
A31:        a in u and
A32:        u in J by TARSKI:def 4;
            consider A being Subset of proj2 rng g such that
A33:        u = union A and
            A is finite by A32;
            A c= bool (f.y) by A25;
            then u c= union bool (f.y) by A33,ZFMISC_1:77;
            then u c= f.y by ZFMISC_1:81;
            hence thesis by A31;
          end;
          let a be object;
          assume
A34:      a in f.y;
          then
A35:      g.a in rng g by A14,FUNCT_1:def 3;
          then g.a = [(g.a)`1, (g.a)`2] by A14,MCART_1:21;
          then (g.a)`2 in proj2 rng g by A35,XTUPLE_0:def 13;
          then reconsider A = {(g.a)`2} as Subset of proj2 rng g by ZFMISC_1:31
;
          union A = (g.a)`2 by ZFMISC_1:25;
          then
A36:      (g.a)`2 in J;
          a in (g.a)`2 by A15,A34;
          hence thesis by A36,TARSKI:def 4;
        end;
        then sup J = f.y by YELLOW_1:22;
        then
A37:    sup J9 = f.y by A1,YELLOW_0:17,26;
        f.y in the topology of Y by A5,A1;
        then reconsider W = f.y as open Subset of Y by PRE_TOPC:def 2;
A38:    proj1 rng g c= the topology of X by A14,FUNCT_5:11;
        defpred P[object,object] means
         ex c1,d being set st d = $1 & [c1,$1] = g.$2 & x in c1 &
        $2 in d & $2 in f.x & [:c1,d:] c= *graph f;
        f.x in P by A8,FUNCT_2:38;
        then J meets P by A7,A37,WAYBEL11:def 1;
        then consider a being object such that
A39:    a in J and
A40:    a in P by XBOOLE_0:3;
        reconsider a as Element of S by A40;
        consider A being Subset of proj2 rng g such that
A41:    a = union A and
A42:    A is finite by A39;
A43:    now
          let c be object;
          assume c in A;
          then consider c1 being object such that
A44:      [c1,c] in rng g by XTUPLE_0:def 13;
          reconsider cc1=c1 as set by TARSKI:1;
          consider a being object such that
A45:      a in dom g and
A46:      [c1,c] = g.a by A44,FUNCT_1:def 3;
           reconsider cc = c as set by TARSKI:1;
           reconsider a as object;
          take a;
          thus a in W by A14,A45;
A47:      [c1,c]`1 = c1;
          then
A48:      x in cc1 by A14,A15,A45,A46;
A49:      [c1,c]`2 = c;
          then [:cc1,cc:] c= *graph f by A14,A15,A45,A46,A47;
          hence P[c,a] by A14,A15,A45,A46,A49,A48;
        end;
        consider hh being Function such that
A50:    dom hh = A & rng hh c= W and
A51:    for c being object st c in A holds P[c,hh.c] from FUNCT_1:sch 6(A43);
        set B = proj1 (g.:rng hh);
        g.:rng hh c= rng g by RELAT_1:111;
        then B c= proj1 rng g by XTUPLE_0:8;
        then
A52:    B c= the topology of X by A38;
        then reconsider B as Subset-Family of X by XBOOLE_1:1;
        reconsider B as Subset-Family of X;
        reconsider Q = Intersect B as Subset of X;
        take Q;
        g.:rng hh is finite by A42,A50,FINSET_1:5,8;
        then B is finite by Th39;
        then Q in FinMeetCl the topology of X by A52,CANTOR_1:def 3;
        then Q in the topology of X by CANTOR_1:5;
        hence Q is open by PRE_TOPC:def 2;
        thus Q c= f"P
        proof
          let z be object;
          assume
A53:      z in Q;
          then reconsider zz = z as Element of X;
          reconsider fz = f.zz, aa = a as Element of InclPoset the topology of
          Y by A1;
          a c= f.zz
          proof
            let p be object;
            assume p in a;
            then consider q being set such that
A54:        p in q and
A55:        q in A by A41,TARSKI:def 4;
            P[q,hh.q] by A51,A55;
            then consider q1,d being set such that
A56:         d = q and
A57:        [q1,q] = g.(hh.q) and
A58:        hh.q in f.x and
A59:        [:q1,d:] c= *graph f;
            hh.q in rng hh by A50,A55,FUNCT_1:def 3;
            then [q1,q] in g.:rng hh by A14,A57,A58,FUNCT_1:def 6;
            then q1 in B by XTUPLE_0:def 12;
            then zz in q1 by A53,SETFAM_1:43;
            then [zz,p] in [:q1,q:] by A54,ZFMISC_1:87;
            hence thesis by A59,Th38,A56;
          end;
          then aa <= fz by YELLOW_1:3;
          then a <= f.zz by A1,YELLOW_0:1;
          then f.zz in P by A7,A40,WAYBEL_0:def 20;
          hence thesis by FUNCT_2:38;
        end;
        now
          let c1 be set;
          assume c1 in B;
          then consider c being object such that
A60:      [c1,c] in g.:rng hh by XTUPLE_0:def 12;
          consider b being object such that
          b in dom g and
A61:      b in rng hh and
A62:      [c1,c] = g.b by A60,FUNCT_1:def 6;
          consider c9 being object such that
A63:      c9 in dom hh and
A64:      b = hh.c9 by A61,FUNCT_1:def 3;
          ex c91,d being set
           st d =c9 & [c91,c9] = g.(hh.c9) & x in c91 & hh.c9 in
          d & hh.c9 in f.x & [:c91,d:] c= *graph f by A50,A51,A63;
          hence x in c1 by A62,A64,XTUPLE_0:1;
        end;
        hence x in Q by A8,SETFAM_1:43;
      end;
      assume ex Q being Subset of X st Q is open & Q c= f"P & x in Q;
      hence x in f"P;
    end;
    hence f"P is open by TOPS_1:25;
  end;
  [#]S <> {};
  hence thesis by A6,TOPS_2:43;
end;
