## Characteristic Functions as Idempotents

I just talked about characteristic functions as masks on other functions. Given a function and a subset , we can mask the function to the subset by multiplying it by the characteristic function . I want to talk a little more about these functions and how they relate to set theory.

First of all, it’s easy to recognize a characteristic function when we see one: they’re exactly the idempotent functions. That is, , and if then must be for some set . Indeed, given a real number , we can only have if or . That is, or for every . So we can define to be the set of for which , and then for every . Thus the idempotents in the algebra of real-valued functions on correspond exactly to the subsets of .

We can define two operations on such idempotent functions to make them into a lattice. The easier to define is the meet. Given idempotents and we define the meet to be their product:

This function will take the value at a point if and only if both and do, so this is the characteristic function of the intersection

We might hope that the join would be the sum of two idempotents, but in general this will not be another idempotent. Indeed, we can check:

We have a problem exactly when the corresponding sets have a nonempty intersection, which leads us to think that maybe this has something to do with the inclusion-exclusion principle. We’re “overcounting” the intersection by just adding, so let’s subtract it off to define

We can multiply this out to check its idempotence, or we could consider its values. If is not in , then , and we find — it takes the value if and otherwise. A similar calculation holds if , which leaves only the case when . But now and both take the value , and a quick calculation shows that does as well. This establishes that

We can push further and make this into an orthocomplemented lattice. We define the orthocomplement of an idempotent by

This function is wherever is , and vice-versa. That is, it’s the characteristic function of the complement

So we can take the lattice of subsets of and realize it in the nice, concrete algebra of real-valued functions on . The objects of the lattice are exactly the idempotents of this algebra, and we can build the meet and join from the algebraic operations of addition and multiplication. In fact, we could turn around and do this for *any* commutative algebra to create a lattice, which would mimic the “lattice of subsets” of some “set”, which emerges from the algebra. This sort of trick is a key insight to quite a lot of modern geometry.

## Galois Connections

I want to mention a topic I thought I’d hit back when we talked about adjoint functors. We know that every poset is a category, with the elements as objects and a single arrow from to if . Functors between such categories are monotone functions, preserving the order. Contravariant functors are so-called “antitone” functions, which reverse the order, but the same abstract nonsense as usual tells us this is just a monotone function to the “opposite” poset with the order reversed.

So let’s consider an adjoint pair of such functors. This means there is a natural isomorphism between and . But each of these hom-sets is either empty (if ) or a singleton (if ). So the adjunction between and means that if and only if . The analogous condition for an antitone adjoint pair is that if and only if .

There are some immediate consequences to having a Galois connection, which are connected to properties of adjoints. First off, we know that and . This essentially expresses the unit and counit of the adjunction. For the antitone version, let’s show the analogous statement more directly: we know that , so the adjoint condition says that . Similarly, . This second condition is backwards because we’re reversing the order on one of the posets.

Using the unit and the counit of an adjunction, we found a certain quasi-inverse relation between some natural transformations on functors. For our purposes, we observe that since we have the special case . But , and preserves the order. Thus . So . Similarly, we find that , which holds for both monotone and antitone Galois connections.

Chasing special cases further, we find that , and that for either kind of Galois connection. That is, and are idempotent functions. In general categories, the composition of two adjoint functors gives a monad, and this idempotence is just the analogue in our particular categories. In particular, these functions behave like closure operators, but for the fact that general posets don’t have joins or bottom elements to preserve in the third and fourth Kuratowski axioms.

And so elements left fixed by (or ) are called “closed” elements of the poset. The images of and consist of such closed elements

## DeMorgan’s Laws

And here’s the post I wrote today:

Today, I want to prove two equations that hold in any orthocomplemented lattice. They are the famous DeMorgan’s laws:

First, we note that by definition. Since our complementation reverses order, we find . Similarly, . And thus we conclude that .

On the other hand, by definition. Then we find by invoking the involutive property of our complement. Similarly, , and so . And thus we conclude . Putting this together with the other inequality, we get the first of DeMorgan’s laws.

To get the other, just invoke the first law on the objects and . We find

Similarly, the first of DeMorgan’s laws follows from the second.

Interestingly, DeMorgan’s laws aren’t just a consequence of order-reversal. It turns out that they’re *equivalent* to order-reversal. Now if then . So . And thus .

## Orthogonal Complements and the Lattice of Subspaces

We know that the poset of subspaces of a vector space is a lattice. Now we can define complementary subspaces in a way that doesn’t depend on any choice of basis at all. So what does this look like in terms of the lattice?

First off, remember that the “meet” of two subspaces is their intersection, which is again a subspace. On the other hand their “join” is their sum as subspaces. But now we have a new operation called the “complement”. In general lattice-theory terms, a complement of an element in a bounded lattice (one that has a top element and a bottom element ) is an element so that and .

In particular, since the top subspace is itself, and the bottom subspace is we can see that the orthogonal complement satisfies these properties. The intersection is trivial, since the inner product is positive-definite as a bilinear form, and the sum is all of , as we’ve seen.

Even more is true. The orthogonal complement is involutive (when is finite-dimensional), and order-reversing, which makes it an “orthocomplement”. In lattice-theory terms, this means that , and that if then .

First, let’s say we’ve got two subspaces of . I say that . Indeed, if is a vector in then it for all . But since any is also a vector in , we can see that , and so as well. Thus orthogonal complementation is

Now let’s take a single subspace of , and let be a vector in . If is any vector in , then by the (conjugate) symmetry of the inner product and the definition of . Thus is a vector in , and so . Note that this much holds whether is finite-dimensional or not.

On the other hand, if is finite-dimensional we can take an orthonormal basis of and expand it into an orthonormal basis of all of . Then the new vectors form a basis of , so that . A vector in is orthogonal to every vector in exactly when it can be written using only the first basis vectors, and thus lies in . That is, when is finite-dimensional.

## Lattices

A poset which has both least upper bounds and greatest lower bounds is called a lattice. In more detail, let’s say we have a poset and give it two operations: meet (written ) and join (written ). These satisfy the requirements that

- and .
- If and then .
- and .
- If and then .

Not every poset has a meet and a join operation, but if these operations do exist they are uniquely specified by these requirements. In fact, we can see this sort of like how we saw that direct products of groups are unique up to isomorphism: if we have two least upper bounds for a pair of elements then they must each be below or equal to the other, so they must be the same.

We can derive the following properties of the operations:

- and .
- and .
- and .

from these we see that there’s a sort of duality between the two operations. In fact, we can see that these provide two commutative semigroup structures that happen to interact in a certain nice way.

Actually, it gets even better. If we have two operations on any set satisfying these properties then we can define a partial order: if and only if . So we can define a lattice either by the order property and get the algebraic properties, or we can define it by the algebraic properties and get the order property from them.

In many cases, a lattice also satisfies , or equivalently . In this case we call it “distributive”. A bit weaker is to require that if then for all . In this case we call the lattice “modular”.

A lattice may have elements above everything else or below everything else. We call a greatest element of a lattice and a least element . In this case we can define “complements”: and are complements if and . If the lattice is distributive, then the complement of is unique if it exists. A distributive lattice where every element has a complement is called “Boolean”.