reserve x, y, i for object,
  L for up-complete Semilattice;
reserve L for complete LATTICE,
  a, b, c for Element of L,
  J for non empty set,
  K for non-empty ManySortedSet of J;
reserve J, K, D for non empty set,
  j for Element of J,
  k for Element of K;
reserve J for non empty set,
  K for non-empty ManySortedSet of J;

theorem ::Theorem 2.7 (iii)
  L is continuous implies for S being non empty Poset st ex g being
  Function of L, S st g is infs-preserving directed-sups-preserving & g is onto
  holds S is continuous LATTICE
proof
  assume
A1: L is continuous;
  let S be non empty Poset;
  given g being Function of L, S such that
A2: g is infs-preserving directed-sups-preserving and
A3: g is onto;
  reconsider S9= S as complete LATTICE by A2,A3,Th29;
  for J, K for F being DoubleIndexedSet of K, S9 st for j being Element of
  J holds rng(F.j) is directed holds Inf Sups F = Sup Infs(Frege F)
  proof
    let J, K;
    let F be DoubleIndexedSet of K, S9 such that
A4: for j being Element of J holds rng(F.j) is directed;
    consider d being Function of S, L such that
A5: [g, d] is Galois and
    for t being Element of S holds d.t is_minimum_of g"(uparrow t) by A2,
WAYBEL_1:14;
    reconsider dF = (J => d)**F as DoubleIndexedSet of K, L by Th31;
A6: ex_inf_of (rng Sups dF),L & g preserves_inf_of (rng Sups dF) by A2,
WAYBEL_0:def 32,YELLOW_0:17;
    for t being Element of S holds d.t is_minimum_of g"{t} by A3,A5,WAYBEL_1:22
;
    then
A7: g*d = id S by WAYBEL_1:23;
A8: for f being set st f in dom(Frege dF) holds rng((Frege F).f) = g.:(
    rng((Frege dF).f))
    proof
      let f be set;
      assume
A9:   f in dom(Frege dF);
      then reconsider f as Element of product doms dF;
A10:  dom(Frege dF) = product(doms dF) by PARTFUN1:def 2
        .= product(doms F) by Th32
        .= dom(Frege F) by PARTFUN1:def 2;
A11:  dom((Frege dF).f) = dom dF by A9,Th8
        .= J by PARTFUN1:def 2;
A12:  now
        let i be object;
        assume
A13:    i in J;
        then reconsider j = i as Element of J;
A14:    j in dom F by A13,PARTFUN1:def 2;
A15:    j in dom dF by A13,PARTFUN1:def 2;
        then f.j in dom(dF.j) by A9,Th9;
        then f.j in dom(((J => d).j)*(F.j)) by MSUALG_3:2;
        then
A16:    f.j in dom(d*(F.j));
        (g*((Frege dF).f)).j = g.(((Frege dF).f).j) by A11,FUNCT_1:13
          .= g.((dF.j).(f.j)) by A9,A15,Th9
          .= g.((((J => d).j)*(F.j)).(f.j)) by MSUALG_3:2
          .= g.((d*(F.j)).(f.j))
          .= (g*(d*(F.j))).(f.j) by A16,FUNCT_1:13
          .= ((id the carrier of S)*(F.j)).(f.j) by A7,RELAT_1:36
          .= (F.j).(f.j) by FUNCT_2:17
          .= ((Frege F).f).j by A9,A10,A14,Th9;
        hence (g*((Frege dF).f)).i = ((Frege F).f).i;
      end;
      dom g = the carrier of L by FUNCT_2:def 1;
      then rng((Frege dF).f) c= dom g;
      then
A17:  dom(g*((Frege dF).f)) = dom((Frege dF).f) by RELAT_1:27;
      dom((Frege F).f) = dom F by A9,A10,Th8
        .= J by PARTFUN1:def 2;
      then rng((Frege F).f) = rng(g*((Frege dF).f)) by A11,A17,A12,FUNCT_1:2
        .= g.:(rng((Frege dF).f)) by RELAT_1:127;
      hence thesis;
    end;
A18: rng Infs Frege F c= g.:(rng Infs Frege dF)
    proof
      let y be object;
      assume y in rng Infs Frege F;
      then consider f being object such that
A19:  f in dom(Frege F) and
A20:  y = //\((Frege F).f, S) by Th13;
      reconsider f as Element of product doms F by A19;
      reconsider f9= f as Element of product doms dF by Th32;
      set X = rng((Frege dF).f9);
A21:  g preserves_inf_of X & ex_inf_of X,L by A2,WAYBEL_0:def 32,YELLOW_0:17;
A22:  dom(Frege dF) = product(doms dF) by PARTFUN1:def 2
        .= product(doms F) by Th32
        .= dom(Frege F) by PARTFUN1:def 2;
      then rng((Frege F).f) = g.:(rng((Frege dF).f)) by A8,A19;
      then y = "/\"(g.:(rng((Frege dF).f)), S) by A20,YELLOW_2:def 6;
      then
A23:  y = g.inf X by A21,WAYBEL_0:def 30
        .= g.Inf((Frege dF).f9) by YELLOW_2:def 6;
      Inf((Frege dF).f9) in rng Infs Frege dF by A19,A22,Th13;
      hence thesis by A23,FUNCT_2:35;
    end;
