# Cartesian Frames Definitions

This is a list of the main definitions from Scott Garrabrant's [Cartesian Frames](https://www.lesswrong.com/s/2A7rrZ4ySx6R8mfoT) sequence. (I'll update it as more posts come out.)

1\. Small Cartesian Frames
--------------------------

Let $W=\{w_0, w_1\}$ for the matrix visualizations below. Let $C$ be an arbitrary Cartesian frame.

|     | **visualization** | **definition** | **notes** |
| --- | --- | --- | --- |
| $0$ | $\\begin{array}{cc} &\\begin{array}{cc} e \\end{array}\\ \\begin{array}{c} \\space \\space \\end{array} & \\begin{pmatrix} \\ \\end{pmatrix} \\end{array}$ | $0=(\\{\\},\\{e\\},\\cdot)$, where $\\mbox{Agent}(0)$ is empty, $\\mbox{Env}(0)=\\{e\\}$ is any singleton set, and $\\mbox{Eval}(0)$ is trivial. | $\\bot_{\\{\\}}$. Initial. Identity of sum ($\\oplus$). |
| $\\top$ | $\\begin{array}{cc} &\\begin{array}{cc} \\end{array}\\ \\begin{array}{c} a \\end{array} & \\begin{pmatrix} \\ \\end{pmatrix} \\end{array}$ | $\\top = (\\{a\\},\\{\\},\\cdot)$, where $\\mbox{Agent}(\\top)$ is any singleton set, $\\mbox{Env}(\\top)$ is empty, and $\\mbox{Eval}(\\top)$ is trivial. | $1_{\\{\\}}$. Terminal. $\\top\\triangleleft C$. Identity of product ($\\&$). |
| $1$ | $\\begin{array}{cc} &\\begin{array}{cc} {w_0} &{w_1} \\end{array}\\ \\begin{array}{c} a \\end{array} & \\begin{pmatrix} w_0 & w_1 \\ \\end{pmatrix} \\end{array}$ | $1_S=(\\{a\\},S,\\star)$, where $S\\subseteq W$ and $a\\star s=s$ for all $s\\in S$. $1$ is the frame $1_W$. | Identity of tensor ($\\otimes$). |
| $\\bot$ | $\\begin{array}{cc} &\\begin{array}{c} e \\end{array}\\ \\begin{array}{c} w_0\\\\w_1\\ \\end{array} & \\begin{pmatrix} w_0\\\\w_1 \\end{pmatrix} \\end{array}$ | $\\bot_S=(S,\\{e\\},\\star)$, where $S\\subseteq W$ and $s\\star e=s$ for all $s\\in S$. $\\bot$ is the frame $\\bot_W$. | $C\\triangleleft\\bot$. Identity of par ($⅋ \\space$). |
| $\\mbox{null}$ | $\\begin{array}{cc} &\\begin{array}{cc} \\end{array}\\ \\begin{array}{c} \\space \\space \\end{array} & \\begin{pmatrix} \\ \\end{pmatrix} \\end{array}$ | $\\mbox{null} = (\\{\\},\\{\\},\\cdot)$, with empty agent, environment, and evaluation function. |     |

2\. Binary Operations
---------------------

**Sum.** For Cartesian frames $C=(A,E,\cdot)$ and $D=(B,F,\star)$ over $W$, $C\oplus D$ is the Cartesian frame $(A\sqcup B, E\times F, \diamond)$, where $a\diamond(e,f)=a\cdot e$ if $a\in A$, and $a\diamond(e,f)=a\star f$ if $a\in B$.

**Product.** For Cartesian frames $C=(A,E,\cdot)$ and $D=(B,F,\star)$ over $W$, $C\&D$ is the Cartesian frame $(A\times B,E\sqcup F,\diamond)$, where $(a,b)\diamond e=a\cdot e$ if $e\in E$, and $(a,b)\diamond e=b\star e$ if $e\in F$.

**Tensor.** Let $C=(A,E,\cdot)$ and $D=(B,F,\star)$ be Cartesian frames over $W$. The tensor product of $C$ and $D$, written $C\otimes D$, is given by $C\otimes D=(A\times B,\mbox{hom}(C,D^*),\diamond)$, where $\mbox{hom}(C,D^*)$ is the set of morphisms $(g,h):C\rightarrow D^*$ (i.e., the set of all pairs $(g:A\rightarrow F,h:B\rightarrow E)$ such that $b\star g(a)=a\cdot h(b)$ for all $a\in A$, $b\in B$), and $\diamond$ is given by $(a,b)\diamond(g,h)=b\star g(a)=a\cdot h(b)$.

