This is the ninth post in a series, continuing TDMO1, TDMO2, TDMO3, TDMO4, TDMO5, TDMO6, TDMO7 and TDMO8. This series builds up to an explanation of the concept of form in the paper Graph-Based Logic and Sketches by Atish Bagchi and me. This post tells how to sketch cartesian closed categories and gives an example of a form.
Cartesian closed categories
A Cartesian closed category is a category with the following structure:
-
has binary products.
- For each pair of objects
and
of
, there is an object
and an arrow
.
is an exponential object.
- For each triple of objects
,
and
of
, there is a map
such that for every arrow
, the diagram below commutes:
(lameval)
- For any arrow
,
.
It follows that is a natural isomorphism of homsets.
Going from to
is called currying or partial application. You can curry a multivariable function all the way down to a constant. The inverse process is usually called uncurrying. It constitutes getting rid of entries in the codomain of a function that are function spaces by adding variables to the function. I suggest using blanding instead of “uncurrying”.
The FL sketch for cartesian closed categories
The FL sketch for CCC’s (which I will call CCCSk) is spelled out in detail in GBLS. I will mention some of the constructions here. I will use many of them in the next section to give an example of a form.
Objects and arrows
The arrows needed are spelled out in Sections 7.2 and 7.6 of GBLS. Here I mention
that formally picks out the identity arrow of an object.
, the formal set of functions of two variables, in other words arrows of the form
.
that picks out the arrow
itself.
that picks out the source
of a two-variable function
.
, the formal set of curried functions from
.
and
that pick out the source and target of a curried function
.
that picks out the function space
of two objects
and
.
, the formal set of composable pairs of arrows in the FL sketch for categories, defined by this pullback diagram:
(Ar2Def)
For the purposes of the example below, I need as defined by this diagram:
(Bsource)
In an object-oriented program built on this work, this would be a derived method..
One of the limit cones in CCCSk defines and in particular gives
the properties it needs:
(Curry)
The commutative diagram below should have been included in the FL sketch for categories in Section 7.2 of GLBS. It gives the composite of a composable pair the right source and target.
(Compreq)
Representing reflexive function spaces
An object of a cartesian closed category is reflexive if there are arrows
and
such that
(ret)
commutes. That means is a retract of
.
is called a reflexive function space. RFS’s are the theoretical basis for programming languages which have “functions as first class objects”.
So a sketch for RFS’s would be defined by a limit cone over the diagram below. I have always shown the cones in blue before, but GBLS does not show cones at all, and it isn’t necessary to show them.
(ReflFSConeBase)
To specify a reflexive function space you would have to give an object and two arrows
that satisfies Diagram (lameval) above, so the mandatory projections would be to
,
and
. The projection to
is induced by Diagram (Curry) above, the projection to
by Diagram (Ar2Def), and the projection to
follows from the fact that it is the vertex of the product cone shown. The other projections exist by composition.
Let’s call the vertex of this cone for “reflexive function space”. Note that all the objects and arrows in this diagram exist in the FL sketch for cartesian closed categories.
Now you can check (or forget all the constructions above and just Put Your Hands On The Monitor And Believe) that in a model of the FL sketch for CCC’s,
would be the set of reflexive function spaces together with specified inclusion
and retraction
.
Non-surprise: In any model of the FL sketch for CCC’s in the category of sets, will be the empty set. It is well known that for any set
the function space
has cardinality properly bigger that the cardinality of
, so there can be no inclusion of
into
.
Nevertheless, is a perfectly well defined set. It just turns out to be empty.
Forms
Forms are defined formally in GBLS. This series of posts is supposed to give you an intuitive idea or understanding of form. Well, we can make a form for reflexive function spaces out of the work done above. Some terminology:
Constructor space
The sketch CCCSk for cartesian closed categories is a constructor space. A constructor space must be an FL-sketch that “contains” and is “generated” (see GBLS, Chapter 6.1) by the FL sketch for categories, and indeed CCCSk is built from the FL sketch for categories by adjoining some objects and arrows, cones and commutative diagrams that all exist already in the FL Cattheory for categories (see TDMO6). So a constructor space has models we can call C-categories. In particular a model for CCCSk in sets is a cartesian closed category. In previous posts I have constructed constructor spaces for categories with finite products and categories with finite limits.
Constructor spaces construct doctrines, in the one-dimensional case and with restrictions I will mention in a later post.
For any constructor space , take an object
in the FL Cattheory of
and adjoin a new arrow
where 1 is the terminal object.
is what we call a C-form and
with
as a freely adjoined arrow is called
.
A model of a -form “in a C-category
“ means that
is a model of
This means that in
,
is nonempty.
The CCC-form for reflexive function spaces is then a global element of the node of CCCSk as constructed above for some CCC. There are no models in the category of sets, but there are many toposes (and many other CCC’s) that do have models, such as the realizability topos.
I have lots of miscellaneous comments and explanations to make about the idea of form which must wait for another post.
References
[1] Charles Wells (1990), A generalization of the concept of sketch.

(Diagram 







(a)
(b)
(c)
(d)



To say that this diagram commutes requires that
under M is a commutative diagram in the category of sets.