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 EqRelLatt the Sorts of A holds CongrCl "\/" (X,
  EqRelLatt the Sorts of A) = CongrCl X
proof
  let X be Subset of EqRelLatt the Sorts of A;
  set D1 = {x where x is Element of EqRelLatt the Sorts of A : x is
  MSCongruence of A & "\/" (X,EqRelLatt the Sorts of A) [= x};
  set D2 = {x where x is Element of EqRelLatt the Sorts of A : x is
  MSCongruence of A & X is_less_than x};
A1: D1 c= D2
  proof
    let x1 be object;
    assume x1 in D1;
    then consider x be Element of EqRelLatt the Sorts of A such that
A2: x1 = x & x is MSCongruence of A and
A3: "\/" (X,EqRelLatt the Sorts of A) [= x;
    now
      let q be Element of EqRelLatt the Sorts of A;
A4:   X is_less_than "\/" (X,EqRelLatt the Sorts of A) by LATTICE3:def 21;
      assume q in X;
      then q [= "\/" (X,EqRelLatt the Sorts of A) by A4,LATTICE3:def 17;
      hence q [= x by A3,LATTICES:7;
    end;
    then X is_less_than x by LATTICE3:def 17;
    hence thesis by A2;
  end;
  D2 c= D1
  proof
    let x1 be object;
    assume x1 in D2;
    then consider x be Element of EqRelLatt the Sorts of A such that
A5: x1 = x & x is MSCongruence of A and
A6: X is_less_than x;
    "\/" (X,EqRelLatt the Sorts of A) [= x by A6,LATTICE3:def 21;
    hence thesis by A5;
  end;
  hence thesis by A1,XBOOLE_0:def 10;
end;
