HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
How to Prove It: A Structured Approach, 2nd Edition

Daniel J. Velleman · 16 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "How to Prove It: A Structured Approach, 2nd Edition" by Daniel J. Velleman.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
Geared to preparing students to make the transition from solving problems to proving theorems, this text teaches them the techniques needed to read and write proofs. The book begins with the basic concepts of logic and set theory, to familiarize students with the language of mathematics and how it is interpreted. These concepts are used as the basis for a step-by-step breakdown of the most important techniques used in constructing proofs. To help students construct their own proofs, this new edition contains over 200 new exercises, selected solutions, and an introduction to Proof Designer software. No background beyond standard high school mathematics is assumed. Previous Edition Hb (1994) 0-521-44116-1 Previous Edition Pb (1994) 0-521-44663-5
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
To clarify:

Velleman wrote "How to Prove It":

Polya wrote "How to Solve It":

Sorry, you are right (I actually have both in front of me... and Beeler's "How to Count"). Polya is also a nice read ;)
On the topic of newcomers to proof-based math - "How to Prove It" is a great resource:
I have seen "How to Prove It" on Hacker News multiple times! I did a similar question about Discrete Math a month ago [1]. Someone also suggested this book. It is on the top of my "to read list". One of my friends says this book is his favorite one. [1]
This book made proof based math approachable for me. There are mechanical aspects to proofs that are probably best practiced in a structured way and this book does that by also acquainting you with set theory.
The last time people asked, I collected the responses so I could do the same thing as you. Note that I'm wanting to learn it in a way where I can do proofs. So, I have general-purpose books and stuff for that. I just ordered the three books I've seen pop up the most. Although 2 are in the mail, Concepts of Modern Mathematics by Stewart just got here yesterday. It had an awesome opening that made me wish the math I was taught in school was done like this back when I went. Makes newer stuff make a lot more sense, too. I included a link to Dover that has a Google Preview button on it where you can read full, first chapter for free to see if it's what you like. Other two are more about exploring and proving things which may or may not interest you. I added them in case anyone is reading your question to learn that stuff.

Concepts of Modern Mathematics by Stewart

Dover Version with Google Preview Button

Introduction to Mathematical Reasoning: Numbers, Sets, and Functions

How to Prove It by Velleman

This is a jump straight into the deep end. I can't recommend starting here. "How to prove it" would be a much more appropriate start
Naw, straight into the deep end is to start with reading the Homotopy Type Theory book...
TL;DR; When you can read this book [6] and do all exercises in it without any issues you can safely stop and be sure you are very well versed in vast majority of subjects that you might encounter while hacking on whatever in most technical fields.

You can be a hacker and get by with very little math, depends what you are hacking. Hacking is not a profession, it is more of an approach to things, a way of looking at the world, the joy of really figuring stuff out and maybe doing something cool, something that might have seemed impossible. This does usually involve mastery, but not necessarily of mathematics.

I think the question you should be asking, or maybe are even asking is - how much mathematics do I need to hack the hack that I want to hack? - and the first thing you need to do, if you have not already done so is try to think about what that might be. Even a vague idea will give you plenty of clues about how much of what you might need for that.

If you find it troublesome, check out what Richard Hamming has to say about it, it should help you out a lot with figuring it out [1][2].

That said, if you want to do computer science, or hack on the interesting things you do need quite a bit of mathematics. This is due to the fact that, as other posters here have pointed out, what you are really in need of, is an effective way of problem solving, and to solve a problem you need to understand it, model it, work on it in some terms. Mathematics is /the/ method of clear thinking which you should apply in order to do this. Sure, you can do certain things without mathematics, but you are not making things any easier for yourself by doing that, and more importantly you are not gaining as much insight as you would have if you used the mathematical approach.

Now, you do mention that you are not good at mathematics, do not let that discourage you, there are many people who were, or are in similar situation as you, me included, and I can assure you that with some dedication and open minded thinking, it comes easier than you might think, and all this effort almost instantly pays off. If you are familiar with one or several programming languages, check out these amazing books and use them alongside whatever mathematics course you will be taking, they will help you out immensely by helping you master both the problem solving approach and the necessary concepts in order to succeed in mathematical education [3][4][5].

[1] [2] [3] [4] [5] [6]

Keeping with the free theme, Book Of Proof by Richard Hammack is a nice introduction to proofs and formalism. It's available free from the author as a PDF[1], and also as a physical book on Amazon[2].

An alternative if you're willing to spend a little is How to Prove It by Daniel J. Velleman, also available from Amazon[3] and probably many other retailers. Both books cover roughly the same topics.




Learn how to prove theorems. "How to Prove It" by Velleman is the best book for this (imho). (Amazon link

More good advice at

math IS hard. i didn't learn this until recently. i never met a practicing mathematician before a few years ago, and when i did they told me that they struggle to get stuff. that was a HUGE relief. if you enjoy it, then maybe you can apply yourself to it for the hours it may take to understand something - a book, a topic, a paper, etc.

i think a lot of what it comes down to for me - and maybe you - is mental discipline (staying focused for more than an hour without straying), knowing that it is very common for it to be tough, and learning how to play with math and explore it. i was never taught those things (or at least i never learned them), and so i have had to learn them the hard way. maybe you suffer from some of the same hurdles? try and overcome them, it's worth it.

as for writing proofs, one of those mathematicians got me interested in this book:

The principal thing I push learners towards after Haskell would be things like Coq and Agda. Coq has better learning materials, Agda has Haskell integration.

The usual sequence is [1] followed by [2].

Augment with [3] and [4] as needed.

One negative thing about Coq/Agda/Idris is they don't have a satisfactory encoding of typeclasses [5]. This is a problem in general with all dependently typed languages. Proof obligations get "churned" by changing code and the only tool to address that is extremely general proof terms combined with proof search. The best proof search is Coq, but the code extraction is heartburn-inducing for Haskell users.

Whereas in Haskell, we get extremely lightweight and type-safe code refactoring because of the way in which we leverage typeclasses and parametricity. This turns out to be very valuable as your projects get more serious.

That said, still entirely worthwhile to learn Coq or Agda.

By the way, this [6] is how I teach Haskell. Working on a book as well.







I do not understand ... please, can you elaborate what is the connection between GEB (which I presume is 'Gödel, Escher, Bach') and for example the "Learn you a Haskell" book ? They are both good books, but I do not think that books about programming languages are suitable alternatives to GEB.
Strange loops come up all the time in Haskell.

Cf. loeb

Understanding type theory and set theory is a common side effect of learning Haskell and are critical in understanding Godel.

Also there's never a bad time to learn Haskell.

Polya's How to Solve It was recommended below. I also like How to Prove it by Daniel Velleman (
Velleman's "How to Prove It" is a great book to learn how to do mathematics.

This is part of a series. I haven't read Solve It but there is another one that I worked through several years ago before returning to school, How to Prove It, that really cleared up how to do proofs for me. It is all based around set theory and some of the later proofs are quite deep:

Not part of a series. "How to solve it" was written long before "How to prove it", and the latter was presumably named in homage to Polya's book. (Though I don't think it has much in common.)

There's another recent mathsy book called "How to solve it: modern heuristics" which is actually about optimization algorithms and has basically nothing to do with Polya's book.

As for studying proofs, _How To Prove It_ [1] is indeed a good book. You may also be interested in _Book of Proof_ [2], which is available under a Creative Commons license. (You can download the PDF for free, and you can order it from Amazon [3] if you want a hard copy.)




_How To Solve It_ [1] is indeed a good book, but I think fjellfras is referring to _How To Prove It_ [2], which prepares students "to make the transition from solving problems to proving theorems."

[1] [2]

If you don't understand proofs, don't read any more maths books until you've read "Prove It":
Even though you'll learn to read and write rigorous proofs with this book, it's requirements are high school maths and doesn't assume anything.
HN Books is an independent project and is not operated by Y Combinator or
~ [email protected]
;laksdfhjdhksalkfj more things ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.