**Par.** Let $C=(A,E,\cdot)$ and $D=(B,F,\star)$ be Cartesian frames over $W$. $C ⅋ \space D=(\mbox{hom}(C^*, D), E\times F,\diamond)$, where $(g,h)\diamond(e,f)=g(e)\star f=h(f)\cdot e$.

**Lollipop.** Given two Cartesian frames over $W$, $C=(A,E,\cdot)$ and $D=(B,F,\star)$, we let $C\multimap D$ denote the Cartesian frame $C\multimap D=(\mbox{hom}(C, D), A\times F,\diamond)$, where $\diamond$ is given by $(g,h)\diamond(a,f)=g(a)\star f=a\cdot h(f)$.

3\. Frames, Morphisms, and Equivalence Relations
------------------------------------------------

**Cartesian frame.** A Cartesian frame $C$ over a set $W$ is a triple $(A,E,⋅)$, where $A$ and $E$ are sets and $⋅:A×E→W$. If $C=(A,E,⋅)$ is a Cartesian frame over $W$, we say $\mbox{Agent}(C)=A$, $\mbox{Env}(C)=E$, $\mbox{World}(C)=W$, and $\mbox{Eval}(C)=⋅$.

**Environment subset.** Given a Cartesian frame $C=(A,E,\cdot)$ over $W$, and a subset $S$ of $W$, let $E_S$ denote the subset $\{e\in E  |  \forall a\in A, e\cdot a\in S\}$.

**Cartesian frame image. **$\mbox{Image}(C)=\{w\in W  |  \exists a\in A, \exists e\in E    \mbox{s.t.}    a\cdot e=w\}$.

**Chu category. **$\mbox{Chu}(W)$ is the category whose objects are Cartesian frames over $W$, whose morphisms from $C=(A,E,\cdot)$ to $D=(B,F,\star)$ are pairs of functions $(g:A\rightarrow B, h:F\rightarrow E)$, such that $a\cdot h(f)=g(a)\star f$ for all $a\in A$ and $f\in F$, and whose composition of morphisms is given by $(g_1,h_1)\circ (g_0,h_0)=(g_1\circ g_0,h_0\circ h_1)$.

**Isomorphism.** A morphism $(g,h):C\rightarrow D$ is an *isomorphism* if both $g$ and $h$ are bijective. If there is an isomorphism between $C$ and $D$, we say $C\cong D$.

**Homotopic.** Two morphisms $(g_0,h_0), (g_1,h_1):C\rightarrow D$ with the same source and target are called *homotopic* if $(g_0,h_1)$ is also a morphism.

**Homotopy equivalence / biextensional equivalence. **$C$ is *homotopy equivalent* (or *biextensionally equivalent*) to $D$, written $C\simeq D$, if there exists a pair of morphisms $\phi:C\rightarrow D$ and $\psi:D\rightarrow C$ such that $\psi\circ\phi$ is homotopic to the identity on $C$ and $\phi\circ \psi$ is homotopic to the identity on $D$.

**Sub-sum.** Let $C=(A,E,\cdot)$, and let $D=(B,F,\star)$. A sub-sum of C and D is a Cartesian frame of the form $(A\sqcup B,X,\diamond)$, where $X\subseteq \mbox{Env}(C\oplus D)$ and $\diamond$ is $\mbox{Eval}(C\oplus D)$ restricted to $(A\sqcup B)\times X$, such that $C\simeq(A,X,\diamond_C)$ and $D\simeq(B,X,\diamond_D)$, where $\diamond_C$ is $\diamond$ restricted to $A\times X$ and $\diamond_D$ is $\diamond$ restricted to $B\times X$. Let $C\boxplus D$ denote the set of all sub-sums of $C$ and $D$.

