Earlier quoted context omitted.
A program proves nothing at all so I am not sure what you can understand from it? Typically in programming you are presented with a piece of code, a statement that this piece of code solves a specific problem and then a proof of that it actually works. Those proofs are typically far from understandable or rigorous.
But programs are proofs! At least in the light of the Curry–Howard correspondence. :) Anyways, I do agree that in programming it’s easier to see what are introductions, assumptions, definitions, functions, values etc. You can’t just invent a notation and go with it. Everything needs to be defined from the ground up. It’s constructive and I like that, probably because I’m a programmer.
A Programmer's Introduction to Mathematics
141–150 of 223 posts
Re: A Programmer's Introduction to Mathematics
#142It appears the ebook is in PDF format[1], does anyone know if an EPUB will become available? [1]: https://gumroad.com/l/pim-book
Re: A Programmer's Introduction to Mathematics
#1431. Theorem 2.4 is stated incorrectly. Given the context, I feel like this is worth correcting. Specifically, it says "degree n" rather than "degree at most n". Part of the proof purports to prove that the degree is indeed n but of course it doesn't because that needn't be true.
There are other cases where you say "degree n" for "degree at most n". Again usually this would be a minor error not worth pointing out, but in this context it seems worth getting right.
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't think you should state, as you do, "By convention the zero polynomial is defined to have degree -1", because that suggests it's some standard universal convention, which is definitely correct, and it's neither of those. Rather you should say something like "We'll use the convention that the zero polynomial is defined to have degree -1". But anyway, the point I made is that, if you're going to question its correctness later, you should anticipate that here, maybe saying something like "(Think about whether this convention makes sense.)" 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.
3. You say that when you see a definition you should write down examples. I would add, "and non-examples". Ideally non-examples that come as close as possible but don't quite make it. You touch on this a little with your polynomial examples, but it's worth stating explicitly.
(In some cases non-examples are unnecessary, but in the generic case one should look for them.)
4. Regarding your polynomial examples, you don't justify that they are, in fact, not polynomials. Now of course you don't, that would be too hard to do here and take up lots of space you want to use for other things. That's fine. But if you're not going to do it, you should call out that you'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's obvious to anyone who knows anything about polynomials, but my point is that it's not in the correct syntactic form.) Like, x^e - x^e is a polynomial, you know? Because it's 0. So without some more knowledge, you can't immediately 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.
5. I feel like it's likely worth noting somewhere in this chapter that actually in general in math it's the "syntactic" definition of polynomial that turns out to be the right one (you don't want to define polynomials to be functions if you're working over a finite field, say!). Maybe not and that would just be confusing, I dunno.
6. This is just nitpicking, but I'd suggest rewriting Theorem 2.3 in a clearer, more standard way. "A nonzero polynomial of degree n has at most n distinct roots." What you wrote down is equivalent, of course, but (IMO) harder to read.
Otherwise, this is pretty nice. I remember being distinctly confused by stuff like "the product over j not equal to i" when I was a kid. I imagine it'll be quite helpful to a number of people that you're laying things out like that explicitly.
Actually, sorry, on that note, one further comment:
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't matter, and that the fact that the order doesn't matter is one of the things that allows notation like "product over j not equal to i".
Re: A Programmer's Introduction to Mathematics
#144I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…
http://www.alt.mathematik.uni-mainz.de/Members/lehn/le/semin...
Here is the Google Translate transcript:
"""
How do you read mathematical texts?
If you are ready to give a seminar lecture in your studies, you have already studied one or two semesters and read one or the other book and know what is important: If you read mathematical texts, there are two modes in which You can proceed: From the bird's eye view: What are the rough lines? What is the subject of the present text? What are the central concepts and definitions, what are the central statements and sentences? What are the rough evidence structures? Why do you do it all? From a frog's perspective: how is it done in detail? How does a proof work? Why do you need the prerequisites in the sentence? What happens if you leave them out? You often have to switch between these modes. First, one has to get an overview of where one is actually going, otherwise one bites oneself in the first technical lemma and gets stuck. At the first reading one can skip all the evidence and focus on the statements of the sentences. At some point, however, comes the point where one no longer understands the sentences, because one has developed no feeling for the introduced concepts. Then it's time to take a closer look at the evidence as well. If you have understood more technical details, you should step back a bit and ask yourself again what the overall context is, etc. In an adapted form, this also applies to the way you approach individual sentences or examples. If you are confronted with a new sentence, you may ask questions of the following kind before, after, or even while studying your proof: What are simple examples of the sentence (such as special cases)? What are simple counterexamples where certain conditions are not met? Does the sentence, or the term used or the proof, refer to already known things? Is there a characteristic example of observing all the essential phenomena? Work in circles in the literature to your presentation (and his position in the seminar).
"""
(You have to swap the word "sentence" with (mathematical) "proposition" or "theorem" at some places for this to make more sense. In german those are the same word ("Satz").)
Re: A Programmer's Introduction to Mathematics
#145I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…
Doing exercises or taking notes is only necessary if you feel the need for it, otherwise try to understand what the thing is and try to find where it is applied. Even though you probably won't ever need it in the future if you do picking it up will be much easier and this way you get the quick endorphins from figuring stuff out without the drudgery of actual work.
just my 2c.
Re: A Programmer's Introduction to Mathematics
#146Earlier quoted context omitted.
Is this a feature or a bug? If it takes you two weeks to apply creative solutions and it take me one week to apply a “rote” solution, what is the benefit?
The main reason to study mathematics is to build and fix your intuition, hence studying rote solutions is a waste of time. It might help you pass the class but it wont help you much at all in other parts of life. For example, at work nobody will care if you have rote memorized a solution or not since they will have already done the math, you will just apply formulas others have came up with. In order to do anything i…
Edit: To your reply below, I’m talking about someone that is self-studying and has no access to a teacher. The suggestion the beginner (without a teacher) should “know” whether or not their solutions are correct is something I disagree with.
I do agree with there are multiple ways to prove something and such a beginner may think their proof is incorrect based on a provided solution, when it may be correct, just different. This is why an instructor is valuable.
Re: A Programmer's Introduction to Mathematics
#147It's good to have something that lowers the bar for programmers so they could learn themselves some math without much fear. Knowing math is very important if you are a coder - and not just linear algebra: knowing a formula, for example, might let you do certain things in constant rather than linear time or, perhaps, reduce the cost of the iteration. Unfortunately, too many of those who can call themselves programmers…
Re: A Programmer's Introduction to Mathematics
#148I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…
Personally, I tend to skim; I find most texts to be far too verbose. But then if I find a part that I'm interested in or want to explore at length, then I'd read it more in-depth.
I think classical books suffer from a lack of features like hyperlinks. This is, authors either have to say something or not say it; they can't just say something concisely with links for readers who want to read more (Note below). As a result, textbooks tend to be cluttered.
Skimming helps you to cut through the clutter to get what you need. But since you'll almost certainly miss points while skimming, it'll tend to involve bouncing back-and-forth rather than a straight read-through.
---
Note: Of course, footnotes like this, along with appendices and references, are partial substitutes for active content. They're far more limited (Meta-note below) and have a much higher overhead on both reader and writer, but they're still often better than cramming everything into the body of a text.
---
Meta-note: Because, seriously, who wants to trace recursively nested footnotes? For more discussion on this topic, please see "_References: Why they're inconvenient_", p.156.
Re: A Programmer's Introduction to Mathematics
#149I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…
Re: A Programmer's Introduction to Mathematics
#150I have a genuine question which might sound dumb but I really do wonder. How do you actually read math, physics and programming books? Reading them the same way as you'd read a novel doesn't seem right. I try to go chapter after chapter and make notes but I often get bored because I don't see the usage in my real life coding. Maybe I'm not working on problems that are challenging enough? Also after few chapters it of…
I don't think you are doing anything wrong. Depending on how the book is written, some might be really boring and unchallenging, pick another one! If you are looking for brain-wrecking adventure and some good story telling, pick something that starts with number theory. If you are looking for understanding the bread and butter for most recent big discoveries and theory crafting, pick something that focus on Complex Analaysis, High dimensional calculus or partial differential equations. If you are planning to stick in the field of computer science for good, pick something that focus on abstract algebra _and_ probabilty theory.
> I often get bored because I don't see the usage in my real life coding.
Then you don't need mathmatics. Depending what you do in coding, there is really rare type of work that need mathematics. Sciences and Mathematics are so far from practical use they are there purely for the sake of knowledge. This isn't just you, it's the case for everyone. Unless some day you find the interest to battle that boredom, the probability of you finding some usage from mathematics might be very unlikely.