Functors and Coarse Worlds

https://www.lesswrong.com/posts/GYQwJsChoRosjdW2r/functors-and-coarse-worlds

Contents

1. Functors from Functions Between Worlds

In the Cartesian frames framework, a world is a set of possible worlds w that can all potentially occur in the same frame. I find it useful to think about "different worlds" W and V in the case where W and V are different world models that carve up a situation in two different ways.W might be a refined world model, one that describes a situation in more detail; while V is a coarser model of the same situation that elides some distinctions in W. Returning to an example from "Biextensional Equivalence," W={w_0,w_1,w_2,w_3,w_4,w_5,w_6,w_7 } could be a world model that includes details about what the agent is thinking (\mbox{G} for a thought about the color green, \mbox{R} for red), as shown in C_0=\begin{array}{cc} &\begin{array}{cc} \mbox{S} & \mbox{B} \end{array}\ \begin{array}{c} \mbox{GH} \ \mbox{GW} \ \mbox{RH} \ \mbox{RW} \end{array} & \begin{pmatrix} w_0 & w_1\ w_2 & w_3\ w_4 & w_5 \ w_6 & w_7 \end{pmatrix} \end{array}, while V={w_8,w_9,w_{10},w_{11}} could be a world model that leaves out this information, representing the same real-world situation with the frame C_1=\begin{array}{cc} &\begin{array}{cc} \mbox{S} & \mbox{B} \end{array}\ \begin{array}{c} \mbox{GH} \ \mbox{GW} \ \mbox{RH} \ \mbox{RW} \end{array} & \begin{pmatrix} w_8 & w_9\ w_{10} & w_{11}\ w_8 & w_9 \ w_{10} & w_{11} \end{pmatrix} \end{array}. To move between frames like C_0 and C_1 and compare their properties, we will need a way to send agents and environments of frames defined over one world, to agents and environments of frames over an entirely different world. Functors will allow us to do this. Definition: Given two sets W and and V, and a function p:W\rightarrow V, let p^\circ:\mbox{Chu}(W)\rightarrow \mbox{Chu}(V) denote the functor that sends the object (A,E,\cdot)\in \mbox{Chu}(W) to the object (A,E,\star)\in \mbox{Chu}(V), where a\star e=p(a\cdot e), and sends the morphism (g,h) to the morphism with the same underlying functions, (g,h). To visualize this functor, you can imagine \mbox{Chu}(W) as a graph, with matrices as nodes (in the finite case) and arrows representing morphisms.\mbox{Chu}(V) is another graph made of matrices and arrows. To move each frame C from \mbox{Chu}(W) to \mbox{Chu}(V), we use p to entrywise replace the possible worlds in C’s matrix with elements of V, without changing the functional properties of the rows and columns; and then we move all the arrows from \mbox{Chu}(W) to \mbox{Chu}(V), which is possible because no functional properties of the original matrices were lost. (Frames and morphisms may or may not be added when we move to \mbox{Chu}(V).) In the cases where we say "W is a refined version of V" or "V is a coarse version of W," all we mean is that the function p:W\rightarrow V is surjective. Claim: p^\circ is well-defined. Proof: We need to show that p^\circ actually sends objects and morphisms of \mbox{Chu}(W) to objects and morphisms of \mbox{Chu}(V), and that it preserves identity morphisms and composition.p^\circ clearly sends objects to objects. To see that p^\circ sends morphisms to morphisms, observe that if (g,h):(A_0,E_0,\cdot_0)\rightarrow(A_1,E_1,\cdot_1), and p^\circ(A_i,E_i,\cdot_i)=(A_i,E_i,\star_i), then for all a\in A_0 and e\in E_1, \begin{equation} \begin{split} g(a)\star_1 e & =p(g(a)\cdot_1 e) \ & =p(a\cdot_0 h(e)) \ & =a\star_0 h(e), \end{split} \end{equation}so p^\circ(g,h) =(g,h) is a morphism. It is clear that p^\circ preserves identity and composition, since it has no effect on morphisms. \square We also have that p^\circ preserves all of our additive operations. Claim: p^\circ(C\oplus D)=p^\circ(C)\oplus p^\circ(D), p^\circ(C& D)=p^\circ(C)&p^\circ(D), p^\circ(C^)=p^\circ(C)^, p^\circ(0)=0, p^\circ(\top)=\top, and p^\circ(\mbox{null})=\mbox{null}. Proof: Trivial. \square Our new functor’s relationship with 1 and \bot is more interesting. In particular, we can define 1_S and \bot_S from 1 and \bot using functors. Claim: Let S\subseteq W and let \iota:S\rightarrow W be the inclusion of S in W. Then 1_S=\iota^\circ(1) and \bot_S=\iota^\circ(\bot). (Here, the 1 and \bot are from \mbox{Chu}(S), not \mbox{Chu}(W).) Proof: Trivial. \square This gives us a more categorical definition of 1_S and \bot_S from 1 and \bot. We will give a more categorical definition of 1 and \bot later, when we talk about multiplicative operations. p^\circ also preserves biextensional equivalence in one direction. (Two equivalent frames in W will always be equivalent in V, but two inequivalent frames in W won’t necessarily be inequivalent in V.) Claim: If C\simeq D, then p^\circ(C)\simeq p^\circ(D). Proof: Let C=(A,E,\cdot) and let D=(B,F,\star). Let (g_0,h_0):C\rightarrow D and (g_1,h_1):D\rightarrow C compose to something homotopic to the identity in both orders. We want to show that (g_0,h_0):p^\circ(C)\rightarrow p^\circ(D) and (g_1,h_1):p^\circ(D)\rightarrow p^\circ(C) compose to something homotopic to the identity in both orders. Indeed p(g_1(g_0(a))\cdot e)=p(a\cdot e) for all a\in A and e\in E, and p(g_0(g_1(b))\star f)=p(b\star f) for all b\in B and f\in F. \square We also have that p^\circ preserves what’s ensurable, where we transition from subsets of W to subsets of V in the obvious way. Claim: Let p:W\rightarrow V, and let p(S)={v\in V \ | \ \exists w\in S, p(w)=v}. If S\in \mbox{Ensure}(C), then p(S)\in \mbox{Ensure}(p^\circ(C)). Proof: Trivial from the original definition of ensurables. \square We also get a stronger result when dealing with subsets of W and V that correspond exactly. Claim: Let p: W\rightarrow V, and let S\subseteq W and T\subseteq V be such that for all w\in W, we have p(w)\in T if and only if w\in S. Then S\in \mbox{Ensure}(C) if and only if T\in \mbox{Ensure}(p^\circ(C)), and S\in \mbox{Ctrl}(C) if and only if T\in \mbox{Ctrl}(p^\circ(C)). **Proof: **Trivial from the original definitions of ensurables and controllables. \square The relationship between observability and functors is quite interesting. We will devote the next section to discussing this relationship and its philosophical consequences.

