A Programmer's Introduction to Mathematics
Some comments&#x2F;corrections on the first chapter, if you don&#x27;t mind:<p>1. Theorem 2.4 is stated incorrectly.  Given the context, I feel like this is worth correcting.  Specifically, it says &quot;degree n&quot; rather than &quot;degree at most n&quot;.  Part of the proof purports to prove that the degree is indeed n but of course it doesn&#x27;t because that needn&#x27;t be true.<p>There are other cases where you say &quot;degree n&quot; for &quot;degree at most n&quot;.  Again usually this would be a minor error not worth pointing out, but in this context it seems worth getting right.<p>2. At one point you introduce a convention that deg(0)=-1.  Later, in the exercises, you ask, is this really such a good convention?  (The answer being, of course, no.)  IMO you should anticipate this.  Indeed I don&#x27;t think you should state, as you do, &quot;By convention the zero polynomial is defined to have degree -1&quot;, because that suggests it&#x27;s some standard universal convention, which is definitely correct, and it&#x27;s neither of those.  Rather you should say something like &quot;We&#x27;ll use the convention that the zero polynomial is defined to have degree -1&quot;.  But anyway, the point I made is that, if you&#x27;re going to question its correctness later, you should anticipate that here, maybe saying something like &quot;(Think about whether this convention makes sense.)&quot;  Or maybe not, and just getting rid of the absolutism of your current wording is sufficient.  Either way, getting rid of that absolutism and certainty is good; you want to encourage to people about this sort of thing immediately, not encourage them not to think about it until later.<p>3. You say that when you see a definition you should write down examples.  I would add, &quot;and non-examples&quot;.  Ideally non-examples that come as close as possible but don&#x27;t quite make it.  You touch on this a little with your polynomial examples, but it&#x27;s worth stating explicitly.<p>(In some cases non-examples are unnecessary, but in the generic case one should look for them.)<p>4. Regarding your polynomial examples, you don&#x27;t justify that they are, in fact, not polynomials.  Now of course you don&#x27;t, that would be too hard to do here and take up lots of space you want to use for other things.  That&#x27;s fine.  But if you&#x27;re not going to do it, you should call out that you&#x27;re skipping over it, like you do with other things.  After all, all sorts of nonobvious things can be polynomials -- such as (x-1)(x+6)^2, as you pointed out earlier, but included no similar examples here.  (Yes that&#x27;s obvious to anyone who knows anything about polynomials, but my point is that it&#x27;s not in the correct syntactic form.)  Like, x^e - x^e is a polynomial, you know?  Because it&#x27;s 0.  So without some more knowledge, you can&#x27;t <i>immediately</i> conclude that your example x + x^2 - x^pi + x^e is in fact not a polynomial!  You should make a note of that, as I said.<p>5. I feel like it&#x27;s likely worth noting somewhere in this chapter that actually in general in math it&#x27;s the &quot;syntactic&quot; definition of polynomial that turns out to be the right one (you don&#x27;t want to define polynomials to be functions if you&#x27;re working over a finite field, say!).  Maybe not and that would just be confusing, I dunno.<p>6. This is just nitpicking, but I&#x27;d suggest rewriting Theorem 2.3 in a clearer, more standard way.  &quot;A nonzero polynomial of degree n has at most n distinct roots.&quot;  What you wrote down is equivalent, of course, but (IMO) harder to read.<p>Otherwise, this is pretty nice.  I remember being distinctly confused by stuff like &quot;the product over j not equal to i&quot; when I was a kid.  I imagine it&#x27;ll be quite helpful to a number of people that you&#x27;re laying things out like that explicitly.<p>Actually, sorry, on that note, one further comment:<p>7. You comment on how sigma and pi notation are special cases of fold, but you might want to make a further note about how (unlike general folds) these are folds where the order doesn&#x27;t matter, and that the fact that the order doesn&#x27;t matter is one of the things that allows notation like &quot;product over j not equal to i&quot;.