Independent scholarship · Open accessThe monthly digest

Full manuscript · browser edition

Evaluation and Reconstruction in Mathematical Duality

Continuous, single-column reading. Equations, tables, proofs, references and appendices stay in document order.

Contents · 17 sections

Evaluation and Reconstruction
in Mathematical Duality

An illustrated introduction to geometry, logic, computation and modules


Abstract. A map of finite sets is determined by its inverse-image action on subsets. Generalizing this observation requires a precise choice of what can be evaluated and which maps preserve evaluation. We compare Stone, Pontryagin, Gelfand, affine, Isbell, Morita and Spanier–Whitehead duality. In each case a two-sided representation produces a contravariant adjunction, and the canonical maps to the double dual specify where reconstruction holds. Theories and models give both a Galois connection and classification in a varying topos. Quotation, specialization and a self-interpreter exhibit a different role for evaluation in computation. The examples include a noncommutative module calculation and executable interpretations of a Lisp program at three depths.


Points, subsets and inverse images

max width=

Figure .The map sends a,ba,b to uu and cc to vv. Reading the indicator of {u}\{u\} on the images of a,b,ca,b,c, in that order, gives 1,1,01,1,0.

Choose the point uu on the right in Figure [fig:pull]. Which points on the left land there? The answer is the subset {a,b}\{a,b\}. For any map f:X→Yf:X\to Y and subset U⊆YU\subseteq Y, this calculation is f−1U={x∈X∣f(x)∈U}.f^{-1}U=\{x\in X\mid f(x)\in U\}. It works even when several points have the same image. A second map g:Y→Zg:Y\to Z gives (gf)−1=f−1g−1(g f)^{-1}=f^{-1}g^{-1}. This reversal of composition is contravariance.

The equality behind the picture is 1f−1U(x)=1U(f(x))\mathbf 1_{f^{-1}U}(x)=\mathbf 1_U(f(x)). It expresses compatibility between a map of points and a map of predicates. The same form of equality occurs when a group character is restricted, a polynomial is substituted, or a sentence is interpreted in a reduct of a model.

A category specifies objects, maps between them, identities and composition. A dual equivalence between two categories assigns to each map X→YX\to Y a map DY→DXDY\to DX. In the opposite direction a second assignment recovers each object up to a canonical isomorphism compatible with every map. Recovering arrows is part of the assertion.

For a finite set XX, start with its Boolean algebra of subsets. Each xx determines the test U↦1U(x)U\mapsto\mathbf 1_U(x). Every Boolean-algebra map from that finite algebra to {0,1}\{0,1\} arises from exactly one xx. Section [sec:stone] identifies the topology needed for the infinite version. This first instance already separates three questions. What can be evaluated? Which maps preserve that evaluation? When is every compatible test evaluation at an original object or point? [23, 30]

Theorem 1 (Finite powerset duality). For finite sets X,YX,Y, inverse image gives a bijection Set(X,Y) ≅ HomBA(P(Y),P(X)),f⟼f−1.\mathbf{Set}(X,Y)\ \cong\ \mathop{\mathrm{Hom}}_{\mathbf{BA}}\bigl(\mathcal P(Y),\mathcal P(X)\bigr), \qquad f\longmapsto f^{-1}. Here Boolean homomorphisms preserve 0,10,1, binary meets and complements. Every finite Boolean algebra is isomorphic to the powerset of its set of atoms, its minimal nonzero elements. Hence finite sets and finite Boolean algebras are dual categories. [30, 23]

To reconstruct ff from hh, look at the disjoint subsets h({y})h(\{y\}) of XX. Their union is XX. For each xx, the unique part containing xx specifies f(x)f(x). In Figure [fig:pull], the parts are {a,b}\{a,b\} and {c}\{c\}. This procedure recovers the function even though it identifies two points. It also explains why preservation of finite joins suffices in the finite theorem.

The common statement

A family of pairings can specify both dual functors before either functor has been named.

Let C,D\mathcal C,\mathcal D be locally small categories, so maps between each pair of objects form a set. Write Cop\mathcal C^{\mathrm{op}} for the category with all arrows reversed. Suppose P:Cop×Dop→SetP:\mathcal C^{\mathrm{op}}\times\mathcal D^{\mathrm{op}}\to\mathbf{Set}. A map in either input acts on PP by precomposition. A representation in the second input means that every element of P(c,d)P(c,d) is determined by a unique map d→Fcd\to Fc, naturally in dd.

A representation in the first input has the analogous form c→Gdc\to Gd.

A familiar example is the set of bilinear forms on V×WV\times W. A form bb gives a map W→V∗W\to V^* by w↦b(−,w)w\mapsto b(-,w), and a map V→W∗V\to W^* by v↦b(v,−)v\mapsto b(v,-). Both descriptions specify every value b(v,w)b(v,w).

Theorem 2 (Two-sided representability). Let P:Cop×Dop→SetP:\mathcal C^{\mathrm{op}}\times\mathcal D^{\mathrm{op}}\to\mathbf{Set} be representable in each variable with the other fixed. The representatives extend to functors F:C→DopF:\mathcal C\to\mathcal D^{\mathrm{op}} and G:Dop→CG:\mathcal D^{\mathrm{op}}\to\mathcal C with F⊣GF\dashv G. Their adjunction is specified by HomD(d,Fc) ≅ P(c,d) ≅ HomC(c,Gd)\mathop{\mathrm{Hom}}_{\mathcal D}(d,Fc)\ \cong\ P(c,d)\ \cong\ \mathop{\mathrm{Hom}}_{\mathcal C}(c,Gd) naturally in both variables. Conversely every such adjunction gives a pairing with these representations. [23, 15]

Here is the action on one arrow. Given u:c→c′u:c\to c', precomposition gives P(c′,d)→P(c,d)P(c',d)\to P(c,d) for every dd. In the representation by D\mathcal D, this is postcomposition with a unique arrow Fc′→FcFc'\to Fc. Applying the same argument to an identity and to a composite gives precisely the two functor laws.

Representing objects are unique up to unique isomorphism compatible with their representations. Yoneda’s lemma supplies the action on arrows. Under the displayed bijection, idFc\mathop{\mathrm{id}}_{Fc} corresponds to ηc:c→GFc\eta_c:c\to GFc, and idGd\mathop{\mathrm{id}}_{Gd} corresponds to δd:d→FGd\delta_d:d\to FGd. The latter arrow is the counit written in D\mathcal D. Both comparison arrows therefore point towards the double dual in their original categories.

Call cc reflexive if ηc\eta_c is an isomorphism, and dd reflexive if δd\delta_d is. The triangle identities give Fηc∘δFc=idFcF\eta_c\circ\delta_{Fc}=\mathop{\mathrm{id}}_{Fc} and Gδd∘ηGd=idGdG\delta_d\circ\eta_{Gd}=\mathop{\mathrm{id}}_{Gd}. Hence the dual of a reflexive object is reflexive on the other side. Restriction gives Cref≃Drefop\mathcal C_{\rm ref}\simeq\mathcal D_{\rm ref}^{\mathrm{op}}. Full duality holds exactly when both comparisons are invertible everywhere. [23, 2, 15]

max width=

Figure .On the left, either route sends cc to GFc′GFc' by the same map. On the right, composition along the lower sides gives the identity for every cc, including nonreflexive objects. A composite equal to the identity need only have one-sided inverses.

max width=

Figure .For V=R2V=\mathbb R^2 and W=R3W=\mathbb R^3, evaluate b(v,w)=vTMwb(v,w)=v^{\mathsf T}Mw in either order. With the indicated inputs, first fixing vv gives 2+6=82+6=8, and first fixing ww gives 0+2⋅4=80+2\cdot 4=8.

Any anti-equivalence yields such a pairing by taking P(c,d)=HomD(d,Fc)P(c,d)=\mathop{\mathrm{Hom}}_{\mathcal D}(d,Fc). In a concrete theorem the mathematical work is identifying PP independently and deciding precisely where its two comparisons are invertible.

A relation and its two closures

A table of integers gives the entire construction in a setting where an arrow is an inclusion.

A partially ordered set is a category with one arrow s→ts\to t when s≤ts\le t, and none otherwise. Take a relation R⊆X×YR\subseteq X\times Y. For a set SS of rows let S↑S^\uparrow be the columns incident with every row in SS. For a set TT of columns let T↓T^\downarrow be the rows incident with every column in TT. Adding rows can only remove common columns. Both operations reverse inclusion. [6]

Let P(S,T)P(S,T) mean S×T⊆RS\times T\subseteq R. In the posets of subsets its two representations read T⊆S↑⟺S⊆T↓.T\subseteq S^\uparrow \quad\Longleftrightarrow\quad S\subseteq T^\downarrow . Both sides assert that every entry in the rectangle S×TS\times T is marked. This is an antitone Galois connection, also called a polarity.

max width=

Figure .Only one column has a dot in both selected rows, namely 22. This column also contains a dot for 3030. The closure of {6,10}\{6,10\} is therefore {6,10,30}\{6,10,30\}.

Every SS satisfies S⊆S↑↓S\subseteq S^{\uparrow\downarrow}, with exponents applied from left to right. The operation is monotone and idempotent. For instance, repeating the calculation from {6,10,30}\{6,10,30\} gives exactly that set. The two triangle identities reduce to equalities of subsets such as S↑↓↑=S↑S^{\uparrow\downarrow\uparrow}=S^\uparrow. The fixed row sets and fixed column sets are opposite posets.

The empty set gives a revealing boundary case. Every one of the three columns is common to its rows, by vacuous truth. The unique row divisible by all three primes is 3030. Thus the least closed row set is {30}\{30\}.

Theorem 3 (The complete lattice of a polarity). For any relation R⊆X×YR\subseteq X\times Y, the closed row sets S=S↑↓S=S^{\uparrow\downarrow} ordered by inclusion form a complete lattice. For any family (Si)i∈I(S_i)_{i\in I} of closed row sets, ⋀iSi=⋂iSi,⋁iSi=(⋃iSi)↑↓.\bigwedge_i S_i=\bigcap_i S_i,\qquad \bigvee_i S_i=\left(\bigcup_i S_i\right)^{\uparrow\downarrow}. The map S↦S↑S\mapsto S^\uparrow is an order-reversing bijection to the closed column sets, with inverse T↦T↓T\mapsto T^\downarrow. The empty meet is XX, and the empty join is ∅↑↓\varnothing^{\uparrow\downarrow}. [6]

For example, the meet of {6,30}\{6,30\} and {10,30}\{10,30\} in Figure [fig:incidence] is {30}\{30\}, and their join is {6,10,30}\{6,10,30\}. Taking common attributes sends these sets to {2,3,5}\{2,3,5\} and {2}\{2\}, respectively. Thus a meet on the row side corresponds to a join on the column side.

The hom-set between two comparable subsets has one element. Otherwise it is empty. Replacing each inclusion above by its hom-set gives exactly the two representations of PP in Section [sec:criterion]. Here a comparison is invertible exactly when an inclusion is equality.

The table has eight closed row sets. Each consists of 3030 together with a subset of {6,10,15}\{6,10,15\}. Their opposite order is the inclusion order on the eight possible sets of prime attributes. In logic, rows can instead be structures and columns sentences. Then closure on the sentence side is closure under semantic consequence, as in Section [sec:logic]. In a general category, double dualization need not be idempotent. Section [sec:enrichment] gives a linear example.

Stone duality

A point can be specified by a compatible truth value for every clopen subset.

A clopen set is open and closed. A Stone space is a compact Hausdorff space with a basis of clopen sets. Its clopens form a Boolean algebra Clop(X)\mathop{\mathrm{Clop}}(X) under union, intersection and complement. A continuous map f:X→Yf:X\to Y induces a Boolean homomorphism f−1:Clop(Y)→Clop(X)f^{-1}:\mathop{\mathrm{Clop}}(Y)\to\mathop{\mathrm{Clop}}(X).

In the other direction let 2={0,1}2=\{0,1\} with its Boolean operations and discrete topology.

For a Boolean algebra BB, put Ult(B)=HomBA(B,2)\mathop{\mathrm{Ult}}(B)=\mathop{\mathrm{Hom}}_{\mathbf{BA}}(B,2), the space of truth assignments preserving 0,1,∧,∨,¬0,1,\wedge,\vee,\neg. Its basic opens are [b]={u:u(b)=1}[b]=\{u:u(b)=1\}. They are clopen since their complements are [¬b][\neg b]. The elements assigned 11 form an ultrafilter. A homomorphism h:B→Ch:B\to C acts by u↦uhu\mapsto u h.

Theorem 4 (Stone representation and duality). In classical set theory, the maps X⟶Ult(ClopX),x⟼(U↦1U(x)),B⟶Clop(UltB),b⟼[b]X\longrightarrow\mathop{\mathrm{Ult}}(\mathop{\mathrm{Clop}}X),\quad x\longmapsto(U\mapsto\mathbf1_U(x)), \qquad B\longrightarrow\mathop{\mathrm{Clop}}(\mathop{\mathrm{Ult}}B),\quad b\longmapsto[b] are a homeomorphism for every Stone space XX and an isomorphism for every Boolean algebra BB. Both are natural. With continuous maps and Boolean homomorphisms, this gives Stone≃BAop\mathbf{Stone}\simeq\mathbf{BA}^{\mathrm{op}}. The empty space corresponds to the one-element Boolean algebra. [30, 23]

Take the subalgebra generated by {a,b}\{a,b\} inside P({a,b,c})\mathcal P(\{a,b,c\}). Its two atoms are {a,b}\{a,b\} and {c}\{c\}. Restriction of a truth assignment to the subalgebra identifies the points aa and bb, and separates both from cc. The inclusion of the subalgebra therefore induces exactly the surjection in Figure [fig:pull].

max width=

Figure .The eight subsets of {a,b,c}\{a,b,c\}. The shaded face consists of all four subsets containing bb. Its characteristic test is evaluation at bb. Dashed edges add bb.

The three singleton subsets partition X={a,b,c}X=\{a,b,c\}. A Boolean homomorphism P(X)→2\mathcal P(X)\to2 must assign 11 to exactly one singleton, since their join is 11 and their pairwise meets are 00. This determines its value on every subset. The spectrum has three points. Evaluation distinguishes them even though the algebra has eight elements.

In a Stone space XX, distinct points have disjoint clopen neighborhoods. A family of clopens in an ultrafilter has the finite intersection property, so compactness gives a point common to all of them. Separation gives uniqueness. On the algebra side, the Boolean prime ideal theorem ensures that distinct elements can be separated by ultrafilters. [30, 23]

An element of P(X,B)P(X,B) gives a truth value for each x∈X,b∈Bx\in X,b\in B. At fixed xx the assignment is Boolean. At fixed bb it is continuous into 22. Read by rows or columns, this is HomStone(X,UltB) ≅ HomBA(B,ClopX).\mathop{\mathrm{Hom}}_{\mathbf{Stone}}(X,\mathop{\mathrm{Ult}}B) \ \cong\ \mathop{\mathrm{Hom}}_{\mathbf{BA}}(B,\mathop{\mathrm{Clop}}X).

In 2N2^{\mathbb N}, every clopen is a finite union of cylinders. Indeed, an open cylinder can be chosen about each of its points and compactness gives a finite subcover. The algebra is obtained from finite Boolean algebras of prefixes. The space is the inverse limit of the finite discrete prefix spaces. The words corresponding to a point at successive levels agree under truncation. Figure [fig:cantor] shows the first three choices.

max width=

Figure .A path beginning 1,0,11,0,1 selects nested cylinders [1]⊃[10]⊃[101][1]\supset[10]\supset[101] in binary Cantor space. Every infinite path determines an ultrafilter of clopens.

Take the Boolean algebra of finite and cofinite subsets of N\mathbb N. Each integer supplies a point by evaluation. There is one more homomorphism to 22, with value 11 exactly on the cofinite sets. An ultrafilter containing a finite set must contain a singleton, so these are all the points. A basic neighborhood of the extra point contains all but finitely many integers. Its Stone space is the one-point compactification of discrete N\mathbb N.

Pontryagin duality

Continuous characters give the compact circle and the discrete integers as one another’s duals.

Put T=R/Z\mathbb T=\mathbb R/\mathbb Z with addition modulo 11. For a locally compact Hausdorff abelian group GG, let G^=Homcont(G,T)\widehat G=\mathop{\mathrm{Hom}}_{\rm cont}(G,\mathbb T), with pointwise addition and the compact-open topology. This topology controls the values of characters on compact subsets. If f:G→Hf:G\to H is a continuous homomorphism, its dual f^:H^→G^\widehat f:\widehat H\to\widehat G sends χ\chi to χf\chi f.

A character of the discrete group Z\mathbb Z has the form n↦ntn\mapsto nt for a unique t∈Tt\in\mathbb T, its value at 11. A continuous character of T\mathbb T is t↦ntt\mapsto nt for a unique n∈Zn\in\mathbb Z. The same expression therefore represents a point on a compact circle in the first calculation and an integer in a discrete group in the second. [21, 23]

max width=

Figure .The parameter t=1/4t=1/4 gives a periodic character of Z\mathbb Z. The four displayed residues are points of T\mathbb T. Allowing every t∈Tt\in\mathbb T gives Z^\widehat{\mathbb Z}.

Let P(G,H)P(G,H) be the jointly continuous bicharacters G×H→TG\times H\to\mathbb T, homomorphisms separately in each variable. Local compactness and the compact-open topology identify these with continuous homomorphisms H→G^H\to\widehat G and G→H^G\to\widehat H. For a given gg, the function χ↦χ(g)\chi\mapsto\chi(g) is a character of the character group.

The dual of a compact group in this category is discrete, and the dual of a discrete group is compact. The whole category also contains R\mathbb R, which is self-dual via (x,t)↦xt mod 1(x,t)\mapsto xt\bmod1. Discrete and compact name two exchanged subcategories. The construction extends beyond them. [21]

Theorem 5 (Pontryagin–van Kampen duality and annihilators). On locally compact Hausdorff abelian groups with continuous homomorphisms, G↦G^G\mapsto\widehat G with the compact-open topology is a contravariant equivalence. Its double-dual isomorphism is g↦(χ↦χ(g))g\mapsto(\chi\mapsto\chi(g)). If H⊆GH\subseteq G is a closed subgroup, set H⊥={χ∈G^:χ(h)=0 for all h∈H}H^\perp=\{\chi\in\widehat G:\chi(h)=0\text{ for all }h\in H\}, using additive circle values. Then G/H^≅H⊥,H^≅G^/H⊥\widehat{G/H}\cong H^\perp,\qquad \widehat H\cong\widehat G/H^\perp as topological groups. The second isomorphism is induced by restriction of characters. [21]

For G=RG=\mathbb R and H=ZH=\mathbb Z, a character x↦tx mod 1x\mapsto tx\bmod1 is zero on HH precisely for t∈Zt\in\mathbb Z. Thus H⊥=Z⊆R^≅RH^\perp=\mathbb Z\subseteq\widehat{\mathbb{R}}\cong\mathbb R. The two formulas simultaneously give R/Z^≅Z\widehat{\mathbb R/\mathbb Z}\cong\mathbb Z and Z^≅R/Z\widehat{\mathbb{Z}}\cong\mathbb R/\mathbb Z.

max width=

Figure .Characters of Z/4\mathbb Z/4 in multiplicative notation. Row jj sends nn to ijni^{jn}. Column nn evaluates all four characters at nn.

For the homomorphism n↦2nn\mapsto2n, precomposing row jj gives row 2j mod 42j\bmod4. For example row 11 becomes row 22. The Fourier transform on functions uses these entries as coefficients in a sum. The group duality itself is already present in evaluation of the columns. Its definition uses no choice of measure.

The even subgroup H={0,2}H=\{0,2\} of Z/4\mathbb Z/4 has quotient Z/2\mathbb Z/2. A character descends to the quotient exactly when it equals 11 on HH. Rows 00 and 22 meet this condition. The quotient homomorphism therefore gives an inclusion of the two quotient characters into the four original characters. In general this subgroup of characters is the annihilator of HH.

Two geometries of functions

Both constructions below send a geometric map ff to substitution h↦h∘fh\mapsto h\circ f. The kinds of functions differ.

For a nonempty compact Hausdorff space XX, C(X,C)C(X,\mathbb C) is a commutative unital complex C∗C^*-algebra, with the supremum norm and complex conjugation. For a nonzero commutative unital C∗C^*-algebra AA, Char(A)\mathop{\mathrm{Char}}(A) consists of its unital ∗*-homomorphisms to C\mathbb C, with the topology of pointwise convergence. Morphisms of algebras here preserve the unit and involution. For a∈Aa\in A, its Gelfand transform is the function a^(χ)=χ(a)\widehat a(\chi)=\chi(a).

Theorem 6 (Commutative Gelfand–Naimark duality). For a nonzero commutative unital complex C∗C^*-algebra AA, its character space is compact Hausdorff and the Gelfand transform A→C(CharA,C)A\to C(\mathop{\mathrm{Char}}A,\mathbb C) is an isometric unital ∗*-isomorphism. For a nonempty compact Hausdorff XX, evaluation X→Char(C(X,C))X\to\mathop{\mathrm{Char}}(C(X,\mathbb C)) is a homeomorphism. Both comparisons are natural for the morphisms specified above. [9, 23]

For A=C×CA=\mathbb C\times\mathbb C, a character sends each coordinate idempotent to 00 or 11. The two images sum to 11 and multiply to 00, so the only characters are the coordinate projections. The transform of (z,w)(z,w) is exactly the function with values z,wz,w on this discrete two-point space.

For a commutative unital ring AA, SpecA\mathop{\mathrm{Spec}}A has the prime ideals as points and a sheaf of local functions. A unital homomorphism A→BA\to B sends a prime of BB to its inverse image in AA. For a scheme XX, write ΓX\Gamma X for the ring of global regular functions.

Theorem 7 (Affine reconstruction). For every scheme XX and commutative unital ring AA, there is a natural bijection HomSch(X,SpecA)≅HomCRing(A,ΓX).\mathop{\mathrm{Hom}}_{\mathbf{Sch}}(X,\mathop{\mathrm{Spec}}A)\cong\mathop{\mathrm{Hom}}_{\mathbf{CRing}}(A,\Gamma X). The canonical ring map A→Γ(SpecA)A\to\Gamma(\mathop{\mathrm{Spec}}A) is an isomorphism. The comparison X→SpecΓXX\to\mathop{\mathrm{Spec}}\Gamma X is universal among maps from XX to affine schemes and is an isomorphism exactly when XX is affine. Consequently Aff≃CRingop\mathbf{Aff}\simeq\mathbf{CRing}^{\mathrm{op}}. [27]

Take B=k[ϵ]/(ϵ2)B=k[\epsilon]/(\epsilon^2) over a field kk. A kk-map SpecB→Ak1\mathop{\mathrm{Spec}}B\to\mathbb A^1_k is determined by t↦a+bϵt\mapsto a+b\epsilon. All choices of bb at a given aa induce the same map on the underlying one-point source. They give different scheme morphisms because the maps on functions record the nilpotent coefficient. This explains the role of the structure sheaf in affine reconstruction.

max width=

Figure .On real points x=−3/4x=-3/4 and x=3/4x=3/4 have the same square. On polynomial rings over a field kk, the map on affine lines induces k[t]→k[s]k[t]\to k[s] by substitution h(t)↦h(s2)h(t)\mapsto h(s^2).

A continuous map f:X→CharAf:X\to\mathop{\mathrm{Char}}A gives the algebra map A→C(X,C)A\to C(X,\mathbb C) with a↦[x↦f(x)(a)]a\mapsto[x\mapsto f(x)(a)]. This is P(X,A)P(X,A) in the Gelfand case. For compact spaces the functions taking only 00 and 11 are precisely the indicators of clopens. On a connected interval they are constant. General continuous complex-valued functions, including the coordinate, separate its points. This explains the different geometric hypotheses in the Stone and Gelfand theorems.

