Please could you comment on following:
I always wanted to know what mathematicians mean by "understanding a piece of mathematics". For example, I have just finished the second chapter from Rudin's Real Analysis. I can recite all theorems and their proofs in my head. But maybe not for long. Does this mean I understand the chapter? There are not many articles on the web on this, and I think the most interesting opinion on the subject is by H. Poincar\'e who in his Essay On Mathematical Creation writes:
... Why then does it not fail me in a difficult piece of mathematical reasoning where most chess-players would lose themselves? Evidently because it is guided by the general march of the reasoning. A mathematical demonstration is not a simple juxtaposition of syllogisms, it is syllogisms placed in a certain order, and the order in which these elements are placed is much more important than the elements themselves. If I have the feeling, the intuition, so to speak, of this order, so as to perceive at a glance the reasoning as a whole, I need no longer fear lest I forget one of the elements, for each of them will take its allotted place in the array, and that without any effort of memory on my part...
Evidently the "certain order" in particular piece of mathematical text is what one should be reaching for in order to be able to claim understanding of the material.
How do I reach it? Like I said, I doubt that this kind of "understanding" is equivalent to working out all proofs to theorems and even solving all problems at the end of the chapter.
There are many ways to build better understanding.
One way that is important is to work through many examples of concepts, and as you do so, to connect them to the theory.
Just learning the theorems, and the various syllogisms etc. that connect them, is not sufficient (for most students) to yield a real understanding.
Similar, just working problems in (mental) isolation, is not sufficient. You have to think of the problems as a guide to developing your understanding of the theory, and at the same time, use the theory as a guide to understanding the various examples provided in the problems. When you see a phenomenon in an example, see if you can relate it to one of the concepts defined in the theory. If you make a computation, see if you can abstract it --- perhaps the conclusion of the computation has a more theoretical explanation, in terms of some of the concepts involved in the theory you are studying.
(E.g. in an analysis book, in an exercise you may prove various inequalities in some context. You should try to think whether there is some underlying phenomenon that explains them all; e.g. maybe there is a linear operator in the background, and the various inequalities are a consequence of it being bounded, or maybe bounded with bounded inverse, or maybe compact, or ... .)
When you read or listen to a lecture on the subject you are trying to understand, say analysis, and the text/lecturer says "Consider a measure space $X$", you don't want the letter $X$ to appear in your head. What you want in your head is all your cumulative experience with measure spaces, all the different measure spaces you know, the properties each of them do and don't satisfy, and so on. As the lecture/text continues, the examples you are holding in your mind should change in a fluid way as various hypotheses are imposed or removed. In this way, you should be following the argument in a conceptual manner, and so hopefully understand the various steps, what their meaning and consequences are, why they are being applied, and how they are furthering the argument.
This doesn't have to happen literally; for those with a lot of mathematical experience it's almost subconscious; until the lecturer they are listening to states something false, at which point the experienced members of the audience can immediately call out a counterexample --- because they have an intimate grasp of the properties and key example of the objects being discussed, and so can immediately recognize if the lecturer oversteps the bounds of reality, and produce an example illustrating this.
When you are beginner, you need to do this in a more conscious, and probably slower, way. As you read the statements of theorems, write down examples you know of that satisfy the hypothesis. Do your best to check, using the tools you know, that they satisfy the conclusion. Already this may help give you a sense of the difficulty of the statement. Sometimes your check will actually not use the particular properties of your example, and you will discover the general proof; other times this won't be the case, and then you will realize that there are logical connections out there that you can't see yet, and so (as you begin to study the proof) you can try to look for where these connections are being made. Then you can go back to your example: is the theorem easier to verify for your example than in the general case? Why? What properties does your example have that aren't hypotheses of the theorem? Can you state an easier, or maybe different, theorem that is more tailored to your example?
The more you do this, the more intuitive it becomes, until eventually it becomes an automatic process, indeed probably the dominant process, in your reading and listening to mathematics. At that point as you listen to or read a proof, you understand in a deep way how the pieces of the argument fit together and what their role is, which is the kind of understanding Poincare is describing.