An Algorithmic Lucidity

a blog

Speculative Etymology I

In the future (to say nothing of large swathes of the present), creative people work for status and attention rather than money. When X is employed by Y, X is said to be "on Y's blogroll" (coined in analogy to payroll).

Blood From a Stone

Decision-theoretically speaking, there's no difference between punishment and lack-of-reward. (Von Neumann–Morgenstern utility functions are really only defined up to an affine transformation: if your behavior is described by u(x), then v(x) := au(x) + b does just as well.) Psychology isn't like that; punishment and lack-of-reward are very different things—although not quite so different as one might think. In an environment where behavior X is rewarded with praise and status, and behavior Y is ignored—not punished, not condemned, but ignored—what kind of mind would it take to persist in behavior Y? It would either have to be very stubborn, unshakeably convinced in the righteousness of Y, or very stupid, desperately willing to endlessly chase a satisfaction that will never, ever come.

Friendship Deficits

I'm not sure, but I suspect that I'm running a friendship deficit—that I need my friends more than they need me.

In a naively romanticized world of "pure" and unconditional love, you would never have occasion to think of such things: friends are always there for each other, no matter what, and no one would dream of anything so monstrous as consciously evaluating whether it's worth maintaining a friendship given the costs and benefits of doing so (including the opportunity cost of forgoing something else that could be done with the same amount of time and attention).

And in a world of Bayesian expected-utility-maximizing decision agents, there would be no loyalty and no concept of friendship.

Part of the beauty of our world is that it lies somewhere between the two extremes, but that we don't know exactly where.

Telling Her There

"And so," said Synthia, "if you feel too self-conscious to write an email, if you don't know what to say or are afraid of saying the Wrong Thing, it might help to lower your quality standard and just start typing as if it were realtime communication, and edit later. It's less tempting to procrastinate replying in a realtime medium like instant messaging, and hardly tempting at all in meatspace, so you can try to import that same mindset to start your email."

"I don't usually have that problem," said Quiana.

"But, arguably, it's still a good thing that I told you, because your analogue in a nearby alternate universe who does have that problem would have been grateful for the tip, and I had to tell you here to ensure that my analogue there tells her."

"Or you could have conditioned your telling me on whether or not your local Quiana had the problem."

"Well, the reason I had to tell you here in order to sure that my analogue told her is that neither I nor my analogue previously knew which of us was which," Synthia explained. She shrugged apologetically. "Now we know."

Bounded but Not Totally Bounded, Redux

Theorem. An open set in real sequence space under the ℓ∞ norm is not totally bounded.

Proof. Consider an open set \(U\) containing a point \(p\). Suppose by way of contradiction that \(U\) is totally bounded. Then for every ε > 0, there exists a finite ε-net for \(U\). Fix ε, and let \(m\) be the number of points in our ε-net, which net we'll denote \(\{S_i\}_{i \in \{1, ..., m\}}\). We're going to construct a very special point \(y\), which does not live in \(U\). For all \(i \in \{1, ..., m\}\), we can choose the \(i\)th component \(y_i\) such that the absolute value of its difference from the \(i\)th component of the \(i\)th point in the net is strictly greater than ε (that is, \(|y_i - S_{i,i}| > \varepsilon\)) but also so that the absolute value of its difference from the \(i\)th component of \(p\) is less than or equal to ε (that is, \(|y_i - p_i| \le \varepsilon\)). Then for \(j > m\), set \(y_j = p_j\). Then \(|y - p| \le \varepsilon\), but that means there are points arbitrarily close to \(p\) which are not in \(U\), which is an absurd thing to happen to a point in an open set! But that's what I've been trying to tell you this entire time.

The Quieted Scare Convention

Everyone knows ("everyone knows") about "scare quotes," where you enclose a phrase in quotation marks to indicate that the literal interpretation of the words should be regarded with skepticism, but sometimes I do this thing where I'll use a phrase normally and then repeat it in scare quotes and parentheses, as if to say, "I do partially intend this sincerely, but also with some irony or skepticism, although not so much as to justify outright scare quotes."

Of course, this practice immediately suggests the "dual" (dual) practice of using a phrase with scare quotes and then repeating it unquoted in parentheses, as if to say, "I do partially intend this ironically or in a way that should be regarded with skepticism, but also with a some sincerity, although not so much as to justify not using any scare quotes at all."

Bounded but Not Totally Bounded