max width=

Figure .On the overlap of the two standard charts of Pk1\mathbb P^1_k, each global function belongs to both indicated subrings of the Laurent ring.

The intersection k[z]∩k[z−1]k[z]\cap k[z^{-1}] there is kk, by uniqueness of Laurent coefficients. The comparison Pk1→Speck\mathbb P^1_k\to\mathop{\mathrm{Spec}}k thus contracts the entire projective line to one point. The local charts contain geometric information unavailable from the global ring.

What a theory determines

A sentence has a class of models. A class of models has a common theory. The two operations reverse inclusion.

Fix a signature. Range over its sentences and over structures in a chosen universe. For sentences TT and a collection of structures KK, set Mod(T)={M∣M⊨φ for all φ∈T},Th(K)={φ∣M⊨φ for all M∈K}.\begin{aligned} \mathop{\mathrm{Mod}}(T)&=\{M\mid M\models\varphi\text{ for all }\varphi\in T\},\\ \mathop{\mathrm{Th}}(K)&=\{\varphi\mid M\models\varphi\text{ for all }M\in K\}. \end{aligned} Form these collections in a larger universe if needed. The pairing is the assertion that every M∈KM\in K satisfies every φ∈T\varphi\in T. Thus K⊆Mod(T)K\subseteq\mathop{\mathrm{Mod}}(T) exactly when T⊆Th(K)T\subseteq\mathop{\mathrm{Th}}(K).

The double passage T↦Th(Mod(T))T\mapsto\mathop{\mathrm{Th}}(\mathop{\mathrm{Mod}}(T)) adds every semantic consequence. On the other side K↦Mod(Th(K))K\mapsto\mathop{\mathrm{Mod}}(\mathop{\mathrm{Th}}(K)) is the smallest class axiomatizable by a set of sentences that contains KK. The fixed objects are closed theories and theory-axiomatizable classes, ordered oppositely. [17, 6]

Theorem 8 (First-order completeness and model classes). Fix a first-order signature with classical semantics over all nonempty structures, and use classical first-order natural deduction with equality. For every set TT of sentences and sentence φ\varphi, T⊢φ⟺∀M (M⊨T ⟹ M⊨φ).T\vdash\varphi\quad\Longleftrightarrow\quad \forall M\,\bigl(M\models T\ \Longrightarrow\ M\models\varphi\bigr). In particular Th(Mod(T))\mathop{\mathrm{Th}}(\mathop{\mathrm{Mod}}(T)) equals the set of sentences with a finite derivation from TT. The maps Mod,Th\mathop{\mathrm{Mod}},\mathop{\mathrm{Th}} restrict to opposite isomorphisms of the posets of deductively closed theories and classes axiomatized by theories. [17]

Finiteness of derivations yields compactness. As an application, take sentences θn\theta_n saying that at least nn elements exist. Any finite subset of the θn\theta_n has a finite model. If a first-order theory axiomatized all finite nonempty sets in the language of equality, adjoining every θn\theta_n would, by compactness, give it an infinite model. This obstruction concerns which model classes appear on the reflexive side.

max width=

Figure .Valuations are written in the order pqpq. The unique excluded valuation 1010 makes pp true and qq false. Adding pp as an axiom leaves only 1111, so qq is a semantic consequence of the enlarged theory.

Identify propositional formulas when they have the same truth value under every valuation. The quotient is a Boolean algebra with conjunction as meet and negation as complement. Equivalently, use provable equivalence in a sound and complete classical propositional calculus. Evaluation at a valuation is a Boolean homomorphism to 22. Conversely, such a homomorphism assigns truth values to the propositional variables, and these determine its value on every formula by induction.

With two variables there are four valuations and sixteen truth functions. Every subset of the four valuations is specified by a disjunction of the corresponding complete conjunctions of literals. Thus the Lindenbaum algebra is the powerset algebra of the four-point space. Figure [fig:truth] displays one of its sixteen elements. For infinitely many variables the clopens of the product space 2I2^I are exactly the truth sets of finitary formulas. [30, 17]

In the language with just <<, the orders (Q,<)(\mathbb Q,<) and (R,<)(\mathbb R,<) satisfy exactly the same first-order sentences. Both are dense linear orders without endpoints, a complete theory. They have different cardinalities and so are nonisomorphic. Even all sentences true in one structure can determine several isomorphism classes. [17]

The compatibility of satisfaction with maps also has an exact formulation. For a signature translation σ\sigma, translating φ\varphi preserves truth when models are restricted along σ\sigma. More precisely, for a model NN of the target signature, N⊨σ(φ) ⟺ N∣σ⊨φ.N\models\sigma(\varphi)\ \Longleftrightarrow\ N|_\sigma\models\varphi . This is the satisfaction condition for an institution. It is the change-of-language analogue of the inverse-image identity on the opening page. [7]

Terms as maps between free models

A group word gives an operation on every group. With the right objects on the semantic side, substitution itself has an exact dual.

Let Lgrp\mathsf L_{\rm grp} be the category whose object nn is a context of nn variables. A map n→mn\to m is an mm-tuple of group terms in those variables, with terms identified by the group axioms. Composition substitutes one tuple into the next. The distinguished object 11 is a single variable, and nn is its nn-fold product. The empty context 00 is the terminal object.

Let FnF_n be the free group on nn generators. A word in nn variables represents an element of FnF_n. An mm-tuple of such elements determines a unique homomorphism Fm→FnF_m\to F_n, by specifying the image of each generator. Thus Lgrp(n,m)≅HomGrp(Fm,Fn).\mathsf L_{\rm grp}(n,m)\cong\mathop{\mathrm{Hom}}_{\mathbf{Grp}}(F_m,F_n). These bijections preserve identities and reverse the order of composition. They exhibit the syntax category as the opposite of the full subcategory on the finite-rank free groups. [13]

Theorem 9 (Lawvere’s functorial semantics). For a single-sorted finitary equational theory TT, let LT\mathsf L_T have finite variable contexts as objects and tuples of terms modulo provable equality as maps. Its opposite is equivalent to the category on the free TT-algebras FnF_n on finitely many generators. Evaluation identifies the category of all set-based TT-algebras and homomorphisms with the category of finite-product-preserving functors LT→Set\mathsf L_T\to\mathbf{Set} and natural transformations. [13]

For abelian groups a map n→mn\to m in the syntax is an m×nm\times n integer matrix. The operation x2y−1x^2y^{-1} corresponds to the row (2,−1)(2,-1), or in additive notation (g,h)↦2g−h(g,h)\mapsto 2g-h. On free groups in the abelian theory the corresponding map Z→Z2\mathbb Z\to\mathbb Z^2 sends 11 to (2,−1)(2,-1). Composing operations is ordinary matrix multiplication, and the transpose reverses that multiplication.

max width=

Figure .Substitute (a−1,ab)(a^{-1},ab) for (x,y)(x,y) in the word xyxy. The result is bb. On free groups the homomorphisms occur in reverse order, and the generator ee of F1F_1 has final image bb in F2F_2.

For any group HH, giving a homomorphism Fn→HF_n\to H amounts to choosing an input tuple in HnH^n. Given w#:Fm→Fnw^\#:F_m\to F_n, precomposition gives Hn→HmH^n\to H^m. In particular the word xyxy acts by (g,h)↦gh(g,h)\mapsto gh. In the permutation group S3S_3, taking g=(12)g=(12) and h=(23)h=(23) gives (123)(123) with right-to-left composition. Reversing the two letters gives (132)(132). The tuple and the order of its letters both affect evaluation.

This interpretation preserves finite products. Conversely, a finite-product-preserving functor Lgrp→Set\mathsf L_{\rm grp}\to\mathbf{Set} specifies a group on the set assigned to 11. The multiplication, unit and inverse are its images of the corresponding terms. The equations hold because equal arrows have equal images. Natural transformations between these functors are precisely homomorphisms. [13]

There are two different semantic constructions here. All groups occur as product-preserving functors on the syntax. Free groups on finitely many generators represent the contexts and account for the dual equivalence. For c=nc=n and d=Fmd=F_m, the common pairing P(c,d)P(c,d) is the set of mm-tuples of group words in nn variables. Reading a tuple as a substitution gives its representation on the syntax side. Reading it as images of free generators gives its representation on the algebra side.

The same calculation applies to a single-sorted finitary equational theory, using its own equations and free algebras. The choice of contexts explains exactly why this duality takes the finite-rank free algebras as its domain. Code quotation in Section [sec:code] makes terms into explicit data. Section [sec:topos] varies the topos in which a theory is interpreted.

Code as data

The list (head (quote (a b))) has two uses. A program can inspect its symbols and nested lists, or execute the expression and obtain the symbol a.

A program text has a parse tree. In Lisp, a tree can itself be a value, a symbolic expression or S-expression. If ee is an expression tree, execution of quote(e)\mathsf{quote}(e) returns ee as a datum. Evaluation of ee interprets its head as an operation and treats its subexpressions according to the rules for that operation. For instance, quote leaves its operand intact. Figure [fig:quotation] displays the distinction on one tree. McCarthy’s original universal Lisp function and later metacircular evaluators use this shared representation of syntax and data. [18, 1]

max width=

Figure .Quoting the entire expression produces a list. Executing it first obtains the literal list (a b) and then takes its head. The same representation supports structural inspection and execution.

Let TT be the set of abstract syntax trees and q:T→Dataq:T\to\mathsf{Data} an injective structural encoding. On Enc=q(T)\mathsf{Enc}=q(T) there is a decoding d:Enc→Td:\mathsf{Enc}\to T with dq=idTdq=\mathop{\mathrm{id}}_T and qd=idEncqd=\mathop{\mathrm{id}}_{\mathsf{Enc}}. This bijection explains the reversible sense of code/data duality. Its universe of data is the set satisfying the grammar. Parsing a concrete text can discard whitespace and comments, so this syntactic identification is most precise at the tree level. A second map assigns a behavior to a well-formed tree. Distinct trees can have identical behavior. For instance, returning an input directly and returning it after testing an always-true condition agree on every input. A third map is partial application of a program to a fixed input. Thus a decoder recovers syntax, and an evaluator determines which programs agree on all inputs. Section [sec:comparison] expresses this latter agreement as equality of rows in a Chu space.

For a total typed language interpreted in a cartesian closed category, currying is the natural bijection C(Z×A,B)≅C(Z,BA).\mathcal C(Z\times A,B)\cong\mathcal C(Z,B^A). It represents a family of maps by a single map into a function object. For computable partial functions, use an acceptable numbering e↦φee\mapsto\varphi_e of the unary partial computable functions and a computable pairing ⟨a,x⟩\langle a,x\rangle of natural numbers. Such a numbering has a partial computable universal evaluator and a total computable operation on indices for composition. Programs become natural numbers on which other programs can operate. Distinct indices with the same partial function remain distinct inputs to a source transformation. [5, 14]

Theorem 10 (Parameter theorem for program indices). For a standard acceptable numbering of the partial computable functions there is a total computable s:N2→Ns:\mathbb N^2\to\mathbb N such that for all e,a,xe,a,x, φs(e,a)(x) ≃∂ φe(⟨a,x⟩).\varphi_{s(e,a)}(x)\ \simeq_\partial\ \varphi_e(\langle a,x\rangle). Here ≃∂\simeq_\partial means that both computations have the same value or both are undefined. The function ss produces a residual program index even when executing that program on a particular xx diverges. [5]

For example, a program indexed by ee that adds its two inputs can be specialized at 77. The resulting index computes x↦7+xx\mapsto 7+x. If ee indexes an interpreter and aa encodes a source program, specialization yields code for execution on the remaining input. This is the semantic equation used in the first Futamura projection. A reduction in running time requires a separate performance argument. [11]

Theorem 11 (Lawvere’s diagonal fixed-point theorem). In a category with finite products, suppose u:P×P→Bu:P\times P\to B represents every arrow h:P→Bh:P\to B on global points, meaning that for each hh there is p:1→Pp:1\to P with h(x)=u(p,x)h(x)=u(p,x) for every global x:1→Px:1\to P. Then every endomorphism t:B→Bt:B\to B has a global fixed point. [14]

Apply the hypothesis to h(x)=t(u(x,x))h(x)=t(u(x,x)), and evaluate at its representing point pp. Then u(p,p)=t(u(p,p))u(p,p)=t(u(p,p)). In sets, Boolean negation has no fixed point, so a total Boolean table on P×PP\times P cannot enumerate every predicate on PP in this sense. The same calculation rules out a total computable Boolean evaluator enumerating all total computable predicates on N\mathbb N, since its negated diagonal would itself be a total computable predicate. Program codes support universal partial evaluation. A canonical bidual reconstruction of raw programs would require further structure.

A metacircular interpreter

An interpreter is metacircular when its defining program belongs to the language it interprets. A direct test executes the interpreter on the representation of another execution of itself.

Use a first-order Lisp fragment with symbols and finite proper lists as values. A program P=(D,e)P=(D,e) consists of a finite table of named, possibly mutually recursive functions and a closed main expression. Each definition has a distinct nonreserved name and a list of distinct parameters. Expressions are variables, quote, if, primitive applications, and calls to named functions of the declared arity. Arguments are evaluated from left to right. Only the selected branch of if is evaluated, and the empty list is the only false value. The primitives are cons, head, tail, a nonempty-list test pair, and structural equality eq. The operations head and tail require a nonempty list. The second operand of cons must be a proper list. A call binds its parameters to the argument values in a fresh environment. Quoted data use exactly the same list representation as program syntax.

The listing is the entry point and dispatch function of the supplied interpreter. An environment is an association list. ev-form handles quotation and branching before evaluating the arguments of an ordinary call. apply-op dispatches a primitive or uses the definition table and a fresh parameter environment to evaluate a named function body. The source bundle contains all nine function definitions. [18, 1]

(ev (expr env defs)
  (if (pair expr)
      (ev-form (head expr) (tail expr) env defs)
      (lookup-value expr env)))