**Sub-tensor.** Let $C=(A,E,\cdot)$, and let $D=(B,F,\star)$. A sub-tensor of $C$ and $D$ is a Cartesian frame of the form $(A\times B,X,\bullet)$, where $X\subseteq\mbox{Env}(C\otimes D)$ and $\bullet$ is $\mbox{Eval}(C\otimes D)$ restricted to $(A\times B)\times X$, such that $C\simeq(A,B\times X,\bullet_C)$ and $D\simeq(B,A\times X,\bullet_D)$, where $\bullet_C$ and $\bullet_D$ are given by $a\bullet_C(b,x)=(a,b)\bullet x$ and $b\bullet_D(a,x)=(a,b)\bullet x$. Let $C\boxtimes D$ denote the set of all sub-tensors of $C$ and $D$.

4\. Functors
------------

**Functions between worlds.** Given a Cartesian frame $C=(A,E,⋅)$ over $W$, and a function $f:W\rightarrow V$, let $f^\circ(C)$ denote the Cartesian frame over $V$, $f^\circ(C)=(A,E,\star)$, where $a\star e=f(a\cdot e)$.

**Dual.** Let $-^{*}:\mbox{Chu}(W)\rightarrow\mbox{Chu}(W)^\mbox{op}$ be the functor given by $(A,E,\cdot)^*=(E,A,\star)$, where $e\star a=a\cdot e$, and $(g,h)^*=(h,g)$.

**Functor (from functions between worlds).** 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)$.

**Functor (from Cartesian frames).** 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)$.

5\. Subagents
-------------

**Subagent (categorical definition).** Let $C$ and $D$ be Cartesian frames over $W$. We say that $C$ is a subagent of $D$, written $C\triangleleft D$, if for every morphism $\phi:C\rightarrow\bot$ there exists a pair of morphisms $\phi_0:C\rightarrow D$ and $\phi_1:D\rightarrow\bot$ such that $\phi=\phi_1\circ\phi_0$.

**Subagent (currying definition).** Let $C$ and $D$ be Cartesian frames over $W$. We say that $C\triangleleft D$ if there exists a Cartesian frame $Z$ over $\mbox{Agent}(D)$ such that $C\simeq D^\circ(Z)$.

**Subagent (covering definition).** Let $C=(A,E,\cdot)$ and $D=(B,F,\star)$ be Cartesian frames over $W$. We say that $C\triangleleft D$ if for all $e\in E$, there exists an $f\in F$ and a $(g,h):C\rightarrow D$ such that $e=h(f)$.

**Sub-environment.** We say $C$ is a sub-environment of $D$, written $C\triangleleft^* D$, if $D^* \triangleleft C^*$.

**5.1. Additive and Multiplicative Subagents**

**Additive subagent (sub-sum definition). **$C$ is an additive subagent of $D$, written $C\triangleleft_+D$, if there exists a $C^\prime$ and a $D^\prime\simeq D$ with $D^\prime\in C\boxplus C^\prime$.

**Additive subagent (brother definition). **$C^\prime$ is called a brother to $C$ in $D$ if $D\simeq D^\prime$ for some $D^\prime\in C\boxplus C^\prime$. We say $C\triangleleft_+ D$ if $C$ has a brother in $D$.

**Additive subagent (committing definition).** Given Cartesian frames $C$ and $D$ over $W$, we say $C\triangleleft_+ D$ if there exist three sets $X$, $Y$, and $Z$, with $X\subseteq Y$, and a function $f:Y\times Z\rightarrow W$ such that $C\simeq (X,Z,\diamond)$ and $D\simeq (Y,Z,\bullet)$, where $\diamond$ and $\bullet$ are given by $x\diamond z=f(x,z)$ and $$$$$y\bullet z=f(y,z)$.

**Additive subagent (currying definition).** We say $C\triangleleft_+ D$ if there exists a Cartesian frame $M$ over $\mbox{Agent}(D)$ with $|\mbox{Env}(M)|=1$, such that $C\simeq D^\circ(M)$.

**Additive subagent (categorical definition).** We say $C\triangleleft_+ D$ if there exists a single morphism $\phi_0:C\rightarrow D$ such that for every morphism $\phi:C\rightarrow\bot$ there exists a morphism $\phi_1:D\rightarrow\bot$ such that $\phi$ is homotopic to $\phi_1\circ\phi_0$ .

