reserve x,y,z,X,Y for set;
reserve X,Y for non empty set,
  f for Function of X,Y;
reserve X, Y for non empty set,
  F for (BinOp of Y),
  B for (Element of Fin X),
  f for Function of X,Y;

theorem
  F is commutative & F is associative & F is idempotent & F is
having_a_unity implies for Z being non empty set for G being BinOp of Z st G is
  commutative & G is associative & G is idempotent & G is having_a_unity for f
  being Function of X, Y for g being Function of Y,Z st g.the_unity_wrt F =
  the_unity_wrt G & for x,y being Element of Y holds g.(F.(x,y)) = G.(g.x,g.y)
  for B being Element of Fin X holds g.(F$$(B,f)) = G$$(B,g*f)
proof
  assume that
A1: F is commutative & F is associative and
A2: F is idempotent and
A3: F is having_a_unity;
  let Z be non empty set;
  let G be BinOp of Z such that
A4: G is commutative & G is associative and
A5: G is idempotent and
A6: G is having_a_unity;
  let f be Function of X, Y;
  let g be Function of Y,Z such that
A7: g.the_unity_wrt F = the_unity_wrt G and
A8: for x,y being Element of Y holds g.(F.(x,y)) = G.(g.x,g.y);
  let B be Element of Fin X;
  per cases;
  suppose
    B = {};
    then
A9: B = {}.X;
    hence g.(F$$(B,f)) = g.the_unity_wrt F by A1,A3,Th28
      .= G$$(B,g*f) by A4,A6,A7,A9,Th28;
  end;
  suppose
    B <> {};
    hence thesis by A1,A2,A4,A5,A8,Th27;
  end;
end;
