The president demanded credit for a history that he regards as a sucker’s mistake.