**Multiplicative subagent (sub-tensor definition). **$C$ is a multiplicative subagent of $D$, written $C\triangleleft_\times D$, if there exists a $C^\prime$ and $D^\prime\simeq D$ with $D^\prime\in C\boxtimes C^\prime$.

**Multiplicative subagent (sister definition). ** $C^\prime$ is called a sister to $C$ in $D$ if $D\simeq D^\prime$ for some $D^\prime\in C\boxtimes C^\prime$. We say $C\triangleleft_\times D$ if $C$ has a sister in $D$.

**Multiplicative subagent (externalizing definition).** Given Cartesian frames $C$ and $D$ over $W$, we say $C\triangleleft_\times D$ if there exist three sets $X$, $Y$, and $Z$, and a function $f:X\times Y\times Z\rightarrow W$ such that $C\simeq (X,Y\times Z,\diamond)$ and $D\simeq (X\times Y,Z,\bullet)$, where $\diamond$ and $\bullet$ are given by $x\diamond (y,z)=f(x,y,z)$ and $$$$$(x,y)\bullet z=f(x,y,z)$.

**Multiplicative subagent (currying definition).** We say $C\triangleleft_\times D$ if there exists a Cartesian frame $M$ over $\mbox{Agent}(D)$ with $\mbox{Image}(M)=\mbox{Agent}(D)$, such that $C\simeq D^\circ(M)$.

**Multiplicative subagent (categorical definition).** We say $C\triangleleft_\times D$ if for every morphism $\phi:C\rightarrow\bot$, there exist morphisms $\phi_0:C\rightarrow D$ and $\phi_1:D\rightarrow\bot$ such that $\phi\cong\phi_1\circ \phi_0$, and for every morphism $\psi:1\rightarrow D$, there exist morphisms $\psi_0:1\rightarrow C$ and $\psi_1:C\rightarrow D$ such that $\psi\cong\psi_1\circ \psi_0$.

**Multiplicative subagent (sub-environment definition).** We say $C\triangleleft_\times D$ if $C\triangleleft D$ and $C\triangleleft^* D$. Equivalently, we say $C\triangleleft_\times D$ if $C\triangleleft D$ and $D^* \triangleleft C^*$.

**Additive sub-environment.** We say $C$ is an additive sub-environment of $D$, written $C\triangleleft^*_+ D$, if $D^* \triangleleft_+ C^*$.

**Multiplicative sub-environment.** We say $C$ is an multiplicative sub-environment of $D$, written $C\triangleleft^*_\times D$, if $D^* \triangleleft_\times C^*$.

**5.2. Ways to Construct Subagents, Sub-Environments, etc.**

**Committing.** Given a set $S\subseteq W$ and a frame $C=(A,E,\cdot)$ over $W$, we define $\mbox{Commit}_{S}(C)=\mbox{Commit}^{B}(C)$ and $\mbox{Commit}_{\backslash S}(C)=\mbox{Commit}^{\backslash B}(C)$, where $B\subseteq A$ is given by $B=\{a\in A  |  \forall e\in E, a\cdot e\in S\}$.

**Assuming.** Given a set $S\subseteq W$ and a frame $C=(A,E,\cdot)$ over $W$, we define $\mbox{Assume}_{S}(C)=\mbox{Assume}^{F}(C)$ and $\mbox{Assume}_{\backslash S}(C)=\mbox{Assume}^{\backslash F}(C)$, where $F\subseteq E$ is given by $F=\{e\in E  |  \forall a\in A, a\cdot e\in S\}.$

**Externalizing.** Given a partition $V$ of $W$, let $v:W\rightarrow V$ send each element $w \in W$ to the part that contains it. Given a frame $C=(A,E,\cdot)$ over $W$, we define $\mbox{External}_{V}(C)=\mbox{External}^{B}(C)$ and $\mbox{External}_{/V}(C)=\mbox{External}^{/B}(C)$, where $B=\{\{a^\prime\in A  |  \forall e\in E, v(a^\prime\cdot e)=v(a\cdot e)\}  |  a\in A\}$.

**Internalizing.** Given a partition $V$ of $W$, let $v:W\rightarrow V$ send each element $w \in W$ to the part that contains it. Given a frame $C=(A,E,\cdot)$ over $W$, we define $\mbox{Internal}_{V}(C)=\mbox{Internal}^{F}(C)$ and $\mbox{Internal}_{/V}(C)=\mbox{Internal}^{/F}(C)$, where $F=\{\{e^\prime\in E  |  \forall a\in a,  v(a\cdot e^\prime)=v(a\cdot e)\}  |  e\in E\}$.