The idea of total boundedness in metric space (for every ε, you can cover the set with a finite number of ε-balls; discussed previously on An Algorithmic Lucidity) is distinct from (and in fact, stronger than) the idea of mere boundedness (there's an upper bound for the distance between any two points in the set), but to an uneducated mind, it's not immediately clear why. What would be an example of a set that's bounded but not totally bounded? Wikipedia claims that the unit ball in infinite-dimensional Banach space will do. Eric Hayashi made this more explicit for me: consider sequence space under the \(\ell^\infty\) norm, and the "standard basis" set (1, 0, 0 ...), (0, 1, 0, 0, ...), (0, 0, 1, 0, 0, ...). The distance between any two points in this set is one, so it's bounded, but an open 1-ball around any point doesn't contain any of the other points, so no finite number of open 1-balls will do, so it's not totally bounded, which is what I've been trying to tell you this entire time.

Dreams

Friend of the blog Alicorn tweets:

Why is the word "dreams" used to describe both pseudorandom nocturnal hallucinations and also heartfelt aspirations for real life?

A cynic might reply: because both the nocturnal hallucinations and the heartfelt aspirations are, for the most part, composed of lies. How many people, what proportion of the time, will actually lift a finger (or open a book, or make a telephone call) to work towards actually achieving what they believe to be heartfelt aspirations?

My Favorite Mnemonic

(From Leonard Gillman and Robert H. McDowell's calculus text.)

The number e to twelve decimal places is 2.718281828459; it's easy to remember because four plus five equals nine, and 1828 is the year after Beethoven died.

Don't Resent That No One Cares

It's tempting to be resentful that other people don't value your time the way you do. You complain at every opportunity: "Why, why, why do I get socially rewarded for working on this-and-such random chore that doesn't even help anyone, when obviously my great masterpiece (in progress, in potentia, coming soon) on such-and-this is so much more valuable?!"

But I think it's better not to be resentful and not to complain, mostly because it doesn't work. Other people don't care about your great masterpiece on such-and-this. They really don't. Maybe someone, somewhere will care after it's done, but it's not reasonable to expect anyone's support in advance—or, alternatively and isomorphically, it is reasonable, but given that there's nothing you can do to force people to be reasonable, reasonableness is not the correct criterion to be paying attention to.

You can't help being economically dependent on other people, but it seems like it ought to be possible to lessen your emotional dependence: to treat praise and criticism as evidence about the effectiveness of your actions, but not as a controlling force, not as a verdict. This is likely to be desirable not only because if you have fewer needs, then there are fewer ways in which you can be hurt, but also because it is necessary in order to accomplish anything at all: if you're dependent on other people's approval, how will you ever summon the energy needed to finish the masterpiece that no one (yet) cares about but you?

If it helps—consider that if everyone else already valued everything you value, then your existence would be superfluous. Maybe it would be better to be superfluous, better if the world were already perfect without there being anything left for you to contribute—but there's no profit in considering such a remote counterfactual. Take a deep breath, try not to let the subsequent exhalation sound like a mournful sigh, and get back to work, or whatever it is you do.

The Sliding False Dichotomy of Idealism and Cynicism

The Television Tropes & Idioms wiki has a page on the Sliding Scale of Idealism Versus Cynicism. Of course I understand why such a page exists, but part of me can't help but protest that it's not really a sliding scale. One of the most charming things about my native subculture is that we have heaps of both: cynicism in the style of "Humans are selfish, weak-willed hypocrites; the reasons people say they do things aren't always or even usually the real reasons, and even introspection itself is untrustworthy," and idealism in the style of "But knowing what we do now, we shall use the power of Reason to remake the world in accordance with our Values!"

Colon-Equals

Sometimes I think it's sad that the most popular programming languages use "=" for assignment rather than ":=" (like Pascal). Equality is a symmetrical relationship: "a equals b" means that a and b are the same thing or have the same value, and this is clearly the same as saying that "b equals a". Assignment isn't like that: putting the value b in a box named a isn't the same as putting the value a in a box named b!—surely an asymmetrical operation deserves an asymmetrical notation? Okay, so it is an extra character, but any decent editor can be configured to save you the keystroke.

I'd like to see the colon-equals assignment symbol more often in math, too. For example, shouldn't we be writing lower indices of summation like this?—

$$\sum_{j:=0}^n f(j)$$

—the rationale being that the text under the sigma isn't asserting that j equals zero, but rather that j is assigned zero as the initial index value of what is, in fact, a for loop:

sum = 0;
for (int j=0; j<=n; j++)
{
    sum += f(j);
}
return sum;

[RETRACTED] Introducing the Fractional Arithmetic Derivative

[NOTICE: The conclusion of this post is hereby retracted because it turns out that the proposed definition of a "fractional arithmetic derivative" doesn't actually make sense. It fails to meet the basic decideratum of corresponding with an iterated arithmetic derivative. E.g., consider that 225″ = (225′)′ = ((32·52)′)′ = (2·3·52 + 32·2·5)′ = (150 + 90)′ = 240′ = (24·3·5)′ = 4·23·3·5 + 24·5 + 24·3 = 480 + 80 + 48 = 608. Whereas, under the proposed definition we would allegedly equivalently have 225(2) = (2!·30·52 + 32·2!·50) = 50 + 18 = 68. I apologize to anyone who read the original post (??) who was thereby misled. The original post follows (with the erroneous section struck through).]

Wikipedia informs us of the idea of an arithmetic derivative—personally, I think this is a terrible name because it doesn't seem to be a rate of change of anything, but the motivation is clear enough, so let's go with it. It's a function on the natural numbers which we'll denote with the prime mark (" ′ "—the name of this symbol is not to be confused with the name for positive integers with exactly two divisors, which are also of—forgive me—"prime" importance in this discussion). It works like this: 0′ is 0, 1′ is 0, \(p'\) is 1 for any prime number \(p\), and the composite numbers get filled in with the product rule \((ab)' = a'b + ab'\) (hence the "derivative" moniker).

For prime powers, the product rule degenerates into a power rule:

$$(p^a)' = \sum_{j:=1}^{a} 1 \cdot p^{a-1} = ap^{a-1}$$

And this in turn makes it easy to compute the arithmetic derivative in general. Say that \(n \in \mathbb{N}\) has the prime factorization \(\prod_i p_i^{a_i}\). Then—

$$n' = \sum_{i} a_{i}p_{i}^{a_{i}-1} \prod_{j:\neq i} p_{j}^{a_{j}} = \sum_{i} a_{i}\frac{n}{p_{i}} = n \sum_{i} \frac{a_{i}}{p_{i}}$$

Arithmetic derivatives for small natural numbers are given as sequence A003415 in the Online Encyclopedia of Integer Sequences.

Some generalizations of this arithmetic derivative idea are discussed online (e.g., they say you can extend it to rational numbers using the familiar quotient rule), but (to my surprise) I didn't see any mentions of the obviously compelling idea of a fractional arithmetic derivative (in analogy to the fractional calculus). Repeated applications of the power rule for a prime power give us

$$(p^{a})^{(k)} = \frac{a!}{(a-k)!}p^{a-k}$$

where the superscript parenthetical \(k\) indicates the \(k\)th arithmetic derivative for natural number \(k\). But then if we just swap out those factorials for their gamma-function equivalents, we should have a \(q\)th power rule for real \(q\)

$$(p^{a})^{(q)} = \frac{\Gamma(a+1)}{\Gamma(a-q+1)}p^{a-q}$$

which in turn should give us a "fractional" \(q\)th arithmetic derivative for natural numbers:

$$n^{(q)} = \sum_{i} \frac{\Gamma(a_{i}+1)}{\Gamma(a_i-q+1)} \frac{n}{p_{i}^{q}}$$

So this is a cute definition that seems to work, but what can we do with it? At time of writing I can only demur that further research is needed.

Book Notes I

Did you know that putting adorable foxes on the cover of your book will make it sell more copies??

Speaking of books with animals on the cover, is it wrong to mentally associate specific programming languages with specific colors based on the O'Reilly books?

Toni Morrison has a book titled What Moves at the Margin, and based on the title I keep hoping that it's a treatise on microeconomic theory, but that's probably not actually true.

Idiot or Alien? Incompetence or Evil?

When you encounter someone who expresses a political or social opinion that you find absolutely abhorrent, it is instructive to consider the extent to which this person is making a mistake, and the extent to which they simply have different values from you. Is this opinion something that they would immediately relinquish, if only they knew they knew the true facts of which they are now ignorant?—or is it reflective of some quality essential to their agency, a basic motive far too sacred to be destroyed by the truth?

(Of course, it is also instructive to consider whether you're making a mistake. But that is not the subject of this post.)

Some would say that it is useless to consider such questions, that human cognition doesn't separate cleanly into beliefs and values, and that even if such a thing could be done, it is futile for any present-day human to consider the matter, given our ignorance of our own psychology. And yet, the question still seems to make sense to me. If I can't know, I can guess. And I don't guess the same thing every time.

It's hard to say which extreme is more terrifying. In one scenario, you want to cry out to them, "Oh, you fool! You beautiful, beautiful fool! I love you and I want to be your friend, trust that I will always want to be your friend, but don't you see that the path you're taking can only lead to disaster? If you give me some time I can explain my reasoning precisely, but all the evidence points to the same conclusion: you must turn back now, I beg you, for the sake of everything we hold dear!"

But you know that wouldn't work, so you say nothing.

In the other scenario, you instinctively know that appeals to emotion or common goals would be a waste of precious time, so you frantically search an argument, some sequence of facts and reasoning that will convince them, convince any halfway-rational creature, to stop doing this terrible thing—but it's clear that no such argument exists. Any fact or reason you could offer would only be interpreted as evidence about reality, incorporated into their world-model, and used to persue their monstrous goals that much more efficiently.

You say nothing, but as you look into your enemy's eyes as they hasten the destruction of your world, you can't shake the feeling of having been understood.

Facial Hair Is Gross

I often go a couple days without bothering to shave, but never much longer, because the stubble quickly becomes intolerable: I end up compulsively touching my face out of what I want to describe as a mildly horrified perverse fascination, perhaps of the same kind that would motivate picking at a scab, or poking a tumor.

The Parity Decomposition Trick

Earlier this year, Robert Hasner showed me something that I assume everyone else ("everyone else") already knows, but which I didn't know: every function on ℝ can be decomposed into the sum of an even function and an odd function—

$$f(x) = \frac{f(x)+f(-x)}{2} + \frac{f(x)-f(-x)}{2}$$

(In fact, as I later read elsewhere, there's nothing essentially twoful about this idea (at least, if you don't care about restricting yourself to ℝ): you can split a function into a sum of \(n\) functions \(f_j\) for \(j \in \{0, ..., n-1\}\) such that \(f_j(\omega z) = \omega^j f_j(z)\) where ω is an \(n\)th root of unity.)

I started seeing the same pattern in my reading, too. Like, every matrix can be decomposed into the sum of a symmetric and a skew-symmetric matrix:

$$A = \frac{1}{2}(A + A^T) + \frac{1}{2}(A - A^T)$$

(In fact, I have been given to understand that this observation is actually expressing a deep truth about the nature of linear transformations: every linear transformation is in some sense—which I hope to make more explicit later—the sum of a scaling in orthogonal directions (from the symmetric matrix; consider the spectral theorem) and a rotation (from the skew-symmetric matrix, which is said to represent an infinitesimal rotation).)

Also (and probably related to the matrix thing), in the geometric algebra, the geometric product of vectors can be expressed as the sum of an inner product and an anticommutative outer product.

Are there more examples of this theme of splitting something into symmetric and antisymmetric parts? Is there a general theorem explaining exactly which mathematical objects do this kind of thing?

Blades

What is a vector in Euclidean space? Some might say it's an entity characterized by possessing a magnitude and a direction. But scholars of the geometric algebra (such as Eric Chisolm and Dorst et al.) tell us that it's better to decompose the idea of direction into the two ideas of subspace attitude (our vector's quality of living in a particular line) and orientation (its quality of pointing in a particular direction in that line, and not the other). On this view, a vector is an attitudinal oriented length element. But having done this, it becomes inevitable that we should want to talk about attitudinal oriented area (volume, 4-hypervolume, &c.) elements. To this end we introduce the outer or wedge product ∧ on vectors. It is bilinear, it is anticommutative (swapping the order of arguments swaps the sign, so \(\vec{a}\wedge\vec{b} = -\vec{b}\wedge\vec{a}\)), and that's all you need to know.

Suppose we have two vectors \(\vec{a}\) and \(\vec{b}\) in Euclidean space and also a basis for the subspace that the vectors live in, \(\vec{e}_1\) and \(\vec{e}_2\), so that we can write \(\vec{a} := a_1\vec{e}_1 + a_2\vec{e}_2\) and \(\vec{b} := b_1\vec{e}_1 + b_2\vec{e}_2\). Then the claim is that the outer product \(\vec{a}\wedge\vec{b}\) can be said to represent a generalized vector (call it a 2-blade—and in general, when we wedge k vectors together, it's a k-blade) with a subspace attitude of the plane that our vectors live in and a magnitude equal to the area of the parallelogram spanned by them. Following Dorst et al., let's see what happens when we expand \(\vec{a}\wedge\vec{b}\) in terms of our basis—

$$\vec{a}\wedge\vec{b} = (a_1\vec{e}_1 + a_2\vec{e}_2)\wedge(b_1\vec{e}_1 + b_2\vec{e}_2)$$
$$= a_1\vec{e}_1\wedge(b_1\vec{e}_1 + b_2\vec{e}_2) + a_2\vec{e}_2\wedge(b_1\vec{e}_1 + b_2\vec{e}_2)$$
$$= a_1\vec{e}_1\wedge b_1\vec{e}_1 + a_1\vec{e}_1\wedge b_2\vec{e}_2 + a_2\vec{e}_2\wedge b_1\vec{e}_1 + a_2\vec{e}_2\wedge b_2\vec{e}_2$$

But the anticommutativity property implies that the outer product of a vector with itself is zero, because \(\vec{e}\wedge\vec{e} = -\vec{e}\wedge\vec{e}\). So we have

$$(a_1b_2 - a_2b_1)\vec{e}_1\wedge\vec{e}_2$$

It's a determinant! And since determinants tell us about the oriented volumes of parallelepipeds, we can see why these blades defined by this outer product are a sensible generalization of the vector idea. And none can doubt that they shall play but ever such an essential role in our vaunted geometric algebra!