Residue identities