Mathematical foundations of computer science