2. What’s Observable is Relative to a Coarse World Model

Since observability is not closed under supersets, we can only really hope to get a result for observables in the stronger case where S\subseteq W and T\subseteq V correspond exactly; but interestingly, even then, the preservation result for observables is only one-directional. **Claim: **Let p:W\rightarrow V and let S\subseteq W and T\subseteq V be such that for all w\in W, we have p(w)\in T if and only if w\in S. Then if S\in \mbox{Obs}(C), then T\in \mbox{Obs} (p^\circ(C)). Proof: If C\simeq C_0&C_1, with \mbox{Image}(C_0)\subseteq S and \mbox{Image}(C_1)\subseteq W\backslash S, then p^\circ(C)\simeq p^\circ(C_0)& p^\circ(C_1), and \mbox{Image}(p^\circ(C_0))=p(\mbox{Image}(C_0))\subseteq p(S)\subseteq T, while \mbox{Image}(p^\circ(C_1))=p(\mbox{Image}(C_1))\subseteq p(W\backslash S)\subseteq V\backslash T. \square The most interesting thing here is that the converse is not also true. There are examples where T\in \mbox{Obs} (p^\circ(C)), even though S\not\in \mbox{Obs}(C). When p is surjective, we think of V as a coarse world model that forgets some details from W. Sometimes, an agent can be able to observe S relative to a coarse description of the world, but not in the more refined description, even in cases where S is definable in both the coarse and refined descriptions. 2.1. Example Let us look at an example. In this example, the agent is an AI that will be given a number and asked whether it is prime or not. There are two possible environments E={\mbox{Prime}, \mbox{Nonprime}}. The agent A has six strategies:

3. Functors from Cartesian Frames

