The president wrote that if Zohran Mamdani were to win, it would be “highly unlikely” that the city would receive federal funding beyond a bare minimum.