Ask HN: How to learn mathematical proofs from scratch?
Where can I find an exceedingly gentle introduction to writing proofs? My math education is limited to non-AP high school classes many years ago. I’m now trying to relearn what I’ve forgotten (and then go beyond that) so I would like to grasp the underlying principles rather than only doing rote exercises to memorize techniques for getting answers without deeply understanding what’s behind those techniques. But I need to start with really, really simple proofs that explain the very basic techniques. For example, I know things like (a^b)^c = a^bc, and that I can solve for x in x/a = b/c by cross multiplying so that xc = ab, but I can’t prove either of those things. How do I learn to develop their formal proofs? Any of the texts I’ve seen so far are much too advanced for me.
124 comments
[ 3.3 ms ] story [ 117 ms ] threadThe most basic subject to understand mathematical proofs is Euclidean geometry. There you will learn the basics of proofs and what it means to prove something.
Let’s look at x/a = b/c. You want to show that this equation has the same exact solution set as xc = ab. In order to prove this rigorously you’ll need to prove things about associativity. You’ll also need to prove that a unit isn’t a zero divisor in the real numbers. What we see is that to prove seemingly simple statements requires some machinery and to understand the necessity of this machinery requires mathematical maturity.
But maybe you don’t want to rigorously prove the above. Maybe you just want to understand why it is plausible that this is true. For that, pick up a beginning algebra book and actually read what it says and try to understand it. This is hard to do on your own.
Here’s a plausible explanation for why x/a = b/c has the same solution set as xc=ab. Note that a and c must be nonzero because we can’t divide by zero (this requires proof!). We note that
(x/a) times a
Is the same thing as x times (1/a times a). This is due to associativity. A nonzero number times it’s reciprocal is 1. And 1 times anything is itself. So x/a times a simplifies to x.
So,starting with
x/a = b/c
I can multiply both sides by a. I can do this since a is invertible and multiplying by an invertible element preserves equality (requires proof!). So what I get, after simplifying, is
x = (b/c) times a
I can rearrange things (by associativity) to write this as
x = (ab)/c
Now multiply both sides by c to get (I skipped a step by multiplying and simplifying at the same time)
xc = ab.
Good luck!
Broadening your field of view will also help a lot. Some introductory abstract algebra (groups, rings, vector spaces) would be a solid next step in my opinion, because there you will have sets of axioms and lots of proofs and you will learn about properties such as commutativity, associativity, inverses and identities in a more abstract and general way.
What you want is a book that combines an introduction to logic with a bunch of different proofs from different areas of math, such as set axioms, relations, functions, sequences, construction of real numbers, etc. There are many books like this, here is one that includes all of that plus a little number theory and algebra towards the end: http://libgen.rs/book/index.php?md5=7E4D97D2F58B91D052595E68...
Is the formatting wrong on this? Because this isn't an identity.
"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. "
With that intuition it's simply a matter of slogging through a proof textbook like Velleman's "How to Prove It" until you have the confidence to work through the texts that truly interest you. If you don't feel like a clueless fool you're not trying hard enough. Confusion and self-doubt are sure signs you're finally learning something.
For me, a proof is essentially transforming one formular into another one until someone who understands math says "yes, now you have proven it!"
For me, any step is as good as the others.
I wish, I could understand what's happening.
Algebra was like solving a puzzle where you randomly move pieces around to try to get them in order. There didn't seem to be any real principles involved. Just a set of rules to memorize.
But I didn't understand proofs with either.
What makes one person better than another at proving things? The same things that make e.g. one chess engine better than another:
1. They have a better heuristic about which paths to explore.
2. They are simply faster at executing the search.
3. They know of more “edges” in the graph: intermediate lemmas that they can apply to arrive at the theorem faster. (This doesn’t apply to most chess engines.)
Getting better at proving things requires exercising these muscles.
This is also why (IMO) it’s important to have basic data structures and algorithms memorized. The faster your recall of these algorithms, and the more algorithms you know, the more likely it is you can solve hard algorithmic problems on the job should that be necessary.
Here's what happens if you try to prove that 2+2=4 with a computer program that refuses to skip any steps (granted, it's treating them as complex numbers with zero imaginary parts):
http://us.metamath.org/mpeuni/mmset.html#trivia
Math is just a matter of transforming one thing into another using the operations allowed by the system starting from the ground truths stipulated by the system
I can’t help but shake the feeling that if it takes this many steps to prove 2+2=4 then you’ve done something wrong in the design of your formalism.
Yeah, this is why
A human proof would probably not generally go beyond something like:
2+2=4
1+1+1+1 = 1+1+1+1 // Substitute the definitions of 2 (1+1) and 4 (1+1+1+1)
S(S(0)) + S(S(0)) = S(S(S(S(0))))
and that is non-trivial. (But it's not 26,000 steps either.)
For example, in Metamath[0] (which was mentioned in another comment), there are just two inference rules. First is modus ponens[1], which says "if A is true, and if A being true implies that B is true, then B is true". Second is the rule of generalization[2], which says "if A is unconditionally true, then for all x A is true". If you start with the axiomatic statements of classical logic + set theory, pretty much all of mathematics can be inferred just by repeatedly applying these two rules to derive more true statements.
The hard part is developing a good feel for what's possible within this system and what's not, so that you can start skipping large numbers of steps too. As someone who's self-learning this stuff I've personally found exploring Metamath very helpful for this, because I find it helpful to break things down to the foundations when I'm not sure about a bit of reasoning, and Metamath is good at breaking things down to the foundations. But to each their own. Regardless, if you haven't already done so, I'd recommend learning classical logic if you want to understand proofs.
[0] http://us.metamath.org/mpeuni/mmset.html
[1] http://us.metamath.org/mpeuni/ax-mp.html
[2] http://us.metamath.org/mpeuni/ax-gen.html
I worked through it after uni years, and after working for a few years. It changed my perspective on proofs and math completely!
It showed how the language of logic combined set theory form a very small and comprehensible foundation for most of math.
After reading it and a few introductory-level books on number theory, calculus and combinatorics, most of CS proofs started feeling... cute.
Did I say I love "How to prove it"?
CS is quite math-intensive on its own but it kind of assumes a certain level of math maturity.
Any particular recommendations?
Instead of listing other books I would suggest the following learning scheme of a programmer trying to deepen their math:
1. No need to go beyond basics. Any uni-level introductory math course is already more advanced than 99.99% uses you might have.
2. Know your basics well. Get 2-3 classic books. Work through the one you like most, but still read through the rest.
3. Practical book size limit - 200-250 pages. Math material is hard, 200 pages of good math is months and months and months and mo...
4. Setup a learning/reading routine.
Here is some help with Baby Rudin:
He wants to get to the Riemann integral, that is, the simplest version of ordinary integration in first calculus. Then for a little more, he also wants to do the Stieltjes extension of the Riemann integral.
So, he wants to integrate a function of one real variable -- he wants to keep it simple and elementary.
For this he wants to state carefully the properties of the function he wants to assume and use. Again, he goes for the simple stuff:
First he integrates the function f only over an interval, e.g., [0,1] or in general [a,b] for real numbers a and b with a < b (maybe a <= b, I save the effort of checking my copy). So, the interval is of finite length, b - a. Integrating over the whole real line from minus infinity to infinity is more difficult and left for later (and is much better done with the Lebesgue integral, see below). Also the interval is closed, that is, includes the two end points a and b.
Second, he wants the function f to be continuous on that closed interval.
So, he needs to define continuous. And what is magic about the closed interval [a,b] is that it is compact. So, he wants to define compact.
Then with continuous and compact, he shows that the function is not just continuous but also uniformly continuous, and that is the crucial, central, key property of function f that makes defining the Riemann integral easy, showing that the integral exists, and establishing its basic properties.
So, Rudin takes you off on a little side journey to understand closed, continuous, compact, and uniformly continuous. Also, with the real numbers, he uses the completeness property -- the rationals are not complete and won't work; he needs the reals! It's good to know this. Completeness also generalizes, e.g., is a key property in Hilbert space and Banach space.
Now he wants to give you a little more for your money, effort, time, etc.: These concepts of completeness, closed, continuous, compact, and uniformly continuous generalize, that is, are principles as in the title of his book. So, really he is attacking, i.e., defining and developing, the simplest integral of freshman (or high school) calculus with more general concepts, closed, continuous, compact, uniformly continuous, and completeness.
And while his function f has only one real variable, he generalizes a little, takes a positive integer n and the set of real numbers R, and considers the Euclidean n-space R^n. Then he proves that in R^n, a set is compact if and only if it is both closed and bounded. Darned good to know! And the proof is not difficult and worth understanding. I used this result in a paper I published on some really tricky aspects of the Kuhn-Tucker conditions. My department got all impressed, and that eased my path to my Ph.D.
Compact: (A) Every infinite subset has a limit point. (B) Every open cover has a finite subcover. Compact via (A) and (B) is so nice that it is almost as well behaved as only finitely many points and generalizes enormously.
A real valued, continuous function with a compact domain is forced to be quite nicely behaved -- in particular to make the Riemann integral easy to develop.
Then the uniformly continuous says that if we pick a fine partition on the X-axis (the domain of function f), then the resulting partition we get on the Y-axis (the range of function f) is also fine -- so, as we make the partition fine on the X-axis, we can be sure the partition on the Y-axis will be as fine as we please which means that, with completeness, the finite Riemann sums converge and our Riemann integral is defined.
So, completeness, closed, bounded, compact, continuous, uniformly continuous -- not very difficult and worth understanding.
Then he moves on and does the basics of infinite sequences and series, enough to define logs, exponents, and t...
If you're missing some fundamental knowledge of algebra or other high school level math, you should refresh that. You can do so through Khan Academy (https://www.khanacademy.org/math/).
The proof course I took mostly started with examples from number theory to allow students to focus on the mechanics of writing proofs. The course seems to have replaced the book I used (Mathematical Proofs: A Transition to Advanced Mathematics Book by Albert D. Polimeni, Gary Chartrand, and Ping Zhang) with this freely accessible book https://www.people.vcu.edu/~rhammack/BookOfProof/Main.pdf. This course was a prereq to the analysis, algebra, and other proof based upper level courses in math.
The most important thing is to work the examples in the chapters and solve the exercises in the back of the book. You can usually find lecture notes, problem sets, and assignment solutions on the web these days. If you're having problems with material, someone else probably has, so there is a good chance your question has been asked on Reddit or other math specific forums.
If you're more interested in math applied to computer science, then you can look for a book on discrete math. The only discrete math book I'm familiar with doesn't really make it explicit that you're learning proof techniques the way the above books do, so I can't really recommend it as a first book for self-study.
The sequence of topics covered for a course from Book of Proof by Hammack: - Sets and basic definitions: 1.1 - Logic: 2.1, 2.2, 2.3 - Proofs: 4.1, 4.2, 4.3, 4.4, 4.5 - Logic: 2.4, 2.5, 2.6 - Contrapositive Proof: 5.1, 5.2, 5.3 - Logic: 2.7, 2.8, 2.10 - Proving non-conditional statements: 7.1, 7.2, 7.3, 7.4 - Disproof: 9.1, 9.2, 9.3 - Mathematical Induction: 10.1 and 10.3 - Sets: 1.3, 1.4, 1.5, 1.6, 1.7 - Proofs involving sets: 8.1, 8.2, 8.3 - Sets: 1.2 - Relations: 11.1, 11.2, 11.3, 11.4, 11.5 - Functions: Chapter 12 - Proof by contradiction: Chapter 6 - Cardinality: Chapter 14
With proofs, I also think there are three layers:
1. How do I draw logical conclusions from premises. This is the most straightforward part.
2. What are some of the clever tricks mathematicians use for doing this (e.g. constructing non-intuitive counterexamples, finding equivalences between two seemingly incompatible things, etc). This requires reading other proofs, and is slower, but can be very fun if you like math and find clever proofs beautiful.
3. Finding the right English words and phrases to capture the logic you have in mind (the language used in proofs is not normal English, and it has its own idiosyncrasies and conventions. Like other mathematical notation, it's often specific to particular fields of math and sometimes to a specific author). This also requires reading proofs, I think, and is also where one benefits the most from formal instruction ("how do I say X in my proof?") but I think you can get there on your own with some persistence. It's not Klingon either—proofs are supposed to be readable—but it's a bit like code, maybe, or legalese. If you just try to write nice prose, other mathematicians may find it confusing or non-rigorous.
It can be good to separate the three. Specifically, when learning a new field of math, the proofs sometimes don't feel rigorous to me right away, but once I get used to the the basics and the linguistic conventions, I'm more able to fill in the holes in my head
the most complicated proofs i ever dabbled in were things like proofs of convergence for algorithms, but i encountered various types of proofs in several intro courses: computability and theory of computation, discrete math, introduction to higher math and then some upper div cs courses in ai/ml.
what you say here rings absolutely true to me. as someone coming in with a long time background in coding and computers, i always found myself wanting to apply the same unambiguousness and precision that one uses to express computations in a programming language in mathematical proofs. this was a huge stumbling block for me! proofs are written in shorthand (!) by humans for other humans who have the same base knowledge, obvious things are omitted. once you have that knowledge it makes sense, but before that it seems like giant leaps are being taken without a rigorous line of reasoning between them.
to answer op's question: "an introduction to mathematical reasoning" by peter eccles was helpful for me. it's basically an expanded version of what you'll find at the start of many intro cs/math courses. another option, if sets, number theory and such are confusing to you is the computability angle (cs theory, computation). personally i found this material a lot easier to reason about which then imputed confidence, which is really the magic ingredient for good proofs.
The process of writing will hopefully help you:
As for books, my personal favorites were Problem Solving Strategies (Engel) and Art and Craft of Problem Solving (Zeitz). They're both really approachable, have plenty of examples, and will give you a different perspective on what math can be about.0: https://softwarefoundations.cis.upenn.edu/
If you keep doing this, you'll build up a whole library of examples and counter-examples for various statements and you'll get a feeling of how you can approach any problem (of similar difficulty).
Start with any Real analysis I and Algebra I book, and try to understand every part of it - don't skim chapters, just work at your own pace. Your pace will improve over time, that's guaranteed.
And keep doing the same thing - work out the proofs, exercises, examples and counter-examples. Re-read old ones, etc.
A lot of math knowledge is really perfect or near-perfect understanding of the basic principles.
In fact, the natural answer to “how do I learn to prove” or “how do I understand mathematical notation” is that you do it by learning mathematics. In mathematics, it’s important, for example, to see how things are connected, and that’s what proofs help with. Without this mathematics turns into a largely useless collection of facts - useless because an isolated fact or a formula can rarely be used as is.
Disclaimer: I didn't fully work through this game, I never studied at ICL and I can't vouch for its effectiveness, I simply heard about it and thought it was interesting and relevant to your question.
(Here's also a talk by the professor about his rationale for using Lean: https://youtu.be/Dp-mQ3HxgDE).
It's a good thing then that this framing is rather unlike the intuitionistic mathematics actually suggested.
I have to wonder if highschool math would make more sense to some students if (a) and (b) were taught together.
I might even cut polynomials entirely to make room for the new stuff and do informal calculus earlier.
Math is ultimately about bridging the gap between fuzzy warm intuition and and cold artificial rigor. Focusing on either in isolation defeats the purpose.
For anyone that struggled with pure math because memorizing seemed less "big brained" than informal proofs, computers making thing concrete let alone gamified can help immensely.
https://www.people.vcu.edu/~rhammack/BookOfProof/
It’s important to get feedback on your proofs, so it’s worth learning to use Lyx which is a LaTeX editor - once you know some LaTeX, you can post questions on math.stackexchange.com and people are usually glad to help
Lots of people are introduced to it in their linear algebra class which is a terrible way to learn it. You want a book like "Proofs and Fundamentals" by Ethan Bloch.
The best one right now is Proofs: A Long Form Textbooks by Jay Cummings. I wholeheartedly recommend it. And this is exactly the one you are looking for.
It is fully intended to teach learners how to write proofs, and not to impress one's peers or get citations.
I loved the book.
I picked it up because although I had a decent curriculum-based Maths education as a Physics undergrad and wrote many proofs, these proofs were always learned in a domain-dependent way. I was clueless about writing a new proof in a new domain.
This book filled a large hole in my life.
And I recommend it.
One other book that is good and should be read if you want to rigorously study Calculus from ground up, and it also teaches you a decent amount of Analysis, too. It's Spivak's Calculus. It's one of the best Math books ever written.
I learned a lot from working through An Infinite Descent into Pure Mathematics by Clive Newstead. It's designed to get someone with minimal math background started with the basics of pure math. Becoming comfortable with proofs happens along the way.
https://infinitedescent.xyz/
Lately, I have also really enjoyed 99 Variations on a Proof by Philip Ording, which is not a textbook. Rather it is an Exercises in Style type book that explores many different ways to express a mathematical proof of the same simple fact. Some of the proofs are whimsical, and others offer genuine insight. If you're looking for something lighter than a textbook that is still interesting and somewhat useful, this book is more approachable.
https://www.amazon.com/99-Variations-Proof-Philip-Ording/dp/...
Thank you, I really enjoyed this so far. Probably going to read one per day or so and then think about it.
Journey into Mathematics: An Introduction to Proofs (Dover Books on Mathematics) https://a.co/d/csM8jRd
I seem to remember that by design it didn't require any advanced maths to get started constructing proofs. Good luck!
we can try your example
we want to show that (a^b)^c = a^bc
let's work on the LHS
by the definition of an exponent, we know that a^b is just a * a * ... * a b times, so we can rewrite it as:
(a_0 * a_1 * ... * a_b)^c
by the same definition, we can multiply the quantity inside the parenthesis by itself c times:
(a_0 * a_1...a_b)_0 * (a_0 * a_1 * ... * a_b)_1 * ... * (a_0 * a_1 * ... * a_b)_c
now, use the fact that a^m * a^n = a^(m+n) to consolidate the parenthesis, since each factor has an exponent of 1 we can use simple counting:
(a^b)_0 * (a^b)_1 * ... * (a^b)_c
Repeat the previous step c times, we end up with
a^(b_0 + b_1 + ... + b_c)
which of course is just
a^(bc)
therefore (a^b)^c = a^(bc)
Let A->B be the set of functions from A to B. Then it has b^a elements.
Let AxB the set of couples with the first element in A and the second on B. Then it has ab elements.
So to prove that (a^b)^c = a^(cb) you have to prove that there is a bijection between C->(B->A) and (CxB)->A.
Ever heard of currying and uncurrying?
(BTW, I didn't really use the hypothesis that the sets are finite, the proof is also valid for transfinites if you care about those)
Good luck!