reserve i, x, I for set,
  A, M for ManySortedSet of I,
  f for Function,
  F for ManySortedFunction of I;
reserve P, R for MSSetOp of M,
  E, T for Element of bool M;
reserve S for 1-sorted;
reserve MS for many-sorted over S;

theorem
  for D being MSClosureSystem of S holds ClOp->ClSys (ClSys->ClOp D) =
  the MSClosureStr of D
proof
  let D be MSClosureSystem of S;
  set M = the Sorts of D, F = the Family of D, I = the carrier of S;
  consider X1 being ManySortedSet of I such that
A1: X1 in bool M by PBOOLE:134;
  F = MSFixPoints (ClSys->ClOp D)
  proof
      let i be object such that
A3:   i in I;
      reconsider f = (ClSys->ClOp D).i as Function of (bool M).i, (bool M).i
      by A3,PBOOLE:def 15;
      reconsider Fi = F.i as non empty set by A3;
      thus F.i c= (MSFixPoints (ClSys->ClOp D)).i
       proof
      let x be object such that
A4:   x in F.i;
      reconsider xx=x as set by TARSKI:1;
      dom (X1 +* (i .--> x)) = I by A3,PZFMISC1:1;
      then reconsider X = X1 +* (i .--> x) as ManySortedSet of I by
PARTFUN1:def 2,RELAT_1:def 18;
A5:   dom (i .--> x) = {i};
      F c= bool M by PBOOLE:def 18;
      then
A6:   F.i c= (bool M).i by A3;
      then x in (bool M).i by A4;
      then
A7:   x in dom f by FUNCT_2:def 1;
      i in {i} by TARSKI:def 1;
      then
A8:   X.i = (i .--> x).i by A5,FUNCT_4:13
        .= x by FUNCOP_1:72;
      X is Element of bool M
      proof
        let s be object such that
A9:     s in I;
        per cases;
        suppose
          s = i;
          hence thesis by A4,A8,A6;
        end;
        suppose
          s <> i;
          then not s in dom (i .--> x) by TARSKI:def 1;
          then X.s = X1.s by FUNCT_4:11;
          hence thesis by A1,A9;
        end;
      end;
      then reconsider X as Element of bool M;
      consider SF being non-empty MSSubsetFamily of M such that
A10:  for Y being ManySortedSet of I holds Y in SF iff Y in F & X c= Y by Th31;
      consider Q being Subset-Family of (M.i) such that
A11:  Q = SF.i and
A12:  (meet SF).i = Intersect Q by A3,MSSUBFAM:def 1;
A13:  SF.i = { z where z is Element of Fi : X.i c= z } by A3,A10,Th32;
      now
        let Z1 be set;
        assume Z1 in Q;
        then ex q being Element of Fi st q = Z1 & X.i c= q by A11,A13;
        hence xx c= Z1 by A8;
      end;
      then
A14:  xx c= Intersect Q by A3,A11,MSSUBFAM:5;
      x in { B where B is Element of Fi : xx c= B } by A4;
      then Intersect Q c= xx by A8,A11,A13,MSSUBFAM:2;
      then
A15:  Intersect Q = x by A14,XBOOLE_0:def 10;
      (ClSys->ClOp D)..X = meet SF by A10,Def14;
      then f.x = x by A3,A8,A12,A15,PRALG_1:def 20;
      hence thesis by A3,A7,Def12;
    end;
    let x be object;
    assume
A16: x in (MSFixPoints (ClSys->ClOp D)).i;
    then
A17: ex f being Function st f = (ClSys->ClOp D).i & x in dom f & f.x = x
          by A3,Def12;
    dom (X1 +* (i .--> x)) = I by A3,PZFMISC1:1;
    then reconsider X = X1 +* (i .--> x) as ManySortedSet of I by
PARTFUN1:def 2,RELAT_1:def 18;
A18: dom (i .--> x) = {i};
    i in {i} by TARSKI:def 1;
    then
A19: X.i = (i .--> x).i by A18,FUNCT_4:13
      .= x by FUNCOP_1:72;
    MSFixPoints (ClSys->ClOp D) c= bool M by PBOOLE:def 18;
    then
A20: (MSFixPoints (ClSys->ClOp D)).i c= (bool M).i by A3;
    X is Element of bool M
    proof
      let s be object such that
A21:  s in I;
      per cases;
      suppose
        s = i;
        hence thesis by A16,A19,A20;
      end;
      suppose
        s <> i;
        then not s in dom (i .--> x) by TARSKI:def 1;
        then X.s = X1.s by FUNCT_4:11;
        hence thesis by A1,A21;
      end;
    end;
    then reconsider X as Element of bool M;
    defpred P[ManySortedSet of I] means X c= $1;
    consider SF being non-empty MSSubsetFamily of M such that
A22: for Y being ManySortedSet of I holds Y in SF iff Y in F & X c= Y by Th31;
    (for Y being ManySortedSet of I holds Y in SF iff Y in F & P[Y])
    implies SF c= F from MSSUBSET;
    then
A24: meet SF in F by A22,MSSUBFAM:def 5;
    (meet SF).i = ((ClSys->ClOp D)..X).i by A22,Def14
      .= x by A3,A17,A19,PRALG_1:def 20;
    hence thesis by A3,A24;
  end;
  hence thesis by Def13;
end;
