|
Archive:
Subtopics:
Comments disabled |
Wed, 09 Aug 2023
No plan survives contact with the enemy
According to legend, Champion boxer Mike Tyson was once asked in an interview if he was worried about his opponent's plans. He said:
It's often claimed that he said this before one of his legendary fights with Evander Holyfield, but Quote Investigator claims that it was actually in reference to his fight with Tyrell Biggs. Here's how Wikipedia says the fight actually went down:
Tyson was 100% correct. He went on to knock out Biggs seventh round. NoteThe actual quote appears to have been more like “Everybody has plans until they get hit for the first time”. The “punched in the mouth” version only seems to date back to 2004. Further research by Barry Popik. [Other articles in category /misc] permanent link Fri, 04 Aug 2023The standard individual U.S. Army ration since 1981, the so-called “Meal, Ready-to-Eat”, is often called “three lies for the price of one”, because it is not a meal, not ready, and not edible. [Other articles in category /misc] permanent link
Worst waterfall in the U.S. and Doug Burgum pays me $19
North Dakota is not a place I think about much, but it crossed paths with me twice in July. WaterfallsLast month I suddenly developed a burning need to know: if we were to rank the U.S. states by height of highest waterfall, which state would rank last? Thanks to the Wonder of the Internet I was able to satisfy this craving in short order. Delaware is the ⸢winner⸣, being both very small and very flat. In looking into this, I also encountered the highest waterfall in North Dakota, Mineral Springs Waterfall. (North Dakota is also noted for being rather flat. It is in the Great Plains region of North America.) The official North Dakota tourism web site (did you know there was one? I didn't.) has a page titled“North Dakota has a Waterfall?” which claims an 8-foot (2.4m) drop. The thing I want you to know, though, is that they include this ridiculous picture on the web site: Wow, pathetic. As Lorrie said, “it looks like a pipe burst.” The World Waterfall Database claims that the drop is 15 feet (5m). The WWD is the source cited in the official USGS waterfall data although the USGS does not repeat WWD's height claim. I am not sure I trust the WWD. It seems to have been abandoned. I wrote to all their advertised contact addresses to try to get them to add Wadhams Falls, but received no response. Doug BurgumDoug Burgum is some rich asshole, also the current governor of North Dakota, who wants to be the Republican candidate for president in the upcoming election. To qualify for the TV debate next month, one of the bars he had to clear was to have received donations from 40,000 individuals, including at least 200 from each of 20 states. But how to get people to donate? Who outside of North Dakota has heard of Doug Burgum? Certainly I had not. If you're a rich asshole, the solution is obvious: just buy them. For a while (and possibly still) Burgum was promising new donors to his campaign a $20 debit card in return for a donation of any size. Upside: Get lots of free media coverage, some from channels like NPR that would normally ignore you. Fifty thousand new people on your mailing list. Get onstage in the debate. And it costs only a million dollars. Money well spent! Downside: Reimbursing people for campaign donations is illegal, normally because it would allow a single donor to evade the limits on individual political contributions. Which is what this is, although not for that reason; here it is the campaign itself reimbursing the contributions. Anyway, I was happy to take Doug Burgum's money. (A middle-class lesson I tried to instill into the kids: when someone offers you free money, say yes.) I donated $1, received the promised gift card timely, and immediately transferred the money to my transit card. I was not able to think of a convincing argument against this:
Taking Doug Burgum's $19 was time well-spent, I would do it again. Addendum: North Dakota tourismOut of curiosity about the attractions of North Dakota tourism, I spent a little while browsing the North Dakota tourism web site, wondering if the rest of it was as pitiful and apologetic as the waterfall page. No! They did a great job of selling me on North Dakota tourism. The top three items on the “Things to Do” page are plausible and attractive:
Good stuff. I had hoped to visit anyway, and the web site has gotten me excited to do it. [Other articles in category /geo] permanent link Tue, 01 Aug 2023
Computational content of Gantō's axe
Lately I have been thinking about the formula $$((P\to Q)\land (\lnot P \to Q)) \to Q \tag{$\color{darkgreen}{\heartsuit}$}$$ which is a theorem of classical logic, but not of intuitionistic logic. This shouldn't be surprising. In CL you know that one of !!P!! and !!\lnot P!! is true (although perhaps not which), and whichever it is, it implies !!Q!!. In IL you don't know that one of !!P!! and !!\lnot P!! is provable, so you can't conclude anything. Except you almost can. There is a family of transformations !!T!! where, if !!C!! is classically valid !!T(C)!! is intuitionistically valid even if !!C!! itself isn't. For example, if !!C!! is classically valid, then !!\lnot\lnot C!! is intuitionistically valid whether or not !!C!! is. IL won't prove that !!(\color{darkgreen}{\heartsuit})!! is true, but it will prove that it isn't false. I woke up in the middle of the night last month with the idea that even though I can't prove !!(\color{darkgreen}{\heartsuit})!!, I should be able to prove !!(\color{darkred}{\heartsuit})!!: $$((P\to Q)\land (\lnot P \to Q)) \to \color{darkred}{\lnot\lnot Q} \tag{$\color{darkred}{\heartsuit}$}$$ This is correct; !!(\color{darkred}{\heartsuit})!! is intuitionistically valid. Understanding !!\lnot X!! as an abbreviation for !!X\to\bot!! (as is usual in IL), and assuming $$ \begin{array}{rlc} P\to Q & & (1) \\ \lnot P\to Q & & (2) \\ \lnot Q & (≡ Q\to\bot) & (3) \end{array} $$ we can combine !!P\to Q!! and !!Q\to\bot!! to get !!P\to\bot!! which is the definition of !!\lnot P!!. Then detach !!Q!! from !!(2)!!. Then from !!Q!! and !!(3)!! we get !!\bot!!, and discharging the three assumptions we conclude: $$ \begin{align} \color{darkblue}{(P\to Q)\to (\lnot P \to Q)} & \to \color{darkgreen}{\lnot Q \to \bot} \\ ≡ \color{darkblue}{((P\to Q)\land (\lnot P \to Q))} & \to \color{darkgreen}{\lnot\lnot Q} \tag{$\color{darkred}{\heartsuit}$} \end{align}$$ But what is going on here? It makes sense to me that !!(P\to Q)\land (\lnot P \to Q)!! doesn't prove !!Q!!. What I couldn't understand was why it could prove anything at all. The part that puzzled me wasn't that !!P\to Q!! and !!\lnot P\to Q!! wouldn't prove !!Q!!. It's that they would prove anything more than zero. And if !!(P\to Q)\land (\lnot P\to Q)!! can prove !!\lnot\lnot Q!!, then why can't it prove anything else? This isn't a question about the formal logical system. It's a question about the deeper meaning: how are we to understand this? Does it make sense? I think the answer is that !!Q\to\bot!! is an extremely strong assumption, in fact the strongest possible statement you can make about !!Q!!. So it's easist possible thing you can disprove about !!Q!!. Even though !!(P\to Q)\land(\lnot P\to Q)!! is not enough to prove anything positive, it is enough, just barely, to disprove the strongest possible statement about !!Q!!. When you assume !!Q\to \bot!!, you are restricting your attention to a possible world where !!Q!! is actually false. When you find yourself in such a world, you discover that both !!P\to Q!! and !!\lnot P\to Q!! are much stronger than you suspected. My high school friends and I used to joke about “very strong theorems”: “I'm trying to prove that a product of Lindelöf spaces is also a Lindelöf space” one of us would say, and someone would reply “I think that is a very strong theorem,” meaning, facetiously or perhaps sarcastically, that it was false. But facetious or sarcastic, it's funny because it's correct. False theorems are really strong, that's why they are so hard to prove! We've been trying for thousands of years to prove a false theorem, but every time we think we have done it, there turns out to be a mistake in the proof. My puzzlement about why !!(P\to Q)\land (\lnot P\to Q)!! can prove anything, translated into computational language, looks like this: I have a function !!P\to Q!! (but I don't have any !!P!!) and a function !!\lnot P\to Q!! (but I don't have any !!\lnot P!!). The intutionistic logic says that I can't use these functions to to actually get any !!Q!!, which is not at all surprising, because I don't have anything to use as arguments. But IL says that I can get !!\lnot\lnot Q!!. The question is, how can I get anything from these functions when I don't have anything to use as arguments? Translating the proof of the theorem into computations, the answer one gets is quite unsatisfying. The proof observes that if I also had a !!Q\to\bot!! function, I could compose it with the first function to make a !!P\to\bot\equiv \lnot P!! which I could then feed to the second function and get !!Q!! from nowhere. Which is very strange, since operationally, where does that !!Q!! actually come from? It's manufactured by the !!\lnot P\to Q!! function, which was rather suspicious to begin with. What does such a function actually look like? What functions of this type can actually be implemented? It all seems rather unlikely: how on earth would you turn a !!P \to \bot!! value into a !!Q!! value? One reasonable answer is that if !!Q = \lnot P!!, then it's easy to write that suspicious !!\lnot P\to Q!! function. But if !!Q=\lnot P!! then the claim that I also have a !!P\to Q!! function looks extremely dubious. An answer that looks good at first but flops is that if !!Q=\mathtt{int}!! or something, then it's quite easy to produce the required functions, both !!P\to Q!! and !!\lnot P\to Q!!. The constant function that always returns !!23!! will do for either or both. But this approach does not answer the question, because in such a case we can deduce not only !!\lnot\lnot Q!! but !!Q!! itself (the !!23!! again), so we didn't need the functions at in the first place. Is the whole thing just trivial because there is no interesting way to instantiate data objects with the right types? Or is there some real computational content here? And if there is, what is it, and how does that translate into the logic? Does this argument ever allow us to conclude something actually interesting? Or is it always just reasoning about vacuities? NoteAs far as I know the formula !!(\color{darkgreen}{\heartsuit})!! was first referred to as “Gantō's Axe” by Douglas Hofstadter. This is a facetious reference to a certain Zen koan, which says, in part:
(See Kubose, Gyomay M. Zen Koans, p.178.) [Other articles in category /math/logic] permanent link Mon, 31 Jul 2023
Can you identify this language?
Rummaging around in the Internet Archive recently, I found a book in a language I couldn't recognize. Can you identify it? Here's a sample page:
I regret that IA's scan is so poor. Answer: Breton. Addendum 20230731: Bernhard Schmalhofer informs me that HathiTrust has a more legible scan. ] [Other articles in category /lang] permanent link Sun, 30 Jul 2023
The shell and its crappy handling of whitespace
I'm about thirty-five years into Unix shell programming now, and I continue to despise it. The shell's treatment of whitespace is a constant problem. The fact that
doesn't work is a constant pain. The problem here is that if one of
the filenames is
and fail, saying
or worse there is a file named To make it work properly you have to say
with the quotes around the Now suppose I have a command that strips off the suffix from a filename. For example,
simply prints
Ha ha, no,some of the files might have spaces in their names. I have to write:
Ha ha, no, fooled you, the output of
At this point it's almost worth breaking out a real language and using something like this:
I think what bugs me most about this problem in the shell is that it's
so uncharacteristic if the Bell Labs people to have made such an
unforced error. They got so many things right, why not this? It's
not even a hard choice! 99% of the time you don't want your strings
implicitly split on spaces, why would you? And the shell doesn't have
this behavior for any other sort of special character. If you have a
file named Even if it was a simple or reasonable choice to make in the beginning,
at some point around 1979 Steve Bourne had a clear opportunity to
realize he had made a mistake. He introduced
and then run it:
except that doesn't work because
Oh, I see what went wrong, it thinks it got three arguments, instead
of two, because the elements of
No, the quotes disabled all the splitting so that now I got one argument that happens to contain two spaces. This cannot be made to work. You have to fix the shell itself. Having realized that
and
so that inside of I deeply regret that, at the moment that Steve Bourne coded up this weird special case, he didn't instead stop and think that maybe something deeper was wrong. But he didn't and here we are. Larry Wall once said something about how too many programmers have a problem, think of a simple solution, and implement the solution, and what they really need to be doing is thinking of three solutions and then choosing the best one. I sure wish that had happened here. Anyway, having to use quotes everywhere is a pain, but usually it works around the whitespace problems, and it is not much worse than a million other things we have to do to make our programs work in this programming language hell of our own making. But sometimes this isn't an adequate solution. One of my favorite trivial programs is called
Many programs stick files into that directory, often copied from the
web or from my phone, and often with long and difficult names like
or
or
except ha ha, no I don't, because none of those work reliably, they all fail if the difficult filename happens to contain spaces, as it often does. Instead I need to type
which in a command so short and throwaway is a noticeable cost, a cost extorted by the shell in return for nothing. And every time I do it I am angry with Steve Bourne all over again. There is really no good way out in general. For
The actual script is somewhat more reliable, and is written in Python, because shell programming sucks. [ Addendum 20230731: Drew DeVault has written a reply article about
how the [ Addendum 20230806: Chris Siebenmann also discusses [Other articles in category /Unix] permanent link Sat, 29 Jul 2023
Tiny life hack: paint your mouse dongles
I got a small but easy win last month. I have many wireless mice, and many of them are nearly impossible to tell apart. Formerly, I would take my laptop somewhere, leaving the mouse behind, but accidentally take the dongle with me. Then I had a mouse with no dongle, but no way to match the dongle with all the other mice that had no dongle. At best I could remember to put the dongles on a shelf at home, the mice on an adjacent shelf, and periodically attempt to match them up. This is a little more troublesome thna it sounds at first, because a mouse that seems not to match any of the dongles might just be out of power. So I have to change the batteries in all the mice also. Anyway, this month I borrowed Toph's paint markers and color-coded each mouse and dongle pair. Each mouse has a different color scribbled on its underside, and each dongle has a matching scribble. Now when I find a mystery dongle in one of my laptops, it's easy to figure out which mouse it belongs with. The blue paint is coming off the dongle here, but there's still enough to recognize it by. I can repaint it before the color goes completely. I had previously tried Sharpie marker, which was too hard to see and wore off to quickly. I had also tried scribing a pattern of scratches into each mouse and its dongle, but this was too hard to see, and there isn't enough space on a mouse dongle to legibly scribe very much. The paint markers worked better. I used Uni Posca markers. You can get a set of eight fat-tipped markers for $20 and probably find more uses for them. Metallic colors might be more visible than the ones I used. [ Addendum 20230730: A reader reports good results using nail polish, saying “It's cheap, lots of colors available and if you don't use gel variants it's pretty durable.”. Thanks nup! ] [Other articles in category /tech] permanent link Fri, 09 Jun 2023
Math SE report 2023-05: Arguments that don't work, why I am a potato, and set theory as a monastery
How to shift a power series to be centered at !!a!!?OP observed that while the Taylor series for !!\sin x!!, centered at zero, is a good approximation near !!x=0!!, it is quite inaccurate for computing !!\sin 4!!:
They wanted to know how to use it to compute a good approximation for !!\sin 4!!. But the Taylor series centered around !!4!! is no good for this, because it only tells you that when !!x!! is close to !!4!!, $$\sin x \approx \sin 4 + (x-4)\cos 4 + \ldots, $$ which is obviously useless: put !!x=4!! and you get !!\sin 4 = \sin 4!!. I'd written about Taylor series centering at some length before, but that answer was too long and detailed to repeat this time. It was about theory (why do we do it at all) and not about computation. So I took a good suggestion from the comments, which is that if you want to compute !!\sin 4!! you should start with the Taylor series centered around !!π!!: $$\begin{align} \sin x & \approx \sin \pi + (x-\pi)\cos \pi - \frac{(x-\pi)^2}{2}\sin \pi - \frac{(x-\pi)^3}{6}\cos \pi + \ldots \\ & = -(x-\pi) + \frac{(x-\pi)^3}{6} - \frac{(x-\pi)^5}{120} + \ldots \end{align} $$ because the !!\sin \pi!! terms vanish and !!\cos \pi = -1!!. I did some nice rainbow-colored graphs in Desmos.
I just realized I already wrote this up last month. And do you know why? It's because I copied this article from last month's, forgot to change the subject line from “2023-04” to “2023-05”, and because of that forgot that I was doing May and not April. Wheeee! This is what comes of writing blog articles at 3 AM. Well anyway, continuing with May, we have… Rational solutions for !!x^3+y^3=1!! where both x and y are non-negativeOP wanted solutions to $$x^3 + y^3 = 1,$$ and had done some research, finding a relevant blog post that they didn't understand, which observed that if !!x!! and !!y!! were solutions, so too would be certain functions of !!x!! and !!y!!, and this allows an infinite family of solutions to be developed if one knows a solution to begin with. Unfortunately, there are no nontrivial rational solutions to !!x^3 + y^3 = 1!!, as has been known for some time. The blog post that OP found was discussing !!x^3 + y^3 = 9!!, for which !!\langle x, y\rangle = \langle 1, 2\rangle !! is an obvious starting point. OP asked a rather odd question in the comments:
Had they actually tried this, they would have seen that if they started with !!\langle x, y\rangle = \langle 0, 1\rangle !!, when they computed the two functions that were supposed to give they another solution, they got !!\langle 0, 1\rangle !! back again. I told OP to try it and see what happened. (Surprising how often people forget this. Lower Mathematics!) This reminds me a bit of a post I replied to long ago that asked why we can't use induction to prove the Goldbach conjecture. Well, what happens when you try? The base case is trivial, so far so good. The induction case says here you go, for every even number !!k < n!! I give you primes !!p_k!! and !!q_k!! with !!p_k+q_k = k!!. Your job is to use these to find primes !!p_{k+2}!! and !!q_{k+2}!! with !!p_{k+2}+q_{k+2} = k+2!!. Uhhh? What now? Proving !!n(n^2+5)!! is always evenMathematicially this is elementary, but the pedagogy is interesting. OP had already proved this by considering even and odd cases separately, but wanted to know if an induction proof was possible. They had started one, but gotten stuck. Three people, apparently not reading the question, provided proofs by considering even and odd cases separately. One other provided a proof by induction that was “a bit hairy”. But I think a better answer engages with OP's attempt at an induction proof: Instead of “here's a way it could be done”, it's better to provide “here's how you could have made your way work”. I used a trick, which is that instead of taking !!\Phi(x)!! to mean “!!f(x)!! is even”, and proving !!\Phi(x)!! for all !!x!! by induction, I took !!\Phi(x)!! to mean “!!f(x)!! is even and !!f(x+1)!! is also even”. You have to prove more, but you have more to work with. For a similar approach to a similar problem, see Proof that every third Fibonacci number is even. The key feature that makes this a good answer is where it says:
It's important to point out to the student when their idea would have worked. This is important in code reviews too. The object is not to make the junior programmer do it the same way you would have, it's to help them make their own idea work well. I ought to write an article about that. Is an argument valid if assuming its premises and conclusion leads to no contradiction?This was one of those questions where OP proposed some logical principle that was totally invalid and asked why it isn't allowed, something about why you can't assume the conclusion and show that it satisfies the required properties. It's a curious question because there's such a failure of instruction here: OP has not grasped what it means to be a valid deduction, that the logic used in mathematics is the same logic that is used everywhere else, and that mathematical arguments are valid or invalid for the same reasons that those same arguments are valid or invalid when thinking about anything else: the invalid arguments lead you to the wrong conclusions! Anyway, I don't want to quote my whole answer here, but you should check it out, it's amusing. OP didn't like it though. Proving or disproving that if !!A^2X=λ^2X!! then !!AX=λX!!OP did like this one, and so do I, it's hilarious. The question is apparently something about linear transformations and eigenvalues and stuff like that, which I never learned as well as I should have, owing to my undergraduate linear algebra class being very poor. (Ugh, so many characteristic polynomials.) Someone else posted a linear algebra (dis)proof which was very reasonable and which got several upvotes. But I realized that this is not actually a question about eigenvalues! It is elementary algebra: If you have an example where !!A^2X=λ^2X!!, then !!-\lambda!! has this property also and is a counterexample to the claim. OP was pleased with this and accepted my answer instead of the smart one with the upvotes. This kind of thing is why my Math SE avatar is a potato. Can we treat two equal sets as being distinct mathematical objects?There was an answer to this that I felt was subtly wrong. It said:
and then started talking about ZFC, which seems to me to be an irrelevant confusion. The formal idea of sets comes from the axioms, but the axioms themselves come from a sort of preformal idea of sets. We want to study what happens when we have these things-that-have-elements, and when we ignore any other properties that they might have. The axiom is just a more formal statement of that. Do sets have properties, such as identities, other than their elements? It's tempting to say “no” as this other person did. But I think the more correct answer is “it doesn't matter”. Think of a monastery where, to enter, you must renounce all your worldly possessions. Must you legally divest yourself of the possessions in order to enter the monastery? Will the monks refuse you entry if, in the view of the outside world, you still own a Lamborghini? No, they won't, because they don't care. The renunciation is what counts. If you are a monk and you ask another monk whether you still own the Lamborgini, they will just be puzzled. You have renounced your possessions, so why are you asking this? Monks are not concerned with Lamborghinis. Set theory is a monastery where the one requirement for entry is that you must renounce your interest in properties of sets other than those that come from their elements. Whether a set owns a Lamborghini is of no consequence to set theorists. [Other articles in category /math/se] permanent link Wed, 31 May 2023
Why does this phrase sound so threatening?
I took it the same way:
is a menacing way to begin, foreboding bad times ahead for the Village. But what about this phrasing communicates that so unmistakably? I can't put my finger on it. Is it “decided that”? If so, why? What would have been a less threatening way to say the same thing? Does “good idea” contribute to the sense of impending doom? Why or why not? (The rest of the case is interesting, but to avoid distractions I will post about it separately. The full opinion is here.) [Other articles in category /lang] permanent link
More about _Cozzi v. Village of Melrose Park_
Earlier today I brought up the case of Cozzi v. Village of Melrose Park and the restrained but unmistakably threatening tone of the opening words of the judge's opinion in that case:
I didn't want to distract from the main question, so I have put the details in this post instead. the case is Cozzi v. Village of Melrose Park N.D.Ill. 21-cv-998, and the judge's full opening paragraph is:
The full docket is available on CourtListener. Mr. Cozzi died in February 2022, sometime before the menacing opinion was written, and the two parties are scheduled to meet for settlement talks next Thursday, June 8. The docket also contains the following interesting entry from the judge:
[Other articles in category /law] permanent link Sun, 28 May 2023
The Master of the Pecos River returns
Lately I have been enjoying Adam Unikowsky's Legal Newsletter which is thoughtful, informative, and often very funny. For example a recent article was titled “Why does doctrine get so complicated?”:
Along the way Unikowsky wanted to support that claim that:
and, comparing the law with fields such as medicine, physics or architecture which require actual expertise, he explained:
I laughed at that.
Anyway, that was not what I planned to talk about. For his most recent article, Unikowsky went over all the United States Supreme Court cases from the last ten years, scored them on a five-axis scale of interestingness and importance, and published his rankings of the least significant cases of the decade”. Reading this was a little bit like the time I dropped into Reddit's r/notinteresting forum, which I joined briefly, and then quit when I decided it was not interesting. I think I might have literally fallen asleep while reading about U.S. Bank v. Lakeridge, despite Unikowsky's description of it as “the weirdest cert grant of the decade”:
Even when the underlying material was dull, Unikowsky's writing was still funny and engaging. There were some high points. Check out his description of the implications of the decision in Amgen, or the puzzled exchange between Justice Sotomayor and one of the attorneys in National Association of Manufacturers. But one of the cases on his list got me really excited:
Does this ring a bell? No? I don't know that many Supreme Court cases, but I recognized that one. If you have been paying attention you will remember that I have blogged about it before! I love when this happens. It is bit like when you have a chance meeting with a stranger while traveling in a foreign country, spend a happy few hours with them, and then part, expecting never to see them again, but then years later you are walking in a different part of the world and there they are going the other way on the same sidewalk. [Other articles in category /law] permanent link Fri, 26 May 2023
Hieroglyphic monkeys holding stuff
I recently had occasion to mention this Unicode codepoint
with the undistinguished name
In a slightly more interesting world it would have been called
Unicode includes a group of eight similar hieroglyphic signs of monkeys holding stuff. Screenshots are from Unicode proposal N1944, Encoding Egyptian Hieroglyphs in Plane 1 of the UCS. The monkeys are on page 27. The names are my own proposals.
|