reserve I for set;

theorem
  for A, B being ManySortedSet of I, F being ManySortedFunction of A, B
  st F is "onto" holds F.:.:A = B
proof
  let A, B be ManySortedSet of I, F be ManySortedFunction of A, B such that
A1: F is "onto";
  now
    let i be object;
    assume
A2: i in I;
    then
A3: F.i is Function of A.i, B.i by PBOOLE:def 15;
    per cases;
    suppose
   B.i = {} implies A.i = {};
      thus (F.:.:A).i = (F.i).:(A.i) by A2,PBOOLE:def 20
        .= rng (F.i) by A3,RELSET_1:22
        .= B.i by A1,A2;
    end;
    suppose
A4:   not (B.i = {} implies A.i = {});
      then
A5:   F.i = {} by A3;
      thus (F.:.:A).i = (F.i).:(A.i) by A2,PBOOLE:def 20
        .= B.i by A4,A5;
    end;
  end;
  hence thesis;
end;
