reserve I for non empty set;
reserve M for ManySortedSet of I;
reserve Y,x,y,i for set;
reserve r,r1,r2 for Real;

theorem
  Top EqRelLatt M = [|M,M|]
proof
  set K = [|M,M|];
  K is Equivalence_Relation of M by Th2;
  then reconsider K as Element of EqRelLatt M by MSUALG_5:def 5;
  now
    let a be Element of EqRelLatt M;
    reconsider K9 = K, a9 = a as Equivalence_Relation of M by MSUALG_5:def 5;
A1: now
      let i be object;
A2:   ex K1 be ManySortedRelation of M st K1 = K9 (\/) a9 & K9 "\/" a9 = EqCl
      K1 by MSUALG_5:def 4;
      assume
A3:   i in I;
      then reconsider i9 = i as Element of I;
      reconsider K2 = K9.i9, a2 = a9.i9 as Equivalence_Relation of M.i by
MSUALG_4:def 2;
      (K9 (\/) a9).i = K9.i \/ a9.i by A3,PBOOLE:def 4
        .= [:M.i,M.i:] \/ a9.i by A3,PBOOLE:def 16
        .= nabla M.i \/ a2 by EQREL_1:def 1
        .= nabla M.i by EQREL_1:1
        .= [:M.i,M.i:] by EQREL_1:def 1
        .= K9.i by A3,PBOOLE:def 16;
      hence (K9 "\/" a9).i = EqCl K2 by A2,MSUALG_5:def 3
        .= K9.i by MSUALG_5:2;
    end;
    thus K "\/" a = (the L_join of EqRelLatt M).(K,a) by LATTICES:def 1
      .= K9 "\/" a9 by MSUALG_5:def 5
      .= K by A1,PBOOLE:3;
    hence a "\/" K = K;
  end;
  hence thesis by LATTICES:def 17;
end;