(run (program)
  (ev (head (tail program)) '() (head program)))

Here ’() abbreviates the literal empty list. The outer execution of this list-processing language is supplied by a Python bootstrap. The code of run, ev and their seven auxiliary functions is written in the same Lisp fragment as the programs passed to run.

Theorem 12 (Operational correctness of the displayed self-interpreter). Let DED_E be the bundled Lisp evaluator’s definition table. For a closed, well-formed program PP in the fragment, set P[0]=PP^{[0]}=P and let P[n+1]P^{[n+1]} consist of DED_E and the expression run(quote(P[n]))\mathsf{run}(\mathsf{quote}(P^{[n]})). For any datum vv and finite nn, P[n]⇓v⟺P⇓v.P^{[n]}\Downarrow v\quad\Longleftrightarrow\quad P\Downarrow v . The relation ⇓\Downarrow means a finite successful execution under the rules above, with unbounded mathematical resources. The claim concerns values and definedness.

The one-layer invariant is that ev applied to a tree, an environment and a table returns exactly the value of the corresponding object-language judgment. Variable lookup and quotation give the base cases. For if, both evaluations use the same test value and selected branch. For a named call, ev-list produces the argument values in order and bind pairs those values with the formal parameters. The recursive call then uses the original body. These clauses give induction on a successful object derivation and inversion of any successful evaluator derivation. Iteration gives the displayed statement for finite nn. Neither direction assigns a value to a divergent computation.

max width=

Figure .For the recursive list-append example, P[1]P^{[1]} contains the evaluator applied to the original program as data. The next layer takes that whole evaluator program as data. The three values in the diagram were obtained by execution.

For (append ’(a b) ’(c)), recursive evaluation reduces the first list to (b) and then to (). The base case returns (c). The two pending cons operations produce (b c) and (a b c). Quoting the entire call instead returns the unevaluated application tree at every tested depth. A third test evaluates a true conditional with (head ’()) in its unused branch. It returns t at each depth. This checks that the interpreter respects the evaluation rule for conditionals as well as the final value of a recursive call. The source bundle reproduces the nine executions with python3 examples/run.py.

The categorical comparison concerns evaluation with an explicit representation of the expression. Self-interpretation furnishes an equality of behaviors after inserting an evaluator layer. The equality concerns outputs of evaluation, while the distinct trees remain available as data. In a higher-order metacircular evaluator a procedure value also contains its defining environment, and application extends that environment with argument bindings. This extra datum implements lexical scope. The first-order example makes the self-interpretation equation observable using only named functions and list data. [1]

Models in a varying topos

A geometric theory has a classifying topos. Each model in a given base topos corresponds to a morphism into the classifier.

A Grothendieck topos is a category equivalent to sheaves of sets on a site. Examples include Set\mathbf{Set} and sheaves Sh(X)\mathop{\mathrm{Sh}}(X) on a space. A geometric formula uses finite conjunctions, set-indexed disjunctions and existential quantification, starting with atomic formulas. A geometric theory TT is axiomatized by sequents between such formulas in context. Use a small signature and a set of axioms.

A geometric morphism f:E→Bf:\mathcal E\to\mathcal B has an inverse-image functor f∗:B→Ef^*:\mathcal B\to\mathcal E preserving finite limits and admitting a right adjoint. Since f∗f^* is also a left adjoint, it preserves colimits. These properties permit pullback of geometric models and their homomorphisms. For the classifying topos BT\mathcal B_T, let UTU_T be its universal model. [4]

Theorem 13 (Classification of geometric models). For a small geometric theory TT there are a Grothendieck topos BT\mathcal B_T and a model UTU_T in it such that, for every Grothendieck topos E\mathcal E, Geom(E,BT)≃ModT(E),f⟼f∗UT.\mathop{\mathrm{Geom}}(\mathcal E,\mathcal B_T)\simeq\mathop{\mathrm{Mod}}_T(\mathcal E),\qquad f\longmapsto f^*U_T . This is an equivalence of categories, pseudonatural in E\mathcal E. The pair (BT,UT)(\mathcal B_T,U_T) is determined up to equivalence compatible with the universal model. [4]

A model of one propositional symbol in E\mathcal E is a subobject of its terminal object 11, called a subterminal. In Set\mathbf{Set} there are two possibilities up to isomorphism. In Sh(X)\mathop{\mathrm{Sh}}(X) the subterminals correspond to all opens of XX. The classifier is Sh(Σ)\mathop{\mathrm{Sh}}(\Sigma) for the Sierpiński space Σ={0,1}\Sigma=\{0,1\} with opens ∅,{1},Σ\varnothing,\{1\},\Sigma. The characteristic map χU:X→Σ\chi_U:X\to\Sigma of an open UU is continuous because the inverse image of {1}\{1\} is UU. [29]

If k:E′→Ek:\mathcal E'\to\mathcal E, then (fk)∗UT≅k∗(f∗UT)(fk)^*U_T\cong k^*(f^*U_T), compatibly with further change of base. We take 2-cells f⇒gf\Rightarrow g to have components f∗⇒g∗f^*\Rightarrow g^*. With this convention the displayed equivalence includes model homomorphisms. For the single proposition those morphisms are inclusions of opens. Reflection h(x)=−xh(x)=-x yields the inverse image in Figure [fig:topos].

max width=

Figure .The open endpoint at zero excludes 00 on both number lines. The triangle expresses χh−1U=χU∘h\chi_{h^{-1}U}=\chi_U\circ h. Passing to sheaves gives an instance of pseudonaturality of the classifying equivalence.

The functor of models in all base topoi determines BT\mathcal B_T up to equivalence by bicategorical Yoneda. Theories with equivalent classifying topoi are Morita-equivalent. This is representation in the base variable. A second representing variable and invertible comparisons would be additional data for a dual equivalence. [4]

For example, add a new predicate QQ to the theory of one proposition PP with axioms P⊢QP\vdash Q and Q⊢PQ\vdash P. In each base topos these are inclusions in both directions between subobjects of 11, hence the subobjects coincide. Forgetting QQ is an equivalence of model categories compatible with every inverse image. The two presentations have equivalent classifying topoi. The term Morita equivalence of theories refers to this invariance. Section [sec:morita] gives the different variance and hypotheses of Morita duality for modules.

Isbell conjugacy

The homs of a small category provide a pairing even in the absence of a chosen object of scalar values inside that category.

A presheaf P:Aop→SetP:\mathcal A^{\mathrm{op}}\to\mathbf{Set} assigns a set to each object and restricts along incoming arrows. A copresheaf Q:A→SetQ:\mathcal A\to\mathbf{Set} acts in the forward direction. Write hb=A(−,b)h_b=\mathcal A(-,b) and ha=A(a,−)h^a=\mathcal A(a,-). A natural transformation is a family of maps commuting with the action of every arrow. Isbell’s formulas are P↑(b)=Nat(P,hb),Q↓(a)=Nat(Q,ha).P^\uparrow(b)=\mathop{\mathrm{Nat}}(P,h_b),\qquad Q^\downarrow(a)=\mathop{\mathrm{Nat}}(Q,h^a). An arrow b→b′b\to b' acts on the first set by postcomposition, so P↑P^\uparrow is a copresheaf. The second formula gives a presheaf. [10, 2]

An element of the common pairing is a natural family P(a)×Q(b)⟶A(a,b).P(a)\times Q(b)\longrightarrow\mathcal A(a,b). Fixing an input of Q(b)Q(b) gives a transformation P→hbP\to h_b. Fixing an input of P(a)P(a) gives one Q→haQ\to h^a. Requiring naturality in both aa and bb gives Nat(Q,P↑)≅Nat(P,Q↓).\mathop{\mathrm{Nat}}(Q,P^\uparrow)\cong\mathop{\mathrm{Nat}}(P,Q^\downarrow). For p∈P(a)p\in P(a), the comparison P→P↑↓P\to P^{\uparrow\downarrow} sends pp to the operation α↦αa(p)\alpha\mapsto\alpha_a(p), with α:P→hb\alpha:P\to h_b and bb variable. This is the evaluation map in this example.

Theorem 14 (Isbell conjugacy). For a small category A\mathcal A, the assignments P↑,Q↓P^\uparrow,Q^\downarrow form a contravariant adjunction between [Aop,Set][\mathcal A^{\mathrm{op}},\mathbf{Set}] and [A,Set][\mathcal A,\mathbf{Set}]. On the full subcategories where the canonical maps to the double conjugates are isomorphisms, conjugation is an anti-equivalence. Moreover hx↑≅hxh_x^\uparrow\cong h^x and (hx)↓≅hx(h^x)^\downarrow\cong h_x naturally in xx. [10, 2]

max width=

Figure .An arrow g:x→bg:x\to b acts on every f:a→xf:a\to x by composition. This identifies Nat(hx,hb)\mathop{\mathrm{Nat}}(h_x,h_b) with A(x,b)\mathcal A(x,b) by Yoneda.

The full category of reflexive presheaves is the reflexive completion of A\mathcal A. The Yoneda embedding of A\mathcal A factors through it by Theorem 14. The two ambient functor categories can also contain nonreflexive objects. For the category with one object and only its identity, a presheaf is a set SS, its conjugate is the singleton Hom(S,1)\mathop{\mathrm{Hom}}(S,1), and its double conjugate is again a singleton. For a two-element SS, the comparison has the same value at both elements. [2]

Regard a poset as enriched in truth values. Its hom-value is the assertion a≤ba\le b. Presheaves are lower sets and copresheaves are upper sets. Conjugation takes a lower set to all its upper bounds and an upper set to all its lower bounds. The closed lower sets form the Dedekind–MacNeille completion. For two incomparable elements, the common upper bounds of {p,q}\{p,q\} form the empty set, whose lower bounds are all of {p,q}\{p,q\}. Both endpoints in Figure [fig:cut] are fixed. This recovers the relation calculation of Section [sec:polarity] from order as a hom-value. [2]

max width=

Figure .In the two-element antichain p,qp,q, the four closed lower sets are the two principal ones together with a new bottom and a new top. Edges here indicate a covering inclusion.

The same calculation adds a nonprincipal cut to the rational order. Let L={q∈Q:q<2}L=\{q\in\mathbb Q:q<\sqrt{2}\}. Its upper bounds in Q\mathbb Q are precisely the rationals greater than 2\sqrt{2}, and their lower bounds are precisely LL. Thus LL is fixed by double conjugation. A principal lower set {q:q≤r}\{q:q\le r\} for rational rr has a largest element. The set LL has none. Reflexive completion can therefore contain objects beyond the original representables.

Changing the values of a pairing

Replacing sets by vector spaces changes the meaning of a natural transformation. Replacing the hom-functor by a kernel changes which two types of inputs can be paired.

Let V\mathcal V be a complete and cocomplete symmetric monoidal closed category, and A,B\mathcal A,\mathcal B small V\mathcal V-categories. In such a category the maps between two objects form an object of V\mathcal V. A kernel (or profunctor in this variance convention) is a V\mathcal V-functor K:Aop⊗B→VK:\mathcal A^{\mathrm{op}}\otimes\mathcal B\to\mathcal V. For X:Aop→VX:\mathcal A^{\mathrm{op}}\to\mathcal V, Y:B→VY:\mathcal B\to\mathcal V define X↑(b)=Nat‾(X,K(−,b)),Y↓(a)=Nat‾(Y,K(a,−)).\begin{aligned} X^\uparrow(b)&=\underline{\mathop{\mathrm{Nat}}}(X,K(-,b)),\\ Y^\downarrow(a)&=\underline{\mathop{\mathrm{Nat}}}(Y,K(a,-)). \end{aligned} Here Nat‾\underline{\mathop{\mathrm{Nat}}} is the enriched object of natural transformations, computed by an end. [12, 2]

The common pairing consists of natural maps X(a)⊗Y(b)→K(a,b)X(a)\otimes Y(b)\to K(a,b), expressed internally in V\mathcal V. The kernel KK is covariant in bb. The resulting pairing on the functor inputs X,YX,Y is contravariant in both, as required by Section [sec:criterion].

Take V=Vectk\mathcal V=\mathbf{Vect}_k and the one-object kk-linear category whose endomorphism algebra is kk. Presheaves and copresheaves here are right and left kk-modules. Since kk is a field, both are vector spaces. For its hom-kernel the two formulas give the algebraic dual V∗=Homk(V,k)V^*=\mathop{\mathrm{Hom}}_k(V,k). [2, 3]

Theorem 15 (Enriched Isbell adjunction for a kernel). Under the size, completeness and closedness assumptions above, put (X⊠Y)(a,b)=X(a)⊗Y(b)(X\boxtimes Y)(a,b)=X(a)\otimes Y(b). There are natural isomorphisms in V\mathcal V Nat‾(Y,X↑) ≅ Nat‾(X⊠Y,K) ≅ Nat‾(X,Y↓).\underline{\mathop{\mathrm{Nat}}}(Y,X^\uparrow) \ \cong\ \underline{\mathop{\mathrm{Nat}}}(X\boxtimes Y,K) \ \cong\ \underline{\mathop{\mathrm{Nat}}}(X,Y^\downarrow). They induce an enriched contravariant adjunction and hence duality on the objects whose evaluation comparisons are invertible. The isomorphisms follow by applying tensor–hom adjunction under the ends defining the three hom-objects. [12, 2]

For example, when V=Vectk\mathcal V=\mathbf{Vect}_k, a scalar multiple or sum of bilinear pairings corresponds to the same scalar multiple or sum of the associated linear maps. An isomorphism of hom-objects includes these linear operations. A bijection of underlying sets alone would omit this structure.

max width=

Figure .For V=⨁n≥0F2V=\bigoplus_{n\ge 0}\mathbb F_2, V∗=∏n≥0F2V^*=\prod_{n\ge 0}\mathbb F_2. The displayed v=e0+e2v=e_0+e_2 evaluates a sequence by adding entries 00 and 22 modulo 22. The bottom row has infinite support.

Every evaluation at a v∈Vv\in V uses finitely many coordinates. Choose a linear form λ\lambda on the product which is zero on its subspace of finite-support sequences and takes value 11 on the constant sequence 1\mathbf 1. This is consistent since 1\mathbf 1 has infinite support. Extend from the span of that subspace and 1\mathbf 1 by basis extension. If λ=evv\lambda=\mathop{\mathrm{ev}}_v, then λ(en)=0\lambda(e_n)=0 for every nn would give vn=0v_n=0 for every nn, contradicting λ(1)=1\lambda(\mathbf1)=1. Thus the canonical V→V∗∗V\to V^{**} misses a specified kind of functional.

For finite-dimensional VV, evaluation V→V∗∗V\to V^{**} is injective and both dimensions equal dim⁡V\dim V, so it is an isomorphism. It is independent of a basis. An identification V≅V∗V\cong V^* generally requires extra data such as a nondegenerate bilinear form. [3]

Under the usual axiom of choice the same finite-support obstruction applies to any infinite basis. Since V∗∗V^{**} above is itself infinite-dimensional, its map to its double dual also fails to be surjective. This precludes idempotence of the double-dual monad on vector spaces. The closure argument in Section [sec:polarity] used antisymmetry of the inclusion order.

Morita duality for modules

For modules over different rings, a bimodule specifies where the values of a pairing lie. Its two actions determine which maps may occur in the double dual.

Let R,SR,S be unital rings and let RUS{}_R U_S be a bimodule. All modules are unital. For a left RR-module MM and a right SS-module NN, define DRM=HomR(M,U),DSN=HomSop(N,U).D_RM=\mathop{\mathrm{Hom}}_R(M,U),\qquad D_SN=\mathop{\mathrm{Hom}}_{S^{\mathrm{op}}}(N,U). The first is a right SS-module by (fs)(m)=f(m)s(fs)(m)=f(m)s, and the second is a left RR-module by (rg)(n)=rg(n)(rg)(n)=r g(n). To see the common pairing, assign b(m,n)∈Ub(m,n)\in U additively in each input and require b(rm,n)=r b(m,n),b(m,ns)=b(m,n)s.b(rm,n)=r\,b(m,n),\qquad b(m,ns)=b(m,n)s. Holding nn fixed gives N→DRMN\to D_RM. Holding mm fixed gives M→DSNM\to D_SN. These are the two representations in Theorem 2. In particular ηM:M→DSDRM\eta_M:M\to D_SD_RM sends mm to the map f↦f(m)f\mapsto f(m).

Theorem 16 (Morita duality induced by a bimodule). Suppose the action maps R→  ∼  EndSop(U),Sop→  ∼  EndR(U)R\xrightarrow{\;\sim\;}\mathop{\mathrm{End}}_{S^{\mathrm{op}}}(U),\qquad S^{\mathrm{op}}\xrightarrow{\;\sim\;}\mathop{\mathrm{End}}_R(U) are ring isomorphisms, and UU is an injective cogenerator both as a left RR-module and as a right SS-module. Then DR,DSD_R,D_S give an exact contravariant equivalence between the full categories of UU-reflexive left RR-modules and UU-reflexive right SS-modules. These categories contain their regular modules and all finitely generated modules on their respective sides. They are closed under submodules, quotients and finite direct sums. [20, 22]

The two action isomorphisms are called faithful balance. For instance, evaluation for RR{}_R R identifies with the left-action map R→EndSop(U)R\to\mathop{\mathrm{End}}_{S^{\mathrm{op}}}(U). Injectivity means that a map into UU from a submodule extends across its inclusion. Cogeneration means that for every nonzero element of a module there is a map to UU nonzero on that element. These conditions give exact dual functors and injective comparisons. Since a finitely generated module is a quotient of a finite direct sum of regular modules, the finite-generation assertion follows from the closure properties. The equivalence is between the full reflexive classes. The complete-local example below gives a finitely generated input whose dual has infinite length.

Take A=(kk0k)A=\left(\begin{smallmatrix} k&k\\0&k\end{smallmatrix}\right) over a field kk and U=DkA=Homk(A,k)U=D_kA=\mathop{\mathrm{Hom}}_k(A,k). Use (aλb)(x)=λ(bxa)(a\lambda b)(x)=\lambda(bxa). The map f↦[m↦f(m)(1)]f\mapsto[m\mapsto f(m)(1)] identifies HomA(M,U)\mathop{\mathrm{Hom}}_A(M,U) with the ordinary vector-space dual DkMD_kM equipped with the right action (ℓa)(m)=ℓ(am)(\ell a)(m)=\ell(am). Its inverse sends ℓ\ell to m↦[x↦ℓ(xm)]m\mapsto[x\mapsto\ell(xm)]. The right-module calculation is symmetric. Exactness and separation now follow from field-linear duality. Finite dimensionality of AA gives A≅DkDkAA\cong D_kD_kA, and thus both balance isomorphisms.

On M=k2M=k^2 use left multiplication on columns. For a=(rt0s)a=\left(\begin{smallmatrix}r&t\\0&s\end{smallmatrix}\right), the right action on the dual row is (α,β)a=(rα, tα+sβ).(\alpha,\beta)a=(r\alpha,\ t\alpha+s\beta). Write S1=ke1S_1=ke_1 and S2=M/S1S_2=M/S_1. Restricting a row to S1S_1 gives its first coordinate α\alpha. Its kernel is the set (0,β)(0,\beta), which is DkS2D_k S_2. The extension is nonsplit. Any proposed complementary line generated by e2+ce1e_2+ce_1 is sent to e1e_1 by the off-diagonal matrix unit, so it cannot be a submodule.

max width=

Figure .Dualizing the inclusion of the first coordinate line gives a surjection by restriction. A row in its kernel factors uniquely through the quotient M→S2M\to S_2. Exactness and arrow reversal are both visible in coordinates.

Theorem 17 (Matlis duality). For a commutative complete Noetherian local ring (R,m,k)(R,\mathfrak m,k), take EE to be the injective hull of its residue field. The functor HomR(−,E)\mathop{\mathrm{Hom}}_R(-,E) gives an anti-equivalence between finitely generated RR-modules and Artinian RR-modules. Evaluation is an isomorphism on both classes, and EndR(E)≅R\mathop{\mathrm{End}}_R(E)\cong R. [28]

For R=k[[t]]R=k[[t]], take E=k((t))/k[[t]]E=k((t))/k[[t]]. This divisible module over a discrete valuation ring is injective, and any nonzero submodule meets the line k t−1 mod Rk\,t^{-1}\bmod R by multiplication by a power of tt. Thus EE is the injective hull of kk. The dual of R/(tn)R/(t^n), for n≥1n\ge1, is determined by the possible images of 11. They are the elements killed by tnt^n, namely t−nR/Rt^{-n}R/R. The assignment aˉ↦t−na+R\bar a\mapsto t^{-n}a+R identifies this module with R/(tn)R/(t^n). The same functor exchanges RR and EE.

A Morita equivalence of rings is a covariant equivalence of module categories. For example, kk-vector spaces correspond to left Mn(k)M_n(k)-modules by V↦VnV\mapsto V^n, with inverse W↦e11WW\mapsto e_{11}W. A map V→V′V\to V' gives a map Vn→(V′)nV^n\to(V')^n in the same direction. Morita duality of modules uses the two contravariant Hom functors above. In geometric logic, Morita equivalence of theories identifies their classifying topoi as in Section [sec:topos]. The specified categories and the direction on arrows determine the meaning in each context. [20, 19, 4]

From hom-sets to mapping spaces

Stone and Pontryagin duality use ordinary categories. Their common adjunction criterion has a higher version that compares entire spaces of maps and the homotopies between them.

For locally small (∞,1)(\infty,1)-categories let S\mathcal S denote the ∞\infty-category of spaces. Given P:Cop×Dop→SP:\mathcal C^{\mathrm{op}}\times\mathcal D^{\mathrm{op}}\to\mathcal S, suppose both partial functors are representable. The higher Yoneda lemma supplies functorial representatives and equivalences MapD(d,Fc)≃P(c,d)≃MapC(c,Gd)\mathop{\mathrm{Map}}_{\mathcal D}(d,Fc)\simeq P(c,d)\simeq\mathop{\mathrm{Map}}_{\mathcal C}(c,Gd) natural in both variables. The choices of representing objects with their representations form contractible spaces. A point of a mapping space plays the role of a map. Its paths and higher simplices specify the homotopies relevant to naturality. [15, 26]

max width=

Figure .The mapping space MapS(∗,S1)\mathop{\mathrm{Map}}_{\mathcal S}(*,S^1) is S1S^1. It has one component and fundamental group Z\mathbb Z. A set with one element has the same component count and trivial fundamental group.

Equality of component sets loses the winding information in Figure [fig:mapspace]. An equivalence of mapping spaces includes it. The triangles of an adjunction commute up to the specified homotopies, with the requisite higher compatibility. [8, 15]

Theorem 18 (Two-sided representability in higher categories). For locally small (∞,1)(\infty,1)-categories C,D\mathcal C,\mathcal D, a space-valued P:Cop×Dop→SP:\mathcal C^{\mathrm{op}}\times\mathcal D^{\mathrm{op}}\to\mathcal S with both partial functors representable determines an adjunction F:C⇄Dop:GF:\mathcal C\rightleftarrows\mathcal D^{\mathrm{op}}:G. On the full subcategories where the evaluation maps are equivalences, its restriction is an adjoint equivalence. The mapping-space equivalences must be natural as maps of functors to spaces. [15, 26]

A spectrum is an object of stable homotopy theory. Suspension Σ\Sigma is invertible there. Write S\mathbb S for the sphere spectrum, ∧\wedge for the smash product, and F(X,Y)\mathsf F(X,Y) for the function spectrum. The latter represents maps from a smash product. Set DX=F(X,S)DX=\mathsf F(X,\mathbb S). The mapping space P(X,Y)=MapSp(X∧Y,S)P(X,Y)=\mathop{\mathrm{Map}}_{\mathrm{Sp}}(X\wedge Y,\mathbb S) is represented both by DXDX and by DYDY in the corresponding variables. A finite spectrum is a retract of a finite cell spectrum. On these objects, DD has the following additional property.

Theorem 19 (Spanier–Whitehead duality for finite spectra). For finite XX, the evaluation map induces a natural equivalence of spectra DX∧Y≃F(X,Y)DX\wedge Y\simeq\mathsf F(X,Y) for every spectrum YY, and X→DDXX\to DDX is an equivalence. The dual sends suspensions to desuspensions and cofiber sequences of finite spectra to fiber sequences in reverse order. [25, 16]

For instance X=S∨Σ2SX=\mathbb S\vee\Sigma^2\mathbb S has DX≃S∨Σ−2SDX\simeq\mathbb S\vee\Sigma^{-2}\mathbb S. Mapping a finite wedge into the sphere gives a finite product of function spectra, and finite products and coproducts agree in spectra. Thus the two cell degrees change from 0,20,2 to 0,−20,-2.

max width=

Figure .For a prime pp, define Mp=cofib(p:S→S)M_p=\mathop{\mathrm{cofib}}(p:\mathbb S\to\mathbb S). Applying DD gives a fiber sequence, read from right to left on the lower row. Thus DMp≃Σ−1MpDM_p\simeq\Sigma^{-1}M_p.

For a sphere ΣnS\Sigma^n\mathbb S, dualization gives Σ−nS\Sigma^{-n}\mathbb S. For MpM_p, mapping a pushout defining the cofiber into S\mathbb S gives a pullback defining the fiber. In a stable category the fiber of a map is the desuspension of its cofiber. Applying DD twice restores both the sphere degree and the Moore spectrum. [25, 16]

For a small ∞\infty-category A\mathcal A, use K(a,b)=MapA(a,b)K(a,b)=\mathop{\mathrm{Map}}_{\mathcal A}(a,b). In Section [sec:isbell] replace each set of natural transformations by the mapping space in the appropriate functor ∞\infty-category. The common pairing is the space of coherent transformations P(a)×Q(b)→K(a,b)P(a)\times Q(b)\to K(a,b). Representable presheaves still correspond to representable copresheaves by higher Yoneda. [15, 26]

What the examples have in common

The invariant assertion concerns maps in two variables. The hypotheses for reconstruction belong to each individual theorem.

Construction Evaluation or pairing What can be reconstructed
Construction Evaluation or pairing What can be reconstructed
Finite sets set membership, read along a function The function is determined by inverse images of singleton subsets.
Incidence truth of S×T⊆RS\times T\subseteq R Closed row and column sets are opposite complete lattices.
Stone Boolean-valued, continuous evaluations A Stone space from its clopens, a Boolean algebra from its ultrafilters.
Pontryagin continuous bicharacters G×H→TG\times H\to\mathbb T Every locally compact Hausdorff abelian group from its double character group.
Gelfand continuous families of complex characters Compact Hausdorff spaces and commutative unital complex C∗C^*-algebras, with the conventions of Section [sec:geometry].
Affine schemes ring maps A→ΓXA\to\Gamma X Affine schemes from their rings of global functions.
Satisfaction M⊨φM\models\varphi on a class of models and set of sentences Deductively closed theories and their model classes.
Lawvere theories tuples of terms on a free algebra Finite contexts and their finite-rank free algebras.
Code as data quote(e)\mathsf{quote}(e), φe(x)\varphi_e(x) An encoded tree has a unique decoding. Distinct trees can compute the same partial function.
Self-interpretation running a quoted program Inserting an interpreter preserves all successful values, including at finite iterated depth.
Classifying topos inverse image f∗UTf^*U_T The model pseudofunctor on all base topoi determines the classifier up to equivalence.
Isbell natural families P(a)×Q(b)→A(a,b)P(a)\times Q(b)\to\mathcal A(a,b) Reflexive presheaves and reflexive copresheaves.
Enriched / linear V\mathcal V-natural pairings into a kernel Invertible comparisons. For ordinary algebraic vector duals these are precisely finite-dimensional spaces, classically.
Morita biadditive M×N→RUSM\times N\to {}_RU_S with the two prescribed actions The two full classes of UU-reflexive modules. For a Morita dualizing bimodule these classes are closed under subquotients.
Matlis HomR(−,E)\mathop{\mathrm{Hom}}_R(-,E), with EE the injective hull of the residue field Finitely generated and Artinian modules over a complete Noetherian local ring.
Spanier–Whitehead MapSp(X∧Y,S)\mathop{\mathrm{Map}}_{\mathrm{Sp}}(X\wedge Y,\mathbb S) Finite spectra and all maps between them.

A simple set-based construction applies even when two variables have different meanings, such as a program and an input. Fix a set KK of possible observations. A Chu space over KK is a triple (A,r,X)(A,r,X) with an evaluation r:A×X→Kr:A\times X\to K. A morphism to (B,s,Y)(B,s,Y) consists of maps f:A→Bf:A\to B and g:Y→Xg:Y\to X satisfying s(f(a),y)=r(a,g(y)).s(f(a),y)=r(a,g(y)). For points and subsets this is the inverse-image identity of Section [sec:opening]. For a homomorphism f:G→Hf:G\to H and a character χ\chi on HH, it reads χ(f(x))=(f^χ)(x)\chi(f(x))=(\widehat f\chi)(x). In both examples, changing the object or pulling back the test yields the same observation. [24, 21]

Theorem 20 (Chu transposition). The assignment (A,r,X)↦(X,rT,A)(A,r,X)\mapsto(X,r^{\mathsf T},A), with rT(x,a)=r(a,x)r^{\mathsf T}(x,a)=r(a,x), and (f,g)↦(g,f)(f,g)\mapsto(g,f) defines a contravariant involution on the category of Chu spaces over KK. Applying it twice returns the entire evaluation, including its row and column labels. [24]

For programs, let AA be the set of program trees with one formal input, XX the set of input data and KK the output data with one extra element ⊥\bot for an undefined result. The row of a program is its complete input–output behavior. The column of a datum lists the outputs of all programs on that datum. An interpreter layer with the same behavior leaves every entry in a program’s row unchanged. Distinct syntax can have the same row even with every possible input included.

max width=

Figure .The programs pp and qq have bodies x and (if ’t x x). The body of hh is ’a. On the symbol inputs a and b, the first two rows agree. After transposition they are two equally valued, separately labelled columns. Quoting the bodies still distinguishes the two programs.

An anti-equivalence is an equivalence with an opposite category. Two-sided representability is the intrinsic characterization of the corresponding adjunction. The unit and counit test adds reconstruction. Given an anti-equivalence, its hom-pairing always satisfies the characterization. Given an independently specified pairing, representability and invertibility can be difficult theorems. The criterion uses only homs, functors and naturality. The scalars and topologies of individual examples enter through their particular pairings. The classifying topos represents models in the base-topos variable. In computation, quotation reconstructs a tree from its structural encoding, and self-interpretation preserves its partial result. Neither operation supplies a second representation of an evaluation pairing by itself. [23, 15]

Theorem 21 (Maximality of the reflexive subcategories). For a given contravariant adjunction F:C⇄Dop:GF:\mathcal C\rightleftarrows\mathcal D^{\mathrm{op}}:G, let Cref\mathcal C_{\mathrm{ref}} and Dref\mathcal D_{\mathrm{ref}} consist of the objects at which its canonical comparisons are invertible. These are the largest pair of full subcategories, closed under isomorphism, on which the given functors and comparisons restrict to a dual equivalence. For (∞,1)(\infty,1)-categories the same assertion uses equivalences throughout. [2, 23, 15]

Indeed, the triangle identities place the image of each reflexive object on the opposite reflexive side. Conversely, on any pair of subcategories with the stated restriction, invertibility of the restricted unit and counit forces every object there to be reflexive. For linear and Morita duality this argument identifies the exact question for a module, namely whether evaluation m↦(f↦f(m))m\mapsto(f\mapsto f(m)) represents every element of its double dual.

For a closed symmetric monoidal category and fixed KK, the object [X,K][X,K] represents the pairing of maps X⊗Y→KX\otimes Y\to K. Tensor dualizability additionally involves evaluation to the tensor unit and coevaluation from it, satisfying the triangle identities. These conditions have different scope. For example take subsets of a set SS, ordered by inclusion, with tensor ∩\cap, unit SS, and K=∅K=\varnothing. Then [A,K]=S∖A[A,K]=S\setminus A and every subset is reflexive. Tensor coevaluation would require S⊆A∩A∨S\subseteq A\cap A^\vee, forcing A=SA=S. [12, 25]

In any bicategory an adjunction with invertible unit and counit is an adjoint equivalence. To express contravariance internally requires a specified opposite construction or a chosen opposite object. In higher categories the requisite equivalences and naturality are coherent. The pairing criterion expresses exactly this structure for categories and (∞,1)(\infty,1)-categories. Broader uses of the word duality require a choice of objects, arrows and comparison data before this criterion has a truth value. [26, 15]

References

The article uses classical sets with choice and a change of universe for large functor or model categories. The theorem in Section [sec:self] concerns the Lisp interpreter supplied with this article. Sources for the other theorems appear below. An AI assistant drafted this anonymous review manuscript, prepared the diagrams and interpreter, and ran the finite checks. The source archive includes build and execution instructions.

H. Abelson and G. J. Sussman, with J. Sussman. Structure and Interpretation of Computer Programs, 2nd ed. MIT Press, 1996. §4.1, the metacircular evaluator. Book section.

T. Avery and T. Leinster. Isbell conjugacy and the reflexive completion. Theory Appl. Categ. 36 (2021), 306–347. See §§2–6 for the construction and examples. Article.

S. Axler. Linear Algebra Done Right, 4th ed. Springer, 2024. §3F develops linear functionals and the dual map. Open book.

O. Caramello. The unifying theory of toposes, technical overview, sections on geometric theories, universal models and Morita equivalence. Author’s exposition.

J. Gallier. Elementary recursive function theory, §9.1, Theorem 9.1 on acceptable indexings and the parameter theorem. University of Pennsylvania, CIS 2620. Lecture notes.

B. Ganter and R. Wille. Formal Concept Analysis: Mathematical Foundations. Springer, 1999. Ch. 1 develops the derivations associated to an incidence relation. Publisher.

J. A. Goguen and R. M. Burstall. Institutions: abstract model theory for specification and programming. J. ACM 39 (1992), 95–146. Article.

A. Hatcher. Algebraic Topology. Cambridge University Press, 2002. §1.1, Theorem 1.7, on winding number and the fundamental group of the circle. Author’s text.

C. Heunen, N. P. Landsman, B. Spitters and S. Wolters. The Gelfand spectrum of a noncommutative C∗C^*-algebra: a topos-theoretic approach. J. Aust. Math. Soc. 90 (2011), 39–52. §1 recalls the classical commutative duality used here. Article.

J. R. Isbell. Adequate subcategories. Illinois J. Math. 4 (1960), 541–552. Original article.

N. D. Jones. An introduction to partial evaluation. ACM Comput. Surv. 28 (1996), 480–503. Specializing interpreters and the Futamura projections. Article.

G. M. Kelly. Basic Concepts of Enriched Category Theory. Cambridge University Press, 1982. Reprinted in Repr. Theory Appl. Categ. 10 (2005). Chs. 1–2 on enriched homs and functor categories. Open reprint.

F. W. Lawvere. Functorial semantics of algebraic theories. Proc. Natl. Acad. Sci. USA 50 (1963), 869–872. Original article.

F. W. Lawvere. Diagonal arguments and cartesian closed categories. Lecture Notes in Math. 92 (1969), 134–145. Reprinted with commentary, Repr. Theory Appl. Categ. 15 (2006). Reprint.

J. Lurie. Kerodon. §6.2.1, adjunctions of ∞\infty-categories, and §8.2.5, representability of couplings. Adjunctions. Couplings.

J. Lurie. Higher Algebra. 2017. §1.1 on stable ∞\infty-categories, fibers, cofibers and suspension. Author’s text.

D. Marker. Model Theory: An Introduction. Springer, 2002. Chs. 2–3 on first-order consequence, completeness and quantifier elimination for dense linear orders. Publisher.

J. McCarthy. Recursive functions of symbolic expressions and their computation by machine, Part I. Commun. ACM 3 (1960), 184–195. See §3 on the universal S-function. Article.

MIT OpenCourseWare. Categories and Morita equivalence. 18.706 Noncommutative Algebra, Spring 2023, Lecture 7, Theorem 7.3 and the matrix-ring example. Lecture notes.

K. Morita. Duality for modules and its applications to the theory of rings with minimum condition. Sci. Rep. Tokyo Kyoiku Daigaku, Sect. A 6 (1958), 83–142. Original article.

S. A. Morris. Pontryagin Duality and the Structure of Locally Compact Abelian Groups. Cambridge University Press, 1977. Chs. 4–7. Duality theorem. Annihilator theorem.

B. J. Müller. On Morita duality. Canad. J. Math. 21 (1969), 1338–1347. The opening characterization gives the bimodule hypotheses and closure properties. Article.

H.-E. Porst and W. Tholen. Concrete dualities. In Category Theory at Work, Heldermann, 1991, 111–136. Dual adjunctions and their restriction in classical examples. Chapter.

V. Pratt. Chu Spaces. School on Category Theory and Applications, University of Coimbra, 1999. Ch. 1 on evaluations, transforms and transpose. Lecture notes.

D. C. Ravenel. Nilpotence and Periodicity in Stable Homotopy Theory. Princeton University Press, 1992. §5.2, especially Theorem 5.2.1 on the Spanier–Whitehead dual. Author’s text.

E. Riehl and D. Verity. Elements of ∞\infty-Category Theory. Cambridge University Press, 2022. Chs. 2, 4–5 and 7–8 on adjunctions, Yoneda and modules. Authors’ text.

The Stacks Project Authors. Schemes, Lemma 26.6.4, Tag 01I1. Morphisms to an affine scheme and homomorphisms on global sections. Lemma.

The Stacks Project Authors. Dualizing complexes, Proposition 47.7.8, Tag 08Z9. Matlis duality for a complete Noetherian local ring. Proposition.

J. Sterling and R. Harper. Logical relations as types: proof-relevant parametricity for program modules. J. ACM 68 (2021). On the Sierpiński topos and its open sets. Article.

M. H. Stone. The theory of representations for Boolean algebras. Trans. Amer. Math. Soc. 40 (1936), 37–111. Original article. JSTOR.

Complete flattened LaTeX source
\documentclass[11pt,letterpaper]{article}

\usepackage[T1]{fontenc}

\usepackage{lmodern,microtype}

\usepackage[letterpaper,left=1.15in,right=1.15in,top=.89in,bottom=.9in,headheight=22.5pt,headsep=15pt,footskip=25pt]{geometry}

\usepackage{amsmath,amssymb,mathtools,booktabs,tabularx,array,longtable,amsthm,needspace,etoolbox}

\usepackage[table]{xcolor}

\usepackage{graphicx,adjustbox,tikz,fancyhdr,titlesec,enumitem,ragged2e}

\usetikzlibrary{arrows.meta,calc,positioning,backgrounds,fit,decorations.pathreplacing}
\usepackage[unicode,bookmarksnumbered=true,bookmarksopen=true]{hyperref}

\definecolor{ink}{HTML}{192F40}
\definecolor{teal}{HTML}{006B69}
\definecolor{warm}{HTML}{A23F23}
\definecolor{muted}{HTML}{425967}
\definecolor{rulecol}{HTML}{B6C8CB}
\definecolor{pale}{HTML}{EAF5F2}
\definecolor{cream}{HTML}{FCF0E7}
\definecolor{paperblue}{HTML}{EEF2F6}
\hypersetup{colorlinks=true,linkcolor=teal,citecolor=teal,urlcolor=teal,
 pdftitle={Evaluation and Reconstruction in Mathematical Duality},
 pdfauthor={Anonymous},pdfsubject={An illustrated introduction to categorical duality},pdfdisplaydoctitle=true}
\pdfgentounicode=1
\setlength{\parindent}{0pt}\setlength{\parskip}{4.4pt plus .4pt minus .3pt}
\linespread{1.055}
\setlength{\abovedisplayskip}{6pt plus 2pt minus 2pt}\setlength{\belowdisplayskip}{6pt plus 2pt minus 2pt}
\setlength{\abovedisplayshortskip}{3pt}\setlength{\belowdisplayshortskip}{5pt}
\setlist{nosep,leftmargin=15pt}
\setcounter{secnumdepth}{1}\setcounter{tocdepth}{1}
\titleformat{\section}{\sffamily\bfseries\fontsize{22}{25}\selectfont\color{ink}}{\color{teal}\thesection}{.58em}{}
\titlespacing*{\section}{0pt}{13pt plus 2pt minus 2pt}{6pt}
\raggedbottom\widowpenalty=8500\clubpenalty=8500
\emergencystretch=1.3em
\newcommand{\running}{\rightmark}
\pagestyle{fancy}\fancyhf{}
\fancyhead[L]{\sffamily\small\color{muted} Mathematical duality}
\fancyhead[R]{\sffamily\small\color{muted}\running}
\renewcommand{\headrulewidth}{.45pt}\renewcommand{\headrule}{\hbox to\headwidth{\color{rulecol}\leaders\hrule height \headrulewidth\hfill}}
\fancyfoot[L]{\sffamily\footnotesize\color{muted}Evaluation and Reconstruction in Mathematical Duality}
\fancyfoot[R]{\sffamily\footnotesize\color{muted}\thepage}
\fancypagestyle{opening}{\fancyhead[L]{}\fancyhead[R]{}\renewcommand{\headrulewidth}{0pt}}
\renewcommand{\sectionmark}[1]{}
\newcommand{\topicsection}[2]{\par\Needspace{8\baselineskip}\section{#2}\markright{#1}}
\newtheoremstyle{duality}{9pt}{7pt}{\normalfont}{}{\sffamily\bfseries\color{teal}}{.}{.5em}{}
\theoremstyle{duality}
\newtheorem{theorem}{Theorem}[section]
\usepackage{bookmark}

\makeatletter
\newenvironment{result}[2]{\par\Needspace{4.5\baselineskip}\begin{theorem}[#1]\label{#2} \bookmark[level=2,dest=\@currentHref]{Theorem \thetheorem. #1}}{\end{theorem}}
\makeatother
\DeclareMathOperator{\End}{End}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\subhead}[1]{\par\Needspace{3.5\baselineskip}\addvspace{6pt}{\sffamily\bfseries\color{teal}#1\par}\nobreak\vspace{-3pt}}
\newcommand{\lead}[1]{{\large\color{ink}#1\par}\smallskip}
\newcommand{\plate}[3]{\par\addvspace{5pt}\noindent\begin{minipage}{\linewidth}
 \centering\begin{adjustbox}{max width=\linewidth}#2\end{adjustbox}\par
 \refstepcounter{figure}\label{#1}\vspace{5pt}
 {\RaggedRight\footnotesize\color{muted}\textbf{\sffamily Figure \thefigure.}\enspace#3\par}
 \end{minipage}\par\addvspace{8pt}}
\newcommand{\keyeq}[1]{\par\addvspace{5pt}\begingroup\setlength{\fboxsep}{8.5pt}
 \noindent\colorbox{pale}{\begin{minipage}{\dimexpr\linewidth-2\fboxsep\relax}\centering\color{ink}#1\end{minipage}}\endgroup\par\addvspace{6pt}}
\newcommand{\aside}[2]{\par\addvspace{4pt}{\sffamily\bfseries\small\color{warm}#1}\hspace{.45em}#2\par}
\newcommand{\Acat}{\mathcal A}\newcommand{\Bcat}{\mathcal B}
\newcommand{\Ccat}{\mathcal C}\newcommand{\Dcat}{\mathcal D}\newcommand{\Ecat}{\mathcal E}
\newcommand{\Vcat}{\mathcal V}\newcommand{\Space}{\mathcal S}\newcommand{\Sp}{\mathrm{Sp}}
\newcommand{\Set}{\mathbf{Set}}\newcommand{\op}{\mathrm{op}}
\newcommand{\Z}{\mathbb Z}\newcommand{\R}{\mathbb R}\newcommand{\Q}{\mathbb Q}\newcommand{\N}{\mathbb N}\newcommand{\CC}{\mathbb C}\newcommand{\FF}{\mathbb F}\newcommand{\Torus}{\mathbb T}
\newcommand{\powers}{\mathcal P}\newcommand{\dual}{^{\vee}}
\DeclareMathOperator{\Map}{Map}\DeclareMathOperator{\Hom}{Hom}\DeclareMathOperator{\Nat}{Nat}
\DeclareMathOperator{\Spec}{Spec}\DeclareMathOperator{\Clop}{Clop}\DeclareMathOperator{\Ult}{Ult}
\DeclareMathOperator{\Mod}{Mod}\DeclareMathOperator{\Th}{Th}\DeclareMathOperator{\Geom}{Geom}
\DeclareMathOperator{\Sh}{Sh}\DeclareMathOperator{\Sub}{Sub}\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\ev}{ev}\DeclareMathOperator{\cofib}{cofib}\DeclareMathOperator{\fib}{fib}
\DeclareMathOperator{\Bilin}{Bilin}\DeclareMathOperator{\Char}{Char}\DeclareMathOperator{\LCA}{LCA}
\newcommand{\psh}{\widehat{\Acat}}\newcommand{\cpsh}{\check{\Acat}}
\newcommand{\lcat}[1]{\mathbf{#1}}
\tikzset{every picture/.style={font=\small\sffamily,text=ink,line cap=round,line join=round,>=Latex},
 arr/.style={-{Latex[length=2.25mm,width=1.55mm]},thick,draw=ink},
 backarr/.style={-{Latex[length=2.25mm,width=1.55mm]},thick,draw=teal},
 faint/.style={draw=rulecol,line width=.6pt},axisline/.style={draw=muted,-{Latex[length=1.65mm]},line width=.65pt},
 line/.style={draw=ink,line width=.85pt},
 markdot/.style={circle,inner sep=1.7pt,fill=ink},
 task/.style={font=\small\sffamily\bfseries,text=teal},
 tinylabel/.style={font=\footnotesize\sffamily,text=muted},
 val/.style={font=\normalsize,text=ink,inner sep=1.3pt},
 rulebox/.style={draw=rulecol,line width=.7pt,rounded corners=2pt,fill=white,inner xsep=6pt,inner ysep=4.2pt}}



\newcommand{\figpullback}{\begin{tikzpicture}[x=1cm,y=1cm]
\node[task,anchor=west] at (0,2.85){A map of points};
\filldraw[fill=paperblue,draw=rulecol,rounded corners=5pt] (.05,-.1) rectangle (1.72,2.38);
\filldraw[fill=paperblue,draw=rulecol,rounded corners=5pt] (4.22,-.1) rectangle (5.89,2.38);
\node[tinylabel] at (.89,2.14){$X$};\node[tinylabel] at (5.06,2.14){$Y$};
\foreach \x/\y/\name in {1.16/1.7/a,1.16/1.03/b,1.16/.36/c}{\node[markdot] at (\x,\y){};\node[left=3pt] at (\x,\y){$\name$};}
\foreach \y/\name in {1.5/u,.61/v}{\node[markdot] at (4.72,\y){};\node[right=3pt] at (4.72,\y){$\name$};}
\draw[backarr] (1.29,1.7)--(4.59,1.52);\draw[backarr] (1.29,1.03)--(4.59,1.47);
\draw[arr] (1.29,.36)--(4.59,.60);\node[tinylabel] at (2.95,2.12){$f$};
\draw[faint] (6.65,-.2)--(6.65,2.92);
\node[task,anchor=west] at (7.35,2.85){A subset and its inverse image};
\node[tinylabel] at (8.52,2.05){in $X$};\node[tinylabel] at (13.65,2.05){in $Y$};
\foreach \xp/\nm/\bit in {7.72/a/1,8.53/b/1,9.34/c/0,13.24/u/1,14.05/v/0}{
 \ifnum\bit=1 \filldraw[fill=pale,draw=teal] (\xp-.34,.72) rectangle (\xp+.34,1.44);
 \else \draw[faint] (\xp-.34,.72) rectangle (\xp+.34,1.44);\fi
 \node at (\xp,1.07){$\bit$};\node[tinylabel] at (\xp,.43){$\nm$};}
\draw[backarr] (12.52,1.09)--(10.05,1.09);\node[above] at (11.29,1.15){$f^{-1}$};
\node at (8.53,-.01){$\{a,b\}$};\node at (13.65,-.01){$\{u\}$};
\end{tikzpicture}}
\newcommand{\figunit}{\begin{tikzpicture}
\node[task,anchor=west] at (0,2.80){Naturality for an arrow $u$};
\node[val] (x) at (.70,1.85){$c$};\node[val] (xx) at (4.37,1.85){$c'$};
\node[val] (gx) at (.70,.08){$GFc$}; \node[val] (gxx) at (4.37,.08){$GFc'$};
\draw[arr] (x)--node[above]{$u$}(xx);\draw[backarr] (x)--node[left]{$\eta_c$}(gx);
\draw[backarr] (xx)--node[right]{$\eta_{c'}$}(gxx);\draw[arr] (gx)--node[above]{$GFu$}(gxx);
\draw[faint] (6.11,-.22)--(6.11,2.82);
\node[task,anchor=west] at (6.78,2.80){One triangle identity, drawn in $\Dcat$};
\node[val] (fc) at (7.45,1.77){$Fc$};\node[val] (f2) at (13.25,1.77){$Fc$};
\node[val] (fgf) at (10.37,-.02){$FGFc$};\draw[arr] (fc)--node[above]{$\id_{Fc}$}(f2);
\draw[backarr] (fc)--node[below left]{$\delta_{Fc}$}(fgf);\draw[backarr] (fgf)--node[below right]{$F\eta_c$}(f2);
\end{tikzpicture}}
\newcommand{\figincidence}{\begin{tikzpicture}
\node[task,anchor=west] at (0,3.72){Divisibility};
\foreach \j/\p in {1/2,2/3,3/5}{\node at (1.13*\j,3.02){$\p$};}
\foreach \i/\n in {1/6,2/10,3/15,4/30}{\node[anchor=east] at (.32,3.04-.61*\i){$\n$};}
\fill[pale] (.58,.27) rectangle (1.68,2.75);
\foreach \j in {0,1,2,3}{\draw[faint] (.57+1.13*\j,.28)--(.57+1.13*\j,2.75);}
\foreach \i in {0,1,2,3,4}{\draw[faint] (.57,.28+.61*\i)--(3.96,.28+.61*\i);}
\foreach \i/\j in {1/1,1/2,2/1,2/3,3/2,3/3,4/1,4/2,4/3}{\fill[ink] (1.13*\j,3.04-.61*\i) circle(2.7pt);}
\draw[warm,dashed,thick,rounded corners=1pt] (.61,1.59) rectangle (3.92,2.70);
\node[tinylabel,anchor=west] at (.58,-.1){A dot indicates divisibility.};
\draw[faint] (5.74,-.1)--(5.74,3.74);
\node[task,anchor=west] at (6.17,3.72){Two applications of the relation};
\node[rulebox] (s) at (7.37,2.36){$\{6,10\}$};\node[rulebox,fill=pale] (ss) at (12.81,2.36){$\{2\}$};
\node[rulebox,fill=cream] (sss) at (7.37,.53){$\{6,10,30\}$};
\draw[backarr] (s)--node[above,tinylabel]{common divisors in the table}(ss);
\draw[arr] (ss.south) to[bend left=10] node[below,sloped,tinylabel]{rows divisible by $2$} (sss.east);
\end{tikzpicture}}
\newcommand{\figcube}{\begin{tikzpicture}[x=1.02cm,y=1cm]
\coordinate (n) at (0,0);\coordinate(a) at (2.32,0);\coordinate(c) at (0,1.55);\coordinate(ac) at (2.32,1.55);
\coordinate(b) at (1.13,.84);\coordinate(ab) at (3.45,.84);\coordinate(bc) at (1.13,2.39);\coordinate(abc) at (3.45,2.39);
\fill[pale] (b)--(ab)--(abc)--(bc)--cycle;
\draw[line] (n)--(a)--(ac)--(c)--cycle;\draw[teal,very thick] (b)--(ab)--(abc)--(bc)--cycle;
\foreach \f/\t in {n/b,a/ab,c/bc,ac/abc}{\draw[faint,dashed](\f)--(\t);}
\foreach \p/\lab in {n/\varnothing,a/a,c/c,ac/ac,b/b,ab/ab,bc/bc,abc/abc}{
 \node[fill=white,inner sep=1.2pt] at (\p){$\lab$};}
\node[tinylabel,align=center] at (1.72,-.55){a vertex is a subset\\ $ab=\{a,b\}$};
\end{tikzpicture}}
\newcommand{\figcantor}{\begin{tikzpicture}[x=.94cm,y=.77cm]
\coordinate(r) at (0,3.32);\coordinate(z) at (-1.37,2.30);\coordinate(o) at (1.37,2.30);
\coordinate(zz) at (-2.09,1.2);\coordinate(zo) at (-.68,1.2);\coordinate(oz) at (.68,1.2);\coordinate(oo) at (2.09,1.2);
\coordinate(ozz) at (.05,.04);\coordinate(ozo) at (1.27,.04);
\foreach \f/\t in {r/z,z/zz,z/zo,o/oo,oz/ozz}{\draw[faint](\f)--(\t);}
\foreach \f/\t in {r/o,o/oz,oz/ozo}{\draw[teal,line width=1.6pt](\f)--(\t);}
\foreach \p/\lab in {r/\ast,z/0,o/1,zz/00,zo/01,oz/10,oo/11,ozz/100,ozo/101}{\node[fill=white,inner sep=1.4pt] at (\p){$\lab$};}
\draw[teal,thick,densely dotted] (1.27,-.17)--(1.59,-.67);
\node[tinylabel,anchor=west] at (-2.15,-.65){finite prefixes};
\end{tikzpicture}}
\newcommand{\figphase}{\begin{tikzpicture}
\node[task,anchor=west] at (0,3.48){A character of the integers};
\node[tinylabel,anchor=west] at (0,2.52){$n$};
\node[tinylabel,anchor=west] at (0,1.56){$\chi(n)$};
\foreach \x/\i/\v in {1.58/0/0,2.63/1/{1/4},3.68/2/{1/2},4.73/3/{3/4},5.78/4/0}{
 \node at (\x,2.52){$\i$};\node at (\x,1.56){$\v$};\draw[backarr] (\x,2.22)--(\x,1.88);}
\node[tinylabel,anchor=west] at (0,.68){Each step adds $1/4$ modulo $1$.};
\draw[faint] (6.62,.26)--(6.62,3.55);
\node[task,anchor=west] at (7.13,3.48){Four values on the circle group};
\begin{scope}[shift={(10.3,1.65)}]
\draw[faint] (0,0) circle(1.05);
\foreach \a in {0,90,180,270}{\draw[backarr] (\a+7:1.05) arc[start angle=\a+7,end angle=\a+83,radius=1.05];\fill[ink] (\a:1.05) circle(2.05pt);}
\node[right] at (1.08,0){$0=1$};\node[above] at (0,1.07){$1/4$};
\node[left] at (-1.08,0){$1/2$};\node[below] at (0,-1.07){$3/4$};
\end{scope}
\end{tikzpicture}}
\newcommand{\figcharacters}{\begin{tikzpicture}[x=.89cm,y=.66cm]
\node[tinylabel,anchor=west] at (-1.0,3.97){$j\backslash n$};
\foreach \i in {0,1,2,3}{\node at (\i,3.97){$\i$};\node at (-.74,3.13-\i){$\i$};}
\draw[faint](-.42,3.6)--(3.52,3.6);\draw[faint](-.44,3.53)--(-.44,-.34);
\foreach \i/\j/\v in {0/0/1,0/1/1,0/2/1,0/3/1,1/0/1,1/1/i,1/2/{-1},1/3/{-i},2/0/1,2/1/{-1},2/2/1,2/3/{-1},3/0/1,3/1/{-i},3/2/{-1},3/3/i}{\node at (\j,3.13-\i){$\v$};}
\end{tikzpicture}}
\newcommand{\figgeometry}{\begin{tikzpicture}
\node[task,anchor=west] at (0,3.52){Squaring on real points};
\draw[axisline] (.16,.55)--(5.15,.55) node[right]{$x$};\draw[axisline] (2.58,.30)--(2.58,3.10) node[above]{$y$};
\draw[teal,very thick,domain=-1:1,samples=60] plot ({2.58+2.1*\x},{.55+2.28*\x*\x});
\draw[warm,dashed] (1.005,.55)--(1.005,1.8325)--(4.155,1.8325)--(4.155,.55);
\foreach \x in {1.005,4.155}{\fill[warm] (\x,1.8325) circle(2.15pt);}
\node[below] at (1.005,.53){$-\tfrac34$};\node[below] at (4.155,.53){$\tfrac34$};
\node[anchor=south east,fill=white,inner sep=1.3pt] at (2.52,1.90){$\tfrac9{16}$};
\draw[faint] (6.30,.04)--(6.30,3.60);
\node[task,anchor=west] at (6.95,3.52){Pullback on polynomial functions};
\node[val] (xs) at (8.10,2.52){$\mathbb A^1_s$};\node[val] (ys) at (12.78,2.52){$\mathbb A^1_t$};
\node[val] (rs) at (8.10,.60){$k[s]$};\node[val] (rt) at (12.78,.60){$k[t]$};
\draw[arr] (xs)--node[above]{$s\mapsto s^2$}(ys);
\draw[backarr] (rt)--node[above]{$t\mapsto s^2$}(rs);
\draw[faint,dashed] (xs)--(rs);\draw[faint,dashed] (ys)--(rt);
\end{tikzpicture}}
\newcommand{\figcharts}{\begin{tikzpicture}[x=.93cm,y=.88cm]
\node[rulebox] (left) at (1.3,1.34){$k[z]$};\node[rulebox] (right) at (5.64,1.34){$k[z^{-1}]$};
\node[rulebox,fill=pale] (mid) at (3.50,-.02){$k[z,z^{-1}]$};
\draw[arr] (left)--(mid);\draw[arr] (right)--(mid);
\node[tinylabel] at (3.5,2.03){regular functions on the two affine charts};
\end{tikzpicture}}
\newcommand{\figtruth}{\begin{tikzpicture}
\node[task,anchor=west] at (0,3.50){The implication $p\Rightarrow q$};
\foreach \x/\nm in {.47/p,1.64/q,3.65/{p\Rightarrow q}}{\node at (\x,2.88){$\nm$};}
\draw[faint] (.0,2.60)--(4.56,2.60);
\foreach \i/\p/\q/\v in {0/0/0/1,1/0/1/1,2/1/0/0,3/1/1/1}{
 \ifnum\v=0 \fill[cream] (.03,2.35-.54*\i-.21) rectangle (4.53,2.35-.54*\i+.20);\fi
 \node at (.47,2.35-.54*\i){$\p$};\node at (1.64,2.35-.54*\i){$\q$};\node at (3.65,2.35-.54*\i){$\v$};}
\draw[faint] (5.48,.32)--(5.48,3.53);
\node[task,anchor=west] at (6.05,3.50){The same formula as a clopen set};
\foreach \x/\y/\p/\v in {7.08/.95/00/1,7.08/2.24/01/1,10.29/.95/10/0,10.29/2.24/11/1}{
 \ifnum\v=1\node[rulebox,fill=pale,draw=teal] at (\x,\y){$\p$};\else\node[rulebox,fill=cream,draw=warm,dashed] at (\x,\y){$\p$};\fi}
\node[tinylabel,anchor=west] at (11.30,2.24){included};\node[tinylabel,anchor=west] at (11.30,.95){excluded};
\end{tikzpicture}}
\newcommand{\figtopos}{\begin{tikzpicture}
\node[task,anchor=west] at (0,3.66){A generalized truth value};
\node[anchor=west] at (0,2.86){$U=(0,\infty)$};
\draw[axisline] (.20,2.33)--(5.78,2.33);
\draw[teal,line width=2.6pt,-{Latex[length=2.2mm]}] (3.01,2.33)--(5.73,2.33);
\draw[teal,fill=white,line width=1pt] (3.01,2.33) circle(2.55pt);
\node[tinylabel,below] at (3.01,2.27){$0$};
\node[anchor=west] at (0,1.41){$h^{-1}U=(-\infty,0)$};
\draw[axisline] (.20,.88)--(5.78,.88);
\draw[teal,line width=2.6pt,-{Latex[length=2.2mm]}] (3.01,.88)--(.22,.88);
\draw[teal,fill=white,line width=1pt] (3.01,.88) circle(2.55pt);
\node[tinylabel,below] at (3.01,.80){$0$};
\draw[faint] (6.45,.20)--(6.45,3.71);
\node[task,anchor=west] at (7.02,3.66){Classification by the Sierpiński space};
\node[val] (x) at (7.75,2.64){$\R$};\node[val] (y) at (12.72,2.64){$\R$};
\node[val] (s) at (10.28,.58){$\Sigma$};
\draw[arr] (x)--node[above]{$h(x)=-x$}(y);
\draw[backarr] (y)--node[right]{$\chi_U$}(s);
\draw[backarr] (x)--node[left]{$\chi_{h^{-1}U}$}(s);
\end{tikzpicture}}
\newcommand{\figisbell}{\begin{tikzpicture}[x=1cm,y=1cm]
\node[val] (a) at (0,1.48){$a$};\node[val] (x) at (1.98,1.48){$x$};\node[val] (b) at (4.22,1.48){$b$};
\draw[arr](a)--node[above]{$f$}(x);\draw[backarr](x)--node[above]{$g$}(b);
\draw[arr] (a) to[bend right=34] node[below]{$g\circ f$} (b);
\node[tinylabel] at (2.08,-.05){fixed $g$ induces a natural transformation};
\end{tikzpicture}}
\newcommand{\figcut}{\begin{tikzpicture}[x=1cm,y=.85cm]
\node[val] (bot) at (2.02,0){$\varnothing$};\node[val] (l) at (.43,1.05){$\{p\}$};
\node[val] (r) at (3.62,1.05){$\{q\}$};\node[val] (top) at (2.02,2.10){$\{p,q\}$};
\draw[line] (bot)--(l)--(top); \draw[line] (bot)--(r)--(top);
\node[tinylabel] at (2.02,-.62){closed lower sets, ordered by inclusion};
\end{tikzpicture}}
\newcommand{\figsequences}{\begin{tikzpicture}[x=.90cm,y=.81cm]
\node[task,anchor=west] at (0,3.72){Vector space};\node[task,anchor=west] at (6.05,3.72){Coordinates over $\FF_2$};
\foreach \y/\lab in {2.78/{$v\in V$},1.73/{$a\in V^*$},.68/{$\mathbf 1\in V^*$}}{\node[anchor=west] at (0,\y){\lab};}
\foreach \x/\a/\b in {6.18/1/1,7.20/0/0,8.22/1/1,9.24/0/0,10.26/0/1,11.28/0/0,12.30/0/1,13.32/0/0}{
 \node[rulebox,inner sep=2pt] at (\x,2.78){$\a$};\node[rulebox,inner sep=2pt] at (\x,1.73){$\b$};\node[rulebox,fill=pale,inner sep=2pt] at (\x,.68){$1$};}
\foreach \y in {2.78,1.73,.68}{\node at (14.15,\y){$\cdots$};}
\node[tinylabel,anchor=west] at (1.83,2.78){finite support};\node[tinylabel,anchor=west] at (1.83,1.73){alternating sequence};\node[tinylabel,anchor=west] at (1.83,.68){constant sequence};
\end{tikzpicture}}
\newcommand{\figmapspace}{\begin{tikzpicture}
\draw[faint,line width=1.2pt] (0,0) circle(.93);
\draw[backarr] (10:.93) arc[start angle=10,end angle=340,radius=.93];\fill[warm] (.93,0) circle(2.4pt);
\node[tinylabel,right] at (1.04,0){basepoint};
\node[tinylabel] at (0,-1.37){one loop of winding number $1$};
\end{tikzpicture}}
\newcommand{\figmoore}{\begin{tikzpicture}[x=.96cm,y=.96cm]
\node[tinylabel,anchor=west] at (0,2.23){cofiber sequence};\node[tinylabel,anchor=west] at (0,-.33){fiber sequence};
\foreach \x/\nm/\val in {.55/s/{\mathbb S},3.07/t/{\mathbb S},5.8/m/{M_p}}{\node[val] (\nm) at (\x,1.67){$\val$};}
\foreach \x/\nm/\val in {.55/ds/{\mathbb S},3.07/dt/{\mathbb S},5.8/dm/{DM_p}}{\node[val] (\nm) at (\x,.23){$\val$};}
\draw[arr](s)--node[above]{$p$}(t);\draw[arr](t)--(m);
\draw[backarr](dt)--node[above]{$p$}(ds);\draw[backarr](dm)--(dt);
\foreach \f/\t in {s/ds,t/dt,m/dm}{\draw[faint,dashed](\f)--(\t);}
\end{tikzpicture}}
\newcommand{\figwords}{\begin{tikzpicture}
\node[task,anchor=west] at (0,3.58){Substitution of operations};
\node[task,anchor=west] at (7.12,3.58){Composition of free-group maps};
\node[val] (n0) at (.63,2.51){$2$};\node[val] (n1) at (3.29,2.51){$2$};\node[val] (n2) at (5.59,2.51){$1$};
\draw[arr] (n0)--node[above]{$s$}(n1);\draw[arr] (n1)--node[above]{$w$}(n2);
\draw[backarr] (n0) to[bend right=27] node[below]{$w\circ s$}(n2);
\node[tinylabel,anchor=west] at (0,.80){$s(a,b)=(a^{-1},ab)$};\node[tinylabel,anchor=west] at (0,.28){$w(x,y)=xy$};
\draw[faint] (6.55,.17)--(6.55,3.69);
\node[val] (g0) at (7.65,2.51){$F_2$};\node[val] (g1) at (10.56,2.51){$F_2$};\node[val] (g2) at (13.30,2.51){$F_1$};
\draw[arr] (g2)--node[above]{$w^\#$}(g1);\draw[arr] (g1)--node[above]{$s^\#$}(g0);
\draw[backarr] (g2) to[bend left=27] node[below]{$s^\#\circ w^\#$}(g0);
\node[tinylabel,anchor=west] at (7.12,.80){$w^\#(e)=xy$};\node[tinylabel,anchor=west] at (7.12,.28){$s^\#(xy)=a^{-1}ab=b$};
\end{tikzpicture}}
\newcommand{\figmatrix}{\begin{tikzpicture}[x=1cm,y=1cm]
\node[task] at (6.56,2.17){A bilinear form in coordinates};
\node[rulebox,fill=paperblue] (m) at (6.56,1.35){\(\displaystyle M=\begin{pmatrix}1&2&0\\0&-1&3\end{pmatrix}\)};
\node[val] (l) at (1.37,.43){\((1,0,6)\in W^*\)};\node[val] (r) at (11.75,.43){\((0,4)\in V^*\)};
\draw[backarr] (m.west) to[bend right=7] node[above,sloped,tinylabel]{hold \(v=(1,2)\) fixed} (l.north);
\draw[backarr] (m.east) to[bend left=7] node[above,sloped,tinylabel]{hold \(w=(2,-1,1)\) fixed} (r.north);
\node[tinylabel] at (1.37,-.05){\(v^{\mathsf T}M\), evaluated at \(w\)};
\node[tinylabel] at (11.75,-.05){\(Mw\), evaluated at \(v\)};
\node[rulebox,fill=pale] (eight) at (6.56,-.07){\(8\)};
\draw[arr] (l.east)--(eight.west);\draw[arr](r.west)--(eight.east);
\end{tikzpicture}}
\newcommand{\figmorita}{\begin{tikzpicture}[x=1cm,y=1cm]
\node[task,anchor=west] at (0,3.12){Left modules};
\node[val] (sone) at (1.05,2.35){$S_1$}; \node[val] (m) at (5.0,2.35){$M$};\node[val] (stwo) at (9.25,2.35){$S_2$};
\draw[arr] (sone)--node[above,tinylabel]{inclusion} node[below,tinylabel]{$x\mapsto (x,0)^{\mathsf T}$} (m);\draw[arr] (m)--node[above,tinylabel]{quotient} node[below,tinylabel]{$(x,y)^{\mathsf T}\mapsto y$} (stwo);

\draw[faint] (0,1.55)--(10.25,1.55);
\node[task,anchor=west] at (0,1.20){Right modules};
\node[val] (dsone) at (1.05,.40){$D_kS_1$}; \node[val] (dm) at (5.0,.40){$D_k M$};\node[val] (dstwo) at (9.25,.40){$D_k S_2$};
\draw[backarr] (dm)--node[above,tinylabel]{restriction to $S_1$} node[below,tinylabel]{$(\alpha,\beta)\mapsto\alpha$} (dsone);\draw[backarr] (dstwo)--node[above,tinylabel]{pullback along the quotient} node[below,tinylabel]{$\beta\mapsto(0,\beta)$} (dm);

\node[tinylabel] at (5.0,-.52){The image from the right in $D_kM$ consists of the rows $(0,\beta)$.};
\end{tikzpicture}}
\newcommand{\figquotation}{\begin{tikzpicture}
\node[task] at (5.2,3.32){One expression tree};
\node[rulebox] (source) at (5.2,2.65){\texttt{(head (quote (a b)))}};
\node[rulebox,fill=pale] (datum) at (1.45,.72){\texttt{(head (quote (a b)))}};
\node[rulebox,fill=cream] (value) at (8.95,.72){\texttt{a}};
\draw[backarr] (source.south west)--node[above,sloped,tinylabel]{quotation} (datum.north);
\draw[arr] (source.south east)--node[above,sloped,tinylabel]{execution} (value.north);
\node[tinylabel] at (1.45,.18){a list whose first symbol is \texttt{head}};
\node[tinylabel] at (8.95,.18){a symbol};
\end{tikzpicture}}
\newcommand{\figself}{\begin{tikzpicture}[x=1cm,y=.90cm]
\node[task,anchor=west] at (0,3.8){Program given to the bootstrap};
\node[task,anchor=west] at (8.9,3.8){Value};
\node[anchor=west] (p0) at (.1,2.98){$P$};
\node[anchor=west] (p1) at (.1,1.87){$(D_E,\ \mathsf{run}(\mathsf{quote}(P)))$};
\node[anchor=west] (p2) at (.1,.76){$(D_E,\ \mathsf{run}(\mathsf{quote}(P^{[1]})))$};
\foreach \i/\yy/\txt in {0/2.98/{direct},1/1.87/{one Lisp interpretation},2/.76/{two Lisp interpretations}}{
\node[rulebox,fill=pale] (v\i) at (9.7,\yy){\texttt{(a b c)}};
\draw[backarr] (5.1,\yy)--node[above,tinylabel]{\txt} (v\i.west);}
\end{tikzpicture}}

\newcommand{\figchu}{\begin{tikzpicture}
\node[task] at (1.75,2.2){Rows are programs};
\node[task] at (9.3,2.2){Rows are inputs};
\node[rulebox,fill=pale,inner sep=7pt] (r) at (1.75,.83){$\begin{array}{c|cc}
 & \mathtt a & \mathtt b\\ \hline
p & \mathtt a & \mathtt b\\
q & \mathtt a & \mathtt b\\
h & \mathtt a & \mathtt a
\end{array}$};
\node[rulebox,fill=paperblue,inner sep=7pt] (tr) at (9.3,.83){$\begin{array}{c|ccc}
 & p & q & h\\ \hline
\mathtt a & \mathtt a & \mathtt a & \mathtt a\\
\mathtt b & \mathtt b & \mathtt b & \mathtt a
\end{array}$};
\draw[backarr] (r.east)--node[above,tinylabel]{transpose} (tr.west);
\end{tikzpicture}}


\begin{document}
\thispagestyle{opening}
\pdfbookmark[0]{Evaluation and Reconstruction in Mathematical Duality}{title}
{\sffamily\bfseries\color{ink}\fontsize{30}{33}\selectfont Evaluation and Reconstruction\\[-1pt]in Mathematical Duality\par}
\vspace{5pt}
{\sffamily\large\color{teal}An illustrated introduction to geometry, logic, computation and modules\par}
\vspace{5pt}{\small Anonymous\par}
\vspace{7pt}\hrule height .55pt\vspace{5pt}
{\small\textbf{\sffamily Abstract.}
A map of finite sets is determined by its inverse-image action on subsets. Generalizing this observation requires a precise choice of what can be evaluated and which maps preserve evaluation. We compare Stone, Pontryagin, Gelfand, affine, Isbell, Morita and Spanier--Whitehead duality. In each case a two-sided representation produces a contravariant adjunction, and the canonical maps to the double dual specify where reconstruction holds. Theories and models give both a Galois connection and classification in a varying topos. Quotation, specialization and a self-interpreter exhibit a different role for evaluation in computation. The examples include a noncommutative module calculation and executable interpretations of a Lisp program at three depths.\par}
\vspace{2pt}\hrule height .35pt
\topicsection{Points and subsets}{Points, subsets and inverse images}\label{sec:opening}
\plate{fig:pull}{\figpullback}{The map sends \(a,b\) to \(u\) and \(c\) to \(v\). Reading the indicator of \(\{u\}\) on the images of \(a,b,c\), in that order, gives \(1,1,0\).}

Choose the point \(u\) on the right in Figure~\ref{fig:pull}. Which points on the left land there? The answer is the subset \(\{a,b\}\). For any map \(f:X\to Y\) and subset \(U\subseteq Y\), this calculation is
\[
 f^{-1}U=\{x\in X\mid f(x)\in U\}.
\]
It works even when several points have the same image. A second map \(g:Y\to Z\) gives \((g f)^{-1}=f^{-1}g^{-1}\). This reversal of composition is \emph{contravariance}.

The equality behind the picture is \(\mathbf 1_{f^{-1}U}(x)=\mathbf 1_U(f(x))\). It expresses compatibility between a map of points and a map of predicates. The same form of equality occurs when a group character is restricted, a polynomial is substituted, or a sentence is interpreted in a reduct of a model.

\subhead{What must be reconstructed?}
A category specifies objects, maps between them, identities and composition. A dual equivalence between two categories assigns to each map \(X\to Y\) a map \(DY\to DX\). In the opposite direction a second assignment recovers each object up to a canonical isomorphism compatible with every map. Recovering arrows is part of the assertion.

For a finite set \(X\), start with its Boolean algebra of subsets. Each \(x\) determines the test \(U\mapsto\mathbf 1_U(x)\). Every Boolean-algebra map from that finite algebra to \(\{0,1\}\) arises from exactly one \(x\). Section~\ref{sec:stone} identifies the topology needed for the infinite version. This first instance already separates three questions. What can be evaluated? Which maps preserve that evaluation? When is every compatible test evaluation at an original object or point? \cite{porst,stone}

\begin{result}{Finite powerset duality}{thm:finite}
For finite sets \(X,Y\), inverse image gives a bijection
\[
  \Set(X,Y)\ \cong\ \Hom_{\lcat{BA}}\bigl(\powers(Y),\powers(X)\bigr),
  \qquad f\longmapsto f^{-1}.
\]
Here Boolean homomorphisms preserve \(0,1\), binary meets and complements. Every finite Boolean algebra is isomorphic to the powerset of its set of atoms, its minimal nonzero elements. Hence finite sets and finite Boolean algebras are dual categories. \cite{stone,porst}
\end{result}
To reconstruct \(f\) from \(h\), look at the disjoint subsets \(h(\{y\})\) of \(X\). Their union is \(X\). For each \(x\), the unique part containing \(x\) specifies \(f(x)\). In Figure~\ref{fig:pull}, the parts are \(\{a,b\}\) and \(\{c\}\). This procedure recovers the function even though it identifies two points. It also explains why preservation of finite joins suffices in the finite theorem.

\topicsection{Contravariant adjunctions}{The common statement}\label{sec:criterion}
\lead{A family of pairings can specify both dual functors before either functor has been named.}

Let \(\Ccat,\Dcat\) be locally small categories, so maps between each pair of objects form a set. Write \(\Ccat^{\op}\) for the category with all arrows reversed. Suppose \(P:\Ccat^{\op}\times\Dcat^{\op}\to\Set\). A map in either input acts on \(P\) by precomposition. A representation in the second input means that every element of \(P(c,d)\) is determined by a unique map \(d\to Fc\), naturally in \(d\).

A representation in the first input has the analogous form \(c\to Gd\).

A familiar example is the set of bilinear forms on \(V\times W\). A form \(b\) gives a map \(W\to V^*\) by \(w\mapsto b(-,w)\), and a map \(V\to W^*\) by \(v\mapsto b(v,-)\). Both descriptions specify every value \(b(v,w)\).

\begin{result}{Two-sided representability}{thm:representation}
Let \(P:\Ccat^{\op}\times\Dcat^{\op}\to\Set\) be representable in each variable with the other fixed. The representatives extend to functors \(F:\Ccat\to\Dcat^{\op}\) and \(G:\Dcat^{\op}\to\Ccat\) with \(F\dashv G\). Their adjunction is specified by
\[
 \Hom_{\Dcat}(d,Fc)\ \cong\ P(c,d)\ \cong\ \Hom_{\Ccat}(c,Gd)
\]
naturally in both variables. Conversely every such adjunction gives a pairing with these representations. \cite{porst,kerodon}
\end{result}
Here is the action on one arrow. Given \(u:c\to c'\), precomposition gives \(P(c',d)\to P(c,d)\) for every \(d\). In the representation by \(\Dcat\), this is postcomposition with a unique arrow \(Fc'\to Fc\). Applying the same argument to an identity and to a composite gives precisely the two functor laws.

\subhead{The canonical comparisons}
Representing objects are unique up to unique isomorphism compatible with their representations. Yoneda's lemma supplies the action on arrows. Under the displayed bijection, \(\id_{Fc}\) corresponds to \(\eta_c:c\to GFc\), and \(\id_{Gd}\) corresponds to \(\delta_d:d\to FGd\). The latter arrow is the counit written in \(\Dcat\). Both comparison arrows therefore point towards the double dual in their original categories.

\subhead{The reflexive objects}
Call \(c\) reflexive if \(\eta_c\) is an isomorphism, and \(d\) reflexive if \(\delta_d\) is. The triangle identities give \(F\eta_c\circ\delta_{Fc}=\id_{Fc}\) and \(G\delta_d\circ\eta_{Gd}=\id_{Gd}\). Hence the dual of a reflexive object is reflexive on the other side. Restriction gives \(\Ccat_{\rm ref}\simeq\Dcat_{\rm ref}^{\op}\). Full duality holds exactly when both comparisons are invertible everywhere. \cite{porst,avery,kerodon}

\plate{fig:unit}{\figunit}{On the left, either route sends \(c\) to \(GFc'\) by the same map. On the right, composition along the lower sides gives the identity for every \(c\), including nonreflexive objects. A composite equal to the identity need only have one-sided inverses.}
\plate{fig:matrix}{\figmatrix}{For \(V=\R^2\) and \(W=\R^3\), evaluate \(b(v,w)=v^{\mathsf T}Mw\) in either order. With the indicated inputs, first fixing \(v\) gives \(2+6=8\), and first fixing \(w\) gives \(0+2\cdot4=8\).}
\aside{The converse.}{Any anti-equivalence yields such a pairing by taking \(P(c,d)=\Hom_{\Dcat}(d,Fc)\). In a concrete theorem the mathematical work is identifying \(P\) independently and deciding precisely where its two comparisons are invertible.}

\topicsection{Order and closure}{A relation and its two closures}\label{sec:polarity}
\lead{A table of integers gives the entire construction in a setting where an arrow is an inclusion.}

A partially ordered set is a category with one arrow \(s\to t\) when \(s\le t\), and none otherwise. Take a relation \(R\subseteq X\times Y\). For a set \(S\) of rows let \(S^\uparrow\) be the columns incident with every row in \(S\). For a set \(T\) of columns let \(T^\downarrow\) be the rows incident with every column in \(T\). Adding rows can only remove common columns. Both operations reverse inclusion. \cite{ganter}

Let \(P(S,T)\) mean \(S\times T\subseteq R\). In the posets of subsets its two representations read
\[
 T\subseteq S^\uparrow
 \quad\Longleftrightarrow\quad
 S\subseteq T^\downarrow .
\]
Both sides assert that every entry in the rectangle \(S\times T\) is marked. This is an \emph{antitone Galois connection}, also called a polarity.

\plate{fig:incidence}{\figincidence}{Only one column has a dot in both selected rows, namely \(2\). This column also contains a dot for \(30\). The closure of \(\{6,10\}\) is therefore \(\{6,10,30\}\).}

\subhead{What changes on the second pass?}
Every \(S\) satisfies \(S\subseteq S^{\uparrow\downarrow}\), with exponents applied from left to right. The operation is monotone and idempotent. For instance, repeating the calculation from \(\{6,10,30\}\) gives exactly that set. The two triangle identities reduce to equalities of subsets such as \(S^{\uparrow\downarrow\uparrow}=S^\uparrow\). The fixed row sets and fixed column sets are opposite posets.

The empty set gives a revealing boundary case. Every one of the three columns is common to its rows, by vacuous truth. The unique row divisible by all three primes is \(30\). Thus the least closed row set is \(\{30\}\).

\begin{result}{The complete lattice of a polarity}{thm:closure}
For any relation \(R\subseteq X\times Y\), the closed row sets \(S=S^{\uparrow\downarrow}\) ordered by inclusion form a complete lattice. For any family \((S_i)_{i\in I}\) of closed row sets,
\[
  \bigwedge_i S_i=\bigcap_i S_i,\qquad
  \bigvee_i S_i=\left(\bigcup_i S_i\right)^{\uparrow\downarrow}.
\]
The map \(S\mapsto S^\uparrow\) is an order-reversing bijection to the closed column sets, with inverse \(T\mapsto T^\downarrow\). The empty meet is \(X\), and the empty join is \(\varnothing^{\uparrow\downarrow}\). \cite{ganter}
\end{result}
For example, the meet of \(\{6,30\}\) and \(\{10,30\}\) in Figure~\ref{fig:incidence} is \(\{30\}\), and their join is \(\{6,10,30\}\). Taking common attributes sends these sets to \(\{2,3,5\}\) and \(\{2\}\), respectively. Thus a meet on the row side corresponds to a join on the column side.

\subhead{A finite way to read the general formula}
The hom-set between two comparable subsets has one element. Otherwise it is empty. Replacing each inclusion above by its hom-set gives exactly the two representations of \(P\) in Section~\ref{sec:criterion}. Here a comparison is invertible exactly when an inclusion is equality.

The table has eight closed row sets. Each consists of \(30\) together with a subset of \(\{6,10,15\}\). Their opposite order is the inclusion order on the eight possible sets of prime attributes. In logic, rows can instead be structures and columns sentences. Then closure on the sentence side is closure under semantic consequence, as in Section~\ref{sec:logic}. In a general category, double dualization need not be idempotent. Section~\ref{sec:enrichment} gives a linear example.

\topicsection{Boolean algebras and spaces}{Stone duality}\label{sec:stone}
\lead{A point can be specified by a compatible truth value for every clopen subset.}

A \emph{clopen} set is open and closed. A Stone space is a compact Hausdorff space with a basis of clopen sets. Its clopens form a Boolean algebra \(\Clop(X)\) under union, intersection and complement. A continuous map \(f:X\to Y\) induces a Boolean homomorphism \(f^{-1}:\Clop(Y)\to\Clop(X)\).

In the other direction let \(2=\{0,1\}\) with its Boolean operations and discrete topology.

For a Boolean algebra \(B\), put \(\Ult(B)=\Hom_{\lcat{BA}}(B,2)\), the space of truth assignments preserving \(0,1,\wedge,\vee,\neg\). Its basic opens are \([b]=\{u:u(b)=1\}\). They are clopen since their complements are \([\neg b]\). The elements assigned \(1\) form an ultrafilter. A homomorphism \(h:B\to C\) acts by \(u\mapsto u h\).

\begin{result}{Stone representation and duality}{thm:stone}
In classical set theory, the maps
\[
 X\longrightarrow\Ult(\Clop X),\quad x\longmapsto(U\mapsto\mathbf1_U(x)),
 \qquad B\longrightarrow\Clop(\Ult B),\quad b\longmapsto[b]
\]
are a homeomorphism for every Stone space \(X\) and an isomorphism for every Boolean algebra \(B\). Both are natural. With continuous maps and Boolean homomorphisms, this gives \(\lcat{Stone}\simeq\lcat{BA}^{\op}\). The empty space corresponds to the one-element Boolean algebra. \cite{stone,porst}
\end{result}
Take the subalgebra generated by \(\{a,b\}\) inside \(\powers(\{a,b,c\})\). Its two atoms are \(\{a,b\}\) and \(\{c\}\). Restriction of a truth assignment to the subalgebra identifies the points \(a\) and \(b\), and separates both from \(c\). The inclusion of the subalgebra therefore induces exactly the surjection in Figure~\ref{fig:pull}.

\plate{fig:cube}{\figcube}{The eight subsets of \(\{a,b,c\}\). The shaded face consists of all four subsets containing \(b\). Its characteristic test is evaluation at \(b\). Dashed edges add \(b\).}

\subhead{Why the finite calculation works}
The three singleton subsets partition \(X=\{a,b,c\}\). A Boolean homomorphism \(\powers(X)\to2\) must assign \(1\) to exactly one singleton, since their join is \(1\) and their pairwise meets are \(0\). This determines its value on every subset. The spectrum has three points. Evaluation distinguishes them even though the algebra has eight elements.

In a Stone space \(X\), distinct points have disjoint clopen neighborhoods. A family of clopens in an ultrafilter has the finite intersection property, so compactness gives a point common to all of them. Separation gives uniqueness. On the algebra side, the Boolean prime ideal theorem ensures that distinct elements can be separated by ultrafilters. \cite{stone,porst}

\subhead{The same pairing on both sides}
An element of \(P(X,B)\) gives a truth value for each \(x\in X,b\in B\). At fixed \(x\) the assignment is Boolean. At fixed \(b\) it is continuous into \(2\). Read by rows or columns, this is
\[
 \Hom_{\lcat{Stone}}(X,\Ult B)
 \ \cong\ \Hom_{\lcat{BA}}(B,\Clop X).
\]

In \(2^{\N}\), every clopen is a finite union of cylinders. Indeed, an open cylinder can be chosen about each of its points and compactness gives a finite subcover. The algebra is obtained from finite Boolean algebras of prefixes. The space is the inverse limit of the finite discrete prefix spaces. The words corresponding to a point at successive levels agree under truncation. Figure~\ref{fig:cantor} shows the first three choices.

\plate{fig:cantor}{\figcantor}{A path beginning \(1,0,1\) selects nested cylinders \([1]\supset[10]\supset[101]\) in binary Cantor space. Every infinite path determines an ultrafilter of clopens.}

\aside{An infinite algebra with one extra point.}{Take the Boolean algebra of finite and cofinite subsets of \(\N\). Each integer supplies a point by evaluation. There is one more homomorphism to \(2\), with value \(1\) exactly on the cofinite sets. An ultrafilter containing a finite set must contain a singleton, so these are all the points. A basic neighborhood of the extra point contains all but finitely many integers. Its Stone space is the one-point compactification of discrete \(\N\).}

\topicsection{Continuous and discrete groups}{Pontryagin duality}\label{sec:pontryagin}
\lead{Continuous characters give the compact circle and the discrete integers as one another's duals.}

Put \(\Torus=\R/\Z\) with addition modulo \(1\). For a locally compact Hausdorff abelian group \(G\), let \(\widehat G=\Hom_{\rm cont}(G,\Torus)\), with pointwise addition and the compact-open topology. This topology controls the values of characters on compact subsets. If \(f:G\to H\) is a continuous homomorphism, its dual \(\widehat f:\widehat H\to\widehat G\) sends \(\chi\) to \(\chi f\).

A character of the discrete group \(\Z\) has the form \(n\mapsto nt\) for a unique \(t\in\Torus\), its value at \(1\). A continuous character of \(\Torus\) is \(t\mapsto nt\) for a unique \(n\in\Z\). The same expression therefore represents a point on a compact circle in the first calculation and an integer in a discrete group in the second. \cite{morris,porst}

\plate{fig:phase}{\figphase}{The parameter \(t=1/4\) gives a periodic character of \(\Z\). The four displayed residues are points of \(\Torus\). Allowing every \(t\in\Torus\) gives \(\widehat{\Z}\).}

\subhead{Evaluation in both variables}
Let \(P(G,H)\) be the jointly continuous bicharacters \(G\times H\to\Torus\), homomorphisms separately in each variable. Local compactness and the compact-open topology identify these with continuous homomorphisms \(H\to\widehat G\) and \(G\to\widehat H\). For a given \(g\), the function \(\chi\mapsto\chi(g)\) is a character of the character group.

The dual of a compact group in this category is discrete, and the dual of a discrete group is compact. The whole category also contains \(\R\), which is self-dual via \((x,t)\mapsto xt\bmod1\). Discrete and compact name two exchanged subcategories. The construction extends beyond them. \cite{morris}

\begin{result}{Pontryagin--van Kampen duality and annihilators}{thm:pontryagin}
On locally compact Hausdorff abelian groups with continuous homomorphisms, \(G\mapsto\widehat G\) with the compact-open topology is a contravariant equivalence. Its double-dual isomorphism is \(g\mapsto(\chi\mapsto\chi(g))\). If \(H\subseteq G\) is a closed subgroup, set \(H^\perp=\{\chi\in\widehat G:\chi(h)=0\text{ for all }h\in H\}\), using additive circle values. Then
\[
 \widehat{G/H}\cong H^\perp,\qquad
 \widehat H\cong\widehat G/H^\perp
\]
as topological groups. The second isomorphism is induced by restriction of characters. \cite{morris}
\end{result}
For \(G=\R\) and \(H=\Z\), a character \(x\mapsto tx\bmod1\) is zero on \(H\) precisely for \(t\in\Z\). Thus \(H^\perp=\Z\subseteq\widehat\R\cong\R\). The two formulas simultaneously give \(\widehat{\R/\Z}\cong\Z\) and \(\widehat\Z\cong\R/\Z\).

\subhead{A finite character table}
\plate{fig:characters}{\figcharacters}{Characters of \(\Z/4\) in multiplicative notation. Row \(j\) sends \(n\) to \(i^{jn}\). Column \(n\) evaluates all four characters at \(n\).}
For the homomorphism \(n\mapsto2n\), precomposing row \(j\) gives row \(2j\bmod4\). For example row \(1\) becomes row \(2\). The Fourier transform on functions uses these entries as coefficients in a sum. The group duality itself is already present in evaluation of the columns. Its definition uses no choice of measure.

\aside{A quotient visible in the table.}{The even subgroup \(H=\{0,2\}\) of \(\Z/4\) has quotient \(\Z/2\). A character descends to the quotient exactly when it equals \(1\) on \(H\). Rows \(0\) and \(2\) meet this condition. The quotient homomorphism therefore gives an inclusion of the two quotient characters into the four original characters. In general this subgroup of characters is the \emph{annihilator} of \(H\).}

\topicsection{Geometry and algebra}{Two geometries of functions}\label{sec:geometry}
\lead{Both constructions below send a geometric map \(f\) to substitution \(h\mapsto h\circ f\). The kinds of functions differ.}

\subhead{Compact Hausdorff spaces}
For a nonempty compact Hausdorff space \(X\), \(C(X,\CC)\) is a commutative unital complex \(C^*\)-algebra, with the supremum norm and complex conjugation. For a nonzero commutative unital \(C^*\)-algebra \(A\), \(\Char(A)\) consists of its unital \(*\)-homomorphisms to \(\CC\), with the topology of pointwise convergence. Morphisms of algebras here preserve the unit and involution. For \(a\in A\), its Gelfand transform is the function \(\widehat a(\chi)=\chi(a)\).

\begin{result}{Commutative Gelfand--Naimark duality}{thm:gelfand}
For a nonzero commutative unital complex \(C^*\)-algebra \(A\), its character space is compact Hausdorff and the Gelfand transform \(A\to C(\Char A,\CC)\) is an isometric unital \(*\)-isomorphism. For a nonempty compact Hausdorff \(X\), evaluation \(X\to\Char(C(X,\CC))\) is a homeomorphism. Both comparisons are natural for the morphisms specified above. \cite{gelfand,porst}
\end{result}
For \(A=\CC\times\CC\), a character sends each coordinate idempotent to \(0\) or \(1\). The two images sum to \(1\) and multiply to \(0\), so the only characters are the coordinate projections. The transform of \((z,w)\) is exactly the function with values \(z,w\) on this discrete two-point space.

\subhead{Affine schemes}
For a commutative unital ring \(A\), \(\Spec A\) has the prime ideals as points and a sheaf of local functions. A unital homomorphism \(A\to B\) sends a prime of \(B\) to its inverse image in \(A\). For a scheme \(X\), write \(\Gamma X\) for the ring of global regular functions. 

\begin{result}{Affine reconstruction}{thm:affine}
For every scheme \(X\) and commutative unital ring \(A\), there is a natural bijection
\[
 \Hom_{\lcat{Sch}}(X,\Spec A)\cong\Hom_{\lcat{CRing}}(A,\Gamma X).
\]
The canonical ring map \(A\to\Gamma(\Spec A)\) is an isomorphism. The comparison \(X\to\Spec\Gamma X\) is universal among maps from \(X\) to affine schemes and is an isomorphism exactly when \(X\) is affine. Consequently \(\lcat{Aff}\simeq\lcat{CRing}^{\op}\). \cite{stacks}
\end{result}
Take \(B=k[\epsilon]/(\epsilon^2)\) over a field \(k\). A \(k\)-map \(\Spec B\to\mathbb A^1_k\) is determined by \(t\mapsto a+b\epsilon\). All choices of \(b\) at a given \(a\) induce the same map on the underlying one-point source. They give different scheme morphisms because the maps on functions record the nilpotent coefficient. This explains the role of the structure sheaf in affine reconstruction.

\plate{fig:geometry}{\figgeometry}{On real points \(x=-3/4\) and \(x=3/4\) have the same square. On polynomial rings over a field \(k\), the map on affine lines induces \(k[t]\to k[s]\) by substitution \(h(t)\mapsto h(s^2)\).}

A continuous map \(f:X\to\Char A\) gives the algebra map \(A\to C(X,\CC)\) with \(a\mapsto[x\mapsto f(x)(a)]\). This is \(P(X,A)\) in the Gelfand case. For compact spaces the functions taking only \(0\) and \(1\) are precisely the indicators of clopens. On a connected interval they are constant. General continuous complex-valued functions, including the coordinate, separate its points. This explains the different geometric hypotheses in the Stone and Gelfand theorems.

\plate{fig:charts}{\figcharts}{On the overlap of the two standard charts of \(\mathbb P^1_k\), each global function belongs to both indicated subrings of the Laurent ring.}
The intersection \(k[z]\cap k[z^{-1}]\) there is \(k\), by uniqueness of Laurent coefficients. The comparison \(\mathbb P^1_k\to\Spec k\) thus contracts the entire projective line to one point. The local charts contain geometric information unavailable from the global ring.

\topicsection{Logic and models}{What a theory determines}\label{sec:logic}
\lead{A sentence has a class of models. A class of models has a common theory. The two operations reverse inclusion.}

Fix a signature. Range over its sentences and over structures in a chosen universe. For sentences \(T\) and a collection of structures \(K\), set
\[
\begin{aligned}
 \Mod(T)&=\{M\mid M\models\varphi\text{ for all }\varphi\in T\},\\
 \Th(K)&=\{\varphi\mid M\models\varphi\text{ for all }M\in K\}.
\end{aligned}
\]
Form these collections in a larger universe if needed. The pairing is the assertion that every \(M\in K\) satisfies every \(\varphi\in T\). Thus \(K\subseteq\Mod(T)\) exactly when \(T\subseteq\Th(K)\).

The double passage \(T\mapsto\Th(\Mod(T))\) adds every semantic consequence. On the other side \(K\mapsto\Mod(\Th(K))\) is the smallest class axiomatizable by a set of sentences that contains \(K\). The fixed objects are closed theories and theory-axiomatizable classes, ordered oppositely. \cite{marker,ganter}

\begin{result}{First-order completeness and model classes}{thm:logic}
Fix a first-order signature with classical semantics over all nonempty structures, and use classical first-order natural deduction with equality. For every set \(T\) of sentences and sentence \(\varphi\),
\[
 T\vdash\varphi\quad\Longleftrightarrow\quad
       \forall M\,\bigl(M\models T\ \Longrightarrow\ M\models\varphi\bigr).
\]
In particular \(\Th(\Mod(T))\) equals the set of sentences with a finite derivation from \(T\). The maps \(\Mod,\Th\) restrict to opposite isomorphisms of the posets of deductively closed theories and classes axiomatized by theories. \cite{marker}
\end{result}
Finiteness of derivations yields compactness. As an application, take sentences \(\theta_n\) saying that at least \(n\) elements exist. Any finite subset of the \(\theta_n\) has a finite model. If a first-order theory axiomatized all finite nonempty sets in the language of equality, adjoining every \(\theta_n\) would, by compactness, give it an infinite model. This obstruction concerns which model classes appear on the reflexive side.

\plate{fig:truth}{\figtruth}{Valuations are written in the order \(pq\). The unique excluded valuation \(10\) makes \(p\) true and \(q\) false. Adding \(p\) as an axiom leaves only \(11\), so \(q\) is a semantic consequence of the enlarged theory.}

\subhead{From formulas to Stone space}
Identify propositional formulas when they have the same truth value under every valuation. The quotient is a Boolean algebra with conjunction as meet and negation as complement. Equivalently, use provable equivalence in a sound and complete classical propositional calculus. Evaluation at a valuation is a Boolean homomorphism to \(2\). Conversely, such a homomorphism assigns truth values to the propositional variables, and these determine its value on every formula by induction.

With two variables there are four valuations and sixteen truth functions. Every subset of the four valuations is specified by a disjunction of the corresponding complete conjunctions of literals. Thus the Lindenbaum algebra is the powerset algebra of the four-point space. Figure~\ref{fig:truth} displays one of its sixteen elements. For infinitely many variables the clopens of the product space \(2^I\) are exactly the truth sets of finitary formulas. \cite{stone,marker}

\subhead{How much of a model follows?}
In the language with just \(<\), the orders \((\Q,<)\) and \((\R,<)\) satisfy exactly the same first-order sentences. Both are dense linear orders without endpoints, a complete theory. They have different cardinalities and so are nonisomorphic. Even all sentences true in one structure can determine several isomorphism classes. \cite{marker}

The compatibility of satisfaction with maps also has an exact formulation. For a signature translation \(\sigma\), translating \(\varphi\) preserves truth when models are restricted along \(\sigma\). More precisely, for a model \(N\) of the target signature,
\[
 N\models\sigma(\varphi)\ \Longleftrightarrow\
 N|_\sigma\models\varphi .
\]
This is the satisfaction condition for an institution. It is the change-of-language analogue of the inverse-image identity on the opening page. \cite{goguen}

\topicsection{Syntax and substitution}{Terms as maps between free models}\label{sec:terms}
\lead{A group word gives an operation on every group. With the right objects on the semantic side, substitution itself has an exact dual.}

Let \(\mathsf L_{\rm grp}\) be the category whose object \(n\) is a context of \(n\) variables. A map \(n\to m\) is an \(m\)-tuple of group terms in those variables, with terms identified by the group axioms. Composition substitutes one tuple into the next. The distinguished object \(1\) is a single variable, and \(n\) is its \(n\)-fold product. The empty context \(0\) is the terminal object.

Let \(F_n\) be the free group on \(n\) generators. A word in \(n\) variables represents an element of \(F_n\). An \(m\)-tuple of such elements determines a unique homomorphism \(F_m\to F_n\), by specifying the image of each generator. Thus
\[
 \mathsf L_{\rm grp}(n,m)\cong\Hom_{\lcat{Grp}}(F_m,F_n).
\]
These bijections preserve identities and reverse the order of composition. They exhibit the syntax category as the opposite of the full subcategory on the finite-rank free groups. \cite{lawvere}

\begin{result}{Lawvere's functorial semantics}{thm:lawvere}
For a single-sorted finitary equational theory \(T\), let \(\mathsf L_T\) have finite variable contexts as objects and tuples of terms modulo provable equality as maps. Its opposite is equivalent to the category on the free \(T\)-algebras \(F_n\) on finitely many generators. Evaluation identifies the category of all set-based \(T\)-algebras and homomorphisms with the category of finite-product-preserving functors \(\mathsf L_T\to\Set\) and natural transformations. \cite{lawvere}
\end{result}
For abelian groups a map \(n\to m\) in the syntax is an \(m\times n\) integer matrix. The operation \(x^2y^{-1}\) corresponds to the row \((2,-1)\), or in additive notation \((g,h)\mapsto 2g-h\). On free groups in the abelian theory the corresponding map \(\Z\to\Z^2\) sends \(1\) to \((2,-1)\). Composing operations is ordinary matrix multiplication, and the transpose reverses that multiplication.

\plate{fig:words}{\figwords}{Substitute \((a^{-1},ab)\) for \((x,y)\) in the word \(xy\). The result is \(b\). On free groups the homomorphisms occur in reverse order, and the generator \(e\) of \(F_1\) has final image \(b\) in \(F_2\).}

\subhead{From a term to an operation}
For any group \(H\), giving a homomorphism \(F_n\to H\) amounts to choosing an input tuple in \(H^n\). Given \(w^\#:F_m\to F_n\), precomposition gives \(H^n\to H^m\). In particular the word \(xy\) acts by \((g,h)\mapsto gh\). In the permutation group \(S_3\), taking \(g=(12)\) and \(h=(23)\) gives \((123)\) with right-to-left composition. Reversing the two letters gives \((132)\). The tuple and the order of its letters both affect evaluation.

This interpretation preserves finite products. Conversely, a finite-product-preserving functor \(\mathsf L_{\rm grp}\to\Set\) specifies a group on the set assigned to \(1\). The multiplication, unit and inverse are its images of the corresponding terms. The equations hold because equal arrows have equal images. Natural transformations between these functors are precisely homomorphisms. \cite{lawvere}

\subhead{Where the opposite category occurs}
There are two different semantic constructions here. \emph{All} groups occur as product-preserving functors on the syntax. \emph{Free} groups on finitely many generators represent the contexts and account for the dual equivalence. For \(c=n\) and \(d=F_m\), the common pairing \(P(c,d)\) is the set of \(m\)-tuples of group words in \(n\) variables. Reading a tuple as a substitution gives its representation on the syntax side. Reading it as images of free generators gives its representation on the algebra side.

The same calculation applies to a single-sorted finitary equational theory, using its own equations and free algebras. The choice of contexts explains exactly why this duality takes the finite-rank free algebras as its domain. Code quotation in Section~\ref{sec:code} makes terms into explicit data. Section~\ref{sec:topos} varies the topos in which a theory is interpreted.


\topicsection{Programs and representations}{Code as data}\label{sec:code}
\lead{The list \code{(head (quote (a b)))} has two uses. A program can inspect its symbols and nested lists, or execute the expression and obtain the symbol \code{a}.}

A program text has a parse tree. In Lisp, a tree can itself be a value, a symbolic expression or \emph{S-expression}. If \(e\) is an expression tree, execution of \(\mathsf{quote}(e)\) returns \(e\) as a datum. Evaluation of \(e\) interprets its head as an operation and treats its subexpressions according to the rules for that operation. For instance, \code{quote} leaves its operand intact. Figure~\ref{fig:quotation} displays the distinction on one tree. McCarthy's original universal Lisp function and later metacircular evaluators use this shared representation of syntax and data. \cite{mccarthy,sicp}

\plate{fig:quotation}{\figquotation}{Quoting the entire expression produces a list. Executing it first obtains the literal list \code{(a b)} and then takes its head. The same representation supports structural inspection and execution.}

\subhead{Three maps that involve evaluation}
Let \(T\) be the set of abstract syntax trees and \(q:T\to\mathsf{Data}\) an injective structural encoding. On \(\mathsf{Enc}=q(T)\) there is a decoding \(d:\mathsf{Enc}\to T\) with \(dq=\id_T\) and \(qd=\id_{\mathsf{Enc}}\). This bijection explains the reversible sense of \emph{code/data duality}. Its universe of data is the set satisfying the grammar. Parsing a concrete text can discard whitespace and comments, so this syntactic identification is most precise at the tree level. A second map assigns a \emph{behavior} to a well-formed tree. Distinct trees can have identical behavior. For instance, returning an input directly and returning it after testing an always-true condition agree on every input. A third map is partial application of a program to a fixed input. Thus a decoder recovers syntax, and an evaluator determines which programs agree on all inputs. Section~\ref{sec:comparison} expresses this latter agreement as equality of rows in a Chu space.

For a total typed language interpreted in a cartesian closed category, currying is the natural bijection
\[
  \Ccat(Z\times A,B)\cong\Ccat(Z,B^A).
\]
It represents a family of maps by a single map into a function object. For computable partial functions, use an acceptable numbering \(e\mapsto\varphi_e\) of the unary partial computable functions and a computable pairing \(\langle a,x\rangle\) of natural numbers. Such a numbering has a partial computable universal evaluator and a total computable operation on indices for composition. Programs become natural numbers on which other programs can operate. Distinct indices with the same partial function remain distinct inputs to a source transformation. \cite{kleene,diagonal}

\begin{result}{Parameter theorem for program indices}{thm:smn}
For a standard acceptable numbering of the partial computable functions there is a total computable \(s:\N^2\to\N\) such that for all \(e,a,x\),
\[
  \varphi_{s(e,a)}(x)\ \simeq_\partial\ \varphi_e(\langle a,x\rangle).
\]
Here \(\simeq_\partial\) means that both computations have the same value or both are undefined. The function \(s\) produces a residual program index even when executing that program on a particular \(x\) diverges. \cite{kleene}
\end{result}
For example, a program indexed by \(e\) that adds its two inputs can be specialized at \(7\). The resulting index computes \(x\mapsto 7+x\). If \(e\) indexes an interpreter and \(a\) encodes a source program, specialization yields code for execution on the remaining input. This is the semantic equation used in the first Futamura projection. A reduction in running time requires a separate performance argument. \cite{jones}

\begin{result}{Lawvere's diagonal fixed-point theorem}{thm:diagonal}
In a category with finite products, suppose \(u:P\times P\to B\) represents every arrow \(h:P\to B\) on global points, meaning that for each \(h\) there is \(p:1\to P\) with \(h(x)=u(p,x)\) for every global \(x:1\to P\). Then every endomorphism \(t:B\to B\) has a global fixed point. \cite{diagonal}
\end{result}
Apply the hypothesis to \(h(x)=t(u(x,x))\), and evaluate at its representing point \(p\). Then \(u(p,p)=t(u(p,p))\). In sets, Boolean negation has no fixed point, so a total Boolean table on \(P\times P\) cannot enumerate every predicate on \(P\) in this sense. The same calculation rules out a total computable Boolean evaluator enumerating all total computable predicates on \(\N\), since its negated diagonal would itself be a total computable predicate. Program codes support universal \emph{partial} evaluation. A canonical bidual reconstruction of raw programs would require further structure.

\topicsection{Self-interpretation}{A metacircular interpreter}\label{sec:self}
\lead{An interpreter is metacircular when its defining program belongs to the language it interprets. A direct test executes the interpreter on the representation of another execution of itself.}

Use a first-order Lisp fragment with symbols and finite proper lists as values. A program \(P=(D,e)\) consists of a finite table of named, possibly mutually recursive functions and a closed main expression. Each definition has a distinct nonreserved name and a list of distinct parameters. Expressions are variables, \code{quote}, \code{if}, primitive applications, and calls to named functions of the declared arity. Arguments are evaluated from left to right. Only the selected branch of \code{if} is evaluated, and the empty list is the only false value. The primitives are \code{cons}, \code{head}, \code{tail}, a nonempty-list test \code{pair}, and structural equality \code{eq}. The operations \code{head} and \code{tail} require a nonempty list. The second operand of \code{cons} must be a proper list. A call binds its parameters to the argument values in a fresh environment. Quoted data use exactly the same list representation as program syntax.

The listing is the entry point and dispatch function of the supplied interpreter. An environment is an association list. \code{ev-form} handles quotation and branching before evaluating the arguments of an ordinary call. \code{apply-op} dispatches a primitive or uses the definition table and a fresh parameter environment to evaluate a named function body. The source bundle contains all nine function definitions. \cite{mccarthy,sicp}

{\small
\begin{verbatim}
(ev (expr env defs)
  (if (pair expr)
      (ev-form (head expr) (tail expr) env defs)
      (lookup-value expr env)))

(run (program)
  (ev (head (tail program)) '() (head program)))
\end{verbatim}
}
Here \code{'()} abbreviates the literal empty list. The outer execution of this list-processing language is supplied by a Python bootstrap. The code of \code{run}, \code{ev} and their seven auxiliary functions is written in the same Lisp fragment as the programs passed to \code{run}.

\begin{result}{Operational correctness of the displayed self-interpreter}{thm:self}
Let \(D_E\) be the bundled Lisp evaluator's definition table. For a closed, well-formed program \(P\) in the fragment, set \(P^{[0]}=P\) and let \(P^{[n+1]}\) consist of \(D_E\) and the expression \(\mathsf{run}(\mathsf{quote}(P^{[n]}))\). For any datum \(v\) and finite \(n\),
\[
 P^{[n]}\Downarrow v\quad\Longleftrightarrow\quad P\Downarrow v .
\]
The relation \(\Downarrow\) means a finite successful execution under the rules above, with unbounded mathematical resources. The claim concerns values and definedness.
\end{result}
The one-layer invariant is that \code{ev} applied to a tree, an environment and a table returns exactly the value of the corresponding object-language judgment. Variable lookup and quotation give the base cases. For \code{if}, both evaluations use the same test value and selected branch. For a named call, \code{ev-list} produces the argument values in order and \code{bind} pairs those values with the formal parameters. The recursive call then uses the original body. These clauses give induction on a successful object derivation and inversion of any successful evaluator derivation. Iteration gives the displayed statement for finite \(n\). Neither direction assigns a value to a divergent computation.

\plate{fig:self}{\figself}{For the recursive list-append example, \(P^{[1]}\) contains the evaluator applied to the original program as data. The next layer takes that whole evaluator program as data. The three values in the diagram were obtained by execution.}

\subhead{A trace and a control case}
For \code{(append '(a b) '(c))}, recursive evaluation reduces the first list to \code{(b)} and then to \code{()}. The base case returns \code{(c)}. The two pending \code{cons} operations produce \code{(b c)} and \code{(a b c)}. Quoting the entire call instead returns the unevaluated application tree at every tested depth. A third test evaluates a true conditional with \code{(head '())} in its unused branch. It returns \code{t} at each depth. This checks that the interpreter respects the evaluation rule for conditionals as well as the final value of a recursive call. The source bundle reproduces the nine executions with \code{python3 examples/run.py}.

The categorical comparison concerns evaluation with an explicit representation of the expression. Self-interpretation furnishes an equality of behaviors after inserting an evaluator layer. The equality concerns outputs of evaluation, while the distinct trees remain available as data. In a higher-order metacircular evaluator a procedure value also contains its defining environment, and application extends that environment with argument bindings. This extra datum implements lexical scope. The first-order example makes the self-interpretation equation observable using only named functions and list data. \cite{sicp}



\topicsection{Categorical logic}{Models in a varying topos}\label{sec:topos}
\lead{A geometric theory has a classifying topos. Each model in a given base topos corresponds to a morphism into the classifier.}

A Grothendieck topos is a category equivalent to sheaves of sets on a site. Examples include \(\Set\) and sheaves \(\Sh(X)\) on a space. A geometric formula uses finite conjunctions, set-indexed disjunctions and existential quantification, starting with atomic formulas. A geometric theory \(T\) is axiomatized by sequents between such formulas in context. Use a small signature and a set of axioms.

A geometric morphism \(f:\Ecat\to\Bcat\) has an inverse-image functor \(f^*:\Bcat\to\Ecat\) preserving finite limits and admitting a right adjoint. Since \(f^*\) is also a left adjoint, it preserves colimits. These properties permit pullback of geometric models and their homomorphisms. For the classifying topos \(\Bcat_T\), let \(U_T\) be its universal model. \cite{caramello}

\begin{result}{Classification of geometric models}{thm:classifying}
For a small geometric theory \(T\) there are a Grothendieck topos \(\Bcat_T\) and a model \(U_T\) in it such that, for every Grothendieck topos \(\Ecat\),
\[
 \Geom(\Ecat,\Bcat_T)\simeq\Mod_T(\Ecat),\qquad f\longmapsto f^*U_T .
\]
This is an equivalence of categories, pseudonatural in \(\Ecat\). The pair \((\Bcat_T,U_T)\) is determined up to equivalence compatible with the universal model. \cite{caramello}
\end{result}

\subhead{One proposition, with no axioms}
A model of one propositional symbol in \(\Ecat\) is a subobject of its terminal object \(1\), called a subterminal. In \(\Set\) there are two possibilities up to isomorphism. In \(\Sh(X)\) the subterminals correspond to all opens of \(X\). The classifier is \(\Sh(\Sigma)\) for the Sierpiński space \(\Sigma=\{0,1\}\) with opens \(\varnothing,\{1\},\Sigma\). The characteristic map \(\chi_U:X\to\Sigma\) of an open \(U\) is continuous because the inverse image of \(\{1\}\) is \(U\). \cite{sierpinski}

\subhead{Changing the base}
If \(k:\Ecat'\to\Ecat\), then \((fk)^*U_T\cong k^*(f^*U_T)\), compatibly with further change of base. We take 2-cells \(f\Rightarrow g\) to have components \(f^*\Rightarrow g^*\). With this convention the displayed equivalence includes model homomorphisms. For the single proposition those morphisms are inclusions of opens. Reflection \(h(x)=-x\) yields the inverse image in Figure~\ref{fig:topos}.

\plate{fig:topos}{\figtopos}{The open endpoint at zero excludes \(0\) on both number lines. The triangle expresses \(\chi_{h^{-1}U}=\chi_U\circ h\). Passing to sheaves gives an instance of pseudonaturality of the classifying equivalence.}
\aside{Extent of this reconstruction.}{The functor of models in \emph{all} base topoi determines \(\Bcat_T\) up to equivalence by bicategorical Yoneda. Theories with equivalent classifying topoi are Morita-equivalent. This is representation in the base variable. A second representing variable and invertible comparisons would be additional data for a dual equivalence. \cite{caramello}}

For example, add a new predicate \(Q\) to the theory of one proposition \(P\) with axioms \(P\vdash Q\) and \(Q\vdash P\). In each base topos these are inclusions in both directions between subobjects of \(1\), hence the subobjects coincide. Forgetting \(Q\) is an equivalence of model categories compatible with every inverse image. The two presentations have equivalent classifying topoi. The term \emph{Morita equivalence of theories} refers to this invariance. Section~\ref{sec:morita} gives the different variance and hypotheses of Morita duality for modules.

\topicsection{Presheaves and copresheaves}{Isbell conjugacy}\label{sec:isbell}
\lead{The homs of a small category provide a pairing even in the absence of a chosen object of scalar values inside that category.}

A presheaf \(P:\Acat^{\op}\to\Set\) assigns a set to each object and restricts along incoming arrows. A copresheaf \(Q:\Acat\to\Set\) acts in the forward direction. Write \(h_b=\Acat(-,b)\) and \(h^a=\Acat(a,-)\). A natural transformation is a family of maps commuting with the action of every arrow. Isbell's formulas are
\[
 P^\uparrow(b)=\Nat(P,h_b),\qquad
 Q^\downarrow(a)=\Nat(Q,h^a).
\]
An arrow \(b\to b'\) acts on the first set by postcomposition, so \(P^\uparrow\) is a copresheaf. The second formula gives a presheaf. \cite{isbell,avery}

An element of the common pairing is a natural family
\[
 P(a)\times Q(b)\longrightarrow\Acat(a,b).
\]
Fixing an input of \(Q(b)\) gives a transformation \(P\to h_b\). Fixing an input of \(P(a)\) gives one \(Q\to h^a\). Requiring naturality in both \(a\) and \(b\) gives
\[
 \Nat(Q,P^\uparrow)\cong\Nat(P,Q^\downarrow).
\]
For \(p\in P(a)\), the comparison \(P\to P^{\uparrow\downarrow}\) sends \(p\) to the operation \(\alpha\mapsto\alpha_a(p)\), with \(\alpha:P\to h_b\) and \(b\) variable. This is the evaluation map in this example.

\begin{result}{Isbell conjugacy}{thm:isbell}
For a small category \(\Acat\), the assignments \(P^\uparrow,Q^\downarrow\) form a contravariant adjunction between \([\Acat^{\op},\Set]\) and \([\Acat,\Set]\). On the full subcategories where the canonical maps to the double conjugates are isomorphisms, conjugation is an anti-equivalence. Moreover \(h_x^\uparrow\cong h^x\) and \((h^x)^\downarrow\cong h_x\) naturally in \(x\). \cite{isbell,avery}
\end{result}

\plate{fig:isbell}{\figisbell}{An arrow \(g:x\to b\) acts on every \(f:a\to x\) by composition. This identifies \(\Nat(h_x,h_b)\) with \(\Acat(x,b)\) by Yoneda.}

\subhead{Which presheaves are reflexive?}
The full category of reflexive presheaves is the \emph{reflexive completion} of \(\Acat\). The Yoneda embedding of \(\Acat\) factors through it by Theorem~\ref{thm:isbell}. The two ambient functor categories can also contain nonreflexive objects. For the category with one object and only its identity, a presheaf is a set \(S\), its conjugate is the singleton \(\Hom(S,1)\), and its double conjugate is again a singleton. For a two-element \(S\), the comparison has the same value at both elements. \cite{avery}

\subhead{Cuts in a partially ordered set}
Regard a poset as enriched in truth values. Its hom-value is the assertion \(a\le b\). Presheaves are lower sets and copresheaves are upper sets. Conjugation takes a lower set to all its upper bounds and an upper set to all its lower bounds. The closed lower sets form the Dedekind--MacNeille completion. For two incomparable elements, the common upper bounds of \(\{p,q\}\) form the empty set, whose lower bounds are all of \(\{p,q\}\). Both endpoints in Figure~\ref{fig:cut} are fixed. This recovers the relation calculation of Section~\ref{sec:polarity} from order as a hom-value. \cite{avery}

\plate{fig:cut}{\figcut}{In the two-element antichain \(p,q\), the four closed lower sets are the two principal ones together with a new bottom and a new top. Edges here indicate a covering inclusion.}

The same calculation adds a nonprincipal cut to the rational order. Let \(L=\{q\in\Q:q<\sqrt{2}\}\). Its upper bounds in \(\Q\) are precisely the rationals greater than \(\sqrt{2}\), and their lower bounds are precisely \(L\). Thus \(L\) is fixed by double conjugation. A principal lower set \(\{q:q\le r\}\) for rational \(r\) has a largest element. The set \(L\) has none. Reflexive completion can therefore contain objects beyond the original representables.

\topicsection{Enrichment and linear duality}{Changing the values of a pairing}\label{sec:enrichment}
\lead{Replacing sets by vector spaces changes the meaning of a natural transformation. Replacing the hom-functor by a kernel changes which two types of inputs can be paired.}

Let \(\Vcat\) be a complete and cocomplete symmetric monoidal closed category, and \(\Acat,\Bcat\) small \(\Vcat\)-categories. In such a category the maps between two objects form an object of \(\Vcat\). A kernel (or profunctor in this variance convention) is a \(\Vcat\)-functor \(K:\Acat^{\op}\otimes\Bcat\to\Vcat\). For \(X:\Acat^{\op}\to\Vcat\), \(Y:\Bcat\to\Vcat\) define
\[
\begin{aligned}
 X^\uparrow(b)&=\underline{\Nat}(X,K(-,b)),\\
 Y^\downarrow(a)&=\underline{\Nat}(Y,K(a,-)).
\end{aligned}
\]
Here \(\underline{\Nat}\) is the enriched object of natural transformations, computed by an end. \cite{kelly,avery}

The common pairing consists of natural maps \(X(a)\otimes Y(b)\to K(a,b)\), expressed internally in \(\Vcat\). The kernel \(K\) is covariant in \(b\). The resulting pairing on the \emph{functor} inputs \(X,Y\) is contravariant in both, as required by Section~\ref{sec:criterion}.

Take \(\Vcat=\lcat{Vect}_k\) and the one-object \(k\)-linear category whose endomorphism algebra is \(k\). Presheaves and copresheaves here are right and left \(k\)-modules. Since \(k\) is a field, both are vector spaces. For its hom-kernel the two formulas give the algebraic dual \(V^*=\Hom_k(V,k)\). \cite{avery,axler}

\begin{result}{Enriched Isbell adjunction for a kernel}{thm:enriched}
Under the size, completeness and closedness assumptions above, put \((X\boxtimes Y)(a,b)=X(a)\otimes Y(b)\). There are natural isomorphisms \emph{in} \(\Vcat\)
\[
 \underline{\Nat}(Y,X^\uparrow)
 \ \cong\ \underline{\Nat}(X\boxtimes Y,K)
 \ \cong\ \underline{\Nat}(X,Y^\downarrow).
\]
They induce an enriched contravariant adjunction and hence duality on the objects whose evaluation comparisons are invertible. The isomorphisms follow by applying tensor--hom adjunction under the ends defining the three hom-objects. \cite{kelly,avery}
\end{result}
For example, when \(\Vcat=\lcat{Vect}_k\), a scalar multiple or sum of bilinear pairings corresponds to the same scalar multiple or sum of the associated linear maps. An isomorphism of hom-objects includes these linear operations. A bijection of underlying sets alone would omit this structure.

\plate{fig:sequences}{\figsequences}{For \(V=\bigoplus_{n\ge 0}\FF_2\), \(V^*=\prod_{n\ge 0}\FF_2\). The displayed \(v=e_0+e_2\) evaluates a sequence by adding entries \(0\) and \(2\) modulo \(2\). The bottom row has infinite support.}

\subhead{What goes wrong in infinite dimension?}
Every evaluation at a \(v\in V\) uses finitely many coordinates. Choose a linear form \(\lambda\) on the product which is zero on its subspace of finite-support sequences and takes value \(1\) on the constant sequence \(\mathbf 1\). This is consistent since \(\mathbf 1\) has infinite support. Extend from the span of that subspace and \(\mathbf 1\) by basis extension. If \(\lambda=\ev_v\), then \(\lambda(e_n)=0\) for every \(n\) would give \(v_n=0\) for every \(n\), contradicting \(\lambda(\mathbf1)=1\). Thus the canonical \(V\to V^{**}\) misses a specified kind of functional.

\subhead{Finiteness and iteration}
For finite-dimensional \(V\), evaluation \(V\to V^{**}\) is injective and both dimensions equal \(\dim V\), so it is an isomorphism. It is independent of a basis. An identification \(V\cong V^*\) generally requires extra data such as a nondegenerate bilinear form. \cite{axler}

Under the usual axiom of choice the same finite-support obstruction applies to any infinite basis. Since \(V^{**}\) above is itself infinite-dimensional, its map to its double dual also fails to be surjective. This precludes idempotence of the double-dual monad on vector spaces. The closure argument in Section~\ref{sec:polarity} used antisymmetry of the inclusion order.


\topicsection{Bimodules and exact sequences}{Morita duality for modules}\label{sec:morita}
\lead{For modules over different rings, a bimodule specifies where the values of a pairing lie. Its two actions determine which maps may occur in the double dual.}

Let \(R,S\) be unital rings and let \({}_R U_S\) be a bimodule. All modules are unital. For a left \(R\)-module \(M\) and a right \(S\)-module \(N\), define
\[
 D_RM=\Hom_R(M,U),\qquad D_SN=\Hom_{S^{\op}}(N,U).
\]
The first is a right \(S\)-module by \((fs)(m)=f(m)s\), and the second is a left \(R\)-module by \((rg)(n)=r g(n)\). To see the common pairing, assign \(b(m,n)\in U\) additively in each input and require
\[
 b(rm,n)=r\,b(m,n),\qquad b(m,ns)=b(m,n)s.
\]
Holding \(n\) fixed gives \(N\to D_RM\). Holding \(m\) fixed gives \(M\to D_SN\). These are the two representations in Theorem~\ref{thm:representation}. In particular \(\eta_M:M\to D_SD_RM\) sends \(m\) to the map \(f\mapsto f(m)\).

\begin{result}{Morita duality induced by a bimodule}{thm:morita}
Suppose the action maps
\[
 R\xrightarrow{\;\sim\;}\End_{S^{\op}}(U),\qquad
 S^{\op}\xrightarrow{\;\sim\;}\End_R(U)
\]
are ring isomorphisms, and \(U\) is an injective cogenerator both as a left \(R\)-module and as a right \(S\)-module. Then \(D_R,D_S\) give an exact contravariant equivalence between the full categories of \(U\)-reflexive left \(R\)-modules and \(U\)-reflexive right \(S\)-modules. These categories contain their regular modules and all finitely generated modules on their respective sides. They are closed under submodules, quotients and finite direct sums. \cite{morita,muller}
\end{result}
The two action isomorphisms are called faithful balance. For instance, evaluation for \({}_R R\) identifies with the left-action map \(R\to\End_{S^{\op}}(U)\). Injectivity means that a map into \(U\) from a submodule extends across its inclusion. Cogeneration means that for every nonzero element of a module there is a map to \(U\) nonzero on that element. These conditions give exact dual functors and injective comparisons. Since a finitely generated module is a quotient of a finite direct sum of regular modules, the finite-generation assertion follows from the closure properties. The equivalence is between the full reflexive classes. The complete-local example below gives a finitely generated input whose dual has infinite length.

\subhead{A noncommutative calculation}
Take \(A=\left(\begin{smallmatrix} k&k\\0&k\end{smallmatrix}\right)\) over a field \(k\) and \(U=D_kA=\Hom_k(A,k)\). Use \((a\lambda b)(x)=\lambda(bxa)\). The map \(f\mapsto[m\mapsto f(m)(1)]\) identifies \(\Hom_A(M,U)\) with the ordinary vector-space dual \(D_kM\) equipped with the right action \((\ell a)(m)=\ell(am)\). Its inverse sends \(\ell\) to \(m\mapsto[x\mapsto\ell(xm)]\). The right-module calculation is symmetric. Exactness and separation now follow from field-linear duality. Finite dimensionality of \(A\) gives \(A\cong D_kD_kA\), and thus both balance isomorphisms.

On \(M=k^2\) use left multiplication on columns. For \(a=\left(\begin{smallmatrix}r&t\\0&s\end{smallmatrix}\right)\), the right action on the dual row is
\[
 (\alpha,\beta)a=(r\alpha,\ t\alpha+s\beta).
\]
Write \(S_1=ke_1\) and \(S_2=M/S_1\). Restricting a row to \(S_1\) gives its first coordinate \(\alpha\). Its kernel is the set \((0,\beta)\), which is \(D_k S_2\). The extension is nonsplit. Any proposed complementary line generated by \(e_2+ce_1\) is sent to \(e_1\) by the off-diagonal matrix unit, so it cannot be a submodule.

\plate{fig:morita}{\figmorita}{Dualizing the inclusion of the first coordinate line gives a surjection by restriction. A row in its kernel factors uniquely through the quotient \(M\to S_2\). Exactness and arrow reversal are both visible in coordinates.}

\subhead{A complete local ring}
\begin{result}{Matlis duality}{thm:matlis}
For a commutative complete Noetherian local ring \((R,\mathfrak m,k)\), take \(E\) to be the injective hull of its residue field. The functor \(\Hom_R(-,E)\) gives an anti-equivalence between finitely generated \(R\)-modules and Artinian \(R\)-modules. Evaluation is an isomorphism on both classes, and \(\End_R(E)\cong R\). \cite{matlis}
\end{result}
For \(R=k[[t]]\), take \(E=k((t))/k[[t]]\). This divisible module over a discrete valuation ring is injective, and any nonzero submodule meets the line \(k\,t^{-1}\bmod R\) by multiplication by a power of \(t\). Thus \(E\) is the injective hull of \(k\). The dual of \(R/(t^n)\), for \(n\ge1\), is determined by the possible images of \(1\). They are the elements killed by \(t^n\), namely \(t^{-n}R/R\). The assignment \(\bar a\mapsto t^{-n}a+R\) identifies this module with \(R/(t^n)\). The same functor exchanges \(R\) and \(E\).

\subhead{The two uses of Morita equivalence}
A Morita \emph{equivalence of rings} is a covariant equivalence of module categories. For example, \(k\)-vector spaces correspond to left \(M_n(k)\)-modules by \(V\mapsto V^n\), with inverse \(W\mapsto e_{11}W\). A map \(V\to V'\) gives a map \(V^n\to(V')^n\) in the same direction. Morita \emph{duality of modules} uses the two contravariant Hom functors above. In geometric logic, Morita equivalence of theories identifies their classifying topoi as in Section~\ref{sec:topos}. The specified categories and the direction on arrows determine the meaning in each context. \cite{morita,moritaequiv,caramello}



\topicsection{Higher duality}{From hom-sets to mapping spaces}\label{sec:higher}
\lead{Stone and Pontryagin duality use ordinary categories. Their common adjunction criterion has a higher version that compares entire spaces of maps and the homotopies between them.}

For locally small \((\infty,1)\)-categories let \(\Space\) denote the \(\infty\)-category of spaces. Given \(P:\Ccat^{\op}\times\Dcat^{\op}\to\Space\), suppose both partial functors are representable. The higher Yoneda lemma supplies functorial representatives and equivalences
\[
 \Map_{\Dcat}(d,Fc)\simeq P(c,d)\simeq\Map_{\Ccat}(c,Gd)
\]
natural in both variables. The choices of representing objects \emph{with their representations} form contractible spaces. A point of a mapping space plays the role of a map. Its paths and higher simplices specify the homotopies relevant to naturality. \cite{kerodon,riehlverity}

\plate{fig:mapspace}{\figmapspace}{The mapping space \(\Map_{\Space}(*,S^1)\) is \(S^1\). It has one component and fundamental group \(\Z\). A set with one element has the same component count and trivial fundamental group.}
Equality of component sets loses the winding information in Figure~\ref{fig:mapspace}. An equivalence of mapping spaces includes it. The triangles of an adjunction commute up to the specified homotopies, with the requisite higher compatibility. \cite{hatcher,kerodon}

\begin{result}{Two-sided representability in higher categories}{thm:higher}
For locally small \((\infty,1)\)-categories \(\Ccat,\Dcat\), a space-valued \(P:\Ccat^{\op}\times\Dcat^{\op}\to\Space\) with both partial functors representable determines an adjunction \(F:\Ccat\rightleftarrows\Dcat^{\op}:G\). On the full subcategories where the evaluation maps are equivalences, its restriction is an adjoint equivalence. The mapping-space equivalences must be natural as maps of functors to spaces. \cite{kerodon,riehlverity}
\end{result}

\subhead{Spanier--Whitehead duality}

A spectrum is an object of stable homotopy theory. Suspension \(\Sigma\) is invertible there. Write \(\mathbb S\) for the sphere spectrum, \(\wedge\) for the smash product, and \(\mathsf F(X,Y)\) for the function spectrum. The latter represents maps from a smash product. Set \(DX=\mathsf F(X,\mathbb S)\). The mapping space
\[
 P(X,Y)=\Map_{\Sp}(X\wedge Y,\mathbb S)
\]
is represented both by \(DX\) and by \(DY\) in the corresponding variables. A finite spectrum is a retract of a finite cell spectrum. On these objects, \(D\) has the following additional property.

\begin{result}{Spanier--Whitehead duality for finite spectra}{thm:spectra}
For finite \(X\), the evaluation map induces a natural equivalence of spectra
\(DX\wedge Y\simeq\mathsf F(X,Y)\) for every spectrum \(Y\), and \(X\to DDX\) is an equivalence. The dual sends suspensions to desuspensions and cofiber sequences of finite spectra to fiber sequences in reverse order. \cite{sw,ha}
\end{result}
For instance \(X=\mathbb S\vee\Sigma^2\mathbb S\) has \(DX\simeq\mathbb S\vee\Sigma^{-2}\mathbb S\). Mapping a finite wedge into the sphere gives a finite product of function spectra, and finite products and coproducts agree in spectra. Thus the two cell degrees change from \(0,2\) to \(0,-2\).

\plate{fig:moore}{\figmoore}{For a prime \(p\), define \(M_p=\cofib(p:\mathbb S\to\mathbb S)\). Applying \(D\) gives a fiber sequence, read from right to left on the lower row. Thus \(DM_p\simeq\Sigma^{-1}M_p\).}
For a sphere \(\Sigma^n\mathbb S\), dualization gives \(\Sigma^{-n}\mathbb S\). For \(M_p\), mapping a pushout defining the cofiber into \(\mathbb S\) gives a pullback defining the fiber. In a stable category the fiber of a map is the desuspension of its cofiber. Applying \(D\) twice restores both the sphere degree and the Moore spectrum. \cite{sw,ha}

\aside{Higher Isbell conjugacy.}{For a small \(\infty\)-category \(\Acat\), use \(K(a,b)=\Map_{\Acat}(a,b)\). In Section~\ref{sec:isbell} replace each set of natural transformations by the mapping space in the appropriate functor \(\infty\)-category. The common pairing is the space of coherent transformations \(P(a)\times Q(b)\to K(a,b)\). Representable presheaves still correspond to representable copresheaves by higher Yoneda. \cite{kerodon,riehlverity}}

\topicsection{Scope of the comparison}{What the examples have in common}\label{sec:comparison}
\lead{The invariant assertion concerns maps in two variables. The hypotheses for reconstruction belong to each individual theorem.}
{\small\setlength{\tabcolsep}{4pt}\renewcommand{\arraystretch}{1.17}
\setlength{\LTpre}{5pt}\setlength{\LTpost}{5pt}
\begin{longtable}{@{}>{\RaggedRight\arraybackslash}p{.218\linewidth}>{\RaggedRight\arraybackslash}p{.333\linewidth}>{\RaggedRight\arraybackslash}p{\dimexpr.449\linewidth-4\tabcolsep\relax}@{}}
\toprule
\sffamily\bfseries Construction & \sffamily\bfseries Evaluation or pairing & \sffamily\bfseries What can be reconstructed\\ \midrule\endfirsthead
\toprule
\sffamily\bfseries Construction & \sffamily\bfseries Evaluation or pairing & \sffamily\bfseries What can be reconstructed\\ \midrule\endhead
\midrule\endfoot
\bottomrule\endlastfoot
Finite sets & set membership, read along a function & The function is determined by inverse images of singleton subsets.\\
\rowcolor{paperblue} Incidence & truth of \(S\times T\subseteq R\) & Closed row and column sets are opposite complete lattices.\\
Stone & Boolean-valued, continuous evaluations & A Stone space from its clopens, a Boolean algebra from its ultrafilters.\\
\rowcolor{paperblue} Pontryagin & continuous bicharacters \(G\times H\to\Torus\) & Every locally compact Hausdorff abelian group from its double character group.\\
Gelfand & continuous families of complex characters & Compact Hausdorff spaces and commutative unital complex \(C^*\)-algebras, with the conventions of Section~\ref{sec:geometry}.\\
\rowcolor{paperblue} Affine schemes & ring maps \(A\to\Gamma X\) & Affine schemes from their rings of global functions.\\
Satisfaction & \(M\models\varphi\) on a class of models and set of sentences & Deductively closed theories and their model classes.\\
\rowcolor{paperblue} Lawvere theories & tuples of terms on a free algebra & Finite contexts and their finite-rank free algebras.\\
Code as data & \(\mathsf{quote}(e)\), \(\varphi_e(x)\) & An encoded tree has a unique decoding. Distinct trees can compute the same partial function.\\
\rowcolor{paperblue} Self-interpretation & running a quoted program & Inserting an interpreter preserves all successful values, including at finite iterated depth.\\
Classifying topos & inverse image \(f^*U_T\) & The model pseudofunctor on all base topoi determines the classifier up to equivalence.\\
\rowcolor{paperblue} Isbell & natural families \(P(a)\times Q(b)\to\Acat(a,b)\) & Reflexive presheaves and reflexive copresheaves.\\
Enriched / linear & \(\Vcat\)-natural pairings into a kernel & Invertible comparisons. For ordinary algebraic vector duals these are precisely finite-dimensional spaces, classically.\\
\rowcolor{paperblue} Morita & biadditive \(M\times N\to {}_RU_S\) with the two prescribed actions & The two full classes of \(U\)-reflexive modules. For a Morita dualizing bimodule these classes are closed under subquotients.\\
Matlis & \(\Hom_R(-,E)\), with \(E\) the injective hull of the residue field & Finitely generated and Artinian modules over a complete Noetherian local ring.\\
\rowcolor{paperblue} Spanier--Whitehead & \(\Map_{\Sp}(X\wedge Y,\mathbb S)\) & Finite spectra and all maps between them.\\
\end{longtable}}

\subhead{Evaluation before reconstruction}
A simple set-based construction applies even when two variables have different meanings, such as a program and an input. Fix a set \(K\) of possible observations. A \emph{Chu space} over \(K\) is a triple \((A,r,X)\) with an evaluation \(r:A\times X\to K\). A morphism to \((B,s,Y)\) consists of maps \(f:A\to B\) and \(g:Y\to X\) satisfying
\[
                    s(f(a),y)=r(a,g(y)).
\]
For points and subsets this is the inverse-image identity of Section~\ref{sec:opening}. For a homomorphism \(f:G\to H\) and a character \(\chi\) on \(H\), it reads \(\chi(f(x))=(\widehat f\chi)(x)\). In both examples, changing the object or pulling back the test yields the same observation. \cite{pratt,morris}

\begin{result}{Chu transposition}{thm:chu}
The assignment \((A,r,X)\mapsto(X,r^{\mathsf T},A)\), with \(r^{\mathsf T}(x,a)=r(a,x)\), and \((f,g)\mapsto(g,f)\) defines a contravariant involution on the category of Chu spaces over \(K\). Applying it twice returns the entire evaluation, including its row and column labels. \cite{pratt}
\end{result}
For programs, let \(A\) be the set of program trees with one formal input, \(X\) the set of input data and \(K\) the output data with one extra element \(\bot\) for an undefined result. The row of a program is its complete input--output behavior. The column of a datum lists the outputs of all programs on that datum. An interpreter layer with the same behavior leaves every entry in a program's row unchanged. Distinct syntax can have the same row even with every possible input included.

\plate{fig:chu}{\figchu}{The programs \(p\) and \(q\) have bodies \code{x} and \code{(if 't x x)}. The body of \(h\) is \code{'a}. On the symbol inputs \code{a} and \code{b}, the first two rows agree. After transposition they are two equally valued, separately labelled columns. Quoting the bodies still distinguishes the two programs.}

\subhead{Generality and mathematical content}
An anti-equivalence is an equivalence with an opposite category. Two-sided representability is the intrinsic characterization of the corresponding adjunction. The unit and counit test adds reconstruction. Given an anti-equivalence, its hom-pairing always satisfies the characterization. Given an independently specified pairing, representability and invertibility can be difficult theorems. The criterion uses only homs, functors and naturality. The scalars and topologies of individual examples enter through their particular pairings. The classifying topos represents models in the base-topos variable. In computation, quotation reconstructs a tree from its structural encoding, and self-interpretation preserves its partial result. Neither operation supplies a second representation of an evaluation pairing by itself. \cite{porst,kerodon}

\begin{result}{Maximality of the reflexive subcategories}{thm:maximal}
For a given contravariant adjunction \(F:\Ccat\rightleftarrows\Dcat^{\op}:G\), let \(\Ccat_{\mathrm{ref}}\) and \(\Dcat_{\mathrm{ref}}\) consist of the objects at which its canonical comparisons are invertible. These are the largest pair of full subcategories, closed under isomorphism, on which the given functors and comparisons restrict to a dual equivalence. For \((\infty,1)\)-categories the same assertion uses equivalences throughout. \cite{avery,porst,kerodon}
\end{result}
Indeed, the triangle identities place the image of each reflexive object on the opposite reflexive side. Conversely, on any pair of subcategories with the stated restriction, invertibility of the restricted unit and counit forces every object there to be reflexive. For linear and Morita duality this argument identifies the exact question for a module, namely whether evaluation \(m\mapsto(f\mapsto f(m))\) represents every element of its double dual.

\subhead{Dualizing an object under a tensor product}
For a closed symmetric monoidal category and fixed \(K\), the object \([X,K]\) represents the pairing of maps \(X\otimes Y\to K\). Tensor dualizability additionally involves evaluation to the tensor unit and coevaluation from it, satisfying the triangle identities. These conditions have different scope. For example take subsets of a set \(S\), ordered by inclusion, with tensor \(\cap\), unit \(S\), and \(K=\varnothing\). Then \([A,K]=S\setminus A\) and every subset is reflexive. Tensor coevaluation would require \(S\subseteq A\cap A^\vee\), forcing \(A=S\). \cite{kelly,sw}

\aside{Formal scope.}{In any bicategory an adjunction with invertible unit and counit is an adjoint equivalence. To express contravariance internally requires a specified opposite construction or a chosen opposite object. In higher categories the requisite equivalences and naturality are coherent. The pairing criterion expresses exactly this structure for categories and \((\infty,1)\)-categories. Broader uses of the word \emph{duality} require a choice of objects, arrows and comparison data before this criterion has a truth value. \cite{riehlverity,kerodon}}


\par\Needspace{12\baselineskip}\markright{References}
\phantomsection\addcontentsline{toc}{section}{References}
\section*{References}
{\small The article uses classical sets with choice and a change of universe for large functor or model categories. The theorem in Section~\ref{sec:self} concerns the Lisp interpreter supplied with this article. Sources for the other theorems appear below. An AI assistant drafted this anonymous review manuscript, prepared the diagrams and interpreter, and ran the finite checks. The source archive includes build and execution instructions.\par}
\smallskip
\makeatletter
\newenvironment{dualreferences}{\list{\@biblabel{\@arabic\c@enumiv}}{\usecounter{enumiv}\setlength{\labelwidth}{1.45em}\setlength{\labelsep}{.4em}\setlength{\leftmargin}{1.85em}\setlength{\itemindent}{0pt}\setlength{\itemsep}{2.4pt}\setlength{\parsep}{0pt}\setlength{\topsep}{0pt}}}{\endlist}
\makeatother
\begingroup\linespread{1.00}\small\RaggedRight
\begin{dualreferences}
\bibitem{sicp} H. Abelson and G. J. Sussman, with J. Sussman. \emph{Structure and Interpretation of Computer Programs}, 2nd ed. MIT Press, 1996. §4.1, the metacircular evaluator. \href{https://mitp-content-server.mit.edu/books/content/sectbyfn/books_pres_0/6515/sicp.zip/full-text/book/book-Z-H-26.html}{Book section.}
\bibitem{avery} T. Avery and T. Leinster. Isbell conjugacy and the reflexive completion. \emph{Theory Appl. Categ.} 36 (2021), 306--347. See §§2--6 for the construction and examples. \href{https://arxiv.org/abs/2102.08290}{Article.}
\bibitem{axler} S. Axler. \emph{Linear Algebra Done Right}, 4th ed. Springer, 2024. §3F develops linear functionals and the dual map. \href{https://linear.axler.net/LADR4e.pdf}{Open book.}
\bibitem{caramello} O. Caramello. \emph{The unifying theory of toposes}, technical overview, sections on geometric theories, universal models and Morita equivalence. \href{https://www.oliviacaramello.com/Unification/TechnicalExplanation.html}{Author's exposition.}
\bibitem{kleene} J. Gallier. Elementary recursive function theory, §9.1, Theorem~9.1 on acceptable indexings and the parameter theorem. University of Pennsylvania, CIS 2620. \href{https://www.seas.upenn.edu/~cis2620/notes/cis262sl10.pdf}{Lecture notes.}
\bibitem{ganter} B. Ganter and R. Wille. \emph{Formal Concept Analysis: Mathematical Foundations}. Springer, 1999. Ch.~1 develops the derivations associated to an incidence relation. \href{https://link.springer.com/book/10.1007/978-3-642-59830-2}{Publisher.}
\bibitem{goguen} J. A. Goguen and R. M. Burstall. Institutions: abstract model theory for specification and programming. \emph{J. ACM} 39 (1992), 95--146. \href{https://courses.grainger.illinois.edu/cs522/sp2016/InstitutionsAbstractModelTheory.pdf}{Article.}
\bibitem{hatcher} A. Hatcher. \emph{Algebraic Topology}. Cambridge University Press, 2002. §1.1, Theorem 1.7, on winding number and the fundamental group of the circle. \href{https://pi.math.cornell.edu/~hatcher/AT/AT.pdf}{Author's text.}
\bibitem{gelfand} C. Heunen, N. P. Landsman, B. Spitters and S. Wolters. The Gelfand spectrum of a noncommutative \(C^*\)-algebra: a topos-theoretic approach. \emph{J. Aust. Math. Soc.} 90 (2011), 39--52. §1 recalls the classical commutative duality used here. \href{https://arxiv.org/abs/1010.2050}{Article.}
\bibitem{isbell} J. R. Isbell. Adequate subcategories. \emph{Illinois J. Math.} 4 (1960), 541--552. \href{https://webhomes.maths.ed.ac.uk/~tl/docs/Isbell_Adequate_subcategories.pdf}{Original article.}
\bibitem{jones} N. D. Jones. An introduction to partial evaluation. \emph{ACM Comput. Surv.} 28 (1996), 480--503. Specializing interpreters and the Futamura projections. \href{https://www.cs.ucdavis.edu/~devanbu/teaching/260/jones-survey.pdf}{Article.}
\bibitem{kelly} G. M. Kelly. \emph{Basic Concepts of Enriched Category Theory}. Cambridge University Press, 1982. Reprinted in \emph{Repr. Theory Appl. Categ.} 10 (2005). Chs.~1--2 on enriched homs and functor categories. \href{https://www.sas.rochester.edu/mth/sites/doug-ravenel/otherpapers/kelly-book.pdf}{Open reprint.}
\bibitem{lawvere} F. W. Lawvere. Functorial semantics of algebraic theories. \emph{Proc. Natl. Acad. Sci. USA} 50 (1963), 869--872. \href{https://www.sas.rochester.edu/mth/sites/doug-ravenel/otherpapers/lawvere.pdf}{Original article.}
\bibitem{diagonal} F. W. Lawvere. Diagonal arguments and cartesian closed categories. \emph{Lecture Notes in Math.} 92 (1969), 134--145. Reprinted with commentary, \emph{Repr. Theory Appl. Categ.} 15 (2006). \href{https://tac.mta.ca/tac/reprints/articles/15/tr15abs.html}{Reprint.}
\bibitem{kerodon} J. Lurie. \emph{Kerodon}. §6.2.1, adjunctions of \(\infty\)-categories, and §8.2.5, representability of couplings. \href{https://kerodon.net/tag/02EJ}{Adjunctions.} \href{https://kerodon.net/tag/045R}{Couplings.}
\bibitem{ha} J. Lurie. \emph{Higher Algebra}. 2017. §1.1 on stable \(\infty\)-categories, fibers, cofibers and suspension. \href{https://people.math.harvard.edu/~lurie/papers/HA.pdf}{Author's text.}
\bibitem{marker} D. Marker. \emph{Model Theory: An Introduction}. Springer, 2002. Chs.~2--3 on first-order consequence, completeness and quantifier elimination for dense linear orders. \href{https://link.springer.com/book/10.1007/b98860}{Publisher.}
\bibitem{mccarthy} J. McCarthy. Recursive functions of symbolic expressions and their computation by machine, Part I. \emph{Commun. ACM} 3 (1960), 184--195. See §3 on the universal S-function. \href{https://www.cs.cmu.edu/~crary/819-f09/McCarthy60.pdf}{Article.}
\bibitem{moritaequiv} MIT OpenCourseWare. Categories and Morita equivalence. \emph{18.706 Noncommutative Algebra}, Spring 2023, Lecture 7, Theorem~7.3 and the matrix-ring example. \href{https://ocw.mit.edu/courses/18-706-noncommutative-algebra-spring-2023/mit18_706_s23_lec07.pdf}{Lecture notes.}
\bibitem{morita} K. Morita. Duality for modules and its applications to the theory of rings with minimum condition. \emph{Sci. Rep. Tokyo Kyoiku Daigaku, Sect. A} 6 (1958), 83--142. \href{https://www.jstor.org/stable/43698445}{Original article.}
\bibitem{morris} S. A. Morris. \emph{Pontryagin Duality and the Structure of Locally Compact Abelian Groups}. Cambridge University Press, 1977. Chs.~4--7. \href{https://www.cambridge.org/core/books/abs/pontryagin-duality-and-the-structure-of-locally-compact-abelian-groups/duality-theorem-and-the-principal-structure-theorem/E850D3614B6D950DED429CEE3C872E88}{Duality theorem.} \href{https://www.cambridge.org/core/books/abs/pontryagin-duality-and-the-structure-of-locally-compact-abelian-groups/consequences-of-the-duality-theorem/142FFEE4237337847994A87D7D17A82F}{Annihilator theorem.}
\bibitem{muller} B. J. Müller. On Morita duality. \emph{Canad. J. Math.} 21 (1969), 1338--1347. The opening characterization gives the bimodule hypotheses and closure properties. \href{https://www.cambridge.org/core/journals/canadian-journal-of-mathematics/article/on-morita-duality/56C03D99BFBDA0B6144BB26E6151C9E6}{Article.}
\bibitem{porst} H.-E. Porst and W. Tholen. Concrete dualities. In \emph{Category Theory at Work}, Heldermann, 1991, 111--136. Dual adjunctions and their restriction in classical examples. \href{https://www.heldermann.de/R\%26E/RAE18/ctw07.pdf}{Chapter.}
\bibitem{pratt} V. Pratt. \emph{Chu Spaces}. School on Category Theory and Applications, University of Coimbra, 1999. Ch.~1 on evaluations, transforms and transpose. \href{https://ncatlab.org/nlab/files/Pratt-ChuSpaces.pdf}{Lecture notes.}
\bibitem{sw} D. C. Ravenel. \emph{Nilpotence and Periodicity in Stable Homotopy Theory}. Princeton University Press, 1992. §5.2, especially Theorem~5.2.1 on the Spanier--Whitehead dual. \href{https://www.sas.rochester.edu/mth/sites/doug-ravenel/mybooks/nilpb2020.pdf}{Author's text.}
\bibitem{riehlverity} E. Riehl and D. Verity. \emph{Elements of \(\infty\)-Category Theory}. Cambridge University Press, 2022. Chs.~2, 4--5 and 7--8 on adjunctions, Yoneda and modules. \href{https://emilyriehl.github.io/files/elements.pdf}{Authors' text.}
\bibitem{stacks} The Stacks Project Authors. Schemes, Lemma 26.6.4, Tag 01I1. Morphisms to an affine scheme and homomorphisms on global sections. \href{https://stacks.math.columbia.edu/tag/01I1}{Lemma.}
\bibitem{matlis} The Stacks Project Authors. Dualizing complexes, Proposition 47.7.8, Tag 08Z9. Matlis duality for a complete Noetherian local ring. \href{https://stacks.math.columbia.edu/tag/08Z9}{Proposition.}
\bibitem{sierpinski} J. Sterling and R. Harper. Logical relations as types: proof-relevant parametricity for program modules. \emph{J. ACM} 68 (2021). On the Sierpiński topos and its open sets. \href{https://www.cs.cmu.edu/~rwh/papers/lrat/jacm.pdf}{Article.}
\bibitem{stone} M. H. Stone. The theory of representations for Boolean algebras. \emph{Trans. Amer. Math. Soc.} 40 (1936), 37--111. \href{https://www.ams.org/tran/1936-040-01/S0002-9947-1936-1501865-8/S0002-9947-1936-1501865-8.pdf}{Original article.} \href{https://www.jstor.org/stable/1989664}{JSTOR.}
\end{dualreferences}
\endgroup


\end{document}

End of manuscript · Back to top ↑