Planet–Disk Interaction in Disks with Cooling: Basic Theory