reserve I for non empty set;
reserve M for ManySortedSet of I;
reserve Y,x,y,y1,i,j for set;
reserve k for Element of NAT;
reserve p for FinSequence;
reserve S for non void non empty ManySortedSign;
reserve A for non-empty MSAlgebra over S;

theorem
  for X be Subset of CongrLatt A holds "\/" (X,EqRelLatt the Sorts of A)
  = "\/" ({ "\/" (X0,EqRelLatt the Sorts of A) where X0 is Subset of EqRelLatt
  the Sorts of A : X0 is finite Subset of X },EqRelLatt the Sorts of A)
proof
  let X be Subset of CongrLatt A;
  set E = EqRelLatt the Sorts of A;
  set X1 = { X0 where X0 is Subset of E : X0 is finite Subset of X };
  set B1 = { "\/"Y where Y is Subset of E : Y in X1 };
  set B2 = { "\/" (X0,EqRelLatt the Sorts of A) where X0 is Subset of E : X0
  is finite Subset of X };
A1: B2 c= B1
  proof
    let x be object;
    assume x in B2;
    then consider Y1 be Subset of E such that
A2: x = "\/" Y1 and
A3: Y1 is finite Subset of X;
    Y1 in X1 by A3;
    hence thesis by A2;
  end;
A4: X c= union X1
  proof
    let x be object;
    assume
A5: x in X;
    then reconsider x9 = x as Element of CongrLatt A;
    the carrier of CongrLatt A c= the carrier of E by NAT_LAT:def 12;
    then reconsider x9 as Element of E;
    {x9} is finite Subset of X by A5,SUBSET_1:41;
    then x in {x} & {x9} in X1 by TARSKI:def 1;
    hence thesis by TARSKI:def 4;
  end;
  union X1 c= X
  proof
    let x be object;
    assume x in union X1;
    then consider Y1 be set such that
A6: x in Y1 and
A7: Y1 in X1 by TARSKI:def 4;
    ex Y2 be Subset of E st Y1 = Y2 & Y2 is finite Subset of X by A7;
    hence thesis by A6;
  end;
  then
A8: X = union X1 by A4;
  now
    let i be object;
    assume i in X1;
    then ex I1 be Subset of E st i = I1 & I1 is finite Subset of X;
    hence i in bool the carrier of E;
  end;
  then
A9: X1 c= bool the carrier of E;
  B1 c= B2
  proof
    let x be object;
    assume x in B1;
    then consider Y1 be Subset of E such that
A10: x = "\/" Y1 and
A11: Y1 in X1;
    ex Y2 be Subset of E st Y1 = Y2 & Y2 is finite Subset of X by A11;
    hence thesis by A10;
  end;
  then B1 = B2 by A1;
  hence thesis by A9,A8,LATTICE3:48;
end;
