reserve R for non empty RelStr,
  N for net of R,
  i for Element of N;

theorem Th39: :: 1.7. Lemma
  for L being complete non empty Poset
  st Scott-Convergence L is (ITERATED_LIMITS) holds L is continuous
proof
  let L be complete non empty Poset such that
A1: Scott-Convergence L is (ITERATED_LIMITS);
  set C = Scott-Convergence L;
  now
    let I be non empty set such that
A2: I in the_universe_of the carrier of L;
    let K be non-empty ManySortedSet of I such that
A3: for j being Element of I holds K.j in the_universe_of the carrier of L;
    let F be DoubleIndexedSet of K, L such that
A4: for j being Element of I holds rng(F.j) is directed;
    set x = Inf Sups F;
A5: x >= Sup Infs Frege F by WAYBEL_5:16;
    [:I,I:] c= [:I,I:];
    then reconsider r = [:I,I:] as Relation of I;
    dom F = I by PARTFUN1:def 2;
    then reconsider f = Sups F as Function of I, the carrier of L;
    set X = NetStr(#I,r,f#);
A6: for i,j being Element of X holds i <= j
    proof
      let i,j be Element of X;
      [i,j] in the InternalRel of X by ZFMISC_1:87;
      hence thesis by ORDERS_2:def 5;
    end;
A7: X is transitive
    by A6;
    X is directed
    proof
      let x,y be Element of X;
      take x;
      thus thesis by A6;
    end;
    then reconsider X = NetStr(#I,r,f#) as strict net of L by A7;
    deffunc F(Element of I) = Net-Str(K.$1,F.$1);
    consider J being ManySortedSet of I such that
A8: for i being Element of I holds J.i = F(i) from PBOOLE:sch 5;
    for i being set st i in the carrier of X holds J.i is net of L
    proof
      let i be set;
      assume i in the carrier of X;
      then reconsider i9 = i as Element of I;
      reconsider rFi = rng(F.i9) as Subset of L;
A9:   rFi is directed by A4;
      J.i9 = Net-Str(K.i9,F.i9) by A8;
      hence thesis by A9,Th20;
    end;
    then reconsider J as net_set of the carrier of X, L by YELLOW_6:24;
A10: for j be set st j in I
    ex R being 1-sorted st R = J.j & K.j = the carrier of R
    proof
      let i be set;
      assume i in I;
      then reconsider i9 = i as Element of I;
      take R = Net-Str(K.i9,F.i9);
      thus R = J.i by A8;
      thus thesis by Def10;
    end;
A11: doms F = K by YELLOW_7:45
      .= Carrier J by A10,PRALG_1:def 15;
A12: dom Frege F = product doms F by PARTFUN1:def 2;
    then
A13: dom Infs Frege F = product doms F by FUNCT_2:def 1;
A14: for i being Element of X holds J.i in NetUniv L
    proof
      let i be Element of X;
      reconsider i9 = i as Element of I;
A15:  J.i = Net-Str(K.i9,F.i9) by A8;
      then reconsider Ji = J.i as strict net of L;
      K.i9 in the_universe_of the carrier of L by A3;
      then the carrier of Ji in the_universe_of the carrier of L by A15,Def10;
      hence thesis by YELLOW_6:def 11;
    end;
A16: for i being Element of X holds [J.i,X.i] in C
    proof
      let i be Element of X;
      reconsider i9 = i as Element of I;
A17:  J.i = Net-Str(K.i9,F.i9) by A8;
      then reconsider Ji = J.i as monotone reflexive net of L;
A18:  J.i in NetUniv L by A14;
      i in I;
      then i9 in dom F by PARTFUN1:def 2;
      then X.i = Sup(F.i9) by WAYBEL_5:def 1
        .= Sup the mapping of Ji by A17,Def10
        .= sup Ji by WAYBEL_2:def 1
        .= lim_inf Ji by Th22;
      then X.i is_S-limit_of J.i;
      hence thesis by A17,A18,Def8;
    end;
A19: X in NetUniv L by A2,YELLOW_6:def 11;
    then
A20: Iterated J in NetUniv L by A14,YELLOW_6:25;
    deffunc I(Element of Iterated J) =
    {(Iterated J).p where p is Element of Iterated J :p >= $1};
    the carrier of Iterated J = [:the carrier of X, product Carrier J:]
    by YELLOW_6:26;
    then reconsider G = the mapping of Iterated J as
    Function of [:the carrier of X, product doms F:], the carrier of L by A11;
    deffunc I(Element of X, Element of product doms F) =
    {G.(i,$2) where i is Element of X :i >= $1};
    deffunc F(Element of product doms F) = "/\"(rng((Frege F).$1),L);
    deffunc F(Element of X, Element of product doms F) = "/\"(I($1,$2),L);
    set D = the set of all "/\"(I(j),L) where j is Element of Iterated J;
    set D9 = {F(i,g) where i is Element of X,
    g is Element of product doms F: P[g]};
    set E9 = {F(g) where g is Element of product doms F : P[g]};
A21: for i being Element of X, g being Element of product doms F
    holds F(g) = F(i,g)
    proof
      let j be Element of X, g be Element of product doms F;
      for y being object holds y in I(j,g) iff
      ex x being object st x in dom((Frege F).g) & y = ((Frege F).g).x
      proof
        let y be object;
        g in product Carrier J by A11;
        then
A22:    g in the carrier of product J by YELLOW_1:def 4;
        hereby
          assume y in I(j,g);
          then consider i being Element of X such that
A23:      y =G.(i,g) and i >= j;
          reconsider x = i as object;
          take x;
          reconsider i9 = i as Element of I;
A24:      i in I;
          then
A25:      i9 in dom F by PARTFUN1:def 2;
          thus x in dom((Frege F).g) by A24,PARTFUN1:def 2;
          thus ((Frege F).g).x = F.i9.(g.i) by A12,A25,WAYBEL_5:9
            .= (the mapping of Net-Str(K.i9,F.i9)).(g.i) by Def10
            .= (the mapping of J.i).(g.i) by A8
            .= y by A22,A23,YELLOW_6:def 13;
        end;
        given x being object such that
A26:    x in dom((Frege F).g) and
A27:    y = ((Frege F).g).x;
A28:    x in dom F by A12,A26,WAYBEL_5:8;
        reconsider i9 = x as Element of I by A26;
        reconsider i = i9 as Element of X;
A29:    i >= j by A6;
        y = (F.x).(g.x) by A12,A27,A28,WAYBEL_5:9
          .= (the mapping of Net-Str(K.i9,F.i9)).(g.i) by Def10
          .= (the mapping of J.i).(g.i) by A8
          .= G.(i,g) by A22,YELLOW_6:def 13;
        hence thesis by A29;
      end;
      hence thesis by FUNCT_1:def 3;
    end;
A30: D = D9
    proof
A31:  the carrier of Iterated J = [:the carrier of X, product Carrier J:]
      by YELLOW_6:26;
A32:  for p being Element of Iterated J, i being Element of X,
      g being Element of product doms F st p = [i,g]
      holds "/\"(I(p),L) = "/\"(I(i,g),L)
      proof
        let p be Element of Iterated J, i be Element of X,
        g be Element of product doms F such that
A33:    p = [i,g];
A34:    the RelStr of Iterated J= the RelStr of [:X, product J:]
        by YELLOW_6:def 13;
        reconsider g9 = g as Element of product J by A11,YELLOW_1:def 4;
        g9 in the carrier of product J;
        then
A35:    g9 in product Carrier J by YELLOW_1:def 4;
        reconsider i9 = i as Element of X;
        for i be object st i in the carrier of X
        ex R being RelStr, xi,yi being Element of R
        st R = J.i & xi = g9.i & yi = g9.i & xi <= yi
        proof
          let i be object;
          assume i in the carrier of X;
          then reconsider ii = i as Element of X;
          reconsider i9 = ii as Element of I;
A36:      J.i = Net-Str(K.i9,F.i9) by A8;
          set R = Net-Str(K.i9,F.i9);
          g9.ii in the carrier of R by A36;
          then reconsider x = g9.i as Element of R;
          take R,x,x;
          x <= x;
          hence thesis by A8;
        end;
        then
A37:    g9 <= g9 by A35,YELLOW_1:def 4;
        I(i,g) c= I(p)
        proof
          let u be object;
          assume u in I(i,g);
          then consider j being Element of X such that
A38:      u = (the mapping of Iterated J).(j,g) and
A39:      j >= i;
          reconsider j9 = j as Element of X;
          reconsider q = [j,g] as Element of Iterated J by A11,YELLOW_6:26;
          [j9,g9] >= [i9,g9] by A37,A39,YELLOW_3:11;
          then
A40:      q >= p by A33,A34,Lm1;
          u = (Iterated J).q by A38;
          hence thesis by A40;
        end;
        then
A41:    "/\"(I(p),L) <= "/\"(I(i,g),L) by WAYBEL_7:1;
        defpred P[Element of X] means $1 >= i;
        deffunc F(Element of X) = G.($1,g);
        {F(k) where k is Element of X: P[k]}
        is Subset of L from DOMAIN_1:sch 8;
        then reconsider A = I(i,g) as Subset of L;
        defpred P[Element of Iterated J] means $1 >= p;
        deffunc F(Element of Iterated J) = (Iterated J).$1;
        {F(z) where z is Element of Iterated J: P[z]}
        is Subset of L from DOMAIN_1:sch 8;
        then reconsider B = I(p) as Subset of L;
        B is_coarser_than A
        proof
          let b be Element of L;
          assume b in B;
          then consider q being Element of Iterated J such that
A42:      b = (Iterated J).q and
A43:      p <= q;
          consider k being Element of X,
          f being Element of product Carrier J such that
A44:      q = [k,f] by A31,DOMAIN_1:1;
          reconsider k9 = k as Element of X;
          set a = (the mapping of Iterated J).(k,g);
          a = G.(k,g);
          then reconsider a as Element of L;
          take a;
          reconsider f9 = f as Element of product J by YELLOW_1:def 4;
A45:      [k9,f9] >= [i9,g9] by A33,A34,A43,A44,Lm1;
          then i <= k by YELLOW_3:11;
          hence a in A;
          reconsider k9 = k as Element of I;
          set N = Net-Str(K.k9,F.k9);
A46:      J.k = N by A8;
          reconsider g9k =g9.k, f9k = f9.k as Element of N by A8;
A47:      b = N.(f9k) by A42,A44,A46,YELLOW_6:27;
          reconsider kg = [k,g] as Element of Iterated J by A11,YELLOW_6:26;
A48:      a = (Iterated J).kg .= N.(g9k) by A46,YELLOW_6:27;
          g9 <= f9 by A45,YELLOW_3:11;
          then g9.k <= f9.k by WAYBEL_3:28;
          hence a <= b by A46,A47,A48,Def10;
        end;
        then "/\"(I(i,g),L) <= "/\"(I(p),L) by Th1;
        hence thesis by A41,YELLOW_0:def 3;
      end;
      thus D c= D9
      proof
        let e be object;
        assume e in D;
        then consider p being Element of Iterated J such that
A49:    e = "/\"(I(p),L);
        consider j being Element of X,
        g being Element of product doms F such that
A50:    p = [j,g] by A11,A31,DOMAIN_1:1;
        e = "/\"(I(j,g),L) by A32,A49,A50;
        hence thesis;
      end;
      let e be object;
      assume e in D9;
      then consider i being Element of X,
      g being Element of product doms F such that
A51:  e = "/\"(I(i,g),L);
      reconsider j = [i,g] as Element of Iterated J by A11,YELLOW_6:26;
      e = "/\"(I(j),L) by A32,A51;
      hence thesis;
    end;
A52: E9 = D9 from Irrel(A21); :: UWAGA!!! wrazliwy na strony rownosci
    for y being object holds y in E9 iff
    ex x being object st x in dom(Infs Frege F) & y = (Infs Frege F).x
    proof
      let y be object;
      thus y in E9 implies
      ex x being object st x in dom(Infs Frege F) & y = (Infs Frege F).x
      proof
        assume y in E9;
        then consider g being Element of product doms F such that
A53:    y = "/\"(rng((Frege F).g),L);
        take g;
        thus
A54:    g in dom(Infs Frege F) by A13;
        thus y = //\((Frege F).g, L) by A53,YELLOW_2:def 6
          .= (Infs Frege F).g by A54,WAYBEL_5:def 2;
      end;
      given x being object such that
A55:  x in dom(Infs Frege F) and
A56:  y = (Infs Frege F).x;
      reconsider x as Element of product doms F by A55,PARTFUN1:def 2;
      y = //\((Frege F).x, L) by A55,A56,WAYBEL_5:def 2
        .= "/\"(rng((Frege F).x),L) by YELLOW_2:def 6;
      hence thesis;
    end;
    then rng Infs Frege F = E9 by FUNCT_1:def 3;
    then
A57: Sup Infs Frege F = lim_inf Iterated J by A30,A52,YELLOW_2:def 5;
    reconsider x9 = x as Element of L;
    set X1 = the set of all x where j9 is Element of X;
    set X2 = the set of all "/\"({X.i where i is Element of X:i >= j},L)
    where j is Element of X;
A58: X2 = X1
    proof
A59:  for j being Element of X holds
      x = "/\"({X.i where i is Element of X:i >= j},L)
      proof
        let j be Element of X;
        set X3 = {X.i where i is Element of X:i >= j};
        for e being object holds e in X3 iff
        ex u being object st u in dom Sups F & e = (Sups F).u
        proof
          let e be object;
          hereby
            assume e in X3;
            then consider i being Element of X such that
A60:        e = X.i and i >= j;
            reconsider u = i as object;
            take u;
            u in I;
            hence u in dom Sups F by FUNCT_2:def 1;
            thus e = (Sups F).u by A60;
          end;
          given u being object such that
A61:      u in dom Sups F and
A62:      e = (Sups F).u;
          reconsider i = u as Element of X by A61,FUNCT_2:def 1;
A63:      i >= j by A6;
          e = X.i by A62;
          hence thesis by A63;
        end;
        then rng Sups F = X3 by FUNCT_1:def 3;
        hence thesis by YELLOW_2:def 6;
      end;
      thus X2 c= X1
      proof
        let u be object;
        assume u in X2;
        then ex j being Element of X st ( u = "/\"({X.i where i is
        Element of X:i >= j},L));
        then u = x by A59;
        hence thesis;
      end;
      let u be object;
      set j = the Element of X;
      assume u in X1;
      then ex j being Element of X st u = x;
      then u = "/\"({X.i where i is Element of X:i >= j},L) by A59;
      hence thesis;
    end;
    now
      let u be object;
      u in X1 iff ex j9 being Element of X st u = x;
      then u in X1 iff u = x;
      hence u in X1 iff u in {x} by TARSKI:def 1;
    end;
    then "\/"(X2,L) = sup {x9} by A58,TARSKI:2
      .= x by YELLOW_0:39;
    then x <= lim_inf X;
    then x is_S-limit_of X;
    then [X,x] in C by A19,Def8;
    then [Iterated J,x] in C by A1,A16;
    then x is_S-limit_of Iterated J by A20,Def8;
    then x <= Sup Infs Frege F by A57;
    hence x = Sup Infs Frege F by A5,ORDERS_2:2;
  end;
  hence thesis by WAYBEL_5:18;
end;
