During a face-to-face encounter, she said, prosecutors can refresh a witness’s memory by providing additional details or showing him documents. They can also come to a judgment based on body language.

“I have not dealt with a witness who has claimed not to remember facts as many times as Trump did, but it is impossible to read a witness’s mind to know whether he is telling the truth,” she said. “Trump’s refusal to participate in an interview,” she added, “hampered Mueller’s investigation and contradicts” the assertion by Attorney General William P. Barr that the president had cooperated fully.

But it may have saved him from a worse outcome. Mr. Mueller began asking Mr. Trump for an interview in December 2017 only to be put off for months. The president’s lawyers opposed the idea, worried that Mr. Trump, who has a documented history of making untrue assertions publicly, would testify falsely and walk into what they deemed a perjury trap.

Bowing to the demands of the president’s lawyers, Mr. Mueller agreed to submit written questions, and only about contacts with Russia before Mr. Trump took office, not about potential obstruction of justice once he entered the White House. When the answers came back in November, they were so “incomplete or imprecise,” the report said, that Mr. Mueller complained to the president’s legal team about “the insufficiency of those responses.”

The answers Mr. Trump provided sounded more like lawyer speak than the blunt-talking president’s usual colorful language. They included phrases like “named entities or individuals” and “tangible support” and “no meaningful relationship.”

It may be hard to imagine Mr. Trump saying or writing this: “In the course of preparing to respond to your questions, I have become aware that the campaign documents already produced to you reflect the drafting, evolution and sources of information for the speech I expected to give ‘probably’ on the Monday following my June 7, 2016, comments.”

But if his memory were hazy in many cases, it was crystal clear in at least one instance. Asked about a specific date that June, Mr. Trump noted that he had prevailed in Republican nomination contests in California, New Jersey, New Mexico, Montana and South Dakota that day. “I remember winning those primaries,” he wrote.