Mathematical Reasoning and Discrete Math

Mathematical Reasoning and Discrete Math

TODOs

I still need to

  • Finish remaining chapters until completing the discussion of number theory.
  • Add videos and other visualizations.
  • Clean the bottom of the main page.
  • Give every chapter a consolidated set of definitions and theorems at the top. Also give every page a set of extra exercises.
  • Write theorems with "premises" and "conclusion" indicators.
  • Write a section on program preconditions and postconditions.
  • Include a section on philosophy.
    • Meaning in mathematics does not exist without our defining it. For example there is no such thing as an "infinitely large number" unless we define it in some precise way. The number 0.999... does not exist until we define it first.

Welcome and Feedback

Welcome to this course in mathematical reasoning! This website delivers a one-quarter semester course. Put briefly, this semester covers naive set theory, logic, and number theory. There will be a part 2, assuming I eventually finish part 1.

If you see mistakes in this website, please let me know! You can open an issue at the GitHub repo: GitHub Math Reason.

Not only that, but if you find anything confusing or just have editorial feedback, you can always let me know! I especially want to hear feedback from people who are trying to learn the subject for the first time, so that I can make the material easier to learn. Just remember that the more specific and constructive your feedback is, the more I am able to act on it.

Content

This is a course on university-level mathematics, designed to prepare first-year students for the techniques that are used throughout the rest of their mathematical careers.

The subject of this course is really two-fold: It has both domain knowledge, as well as mathematical technique.

The domain knowledge that this course covers includes

  • Number theory

  • Rational, real, and complex numbers

  • Sets and formal logic

  • Type theory

  • Relations

  • Functions

  • Combinatorics

  • Recursion

  • Matrices

  • Graphs

  • Algorithms

But besides learning substantive topics in mathematics, this course also aims to teach how to reason about mathematics. Therefore this course includes parallel lessons in

  • Direct and indirect proof

  • Proof by cases

  • Proof by contradiction

  • Counterexamples

  • Diagrammatic reasoning

  • Induction

  • The pigeonhole principle

  • Proof of correctness

The content of this text is very similar to other texts on discrete mathematics, with a few exceptions. Most discrete math texts have less content than I have included on formal logic. They also do not discuss type theory and the lambda calculus, which are usually in the domain of computer science.

Because I have in mind an audience of mathematics majors, I have included these topics because I think it will help them throughout their mathematical careers.

Structure

The structure of this text is intended to be unlike the usual mathematics textbook, in a number of ways.

  • I want to have a thorough coverage of formal and informal logic, since the intent is to train future mathematicians. The main tool of mathematics is logic.
  • Chapter 1 gives a case study in how logic is used in the study of mathematics. In particular I show the use of logic to study elementary number theory. As we later discuss logic, the reader can apply all of the broad and abstract lessons of logic, to the concrete example of number theory.
  • Where possible I try to explain not just the proofs of theorems, but how to write the proofs of theorems. That means explaining writing style, structure, and discovery of proofs.
  • This resource provides an "theorem assistant". This is very similar to Lean, but written in Python, and it places a higher priority on making proofs readable even when written in code. This is helpful for understanding the logic and level of detail in which proofs should be written.

Advice on Studying

The most important advice that I can give you about how to study this subject, and how to study more generally, is: be curious, and be tough.

Go into this with the understanding that it will be hard and confusing. No author will ever be able to make advanced mathematics easy. I hope to make it more accessible with this text, but studying mathematical reasoning will still demand that the reader is up for a challenge and a time commitment.

But if you genuinely find the ideas interesting, take heart! You can learn them with enough exercise. Do not be intimidated by notation or abstraction. With time, exposure, focus, and use of these ideas, what initially seems obscure can come to feel natural and clear.

Being curious and wanting to know this content is necessary to keep you motivated. You'll need to be so motivated that, when you are inevitably frustrated by something you don't immediately understand, you will spend minutes, hours, or even days living in that confusion. You'll find that your endurance grows, as if you were a long distance runner.

But notice that I said you get better with exercise. Not reading, not thinking. Exercise.

There is a common saying in mathematics:

A mathematician reads with a pencil in her hand.

Every mathematician, whenever reading any new piece of mathematics, always finds exercises, or makes up their own exercises to ensure that they fully understand what they are reading. You should begin to develop the same habit.

This text puts exercises throughout the body of the text, as well as after each chapter. The exercises inside the body are intended to be quick, direct, easy. That doesn't mean they will take no time. Just that they are intended to be a easy as I can make them while still exercising what is necessary.

The exercises in the body of the text are intended to be minimal to ensure understanding. You should be doing exercises constantly, but the ones that you do while you read should be just enough to make sure you're following what the text says.

The exercises at the end of the chapter are intended to be more challenging: They don't just make sure that you've understood what you've read, like the exercises in the middle of the chapter do. They ask you to become increasingly creative, thinking beyond merely what you've been told. You will have to find solutions to problems, for which you haven't seen the solution to perfectly similar examples. This is unavoidable with many proofs of theorems: once a theorem is proved, there is not necessarily another theorem that is similar enough to act as a direct exercise of the same ideas and methods.

If there are exercises that you continue to struggle with, you should seek out more exercises, and do them until you reach at least a medium level of comfort and mastery. On the other hand, don't feel the need to reach perfection at the end of any chapter. A medium level of mastery is perfectly adequate to move on to the next chapter. Moreover, later chapters continue to exercise the information in earlier chapters--so by moving on, you will both acquire new skills while simultaneously sharpening your old skills.

Chapters