Michael Cohen, a former personal lawyer to Donald Trump, said in court papers unsealed Friday that he had accidentally given his lawyers fictitious legal citations generated by an artificial intelligence program — an admission that could undermine his credibility when he testifies against his former boss.