How I use Anki to learn mathematics

Here is my first less wrong post (after years spent blogging in French). I discovered Anki on this blog. I’m now sharing the tips I’ve been using for months to learn mathematics with Anki. Example(s) of deck can be found on http://​​milchior.fr/​​Anki/​​
I’m a French researcher in fundamental computer science, which essentially means that I do mathematics all day long. But my biggest problem is that I’m really bad at learning mathematics. Let me give an example. Hopefully, you should be able to understand even if you don’t know the domains I’m using in my examples. One day, I wanted to discover what category theory is. Another day, I wanted to read an introduction to number theory. Two subjects which seem really interesting. And the first pages of those books seems to be crystal clear. After 10 or 20 pages, I have already forgotten the definitions given in the first page, and I am lost. Definitions are not hard, there is just too many of them.
Let me emphasize that I’m speaking of learning definitions you understand. As far as I know, it is mathematically useless to learn things you do not understand. (Apart, may be, if you try to learn the first digits of Pi, or some few things like that).
In the category theory example, definitions are explained by showing how well-known properties of algebra or of topology are special cases of the introduced category definition. Those examples are really helpful to understand the definitions. Indeed, it allows my mind to go from new notions to known notions. For example, I recall that Epi and Mono are generalization of injective and of surjective. Or of surjective and injective. I can’t remember which is which. But at least I know that an arrow can both be Epi and Mono. And even know that I know that Epi in Sets are surjective, I still don’t know which of the properties of surjection remains. Which is a trouble since having only the Set example would imply that Epi and Mono imply Iso.
And, to solve this kind of problem, a spaced memorization software is wonderful. The only trouble I have is that the decks which already exist are not really interesting. Because, usually, card creation did not follow any special logic (some scanned hand written lectures note). And furthermore, the already existing decks concern mathematics I’m not interested in. I don’t want to learn multiplication table, nor calculus. In fact, the only decks from the community I use are the one from Rationality, from A.I. to Zombie and the one which teach good learning practice. Hence, I’m now creating decks, from books on topic I want to know.

The rules I follow

Decks.

I create a deck per book. Hence I will be able to give the decks to the community, telling each time exactly what belongs in the deck. It means I accept to put in the decks things I already know. And to put the same thing in different decks (for example, the definition of Open Sets of course belongs to a topology deck. But it also belong to a complex analysis book where this definition is restricted to the case of metric space.) I don’t think I’m really wasting my time, it allows me to learn things I don’t perfectly know but that I would not have created otherwise. Furthermore, it will hopefully allows the community to begin by any book.
I must emphasize that the decks are supposed to help reading the book. Not to be used instead of the book. Because having read the proof at least once is often important. And my decks do not contains proofs (apart when I’m reading research paper and that my goal is to understand complex proofs).
I don’t create the entire deck at once. For example, I’m reading a set theory book. Right now I’ve only read the first chapter. Because there are already too many definitions I do not remember correctly and which is confusing (the type, the cofinality, …). Hence it would be too much of a trouble to read the 2nd chapter yet. (Relating to this, I will need to tell the users of my decks to suspend the chapter n+1 until they know the content of the chapter n.)
Reciprocally, I create many decks simultaneously. Which is coherent with the way maths are studied in university. That is, even if I’m currently blocked in the complex analysis book, I can still read a graph theory book. And while I learn my analysis course, I can create the graph deck.

Kind of cards.

A basic anki card is a question and an answer. Sometime, both sides of the cards are questions and answer. It’s useful for vocabulary. Since I’m French, I want to know both the English and the French name of the definitions I learn.
Otherwise, I only use clozed deletions. That is, a basic text, with holes you must recall. (Note that it allows to simulate basic cards. So once you selected cloze deletion, you never need to switch back to usual mode).
Apart from the usual «front» and «extra» field, I always have a «reference» field. In this field, I write chapter, section, subsection and so on. I also write the theorem, lemma, corollary, definition number. I do not write down the page number because of laziness. I think I should, because some books have long sections without any numbered results. And in those case, it takes minutes to find where an information come from. Having theorem number is required because, in order to recall a result, it is usually helpful to remember its proof. And reciprocally, if you forgot the theorem, it may be usefull to read its proof again.
Last important fact. I told Anki not to erase fields when I completed the creation of a card. It is clear that chapter and section numbers rarely change, so it is useful not to have to write them down again. Concerning the mathematics part, I saw that successive cards are often similar. For example, in a linear algebra book, many results begin by «Let U,V be two vector space and T a morphism from u to V». It is helpful not to have to retype it in each cards.

Definition

