
Logic in Computer Science
by Michael Huth · first published 2000
9mentions
5recommended by
7HN commenters
2008–2025first – last mentioned
71% recommend29% neutral
Why HN recommends it
Covers formal logic and proofs for computer science, with many exercises of varying difficulty. It teaches natural deduction and proof techniques, including intuitionistic logic.
Summarised by Claude from recommending comments
This second edition continues to provide a clear introduction to formal reasoning which is both relevant to the needs of modern computer science and rigorous enough for practical application. Improvements have been made throughout, with many extra and expanded sections and exercises. The coverage of model-checking has been substantially updated.
Affiliate links. As an Amazon Associate I earn from qualifying purchases.




Logic in Computer Science by Huth and Ryan.
on “Ask HN: Introductory Logic Text?” ↗Natural deduction for propositional logic? Simple rules, real math. There are lots of good problems of varying difficulty in Logic in Computer Science by Huth and Ryan. Edit: Perhaps this doesn't qualify as a game per se, but I think it might be a fun activity to work through the proofs together.
on “Mathematical games interesting to both you and a five-year-old child” ↗…try a DIY bootcamp in the spirit of Harvard Math 55. If you are interested in continuous math: * Vector Calculus by Hubbard & Hubbard If you are interested in discrete mathematics and computation: * Logic in Computer Science by Huth & Ryan
on “Ask HN: How do I re-learn maths as a middle-age person?” ↗…maybe not for everybody. But I am not a math major and it appealed to me. https://web.mat.bham.ac.uk/R.W.Kaye/logic (not very helpful, lots of broken links, just look at the book instead) I also like Logic in Computer Science by Huth and Ryan, cited in another comment here. It is much more comprehensive and has a lot more about logic applications in computer science.
on “Ask HN: Introductory Logic Text?” ↗A key subject is Logic. Logic is the Calculus of CS and should be your first stop. I recommend: * Logic for Computer Scientists by Uwe Schoening * Logic in Computer Science by M. Huth and M. Ryan The first one is short, very elegant and doable. The second one is a bit longer, but also at freshman level. There are PDFs circulating on the Internet. Skim through those before…
on “Ask HN: Book recommendations for CS fundamentals for a self-taught programmer?” ↗I suggest you start out with a course or book on formal logic in computer science. In particular doing proofs in intuitionistic logic. You can use a simple proof assistant to verify your proofs and it will help you really understand how proofs are done and how they are just a kind…
on “Ask HN: Books or courses to understand college level mathematics?” ↗Oh yeah Logic in Computer Science: Modeling and Reasoning about Systems by Huth and Ryan. We used this as a textbook in a formal methods class. The book teaches techniques for developing proofs and for specifying and proving properties…
on “Ask HN: Recommended path for self-study math and CS?” ↗…did not use slides but instead wrote everything on a whiteboard. The lecture notes are not public afaik. The lecturer did suggest the following supplementary material: - Michael Huth and Mark Ryan. Logic in Computer Science: Modelling and Reasoning about systems (2nd ed.). Cambridge University Press 2004. (Mainly chapters 1, 2) - Glynn Winskel. The Formal Semantics of Programming Languages: An Introduction, MIT Press 1993.…
on “Propositions as Types (2014) [pdf]” ↗…"Spec and Check!" http://www.cs.cmu.edu/~15819/ I wonder when this course was taught? I like Z but it has gone out of fashion. The course schedule page lists a Mon Jan 10. The most recent textbook, Logic in Computer Science, appeared in 2004. Jan 10 last fell on a Monday in 2011 and 2005, according to https://spu.edu/ddowning/percal.htm
on “Using Z: Specification, Refinement, and Proof [pdf]” ↗