Understanding Galois connections using rectangles

q(140) 140 100 p(100)

How do we compare two things? And how do we represent an (in)equality? It could be represented visually or using mathematical notation. It often happens to be the case that one of the various representations is more "obvious" than others.

Even using the same medium, two ways of representing the same thing could vary a lot in their obviousness. For instance the expressions

(x-y)2 ≥ 0

(x2 + y2)/2 ≥ xy

and

say pretty much the same thing.

But the first one is more obvious. These two expressions are close to each other in the world of mathematical notations but in the world of an average person driven by a combination of intuition and logic, these two expressions might seem far apart or even disconnected.

This is an attempt translate certain inequalities written in the language of mathematical notation into the language of (more intuitive) visuals. This helps in not only understanding the topic better but also makes certain proofs "obvious". The inequalities we will be looking at are related to Galois connections.

1. Introduction

Let's start with the definition of Galois connections. Here we only talk about monotone Galois connections, not antitone ones.

Given preorders P and Q and a pair of monotone maps p:P→Q and q:Q→P, a Galois connection between P and Q exists if: x ≤ q(y)⇔ p(x) ≤ y ∀ xϵP and yϵQ

They also have two properties:

x ≤ q(p(x))

y ≥ p(q(y))

The map p is known as left adjoint and the map q is known as right adjoint. It took me a while to wrap my head around this definition and the implied properties. Now let's translate this definition into something visual.

2. Visualizing p→f(p) and q→g(q)

x p(x)

Let's assume the domain of map f to be points on the x-axis and co-domain to be the points of y-axis. Then we get a rectangle as shown in light red above. q(y) y This means that the domain of map g is points of the y-axis and co-domain are points on x-axis. This gives us another rectangle as shown in light blue. q(y) y x p(x) Thus, given monotone maps p and q and points x∈P and y∈Q, we can show p(x) and q(y) as shown here. Note the two rectangles, each corresponding to a monotone map.

3. What does a Galois connection look like?

q(140) 140 100 p(100)



A Galois Connection

Modify p(x) :

Modify q(y) :

Now let's revisit the definition. A Galois connection exists if:x ≤ q(y)⇔ p(x) ≤ y ∀ xϵP and yϵQ In the world of visual representation, it means the a Galois connection exists if the two rectangles do not intersect. To be more specific, the rectangle corresponding to the map p should either have its edges contained inside the rectangle corresponding to the map q or vice versa. The edges of these two rectangles can never intersect.



Play with the interactive visual to get a better feel for it. The color of the rectangles changes to a dull gray as soon as the Galois connection is broken.





4. Properties of Galois connections

Now let's visit two properties of Galois connections. Before you look at the visual representation of these properties, try to prove them using the conventional mathematical machinery. Are they obvious to you? How easy or hard are the proofs?

Property #1: x ≤ q(p(x))

q(p(x)) x p(x)

Modify q(p(x)):

A Galois Connection





Now let's look at the visual representation of x ≤ q(p(x)).

• Pick any point x∈P and plot it to y=p(x) on y-axis.

• Now plot q(y) back to y-axis.

Click on the buttons to increase or decrease the value of q(y).

At what point does it stop being a Galois connection? Is the property now obvious to you?

Property #2: y ≥ p(q(y))

q(y) y p(q(y))

Modify p(q(y)):

A Galois Connection





You can do something similar for the next property: y ≥ p(q(y)).

• Pick any point y∈Q and plot q(y) and p(q(y)).

• Modify the function p(q(y)) and observe what constraints does a Galois connection put on p(q(y)).

5. Conclusion

This article solely focused on visualizations of definitions of Galois connections and their properties. We did not cover any examples or practical applications at all. You can check out the (pdf) slides here for a list of examples and applications.

andHere are two more properties we didn't mention earlier: left adjoints preserve joins and right adjoints preserve meets. How does it look visually? Can you prove it?