reserve i, x, I for set,
  A, B, M for ManySortedSet of I,
  f, f1 for Function;
reserve SF, SG for SubsetFamily of M;
reserve E, T for Element of Bool M;
reserve g, h for SetOp of M;

theorem :: CLOSURE:23
  g is idempotent & h is idempotent & g*h = h*g implies g * h is idempotent
proof
  assume that
A1: g is idempotent and
A2: h is idempotent and
A3: g*h = h*g;
  let X be Element of Bool M;
A4: dom g = Bool M by FUNCT_2:def 1;
A5: dom h = Bool M by FUNCT_2:def 1;
  hence (g*h).X = g.(h.X) by FUNCT_1:13
    .= g.(h.(h.X)) by A2
    .= g.(g.(h.(h.X))) by A1
    .= g.((h*g).(h.X)) by A3,A5,FUNCT_1:13
    .= g.(h.(g.(h.X))) by A4,FUNCT_1:13
    .= g.(h.((g*h).X)) by A5,FUNCT_1:13
    .= (g*h).((g*h).X) by A5,FUNCT_1:13;
end;