6\. Controllables and Observables
---------------------------------

**Ensurables (categorical definition).** $\mbox{Ensure}(C)$ is the set of all $S\subseteq W$ such that there exists a morphism $\phi:1_S\rightarrow C$.

**Preventables (categorical definition). **$\mbox{Prevent}(C)$is the set of all $S\subseteq W$ such that there exists a morphism $\phi_1: 1_{W\backslash S}\rightarrow C$.

**Controllables (categorical definition).** Let $2_S$ denote the Cartesian frame $1_S\oplus 1_{W\backslash S}$. $\mbox{Ctrl}(C)$ is the set of all $S\subseteq W$ such that there exists a morphism $\phi:2_S\rightarrow C$.

**Observables (original categorical definition). **$\mbox{Obs}(C)$ is the set of all $S\subseteq W$ such that there exist $C_0$ and $C_1$ with $\mbox{Image}(C_0)\subseteq S$ and $\mbox{Image}(C_1)\subseteq W\backslash S$ such that $C\simeq C_0\&C_1$.

**Observables (definition from subsets).** We say that a finite partition $V$ of $W$ is observable in a frame $C$ over $W$ if for all parts $S_i\in V$, $S_i\in \mbox{Obs}(C)$. We let $\mbox{Obs}^\prime(C)$ denote the set of all finite partitions of $W$ that are observable in $C$.

**Observables (conditional policies definition):** We say that a finite partition $V$ of $W$ is observable in a frame $C=(A,E,\cdot)$ over $W$ if for all functions $f:V\rightarrow A$, there exists an element $a_f\in A$ such that for all $e\in E$, $f(v(a_f\cdot e))\cdot e=a_f\cdot e$, where  $v:W\rightarrow V$ is the function that sends each element of $W$ to its part in $V$.

**Observables (non-constructive additive definition):** We say that a finite partition $V=\{S_1,\dots,S_n\}$ of $W$ is observable in a frame $C$ over $W$ if there exist frames $C_1,\cdots C_n$ over $W$, with $C_i\triangleleft\bot_{S_i}$ such that $C\simeq C_1\&\dots\&C_n$.

**Observables (constructive additive definition):** We say that a finite partition $V=\{S_1,\dots,S_n\}$ of $W$ is observable in a frame $C$ over $W$ if $C\simeq \mbox{Assume}_{S_1}(C)\&\dots\&\mbox{Assume}_{S_n}(C)$.

**Powerless outside of a subset:** Given a frame $C=(A,E,\cdot)$ over $W$ and a subset $S$ of $W$, we say that $C$'s agent is powerless outside $S$ if for all $e\in E$ and all $a_0,a_1\in A$, if $a_0\cdot e\notin S$, then $a_0\cdot e=a_1\cdot e$.

**Observables (non-constructive multiplicative definition):** We say that a finite partition $V=\{S_1,\dots,S_n\}$ of $W$ is observable in a frame $C$ over $W$ if $C\simeq C_1\otimes\dots \otimes C_n$, where each $C_i$'s agent is powerless outside $S_i$.

**Observables (constructive multiplicative definition): ** We say that a finite partition $V=\{S_1,\dots,S_n\}$ of $W$ is observable in a frame $C$ over $W$ if $C\simeq C_1\otimes\dots\otimes C_n$, where $C_i=\mbox{Assume}_{S_i}(C)\&1_{T_i}$, where $T_i=(W\backslash S_i)\cap \mbox{Image}(C)$.

**Observables (non-constructive internalizing-externalizing definition):** We say that a finite partition $V$ of $W$ is observable in a frame $C=(A,E,\cdot)$ over $W$ if either $A=\{\}$ or $C$ is biextensionally equivalent to something in the image of $\mbox{External}_V\circ\mbox{Internal}_V$.

**Observables (constructive internalizing-externalizing definition):** We say that a finite partition $V$ of $W$ is observable in a frame $C=(A,E,\cdot)$ over $W$ if either $A=\{\}$ or $C\simeq \mbox{External}_V(\mbox{Internal}_V(C))$.