Mathematical foundation of computer science