
theorem
  for I be set, M be ManySortedSet of I, A be SubsetFamily of M holds
  MSUnion A = union |:A:|
proof
  let I be set, M be ManySortedSet of I, A be SubsetFamily of M;
  set AA = |:A:|;
  reconsider UA = union AA as ManySortedSet of I;
  per cases;
  suppose
A1: A is non empty;
    for i be object st i in I holds (MSUnion A).i = UA.i
    proof
      let i be object;
      assume
A2:   i in I;
      then
      AA.i = { g.i where g is Element of Bool M : g in A } & UA.i = union
      (AA.i) by A1,CLOSURE2:14,MBOOLEAN:def 2;
      hence thesis by A2,Def2;
    end;
    hence thesis;
  end;
  suppose
A3: A is empty SubsetFamily of M;
    for i be object st i in I holds (MSUnion A).i = UA.i
    proof
      let i be object;
      assume i in I;
      AA = EmptyMS I by A3;
      then UA = EmptyMS I by MBOOLEAN:21;
      then UA.i is empty;
      hence thesis by A3;
    end;
    hence thesis;
  end;
end;
