reserve f,g,h for Function,
  A for set;
reserve F for Function,
  B,x,y,y1,y2,z for set;
reserve x,z for object;
reserve X for non empty set,
  Y for set,
  F for BinOp of X,
  f,g,h for Function of Y,X,
  x,x1,x2 for Element of X;
reserve Y for non empty set,
  F for BinOp of X,
  f,g,h for Function of Y,X,
  x,x1,x2 for Element of X;
reserve Y for set,
  F for BinOp of X,
  f,g,h for Function of Y,X,
  x,x1,x2 for Element of X;
reserve Y for non empty set,
  F for BinOp of X,
  f,g,h for Function of Y,X,
  x,x1,x2 for Element of X;
reserve Y for set,
  F for BinOp of X,
  f,g,h for Function of Y,X,
  x,x1,x2 for Element of X;
reserve Y for non empty set,
  F for BinOp of X,
  f,g,h for Function of Y,X,
  x,x1,x2 for Element of X;
reserve Y for set,
  F for BinOp of X,
  f,g,h for Function
  of Y,X,
  x,x1,x2 for Element of X;
reserve y for Element of Y;

theorem
  F is idempotent implies F.:(f,f) = f
proof
  assume
A1: F is idempotent;
  per cases;
  suppose
A2: Y = {};
    hence F.:(f,f) = {}
      .= f by A2;
  end;
  suppose
A3: Y <> {};
    now
      let y;
      reconsider x = f.y as Element of X by A3,FUNCT_2:5;
      thus f.y = F.(x,x) by A1
        .= F.(f.y,f.y);
    end;
    hence thesis by A3,Th38;
  end;
end;
