### Proving Bezout’s identity and uniqueness of prime factorization (and writing it up in a LaTeX

Originally published at 狗和留美者不得入内. You can comment here or there.

**My writeup on number theory (I did not refer to any text on number theory in the process of re-solving or writing this, which indicates a certain level of depth of understanding): elementary_number_theory.**

I’ll first talk a bit about some LaTeX technicalities orthogonal to the core mathematical content (separating form from substance in some sense).

I had long known of BibTeX for references in LaTeX. I vaguely remember trying to get it working once and giving up after failing. A quirk of it is that one has to run pdflatex, then bibtex, then pdflatex again. One need not run bibtex if one has already ran it and the references or labels are unchanged.

I have not written any .tex file for almost three years probably. The LaTeX which I’ve written then has been on Zhihu or on WordPress, where one embeds each equation in LaTeX individually into the main text, which is in HTML or some visual editor that translates to HTML in the background.

Since I was not much into writing as an undergrad, I pretty much never wrote anything in LaTeX that came with definitions, propositions, lemmas, and theorems that were automatically ordered. I also had never used the \label or \eqref feature until I wrote this. All the LaTeX I had written before was pretty much the most rudimentary.

I believe that much of my pretty much never having written anything super “theory building” in a LaTeX file has to do with my having been rather weak at the theory building side of mathematics. In fact, most of the LaTeX I’ve written was probably for homework assignments where problems were solved in isolation.

Though I had read the proof of the fundamental theorem of arithmetic long before, I’ve never actually proved it myself, maybe because despite being able to solve some somewhat non-trivial contest problems, I for the most part lacked mathematical maturity that a graduate student in pure math who is not a joke would have. I certainly being able to prove the most basic theorems in elementary number theory is a good test of whether one possess the most rudimentary level of mathematical maturity at the theoretical level. One might ask how being able to solve some of the more difficult olympiad math or Putnam problems would compare. My answer to this is that the more difficult such math contest problems require a type of technical or pattern recognition ability. However, they require very little theory building ability. One can know some theorems, which are generally limited in their level of abstraction, and then simply use them to solve those very contrived contest problems, which can be artificially made very very difficult. However, that’s quite different from actually gaining a deep understanding of the theorems behind a mathematical theory at the theoretical level, especially their relations to each other and why it’s reasonable to construct the theorems and theory in such a way.

I had read while in high school that math research or real math is very different from contest math, though I was too weak in both, especially the former, to have any meaningful idea of what that meant. Both of them seemed way too hard, especially real math/math research. Some people, those who tend to be higher in verbal intelligence than math intelligence, find contest math harder than real math though. It seems there is a type of cleverness or problem solving related pattern recognition required to excel in contest math that one need not have to excel in real math. I had asked a guy who placed at or near the top in olympiad math, and he said that if most professors at really good places were to take the IMO, they would do rather poorly, much because of lack of training to solve such problems under the time limit, but if they were given pretty much unlimited time, they would be able to solve them eventually, developing the requisite theory or techniques (for say, synthetic geometry or inequalities) themselves once they realized it was needed to solve such problems. When I heard that, I felt bad, much because not only could I not solve those difficult contest problems at all, I had no idea to proceed with them, even given unlimited time. I simply had no concept of theory building, and no ability to work on mathematics over the long term, proving and accumulating theorems methodically in the process.

I was often very frustrated, because I felt like I was unable to clearly or deeply the grasp the big picture behind the mathematics I read in textbooks. Many of the more difficult theorems, I had difficulty proving or could not prove even after I had already read their proofs, which I often could only vaguely follow. I became much more confident of my mathematical ability after I was able to re-prove some theorems which I found too difficult to “visualize” before, like the multivariate implicit function theorem. Another frustration was how I was for a while never able to do mathematics independently, by which I mean go beyond reading stuff in textbooks and solving some problems in them. I am certainly not good in working in an open ended way when I was an immature kid. I believe being able to identify or propose suitable projects of an open-ended or ambiguous nature with some scope and independently drive them to completion is much of what separates a serious scholar or intellectual from an immature and superficially smart person, who is often of course very young, since this ability tends to improve much between age 20-30 from what I’ve observed.

I learned of the proof of the infinitude of prime numbers in the first year of high school, which seemed trivial in retrospect. However, its complete proof, strictly speaking, requires a mathematically rigorous grasp of the intuitive concept of a prime factorization, and an appreciation of the value of proving in compete rigor “obvious” facts such that if is prime and , then either or . I realized this more so in the process of writing up this little more than 4 pages document that contains a complete proof of it as well all the definitions or facts typically tacitly assumed in its presentation in isolation.