In a definition card, there is usually three deletions. The first is the name of the defined object. The second is the notation of this object. The third one is the definition. If an object admits many equivalent definitions, all definitions appears on the same card. Each definition being a different cloze deletion. Indeed, if your card is «A square is … » and you answer «A diamond with a 90° angle», you don’t want to be wrong because it is written «A rectangle with two adjacent side of same length». Therefore, the card is:
«{{c1::A square}} is: equivalently
-{{c2::A diamond with a 90° angle}} or
-{{c3::A rectangle with two adjacent side of same length}}»
Beware, sometime it is better if the name and the notation belong to the same deletion. For example, if X is a subset of a vector space, it is easy to guess that «Aff(X)» is «the Affine Hull of X» and that «the affine hull of X» is denoted «Aff(X)». What you really want is to recall that «the set of vectors of the form Sum of x_ir_i, with x_i\in X and r_i in the field, where the sum of the r_i is 1» is «the affine hull of X».

Theorem

A theorem usually admits two deletions. Hypothesis and conclusion. It sometime admits a third deletion if the theorem has a classical name. For example you may want to remember that the theorem stating «In a right triangle, the square of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides. » is called «the Pythagorean theorem».
Beware, no hypothesis in a deletion should introduce an object. «If, … , then the center of P is not trivial» is hard to understand, whereus «Let P be a group. If …, then the center of P is non trivial» is more clear.

Hypothesis

A first important thing is to always write all hypothesis. Sometime, some hypothesis are given in the beginning of a chapter and are assumed to be true in the whole chapter. But, when the card appears, you don’t recall those hypothesis (and you don’t want to learn that, in this very book, in this very chapter, only complex vector spaces are considered).
It is important to have empty deletion. In automata theory, some theorems deal with monoids, and some other only deal with finite monoid. If I write «If M is a {{c1::finite}} monoid» for theorem dealing with finite monoid, and «If M is a monoid» for theorem dealing with arbitrary monoids, the deletion show that M is assumed finite. Therefore, in the second case, I must write «If M is a {{c1::}} monoid». It’s really simple to do, since Anki don’t delete the fields when I create a card. So, when the hypothesis that M is finite is not required anymore, I can keep the deletion in the field to create the new card.

Multiple implications

This leads me to another problem. An hypothesis may have many implications. And a property may be implied by many hypothesis. Therefore, it is better to state:

«If {{c1::P1}} or {{c2::P2}} .. or {{c3::Pi}} then {{c4::Q}}», or «If {{c1::P}} then {{c2::Q1}} and {{c3::Q2}} … and {{c4::Qi}}». Indeed, you don’t want to be wrong because, of all hypothesis, you thought of the wrong one for this very card. Here, each term in brackets represents a cloze deletion.
There would be a problem if P implies Q and R and if O and P both imply Q. But this has not happened yet to me. It seems that it does not often happen in math textbooks.

Order of the words

When a theorem is of the form «{{c1::The centralizer of A in G}} {{c2::divides}} {{c3::the normalizer of A in G}}», you must also have a card «The normalizer of A in G {{c1::is divided by}} the centralizer of A in G». Otherwise, you could guess the result by pattern matching. Because you know the hole in the middle is either an equality or a dividability statement. Right now, I did not figure out how to do this efficiently. But I should edit my old cards in order to satisfy this property.
Note that you always want to have a cloze deletion named c1. If you don’t have it, you can’t preview your card, therefore you can’t check whether your LaTeX compile. And if you choose to change c2 to c1 later, you need to review your card again, because Anki thinks that it is a new cloze deletion.

Example

The last thing I want in Anki are examples. Generally, they are of the form
«{{c1::A}}, {{c2::B}}.., {{c3::Z}} are examples of {{c4::P}}».
I used to believe that examples were not mathematics. Because, as a Bourbakist, as a logician, I know that an example does not belong to any theory. What matters is definitions, axioms, theorems, proofs. Since, I understood examples have at least three goals. Officially, it gives intuition, and shows cases where theorems can be applied. Formally, it shows that some set of hypothesis is not contradictory, hence it is useful to consider those hypothesis. In practice, this very examples may be used when one want to test statements which does not appear in the course. That is, examples are sometime answers to exercices, or counter example to idea one may have.

Learning

Once the cards are made, I ask to Anki to create all images using LaTex (which should be done immediatly in a perfect program, but is not). And I use synchronization to send all cards to my smartphone. (Free application, without ad, they are wonderful!) to learn in the public transport.
Of course, when I create cards, I made mistake. Either because my LaTeX doesn’t compile, and Anki shows an error message in the cards. Or because I forgot a word, wrote a word instead of another one. (For example, I always write «set» instead of «state».) If I believe there is a mistake, I suspend the card. Once at home, I synchronize and, on my computer, check whether it is really a mistake or not.
It is why I wrote the chapter and section number of each card. It allows me to check quickly whether the card and the book states the same thing.
Sometime, the mistake is a bad cloze deletion. It is possible that, when a part of the sentence is deleted, it makes no sens anymore. For example, it happens if I did not follow the above mentioned rules. (It was the case for the first deck I created, where I didn’t devise any rule yet). Same rule applies if I see a mistake so big that I do not understand anymore the question I asked.
Thanks to dutchie and to rhaps0dy who corrected many typo of this post.