When p:W\rightarrow V is surjective, p^\circ will send Cartesian frames over the more refined W to Cartesian frames over the less refined V. What if we want to go in the other direction? While there is a unique function from less refined worlds to more refined worlds, there are many functions in the other direction. Luckily, we have an object that lets us deal with many functions at once. Definition: Let C=(V,E,\cdot) be a Cartesian frame over W, with \mbox{Agent}(C)=V. Then C^\circ:\mbox{Chu}(V)\rightarrow \mbox{Chu}(W) is the functor that sends (B,F,\star) to (B,F\times E,\diamond), where b\diamond(f,e)=(b\star f)\cdot e, and sends the morphism (g,h) to (g,h^\prime), where h^\prime(f,e)=(h(f),e). (Notice how this definition looks a bit like currying.) Claim: C^\circ is well-defined. Proof: We need to show that C^\circ actually sends objects and morphisms of \mbox{Chu}(V) to objects and morphisms of \mbox{Chu}(W), and that it preserves identity morphisms and composition. C^\circ clearly sends objects to objects. To see that it sends morphisms to morphisms, let (g,h):(B_0,F_0,\star_0)\rightarrow (B_1,F_1,\star_1) be a morphism in \mbox{Chu}(V), let (B_i,F_i\times E,\diamond_i)=C^\circ(B_i,F_i,\star_i), and let (g,h^\prime)=C^\circ(g,h). We want to show that (g,h^\prime):(B_0,F_0\times E,\diamond_0)\rightarrow (B_1,F_1\times E,\diamond_1) is a morphism, which is true because \begin{equation} \begin{split} g(b)\diamond_1(f,e) & =(g(b)\star_1 f)\cdot e \ & =(b\star_0 h(f))\cdot e \ & =b\diamond_0(h(f),e) \ & =b\diamond_0h^\prime(f,e) \end{split} \end{equation}for all b\in B_0 and (f,e)\in F_1\times E. C^\circ clearly preserves identity morphisms and composition. \square The coarse-to-refined functor C^\circ preserves &, \top, and \mbox{null}, but not \oplus, 0, or -^*, which make sense, since C^\circ is violating the symmetry between agent and environment. **Claim: **C^\circ(\top)=\top, and C^\circ(\mbox{null})=\mbox{null}. **Proof: **Trivial. \square Claim: C^\circ(D_0& D_1)=C^\circ(D_0)& C^\circ(D_1). Proof: Let C=(V,E,\cdot) and let D_i=(B_i,F_i,\star_i). We have that C^\circ(D_0& D_1)=(B_0\times B_1,(F_0\sqcup F_1)\times E,\diamond) and C^\circ(D_0)& C^\circ(D_1)=(B_0\times B_1,(F_0\times E)\sqcup (F_1\times E),\bullet). The agent and environment are the same, so we just need to check that \diamond=\bullet. Take (b_0,b_1)\in B_0\times B_1 and (f,e)\in (F_0\sqcup F_1)\times E=(F_0\times E)\sqcup (F_1\times E). Without loss of generality, assume f\in F_0. Observe that \begin{equation} \begin{split} (b_0,b_1)\diamond(f,e) & =(b_0\star_0 f)\cdot e \ & =(b_0,b_1)\bullet (f,e). \end{split} \end{equation}\square One way to see that C^\circ does not preserve \oplus is to see that the environments are different, since C^\circ (D_0\oplus D_1) has one copy of E in the environment, while C^\circ(D_0)\oplus C^\circ(D_1) has two copies. We also have that C^\circ preserves biextensional equivalence. Claim: if D_0\simeq D_1, then C^\circ(D_0)\simeq C^\circ(D_1). Proof: Let D_i=(B_i, F_i,\star_i), and let C^\circ(D_i)=(B_i,F_i\times E,\diamond_i). Let (g_0,h_0):D_0\rightarrow D_1 and (g_1,h_1):D_1\rightarrow D_0 compose to something homotopic to the identity in both orders. It suffices to show that C^\circ(g_1,h_1)\circ C^\circ(g_0,h_0) is homotopic to the identity on C^\circ(D_0), since the other composition will be symmetric. Indeed \begin{equation} \begin{split} g_1(g_0(b))\diamond_0 (f,e) & =g_1(g_0(b))\star_0 f \ & =b\star_0 f \ & =b\diamond_0(f,e) \end{split} \end{equation} for all b\in B_0, and (f,e)\in F_0\times E. \square Before we talk about the relationship between functors from functions and functors from Cartesian frames, I want to pause to talk about how to view Cartesian frames as sets of functions.

4. Cartesian Frames as Sets of Functions

One way to view (some) Cartesian frames is as sets of functions. **Definition: **Given a set P of functions from E to W, let \mbox{CF}(P) denote the Cartesian frame over W given by (P,E,\cdot), where p\cdot e=p(e). Claim: \mbox{CF}(P) is well-defined. Proof: Trivial. \square Not every Cartesian Frame is expressible this way: every Cartesian frame is biextensionally equivalent to a Cartesian frame with duplicate columns and rows, and these uncollapsed frames are excluded because sets do not allow multiplicity. Claim: For every Cartesian frame C over W, there exists a set of functions P:\mbox{Env}(C)\rightarrow W, such that C\simeq \mbox{CF}(P). Proof: Take C=(A,E,\cdot), and take P to be the set of all p:E\rightarrow W such that there exists an a\in A such that for all e\in E, p(e)=a\cdot e. Take (g_0,h_0):C\rightarrow\mbox{CF}(P) and (g_1,h_1):\mbox{CF}(P)\rightarrow C, given as follows: h_0=h_1 is the identity on E, g_0(a) is the function e\mapsto a\cdot e, and g_1(p) is some a\in A such that p(-)=a\cdot-. These are both clearly morphisms, and they compose to something homotopic to the identity, since h_0\circ h_1 and h_1\circ h_0 are both the identity. \square This give us an alternate definition of Cartesian frames up to biextensional equivalence. This almost gives a complete alternate definition of Cartesian frames; if we instead took P to be a multiset, then we could identify the Cartesian frame \mbox{CF}(P) with the multiset P. Note that this is not as symmetric as our original definition of Cartesian frames. The "sets of functions" approach here thinks of a Cartesian frame as a set of functions from the environment to the world, but we could instead think of it as a set of functions from the agent to the world. Definition: Given a set P of functions for A to W, let \mbox{CF}^(P) denote the Cartesian frame over W given by (A,P,\cdot), where a\cdot p=p(a). Claim: \mbox{CF}^(P)=(\mbox{CF}(P))^*. Proof: Trivial. \square Thinking of Cartesian frames in this way is not particularly different from our original definition. It is just thinking about a function with two inputs as a parameterized function with one input and one parameter. However, this way of understanding Cartesian frames will allow us to more easily relate functors from functions to functors from Cartesian frames.