I now have pretty much no interest in contest math problems (though I might very occasionally look at the list of placers at IMO/Putnam/IOI/ACM ICPC/TopCoder/CodeForces and the high school olympiads in math, computing, and maybe even middle school MathCounts, including their national or ethnic distribution). I’ve matured much intellectually. Yes, most professors of mathematics at good places also have much much better things to do. The olympiad problems 17 year old kids solve are generally of little mathematical significance or depth. Now, I am clearly much of more aware of how a big part of research is picking or proposing good problems which lead to significant science or mathematics, and also developing scientific theory in the process. Raw technical ability of course is still important and one must have a certain requisite level of it before one is qualified to talk about taste or picking good problems or vision. I do believe though that now, my technical ability is sufficient to have some of my own judgment on mathematics and the style of various mathematicians of a non-superficial nature. I’ve noticed that at the forefront of science, things are often ambiguous, totally unknown, or controversial. What’s currently possible or currently pretty much impossible is often unclear. The real geniuses are the ones who imagine possibilities or create new directions or fields that most other good mathematicians or scientists cannot even see. I have better appreciation of the theory builder or problem solver spectrum in mathematics now, and why in the long term, the visionary theory builders tend to be valued higher than the strong problem solvers or technicians. I’m well aware that the problem solvers tend to be those who are more inclined to seek formal recognition from others.

Though I was much better at “problem solving” than at real mathematics in high school and much arguably also university, it’s more fair to say that I was basically mostly a silly kid then. I remember learning of Grothendieck in high school, in particular of how he was visibly inclined towards abstraction and theory building. I believe I had also read then

In those critical years I learned how to be alone. [But even] this formulation doesn’t really capture my meaning. I didn’t, in any literal sense learn to be alone, for the simple reason that this knowledge had never been unlearned during my childhood. It is a basic capacity in all of us from the day of our birth. However these three years of work in isolation [1945–1948], when I was thrown onto my own resources, following guidelines which I myself had spontaneously invented, instilled in me a strong degree of confidence, unassuming yet enduring, in my ability to do mathematics, which owes nothing to any consensus or to the fashions which pass as law….By this I mean to say: to reach out in my own way to the things I wished to learn, rather than relying on the notions of the consensus, overt or tacit, coming from a more or less extended clan of which I found myself a member, or which for any other reason laid claim to be taken as an authority. This silent consensus had informed me, both at the lycée and at the university, that one shouldn’t bother worrying about what was really meant when using a term like “volume,” which was “obviously self-evident,” “generally known,” “unproblematic,” etc….It is in this gesture of “going beyond,” to be something in oneself rather than the pawn of a consensus, the refusal to stay within a rigid circle that others have drawn around one—it is in this solitary act that one finds true creativity. All others things follow as a matter of course.

Since then I’ve had the chance, in the world of mathematics that bid me welcome, to meet quite a number of people, both among my “elders” and among young people in my general age group, who were much more brilliant, much more “gifted” than I was. I admired the facility with which they picked up, as if at play, new ideas, juggling them as if familiar with them from the cradle—while for myself I felt clumsy, even oafish, wandering painfully up an arduous track, like a dumb ox faced with an amorphous mountain of things that I had to learn (so I was assured), things I felt incapable of understanding the essentials or following through to the end. Indeed, there was little about me that identified the kind of bright student who wins at prestigious competitions or assimilates, almost by sleight of hand, the most forbidding subjects.

In fact, most of these comrades who I gauged to be more brilliant than I have gone on to become distinguished mathematicians. Still, from the perspective of thirty or thirty-five years, I can state that their imprint upon the mathematics of our time has not been very profound. They’ve all done things, often beautiful things, in a context that was already set out before them, which they had no inclination to disturb. Without being aware of it, they’ve remained prisoners of those invisible and despotic circles which delimit the universe of a certain milieu in a given era. To have broken these bounds they would have had to rediscover in themselves that capability which was their birthright, as it was mine: the capacity to be alone.

which puzzled then struggling at relatively trivial contest math me quite a bit. Now, I feel like I can relate to what he is saying.

I am certainly not a “conformist”, unlike most of those silly Chinese ~~intellectuals~~ status-seekers in America. In high school, I soon realized that people like CN Yang and SS Chern and Grothendieck were way more significant than those math contests most smart high school kids pay attention to, even though I was then far from any understanding what they did. Actual great mathematicians or scientists and their life experiences interested me much more than grades or tests or contests. Of course, to actually appreciate their life experiences, learning a certain degree of material directly related to the science they did is necessary. Another aspect of my “non-conformism” is well represented by how I eventually realized that all that trying to obtain “status” by associating with prestigious American institutions or contests on the part of the Chinese in America is rather misguided and ridiculous. I’m glad that I kept some distance from most of the ethnic Chinese kids in America while growing up, which I did much because for some reason, most of them and their tastes made me feel uncomfortable in a way that might be difficult to explain.