reserve x,y,z for set;
reserve Q for left-distributive right-distributive complete Lattice-like non
  empty QuantaleStr,
  a, b, c, d for Element of Q;
reserve Q for Quantale,
  a,a9,b,b9,c,d,d1,d2,D for Element of Q;
reserve Q for Girard-Quantale,
  a,a1,a2,b,b1,b2,c,d for Element of Q,
  X for set;

theorem
  for Q being Quantale for j being UnOp of Q st j is monotone idempotent
\/-distributive ex L being complete Lattice st the carrier of L = rng j & for X
  being Subset of L holds "\/"X = j."\/"(X,Q)
proof
  let Q be Quantale, j be UnOp of Q;
  assume
A1: j is monotone idempotent \/-distributive;
  reconsider D = rng j as non empty Subset of Q;
  dom j = carr(Q) by FUNCT_2:def 1;
  then reconsider j9 = j as Function of carr(Q), D by RELSET_1:4;
  deffunc F(Subset of D) = j9."\/"($1,Q);
  consider f being Function of bool D, D such that
A2: for X being Subset of D holds f.X = F(X) from FUNCT_2:sch 4;
A3: dom f = bool D by FUNCT_2:def 1;
A4: for X being Subset-Family of D holds f.(f.:X) = f.(union X)
  proof
    let X be Subset-Family of D;
    set A = {j.a where a is Element of Q: a in f.:X};
    set B = {j.b where b is Element of Q: b in union X};
    reconsider Y = f.:X, X9 = union X as Subset of Q by XBOOLE_1:1;
    now
      let a be Element of Q;
      assume a in B;
      then consider b9 being Element of Q such that
A5:   a = j.b9 and
A6:   b9 in union X;
      consider Y being set such that
A7:   b9 in Y and
A8:   Y in X by A6,TARSKI:def 4;
      reconsider Y as Subset of D by A8;
A9:   b9 [= "\/"(Y,Q) by A7,LATTICE3:38;
      take b = j."\/"(Y,Q);
      b = f.Y by A2;
      then
A10:  b in f.:X by A3,A8,FUNCT_1:def 6;
      j.b = b by A1,Lm1;
      hence a [= b & b in A by A1,A5,A10,A9;
    end;
    then
A11: "\/"(B, Q) [= "\/"(A, Q) by LATTICE3:47;
    A is_less_than "\/"(B, Q)
    proof
      let a be Element of Q;
      assume a in A;
      then consider a9 being Element of Q such that
A12:  a = j.a9 and
A13:  a9 in f.:X;
      consider x being object such that
A14:  x in dom f and
A15:  x in X and
A16:  a9 = f.x by A13,FUNCT_1:def 6;
      reconsider x as Subset of D by A14;
      reconsider Y = x as Subset of Q by XBOOLE_1:1;
A17:  {j.b where b is Element of Q: b in Y} c= B
      proof
        let z be object;
        assume z in {j.b where b is Element of Q: b in Y};
        then consider b being Element of Q such that
A18:    z = j.b and
A19:    b in Y;
        b in union X by A15,A19,TARSKI:def 4;
        hence thesis by A18;
      end;
      a9 = j."\/"Y by A2,A16;
      then a9 = "\/" ({j.b where b is Element of Q: b in Y}, Q) by A1,Th10;
      then a9 [= "\/"(B, Q) by A17,LATTICE3:45;
      then a [= j."\/"(B, Q) by A1,A12;
      then a [= j.(j."\/"X9) by A1,Th10;
      then a [= j."\/"X9 by A1,Lm1;
      hence thesis by A1,Th10;
    end;
    then
A20: "\/"(A, Q) [= "\/"(B, Q) by LATTICE3:def 21;
    thus f.(f.:X) = j."\/"Y by A2
      .= "\/"(A, Q) by A1,Th10
      .= "\/"(B, Q) by A20,A11,LATTICES:8
      .= j."\/"X9 by A1,Th10
      .= f.union X by A2;
  end;
  for a being Element of D holds f.{a} = a
  proof
    let a be Element of D;
    consider a9 being object such that
A21: a9 in dom j and
A22: a = j.a9 by FUNCT_1:def 3;
    reconsider x = a as Element of Q;
    reconsider x9 = {x} as Subset of Q;
    reconsider a9 as Element of Q by A21;
    thus f.{a} = j."\/"x9 by A2
      .= j.(j.a9) by A22,LATTICE3:42
      .= a by A1,A22,Lm1;
  end;
  then consider L being complete strict Lattice such that
A23: carr(L) = D and
A24: for X being Subset of L holds "\/" X = f.X by A4,LATTICE3:55;
  take L;
  thus carr(L) = rng j by A23;
  let X be Subset of L;
  thus "\/"X = f.X by A24
    .= j."\/"(X,Q) by A2,A23;

end;
