reserve e for set;

theorem Th7:
  for I,J being set, A being ManySortedSet of I, B being
  ManySortedSet of J holds A cc= B & B cc= A implies A = B
proof
  let I,J be set, A be ManySortedSet of I, B be ManySortedSet of J;
  assume that
A1: A cc= B and
A2: B cc= A;
A3: I c= J by A1;
  J c= I by A2;
  then I = J by A3,XBOOLE_0:def 10;
  then reconsider B9 = B as ManySortedSet of I;
  now
    let i be object;
    assume i in I;
    then A.i c= B.i & B.i c= A.i by A1,A2;
    hence A.i = B9.i by XBOOLE_0:def 10;
  end;
  hence thesis by PBOOLE:3;
end;