5. Relationship Between the Two Functor Definitions

Functors from functions are a special case of functors from Cartesian frames. Indeed, they correspond when \mbox{Env}(C) is a singleton. Claim: For any p:V\rightarrow W, p^\circ=(\mbox{CF}^({p}))^\circ. Conversely, if C=(V,{e},\cdot) is a Cartesian frame over W with singleton environment, then C^\circ=p^\circ, where p(v)=v\cdot e. Proof: Observe that \mbox{CF}^({p})=(V,{e},\cdot), where v\cdot e=p(e). That p^\circ=(\mbox{CF}^({p}))^\circ is trivial from considering the definition of C^\circ in the special case where E is a singleton. \square However, we can do a lot more with functors from Cartesian frames. In the case where p:W\rightarrow V is a surjection, p^\circ shows how to send Cartesian frames over the more refined W to the less refined V. We want to go in the other direction using an inverse of p. Since p is a surjection, it has a right inverse, but it might have many right inverses. If we want to go from Cartesian frames over V to Cartesian frames over W, we could pick any right inverse to p, but since we have functors from Cartesian frames, we don’t have to. Claim: For any surjective p:W\rightarrow V, let Q be the set of all q:V\rightarrow W such that p\circ q is the identity on V. Then for any Cartesian frame C over V, (p^\circ\circ(\mbox{CF}^(Q))^\circ)(C)\simeq C. Thus (\mbox{CF}^(Q))^\circ is right inverse to p^\circ up to biextensional equivalence. Proof: Let C=(A,E,\cdot). Then (\mbox{CF}^(Q))^\circ(C)=(A,E\times Q,\star), where a\star(e,q)=q(a\cdot e), and (p^\circ\circ(\mbox{CF}^(Q))^\circ)(C)=(A,E\times Q,\diamond), where \begin{equation} \begin{split} &a\diamond(e,q) &=p(q(a\cdot e)) \ &=a\cdot e. \end{split}\end{equation}(Viewed as a matrix, (p^\circ\circ(\mbox{CF}^(Q))^\circ)(C) is isomorphic to C with |Q| copies of each column.) To explicitly see the homotopy equivalence, take (g_0,h_0):(A,E,\cdot)\rightarrow(A,E\times Q,\diamond) by g_0(a)=a and g_1(e,q)=e, and take (g_1,h_1):(A,E\times Q,\diamond)\rightarrow(A,E,\cdot) by g_1(a)=a and h_1(e)=(e,q) for some fixed q\in Q. These are clearly morphisms and clearly compose to something homotopic to the identity in both orders, since the g_i are the identity. Note that we used the surjectivity of p when we said "for some fixed q\in Q," since the surjectivity of p is what makes Q nonempty. \square Functors from Cartesian frames will prove useful in the next section, when we finally introduce the concept of subagent.

Comment

https://www.lesswrong.com/posts/GYQwJsChoRosjdW2r/functors-and-coarse-worlds?commentId=WwhYRxSxtrj8dYDvF

minor typo:

and take P to be the set of all p:E\rightarrow C such that should have p : E \to W Also I think later in that proof some of the h‘s (like in h_0 \circ h_1) should be g’s instead.

Comment

https://www.lesswrong.com/posts/GYQwJsChoRosjdW2r/functors-and-coarse-worlds?commentId=usAKfmgcDbmYNj3y7

Fixed, Thanks. I think the h‘s are correct. Any morphism in which either component is the identity must be homotopic to the identity, since homotopic is symmetric. In this proof, checking the h’s is easier.

Comment

Nice! I’m glad I asked, since I hadn’t realised those sufficient conditions for being homotopic to the identity. That’s useful in several proofs I suspect. (For anyone following along, I believe this only holds for a morphism from a frame to itself.)