Implement pycosat