A24: g.:(rng Infs Frege dF) c= rng Infs Frege F
    proof
      let y be object;
      assume y in g.:(rng Infs Frege dF);
      then consider x being object such that
      x in the carrier of L and
A25:  x in rng Infs Frege dF and
A26:  y = g.x by FUNCT_2:64;
      consider f being object such that
A27:  f in dom(Frege dF) and
A28:  x = //\((Frege dF).f, L) by A25,Th13;
      reconsider f as Element of product doms dF by A27;
      set X = rng((Frege dF).f);
      g preserves_inf_of X & ex_inf_of X,L by A2,WAYBEL_0:def 32,YELLOW_0:17;
      then inf(g.:X) = g.inf X by WAYBEL_0:def 30;
      then
A29:  y = inf(g.:X) by A26,A28,YELLOW_2:def 6;
A30:  dom(Frege dF) = product(doms dF) by PARTFUN1:def 2
        .= product(doms F) by Th32
        .= dom(Frege F) by PARTFUN1:def 2;
      reconsider f9= f as Element of product doms F by Th32;
      rng((Frege F).f) = g.:(rng((Frege dF).f)) by A8,A27;
      then y = Inf((Frege F).f9) by A29,YELLOW_2:def 6;
      hence thesis by A27,A30,Th13;
    end;
A31: d is monotone by A5,WAYBEL_1:8;
A32: for j being Element of J holds rng(dF.j) is directed
    proof
      let j be Element of J;
      (J => d).j = d;
      then
A33:  rng(dF.j) = rng(d*(F.j)) by MSUALG_3:2
        .= d.:(rng(F.j)) by RELAT_1:127;
      rng(F.j) is directed by A4;
      hence thesis by A31,A33,YELLOW_2:15;
    end;
    then rng Infs Frege dF is directed non empty by Th27;
    then
A34: g preserves_sup_of rng Infs Frege dF by A2,WAYBEL_0:def 37;
    reconsider gdF = (J => g)**dF as DoubleIndexedSet of K, S;
A35: ex_sup_of rng Infs Frege dF,L by YELLOW_0:17;
A36: rng Sups gdF c= g.:(rng Sups dF)
    proof
      let y be object;
      assume y in rng Sups gdF;
      then consider j being Element of J such that
A37:  y = Sup(gdF.j) by Th14;
      gdF.j = ((J => g).j)*(dF.j) by MSUALG_3:2
        .= g*(dF.j);
      then rng(gdF.j) = g.:(rng(dF.j)) by RELAT_1:127;
      then
A38:  y = sup(g.:(rng(dF.j))) by A37,YELLOW_2:def 5;
      rng(dF.j) is directed by A32;
      then
A39:  g preserves_sup_of rng(dF.j) by A2,WAYBEL_0:def 37;
      ex_sup_of rng(dF.j),L by YELLOW_0:17;
      then sup(g.:(rng(dF.j))) = g.sup(rng(dF.j)) by A39,WAYBEL_0:def 31;
      then
A40:  y = g.Sup(dF.j) by A38,YELLOW_2:def 5;
      Sup(dF.j) in rng Sups dF by Th14;
      hence thesis by A40,FUNCT_2:35;
    end;
A41: g.:(rng Sups dF) c= rng Sups gdF
    proof
      let y be object;
      assume y in g.:(rng Sups dF);
      then consider x being object such that
      x in the carrier of L and
A42:  x in rng Sups dF and
A43:  y = g.x by FUNCT_2:64;
      consider j being Element of J such that
A44:  x = Sup(dF.j) by A42,Th14;
      rng(dF.j) is directed by A32;
      then
A45:  g preserves_sup_of rng(dF.j) by A2,WAYBEL_0:def 37;
      ex_sup_of rng(dF.j),L by YELLOW_0:17;
      then sup(g.:(rng(dF.j))) = g.sup(rng(dF.j)) by A45,WAYBEL_0:def 31;
      then
A46:  y = sup(g.:(rng(dF.j))) by A43,A44,YELLOW_2:def 5;
      gdF.j = ((J => g).j)*(dF.j) by MSUALG_3:2
        .= g*(dF.j);
      then rng(gdF.j) = g.:(rng(dF.j)) by RELAT_1:127;
      then y = Sup(gdF.j) by A46,YELLOW_2:def 5;
      hence thesis by Th14;
    end;
    F = (id (J --> the carrier of S))**F by MSUALG_3:4
      .= ((J --> g)**(J --> d))**F by A7,Th30
      .= gdF by PBOOLE:140;
    then Inf Sups F = inf rng Sups gdF by YELLOW_2:def 6
      .= inf (g.:(rng Sups dF)) by A36,A41,XBOOLE_0:def 10
      .= g.(inf rng Sups dF) by A6,WAYBEL_0:def 30
      .= g.(Inf Sups dF) by YELLOW_2:def 6
      .= g.(Sup Infs Frege dF) by A1,A32,Lm8
      .= g.(sup rng Infs Frege dF) by YELLOW_2:def 5
      .= sup(g.:(rng Infs Frege dF)) by A34,A35,WAYBEL_0:def 31
      .= sup rng Infs Frege F by A24,A18,XBOOLE_0:def 10
      .= Sup Infs Frege F by YELLOW_2:def 5;
    hence thesis;
  end;
  hence thesis by Lm9;
end;
