The original plan was also one that everyone rejected from the beginning — Mr. Trump even criticized public-private partnerships, which were key to the plan’s financing — and no new plan has been put forward since.

But Democrats went to the White House for a meeting, intent to play along as if there was a chance.

Ms. Pelosi requested the meeting with Mr. Trump, in part to change the conversation from impeachment to infrastructure and to demonstrate that Democrats want to proceed with a policy agenda, and not merely with investigations of the president.

For Mr. Trump, an infrastructure deal would provide him with a bipartisan achievement he could point to while campaigning.

Democrats arrived on Tuesday with a dozen-member delegation of lawmakers. Mr. Trump was accompanied by Elaine Chao, the transportation secretary, as well as seven White House aides, including his daughter Ivanka Trump, who is also a presidential adviser; Larry Kudlow, the director of the National Economic Council; and Pat Cipollone, the White House counsel.

“I would like to do something,” Mr. Trump told the group, according to a Democratic aide. “It may not be typically Republican.” The president made it clear that he had never supported the public-private partnership model to fund a bill that his aides, like Gary D. Cohn, his former top economic adviser, had pitched. “That was a Gary bill,” he said of his earlier attempt at an infrastructure bill. “That bill was so stupid.”

Meetings between the president and the two Democratic leaders have often taken a surprising turn.

Mr. Trump has conducted supposedly closed-door sessions on live television, or shuttled his guests to the Situation Room for maximum privacy. They, in turn, have surprised him by getting out their versions of what happened as soon as they got to the driveway in front of the White House, where reporters are usually waiting.

In September 2017, for instance, after Mr. Schumer and Ms. Pelosi joined the president for in-house Chinese food, they announced that Mr. Trump had agreed to work on an immigration deal, including protections for thousands of young immigrants from deportation. Mr. Trump was later forced to backtrack from that position.