Warning: this is an htmlized version! The original is across this link, and the conversion rules are here.
% (find-angg "LATEX/istanbul1.tex")
% (find-angg "LATEX/istanbul1.lua")
% (defun c () (interactive) (find-LATEXsh "lualatex istanbul1.tex"))
% (defun c () (interactive) (find-LATEXsh "lualatex --output-format=dvi istanbul1.tex"))
% (defun d () (interactive) (find-xpdfpage "~/LATEX/istanbul1.pdf"))
% (defun d () (interactive) (find-xdvipage "~/LATEX/istanbul1.dvi"))
% (defun e () (interactive) (find-LATEX "istanbul1.tex"))
% (defun l () (interactive) (find-LATEX "istanbul1.lua"))
% (find-xpdfpage "~/LATEX/istanbul1.pdf")
% (find-xdvipage "~/LATEX/istanbul1.dvi")
% (find-fline "~/LATEX/" "istanbul1.pdf")
% http://angg.twu.net/LATEX/istanbul1.pdf

% Â«.geometryÂ»	(to "geometry")
% Â«.update-bodyÂ»	(to "update-body")

\documentclass[oneside]{book}
\usepackage[utf8]{inputenc}
% Â«geometryÂ» (to ".geometry")
% (find-angg ".emacs.papers" "latexgeom")
\usepackage[%total={6.5in,4in},
textwidth=4in,  paperwidth=4.5in,
textheight=5in, paperheight=4.5in,
top=0.05in, left=0.2in%, includefoot
]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage{luacode}
\usepackage{proof}   % For derivation trees ("%:" lines)
\input diagxy        % For 2D diagrams ("%D" lines)
\xyoption{curve}     % For the ".curve=" feature in 2D diagrams
\usepackage{edrx15}  % (find-LATEX "edrx15.sty")
\input istanbuldefs  % (find-ist "defs.tex")
\begin{document}

%\input edrxrepl                     % (find-LATEX "edrxrepl.tex")
\catcode\^^J=10                     % (find-es "luatex" "spurious-omega")
%\directlua{dofile "\jobname.lua"}   % (find-LATEX "2015logicandcats.lua")
\directlua{dofile "2015logicandcats.lua"}
\directlua{dofile "istanbulall.lua"} % (find-ist "all.lua")
\directlua{getword = getword_utf8}   % (find-dn5 "dednat6.lua" "utf8")

\directlua{output =  printboth}
\directlua{output = mytexprint}
\directlua{tf:processuntil()}
%
\def\pu{\directlua{tf:processuntil()}}
%%L output(preamble1)
\pu
\def\myttchars{\basicttchars}

% Â«update-bodyÂ» (to ".update-body")
% Produce an updated body: (find-ist "all.lua" "orgblocktotex-export")
% Mark the body, then kill it by hand: (eek "<right> 2*<down> C-SPC M-> 8*<up>")
% Insert a new body: (insert-file "~/LATEX/istanbul1body.tex")

%
% -defs

\def\liml{\underleftarrow {\lim}{}}
\def\limr{\underrightarrow{\lim}{}}
\def\frakCat{\mathfrak{Cat}}
\def\frakTop{\mathfrak{Cat}}
\def\elephantpage#1{((page #1))}
\def\ob{{\operatorname{ob}}}
\def\sh{\mathbf{sh}}
\def\Sh{\mathbf{Sh}}
\def\Sp{\mathbf{Sp}}
\def\Lop{\mathbf{Lop}}
\def\Hom{\mathrm{Hom}}

\def\sdd{\ssk{\scriptsize (...)}\ssk}
\def\mdd{\msk{\scriptsize (...)}\msk}

%
% -title
 {\bf Logic and Categories, or:
      Heyting Algebras for Children}
 A tutorial presented at the UniLog 2015 conference (Istanbul),
 June 20-22, 2015
\msk
 By Eduardo Ochs
 {\tt eduardoochs@gmail.com}
 \url{http://angg.twu.net/math-b.html#istanbul}
\msk
 Version: 2015jun22

%
% ---
\newpage
1. (Non-mathematical) introduction
\bsk

\newpage
1.1. Why study CT {\sl now}?

%\includegraphics[width=8.5cm]{garota_de_ipanema.jpg}
\par Public education in Brazil is being dismantled -
\par maybe we should be doing better things than studying
\par very technical \& inaccessible subjects
\par with no research grants -

\newpage
1.2. Category theory should be more accessible
\par Most texts about CT are for specialists in research universities...
\par {\sl Category theory should be more accessible.}
\msk
\par To whom?...
\begin{itemize}
\item Non-specialists (in research universities)
\item Grad students (in research universities)
\item Non-specialists (in conferences - where we have to be quick)
\item Undergrads (e.g., in CompSci - in teaching colleges) - (Children'')
\end{itemize}
\newpage
1.3. What do we mean by "accessible"?
{\myttchars
\footnotesize
\begin{verbatim}
1) Done on very firm grounds:
mathematical objects made from numbers, sets and tuples
FINITE, SMALL mathematical objects whenever possible
avoid references to non-mathematical things like
windows, cars and pizzas (like the OO people do)
avoid reference to Physics - avoid QM at all costs
time is difficult to draw - prefer static rather than changing

2) People have very short attention spans nowadays

3) Self-contained, but not isolated or isolating -
our material should make the literature more accessible

4) We learn better by doing.
Our material should have lots of space for exercises.

5) Most people with whom I interact are not from Maths/CS/etc

6) Proving general cases is relatively hard.
Checking and calculating is much easier.
People can believe that something can be generalized after
seeing a convincing particular case.
(Sometimes leave them to look for the right generalization
by themselves)

\end{verbatim}
}

\newpage
1.4. Generalizations
{\myttchars
\footnotesize
\begin{verbatim}
General case                Full things
| ^                        | ^
projection | : lifting     projection | : lifting
v :                        v :
Particular case          Things for children

Paper:
Internal Diagrams and Archetypal Reasoning in Category Theory
Eduardo Ochs 2103 - Logica Universalis
http://angg.twu.net/math-b.html
http://angg.twu.net/math-b.html#idarct

The type-theorical view of the formalization of all that
is something that I can discuss with very few people =(

The parts "for children" are more fun
(esp. because I don't have to do them alone)
so I have to get good excuses for working on that
instead of on the very technical type-theoretical parts

\end{verbatim}
}

\newpage
1.5. Yesterday and slides
{\myttchars
\footnotesize
\begin{verbatim}
To do: apologize for yesterday

I overestimated my TeXnical skills!!! =(
Some of my diagrams need LuaLaTeX extensions
that took me _much_ longer to write than I expected,
and the emergency tools that let me use ascii+utf8 slides
also took me one (_very_ frantic) day more than I had -

...so things were not ready yesterday - and as I could not
connect my computer directly to the projector, and I did not
have enough material in PDF form, I had to cancel -

These ascii slides will be at
http://angg.twu.net/math-b.html
soon.

Nice (Lua)(La)TeXed slides should be ready soon,
for some adequate, not-very-small value of "soon".

\end{verbatim}
}

%
% ---
\newpage
2. The very basics
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
2.1. Evaluation: steps
{\myttchars
\footnotesize
\begin{verbatim}
How do we evaluate an expression like 2*3+4*5
to obtain its value, 26?
This involves a series of steps...
There are several ways to represent these steps:

2*3+4*5        2*3+4*5 -> 2*3+20
\-/ \-/           |          |
6   20           v          v
\-----/         6+4*5 ---> 6+20 --> 26
26
2*3+4*5 = 2*3+20
2*3+4*5 = 6+20           = 6+20
= 26             = 26

The technical term for the arrows is reductions''.
Informally, they are evaluation steps''.

\end{verbatim}
}

\newpage
2.2. Evaluation sequences
{\myttchars
\footnotesize
\begin{verbatim}
2*3+4*5        2*3+4*5 -> 2*3+20
\-/ \-/           |          |
6   20           v          v
\-----/         6+4*5 ---> 6+20 --> 26
26
2*3+4*5 = 2*3+20
2*3+4*5 = 6+20           = 6+20
= 26             = 26

To evaluate is to reduce, and reduce, and reduce
until there is nothing more to do - until we reach
someting that is fully evaluated''.

Note that two evaluation sequences'' starting
at the same expression may diverge'' at some point,
but they necessarily converge'' later - this is
what assures us that the result of evaluation is
unique.

(Technical terms: confluence'', diamond lemma'',
normalization''...)

\end{verbatim}
}

\newpage
2.3. Algebra: tables
{\myttchars
\footnotesize
\begin{verbatim}
Some expressions, e.g. (a+b)(a-b) and a*a-b*b,
return equal values for all inputs...

We can /test/ whether (a+b)(a-b)=a*a-b*b
in a /finite number/ of cases using tables,

a  b   (a+b)(a-b)   a*a-b*b   (a+b)(a-b)=a*a-b*b
------------------------------------------------
0  0        0          0              T
2  3       -5         -5              T
10 1       99         99              T

but we can not /know/ that (a+b)(a-b)=a*a-b*b
just by checking a finite number of table lines...

\end{verbatim}
}

\newpage
2.4. Algebra: reductions
{\myttchars
\footnotesize
\begin{verbatim}
To understand why (a+b)(a-b)=a*a-b*b we need /algebra/,
which includes reductions like these, which use associativity
always in the "expansion" direction, i.e., x(y+z)->xy+xz,

(a+b)(a-b) -> (a+b)a-(a+b)b -> (a+b)a-ab-bb
|              |                |
|              v                v
|         aa+ba-(a+b)b -> aa+ba-ab-bb
|                               :
v                               :
a(a-b)+b(a-b) -> a(a-b)+ba-bb        :
|               |               :
v               v               v
aa-ab+b(a-b) -> aa-ab+ba-bb - - -> aa-bb

...but then we don't get confluence!
To get the two "- - ->" arrows we need
commutativity of + and Â, plus x-x=0...
We need several new things to learn how to do
"calculations with letters"!...

We can teach evaluation to small children.
We can only teach algebra to /older/ children,

The important thing:
evaluation comes first,
algebra comes later.

\end{verbatim}
}

\newpage
2.5. Logic: evaluation and tautologies
{\myttchars
\footnotesize
\begin{verbatim}
Logic is simpler than algebra (for children),
because we can prove lots of things just by
looking at tables with a finite number of lines.

For example, we can check that P&Q->PâQ just by
calculating the result of P&Q->PâQ in all four cases.

(P -> Q)â(Q -> P)     P  Q  P->Q  Q->P  (P->Q)â(Q->P)
\-/  \-/ \-/  \-/     -------------------------------
0    1   1    0      0  0   1     1          1
\------/ \------/     0  1   1     0          1
1        0        1  0   0     1          1
\--------------/      1  1   1     1          1
1

P  Q  P&Q  PâQ  P->Q
--------------------
0  0   0    0    1
0  1   0    1    1
1  0   0    1    0
1  1   1    1    1

When we teach logic to children it is
good karma to spend a LONG time on this:
what propositions are tautologies?

\end{verbatim}
}

\newpage
2.6. A glimpse at other logics
{\myttchars
\footnotesize
\begin{verbatim}
The truth values of classical logic are {0,1}.
The truth values of O(2)-logic are {00,01,11}.
Some propositions, like ÂÂP->P, are tautologies
in classical logic but not in O(2)-logic...

P  Q  P&Q  PâQ  P->Q    P  ÂP  ÂÂP  ÂÂP->P
--------------------    ------------------
00 00  00   00   11     00  11  00    11
00 01  00   01   11     01  00  11    01
00 11  00   11   11     11  00  11    11
01 00  00   01   00
01 01  01   01   11
01 11  01   11   11
11 00  00   11   00
11 01  01   11   01
11 11  11   11   11

\end{verbatim}
}

\newpage
2.7. $»$-calculus: subtopics
{\myttchars
\footnotesize
\begin{verbatim}
Lambda-calculus, even for children, is a big topic...
We will see it as this series of subtopics:
* the usual way of defining (named) functions
* the meaning of :' and ->' in f:A->B
* the meaning of |->'
* evaluation, a.k.a., reduction
* lambda-notation
* beta-reduction
* the diamond lemma
* name clashes
* pairing and projection
* types
* contexts, pre-judgments and judgments
* unions of contexts
* type inference
* Set as model for lambda1

\end{verbatim}
}

\newpage
2.8. Defining named functions
{\myttchars
\footnotesize
\begin{verbatim}
The usual notation for defining functions is like this:

f: N -> R                      (*)
n |-> 2+sqrt(n)

name: domain -> codomain
variable |-> expression

It creates _named_ functions.

To use this notation we have to fill up five slots,
and use a ":", an "->" and a "|->" in the right places.

After stating (*) we can "reduce" expressions with f, like this:

f(4+5) ---> 2+sqrt(4+5)
:            :
:            :
v            v
f(9) ---> 2+sqrt(9) ---> 2+3 ---> 5

\end{verbatim}
}

\newpage
2.9. $»$-calculus: defining unnamed functions
{\myttchars
\footnotesize
\begin{verbatim}
Now compare

name: domain -> codomain
variable |-> expression   name = \variable.expression

g: N  -> R
a |-> a*a+4                    h = \a.a*a+4

g(2+3) -----------> g(5)   h(2+3) ------------> h(5)
|                   |      |                   |
|                   |      v                   v
|                   |  (\a.a*a+4)(2+3) ---> (\a.a*a+4)(5)
|                   |      |                   |
v                   |      v                   |
(2+3)*(2+3)+4         |    (2+3)*(2+3)+4         |
|    \          |          |    \          |
|     v         |          |     v         |
|   (2+3)*5+4   |          |   (2+3)*5+4   |
|          \    |          |          \    |
v           v   v          v           v   v
5*(2+3)+4 -----> 5*5+4     5*(2+3)+4 -----> 5*5+4

Note that the parentheses are important...
2+3*2+3+4 != (2+3)*(2+3)+4

Note also that in h = \a.a*a+4 we have not used
neither the domain nor the codomain...

\end{verbatim}
}

\newpage
2.10. Functions as lists of $\mapsto$'s
{\myttchars
\footnotesize
\begin{verbatim}
Functions can be regarded as sets of (input,output) pairs.
For example,

f:{4,5,6} -> R
a |-> 10a

_is_ the set {(4,40),(5,50),(6,60)}.
Just as we saw to fully evaluate expressions like 2Â3+4Â5 -
the _value_ of 2Â3+4Â5 is 26 because on numbers there are
no futher evaluation steps to be done -
the _value_ of the f above is {(4,40),(5,50),(6,60)}.

Alternative notations:

\csm{(4,40), && (5,50), && (6,60)} =
\csm{4â40, && 5â50, && 6â60} =
\csm{4â40  && 5â50  && 6â60} =
\sm {4â40  && 5â50  && 6â60}

We will be sloppy with commas in the {}/â notation.

\end{verbatim}
}

\newpage
2.11. Trees
{\myttchars
\footnotesize
\begin{verbatim}
We are going to use tree for lots of things, e.g.:
represent constructions
compare general and particular cases (with parallel trees)
track free variables / undischarged hypotheses
understand translations (including Curry-Howard)

p                     (-2,5)                  (-2,5)
---                  --------                  ------
p   Ï'p  f     (-2,5)    Ï'(-2,5)  sqrt    (-2,5)     5    sqrt
--   ------     -------   --------------    ------     ---------
Ïp   f(Ï'p)     Ï(-2,5)   sqrt(Ï'(-2,5))     -2         sqrt(5)
-----------     ------------------------     ------------------
(Ïp,f(Ï'p))     (Ï(-2,5),sqrt(Ï'(-2,5)))       (-2,sqrt(5))

p:AÃB                         (-2,5)âZÃN
-----                         ----------
p:AÃB   Ï'p:B   f:B->C   (-2,5)âZÃN       5âN     sqrt:N->R
-----   --------------   ----------       -----------------
Ïp:A    f(Ï'p):C           -2âZ               sqrt(5)âR
----------------           ----------------------------
(Ïp,f(Ï'p)):AÃC                  (-2,sqrt(5))âZÃR

\end{verbatim}
}

\newpage
2.12. Trees: free variables, discharges, sequents, Curry-Howard...
{\myttchars
\footnotesize
\begin{verbatim}
----
[p]^1               p|-p                   [P&Q]^1
-----      ----    ------  ----            -------
[p]^1    Ï'p  f    p|-p    p|-Ï'p  f|-f   [P&Q]^1    Q      Q->R
-----    ------    -----   ------------   -------    -----------
Ïp     f(Ï'p)    p|-Ïp    f,p|-f(Ï'p)    P             R
-------------    --------------------    ---------------
(Ïp,f(Ï'p))       f,p|-(Ïp,f(Ï'p))           P&R
--------------1   ------------------       --------1
»p.(Ïp,f(Ï'p))    f|-»p.(Ïp,f(Ï'p))        P&Q->P&R

p:AÃB
-----                           ------------
p:AÃB   Ï'p:B   f:B->C                  p:AÃB|-Ï'p:B   f:B->C
-----   --------------    -----------   ---------------------
Ïp:A    f(Ï'p):C         p:AÃB|-Ïp:A     p:AÃB|-f(Ï'p):C
----------------         -------------------------------
(Ïp,f(Ï'p)):AÃC             p:AÃB|-(Ïp,f(Ï'p)):AÃC

---------
Ï':AÃB->B  f:B->C
-----------------
Ï:AÃB->A     fâÏ':AÃB->C
-------------------------
\ang{Ï,fâÏ):AÃB->AÃC

\end{verbatim}
}

\newpage
2.13. Alice's logic and Bob's logic
{\myttchars
\footnotesize
\begin{verbatim}
(For students of Discrete Mathematics)

Our friends Alice and Bob have both publish books on logic,
with some stylistic differences...

For Alice, Classical Propositional Logic is this,

(Ω,â,â,â,â,â,Â,â) =

({0,1}, 1, 0, {(0,0)â0,   {(0,0)â0,   {(0,0)â1,  {0â1,  {(0,0)â1,  }
(0,1)â0,    (0,1)â1,    (0,1)â1,   1â0},  (0,1)â0,
(1,0)â0,    (1,0)â1,    (1,0)â0,          (1,0)â0,
(1,1)â1 },  (1,1)â1 },  (1,1)â1 },        (1,1)â1 }

In Bob's book, Classical Propositional Logic is

(Ω,â,â,Â) = ...

with all the other operators being defined from this one...

How do we translate from one of these notions to another?
Suppose that Alice's book has a theorem that is not in Bob's book.
We may need to translate both the /theorem/ and the /proof/.

At one point, when we were studying Alice's book and feeling that
we were on shaky ground, we thought of "â" as being the 4th
component of the structure above...

A very low-level translation uses things like "4th component".
A higher-level translation refers to components by their names.

\end{verbatim}
}

%
% ---
\newpage
3. (Planar) Heyting Algebras for children
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
3.1. A game - on $N^2$
{\myttchars
\footnotesize
\begin{verbatim}
Let's consider a game played
on an infinite board, N^2,
with black and white pieces.

*   This is a black piece.
It is solid. It is heavy.
It tends to sink.
/Black pieces move down/.

O   This is a white piece.
It is hollow. It is light.
It tends to float.
/White pieces move up/.

Black moves:   *                (x,y)               (0,y)
/|\              /  |  \                |  \
v v v            v   v   v               v   v
(x-1,y-1) (x,y-1) (x-1,y-1)   (0,y-1) (1,y-1)

White moves:         (x-1,y+1) (x,y+1) (x-1,y+1)   (0,y+1) (1,y+1)
^ ^ ^            ^   ^   ^               ^   ^
\|/              \  |  /                |  /
O                (x,y)               (0,y)

Note that moves are only possible
between /valid positions/ -
this rules out positions with x=-1.

\end{verbatim}
}

\newpage
3.2. A game - on subsets of $N^2$
{\myttchars
\footnotesize
\begin{verbatim}
Let's consider a game played
on an infinite board, N^2,
with black and white pieces...

Note that moves are only possible
between /valid positions/ -
this rules out positions with x=-1.

We may restrict the
valid positions even more.
Let A â N^2.

Let BM(A) be the set of black moves
starting and ending on points of A, and
let WM(A) be the set of white moves
starting and ending on points of A.

Then BM(A) and WM(A) are sets of arrows,
and (A,BM(A)) and (A,WM(A)) are graphs.

(A,BM(A)) and (A,WM(A)) are directed,
acyclical graphs - DAGs.

\end{verbatim}
}

\newpage
3.3. A game - on $K$
{\myttchars
\footnotesize
\begin{verbatim}
Let K ("Kite") be this subset of N^2:
K = {(1,3),(0,2),(2,2),(1,1),(1,0)}

Then (K,BM(K)) is the DAG at the left below,
which is isomorphic to the DAG K' at the right...

(1,3)               1
/   \              / \
v     v            v   v
(0,2)       (2,2)      2     3
\     /            \   /
v   v              v v
(1,1)               4
|                 |
v                 v
(0,0)               5

(K,BM(K)) = ({(1,3), (0,2),(2,2), (1,1), (1,0)},
{((1,3),(0,2)), ((1,3),(2,2)),
((0,2),(1,1)), ((2,2),(1,1)),
((1,1),(0,0))})

K' = ({1, 2,3, 4, 5},
{(1,2),(1,3), (2,4),(3,4), (4,5)})

\end{verbatim}
}

\newpage
3.4. A game - definition aborted
{\myttchars
\footnotesize
\begin{verbatim}
When I talked about game'' that was a trick...
I just wanted to define BM(A) and WM(A) on an A â N^2.
We don't need notions like initial position'',
turn'', winning'', etc.

From now on we will forget the idea of a game''.

\end{verbatim}
}

\newpage
3.5. Transitive-reflexive closure
{\myttchars
\footnotesize
\begin{verbatim}
Let (A,R) be a (directed) graph; note that R â A^2.
We will write
(A,R^+) for the transitive closure of (A,R), and
(A,R^*) for the transitive-reflexive closure of (A,R).

(A,R^+) is (A,R) plus all the identity arrows'',
(A,R^*) is (A,R^+) plus all the composites''.

Remember that when A â N^2
then (A,BM(A)) and (A,WM(A)) are DAGs...
When we pass to (A,BM(A)^*) and (A,WM(A)^*)
we don't get cycles - except for the identity maps!

(A,BM(A)^*) and (A,WM(A)^*) are directed,
almost acyclical'' graphs...
More precisely, (A,BM(A)^*) and (A,WM(A)^*)
are /partial orders/!

\end{verbatim}
}

\newpage
3.6. Well-positioned subsets of $N^2$
{\myttchars
\footnotesize
\begin{verbatim}
Let A â N^2, and let (Δx,Δy) â Z^2.
Let A' = {(x+Δx,y+Δy) | (x,y)âA}.
Then (A,BM(A)) and (A',BM(A')) are isomorphic!
For example, if A=K and (Δx,Δy)=(80,90),
then (A,BM(A)) and (A',BM(A')) are:

(1,3)               (81,93)
/   \                /   \
v     v              v     v
(0,2)       (2,2)    (80,92)   (82,92)
\     /              \     /
v   v                v   v
(1,1)               (81,91)
|                    |
v                    v
(0,0)               (80,90)

We are only interested in the /graphs/
generated by subsets of N^2 - so let's
create a notion of canonical position''...

Also, we are only interested in the graphs
generated by /finite/, /nonempty/ subsets of N^2...

\end{verbatim}
}

\newpage
3.7. Well-positioned subsets of $N^2$ (2)
{\myttchars
\footnotesize
\begin{verbatim}
Definition:
a subset A of N^2 is /well-positioned/
when it contains a point of the form (0,y)
and a point of the form (x,0), i.e.,
it touches both axes, i.e.,
it can't be translated left or down
without going outside of N^2...

For any non-empty subset A of N^2,
there is exactly one (Δx,Δy)âN^2
such that A-(Δx,Δy) is well-positioned.

(1,3)               (81,93)
/   \                /   \
v     v              v     v
(0,2)       (2,2)    (80,92)   (82,92)
\     /              \     /
v   v                v   v
(1,1)               (81,91)
|                    |
v                    v
(0,0)               (80,90)

\end{verbatim}
}

\newpage
3.8. ZSets
{\myttchars
\footnotesize
\begin{verbatim}
Definition:
A /ZSet/ is a finite, nonempty,
well-positioned subset of N^2.

The nice thing about ZSets is that
we can represent them unambiguously
using a bullet notation. For example,

*
* *
*
*

is {(1,3), (0,2), (2,2), (1,1), (0,0)}.

\end{verbatim}
}

\newpage
3.9. ZSets, ZDAGs, ZPosets
{\myttchars
\footnotesize
\begin{verbatim}
Definitions:
A /ZSet/ is a finite, nonempty, well-positioned subset of N^2.
A /ZDAG/ is a DAG (A,BM(A)) or (A,WM(A)), where A is a ZSet.
A /ZPoset/ is a poset (A,BM(A)^*) or (A,WM(A)^*), where A is a ZSet.

Examples:
Let H ("House") be this zset here:

*
* *
* *

then:
(H, BM(H))   and (H, WM(H)) are ZDAGs
(H, BM(H)^*) and (H, WM(H)^*) are ZPosets

\end{verbatim}
}

\newpage
3.10. Zfunctions
{\myttchars
\footnotesize
\begin{verbatim}
A Zfunction is a function whose domain is a ZSet.
We can represent Zfunctions using a positional notation.
For example, with K={(1,3), (0,2),(2,2), (1,1), (1,0)},
the function f:K->N such that
f = {((1,3),1), ((0,2),2),((2,2),3), ((1,1),4), ((1,0),5)}
can be represented as:

1
2 3
4
5

Note that its domain, K, can be inferred from the shape

*
* *
*
*

but its codomain has to be deduced from the context.

\end{verbatim}
}

\newpage
{\myttchars
\footnotesize
\begin{verbatim}
The /reading order/ for a ZSet A
is the bijection from A to {1, 2, ..., |A|}
that enumerates the elements of A from top
to bottom, going from left to right in each line.

1
1     1        2 3
2 3   2 3      4   5
4    4 5     6 7 8 9

The reading order can be used to formalize
a way to read aloud'' Zfunctions. For example,

3
2 40
1 50

as 3, 2, 40, 1, 50.

(And this gives a kind of a lexicographic order on
Zfunctions on the same ZSet)

\end{verbatim}
}

\newpage
3.12. ZHAs
{\myttchars
\footnotesize
\begin{verbatim}
A Heyting Algebra, as we will see later,
is a structure (a logic!) (Ω,â,â,â,â,â,â,Â)
in which â,â,â,â,â,â,Â obey the axioms
of /intuitionistic/ propositional calculus.

A ZHA is a ZPoset having:
a bottom point and a top point,
a left wall and a right wall,
all the same-parity points between the two walls,
and no other points.

Some examples of ZHAs:

o              o
o o            o o         o
o o o          o o o       o o
o o o o        o o o       o o
o     o o o o o      o o o         o o
o o o o        o o o       o o
o o o          o o o       o o
o o            o o       o o
o              o         o

(dot)   (diamond5)        (L)  (squiggle)  (weird)

\end{verbatim}
}

\newpage
3.13. ZHAs (2)
{\myttchars
\footnotesize
\begin{verbatim}
A ZHA is a ZPoset having:
a bottom point and a top point,
a left wall and a right wall,
all the same-parity points between the two walls,
and no other points.

o               o
o o             o                o o
o o o             o
o o o           o o              o
o o o           o              o   o
o o o           o o              o o
o o o o           o o              o
o o o o             o               o
o o o              o              o o
o o              o o             o o
o                o               o

This is          This is         This is
a ZHA             a ZHA        NOT a ZHA

\end{verbatim}
}

\newpage
3.14. ZHAs (formally)
{\myttchars
\footnotesize
\begin{verbatim}
A ZHA is a ZPoset having:
a bottom point and a top point,
a left wall and a right wall,
all the same-parity points between the two walls,
and no other points.

A ZHA D is generated by:
a height maxy â 0
a bottom point (x_0, 0)
left wall and right wall functions L,R:{0,1,...,maxy}->N
obeying:
L(0)=R(0)=x_0      (bottom point)
L(maxy) = R(maxy)  (top point)
0 â L(i) â R(i)    (left wall â right wall)
L(y+1) = L(y)Â1    (left wall changes in unit steps)
R(y+1) = R(y)Â1    (right wall changes in unit steps)
L(y)=0 for some y  (to ensure well-positionedness)

then
D â {(x,y)|x â N} is empty when y>maxy,
D â {(x,y)|x â N} = {L(y), L(y)+2, L(y)+4, ..., R(y)}
when yâ{0,1,...,maxy}.

\end{verbatim}
}

\newpage
3.15. ZHAs (formally) (2)
{\myttchars
\footnotesize
\begin{verbatim}
A ZHA is a ZPoset having:
a bottom point and a top point,
a left wall and a right wall,
all the same-parity points between the two walls,
and no other points.

o         L(9)=1 R(9)=1   maxy=9  L(maxy)=R(maxy)
o o
o
o
o
o o
o o o
o o
o o      L(1)=3 R(1)=5
o       L(0)=4 R(0)=4   L(0)=R(0)=x_0=4

\end{verbatim}
}

\newpage
3.16. ZHAs: the (l,r) coordinates
{\myttchars
\footnotesize
\begin{verbatim}
We can define the (l,r) coordinates
on a ZHA /informally/ in this way:

the bottom point has (l,r)=(0,0);

when we go one unit northwest,
i.e., from (x,y) to (x-1,y+1),
the l coordinate increases by 1;

when we go one unit northeast,
i.e., from (x,y) to (x+1,y+1),
the r coordinate increases by 1;

We usually write the (l,r) coordinates
of a point as just lr - two digits together,
without the (', ,', )'.

Here are two examples:

46
45  36            63
35  26        62  53
34  25            52  43
24            51  42  33
23            50  41  32  23
22                40  31  22
21                    30  21  12
20  11                    20  11  02
10  01                    10  01
00                        00

\end{verbatim}
}

\newpage
3.17. ZHAs are Heyting Algebras (introduction)
{\myttchars
\footnotesize
\begin{verbatim}
Magic fact / big theorem:
ZHAs are Heyting Algebras.

Version for children: we will learn
1. how to interpret â,â,â,â,â,â,Â,â in any given ZHA
2. what properties that â,â,â,â,â,â,Â,â have to obey in a HA
3. that our ZHA operations from (1) obey the properties in (2)

The properties are these:

(id)   âP.(PâP)
(comp) âP,Q,R.(PâQ)â(QâR)â(PâR)

(â)    âP.(Pââ)
(â)    âP.(ââP)
(â)    âP,Q,R.(PâQâR)â(PâQ)â(PâR)
(â)    âP,Q,R.(PâQâR)â(PâR)â(QâR)
(â)    âP,Q,R.(PâQâR)â(PâQâR)

(Â)    ÂP := Pââ
(â)    PâQ := (PâQ)â(QâP)

\end{verbatim}
}

\newpage
3.18. Operations in ZHAs: $â, â, â, â$ and $â$
{\myttchars
\footnotesize
\begin{verbatim}
In a ZHA H,
â is the top element of H,
â is the bottom element (00), and
PâQ is true iff P_LâQ_L and P_RâQ_R, or, equivalently,
PâQ is true iff the ZPoset (H,WM(H)^*) has an arrow P->Q.

Also:
(P_L,P_R)&(Q_L,Q_R) := (min(P_L,Q_L),min(P_R,Q_R))
(P_L,P_R)â(Q_L,Q_R) := (max(P_L,Q_L),max(P_R,Q_R))

Visually, this is:

(diagram)

\end{verbatim}
}

\newpage
3.19. Operations in ZHAs: $â$
{\myttchars
\footnotesize
\begin{verbatim}
In a ZHA H,
PâQ returns 0 or 1,           (â:HÃHâ{0,1})
PâQ returns an element of H   (â:HÃHâH).

The definition of â:HÃHâH is by cases.

(Note: before I explain this to people I usually
ask them to remember how weird they felt the
definition of â:{0,1}Ã{0,1}â{0,1} was when
they first saw it...)

QâR := if     Q is below R then â                <-- case 1
elseif Q at left  of R then (â)(QâR)      <-- case 2
elseif Q at right of R then (â)(QâR)      <-- case 3
elseif Q is above R then R                <-- case 4
end

Note that the order matters!
If R=22, this is »Q.(which case we use to calculate QâR):

4
4   4
2   4   3
2   2   3   3
2   2   1   3   3
2   1   1   3
1   1   1
1   1
1

\end{verbatim}
}

\newpage
3.20. Operations in ZHAs: $Â$ and $â$
{\myttchars
\footnotesize
\begin{verbatim}
The operations Â and <-> in a ZHA are
defined in terms of others.
ÂP := P->â
P<->Q := (P->Q)&(Q->P)

\end{verbatim}
}

\newpage
3.21. Some non-tautologies: DeMorgan
{\myttchars
\footnotesize
\begin{verbatim}
In classical logic both DeMorgan laws hold:
Â(P&Q)<->(ÂPâÂQ)
Â(PâQ)<->(ÂP&ÂQ)

In intuitionistic logic these three implications are provable,
(ÂPâÂQ)->Â(P&Q)
Â(PâQ)->(ÂP&ÂQ)    (ÂP&ÂQ)->Â(PâQ)

While this one
Â(P&Q)->(ÂPâÂQ)
is false in some ZHAs, for example here:

32
22
21  12
20  11  02
10  01
00

Â(P  & Q)->(Â P â  Â Q)
--  --      --    --
10  01      10    01
------    ----  ----
00      02    20
---------  ------------
32              22
-----------------------
22

\end{verbatim}
}

\newpage
3.22. Some non-tautologies: $ÂÂPâP$
{\myttchars
\footnotesize
\begin{verbatim}
Exercise (homework!):
check that in the obvious ZHA -
the same as in the previous slide -
we have:

00
00
00  00
(»P.ÂP) = 02  00  20
02  20
32

32
32
32  32
(»P.ÂÂP) = 20  32  02
20  02
00

1
0
(»P.ÂÂP=P) =    0   0
(»P.ÂÂPâP) =  1   0   1
0   0
1

\end{verbatim}
}

\newpage
3.23. Lindenbaum Algebras
{\myttchars
\footnotesize
\begin{verbatim}
We've been working with algebras of truth values.
What happens when we try to pass to an algebra of propositions?
"Wff" = "well-formed formula".
Let A = Wffs(â,â,â,â,â,Â,â,P,Q,R) be the set of wffs built from
the constants â,â, the operators â,â,â,Â,â and the
atomic propositions P,Q,R - plus parentheses.

Let D be the set of triples (P,Q,∧) where
∧ is a /intuitionistic/ proof of PâQ.                 <- what is that????
Let D^- be the set of pairs (P,Q) obtained by deleting
the third component of each triple (P,Q,∧)âD.

Then (A,D^-) is a directed graph.
(A,D^-) is reflexive and transitive - it is a /preorder/ on A.
It induces a quotient ~ on A.
(A/~,D^-/~) is a partial order - the Lindenbaum Algebra
geerated by etc etc etc etc.

\end{verbatim}
}

\newpage
3.24. Lindenbaum Algebras (2)
{\myttchars
\footnotesize
\begin{verbatim}
Let A = Wffs(â,â,&,â,â,P,Q,R).
Let D be the set of triples (P,Q,∧) where
∧ is a intuitionistic proof of PâQ (P,QâA).
Let D^- be the set of pairs (P,Q) obtained by deleting
the third component of each triple (P,Q,∧)âD.

Then (A,D^-) is a directed graph,
and the partial order (A/~,D^-/~) is the Lindenbaum Algebra (...)

Lindenbaum Algebras are (free) Heyting Algebras.

We can visualize Lindenbaum Algebras by writing some
wffs in A and
1) treating them as vertices in a directed graph
2) drawing the arrows in D between them
3) making each wff stand for its equivalence class.

\end{verbatim}
}

\newpage
3.25. Lindenbaum Algebra for classical logic
{\myttchars
\footnotesize
\begin{verbatim}
Let A = Wffs(â,â,&,â,â,Â,â,P) be the set of wffs...
Let D be the set of triples (P,Q,∧) where
∧ is a /classical/ proof of PâQ.
Then the Lindenbaum Algebra (A/~,D^-/~) looks like this -
more precisely, it is transitive-reflexive closure of this:

â

P   ÂP

â

This is a Heyting Algebra - but it is not free.
It is a Boolean Algebra - the free one on one generator.

\end{verbatim}
}

\newpage
3.26. Lindenbaum Algebras for classical logic (2)
{\myttchars
\footnotesize
\begin{verbatim}
Let A = Wffs(â,â,&,â,â,Â,â,P,Q) be the set of wffs...
Let D be the set of triples (P,Q,∧) where
∧ is a /classical/ proof of PâQ.
Then the Lindenbaum Algebra (A/~,D^-/~) looks like this -
more precisely, it is the transitive-reflexive closure of
this hypercube:

F
7       E
B 6 D
3   5   A   C
2 9 4
1       8
0

This is the free Boolean Algebra on two generators.
(Hint: take P=3 and Q=5)

\end{verbatim}
}

\newpage
3.27. Lindenbaum Algebras for IPL are infinite
{\myttchars
\footnotesize
\begin{verbatim}
Let I_1 = Wffs(â,â,&,â,â,Â,â,A) be the set of wffs...
Let D be the set of triples (P,Q,∧) where
∧ is an /intuitionistic/ proof of PâQ.
Then the Lindenbaum Algebra (I_1/~,D^-/~) has at least
these distinct points:

43          G         G:=FâF'
42  33      F'  F       F:=EâE' F':=FâE
32  23      E   E'    E:=DâD' E':=EâD
31  22      D'  D       D:=CâC' D':=DâC
21  12      C   C'    C:=BâB' C':=CâB
20  11      B'  B       B:=AâA' B':=BâA
10  01      A   A'    A:=10   A':=ÂA
00          00

A, A', B, B', ... are all distinct in the ZHA at the left above,
so there cannot be an intuitionistic proof that any two of them -
say, E and C - are equal.

^ This is an argument for adults!!!
We will make it children-friendly soon.

\end{verbatim}
}

\newpage
3.28. A computer library
{\myttchars
\footnotesize
\begin{verbatim}
The "spec" for a ZHA uses one char per line...

> ZHA.fromspeclr("123LLR432L1"):drawf()
64
63  54
53  44
52  43  34     <- 3
51  42  33  24   <- 4
41  32  23     <- R (means 3 again, but moved right)
40  31  22       <- L (means 3 again, but moved left)
30  21  12     <- L (means 3 again, but moved left)
20  11  02   <- 3
10  01     <- 2
00       <- 1     <- first char of the spec
>

\end{verbatim}
}

\newpage
3.29. A computer library (2)
{\myttchars
\footnotesize
\begin{verbatim}
We can define functions using a very compact lambda-notation,
and use them to draw the values of Zfunctions.

L0 "P Eq(P, Not(Not(P)))"
--> "function (P) return Eq(P, Not(Not(P))) end"

The ":drawL" method draws Zfunctions.
The global functions Eq, Not, And, Imp, etc
use the global variable "z" - that's why the "z =".

> z = ZHA.fromspeclr("123LLRR21"):drawf()
(...)
> z:drawL "P           Not(P)  "
(...)
> z:drawL "P       Not(Not(P)) "
(...)
> z:drawL "P Eq(P, Not(Not(P)))"
11
00  00
00  00  00
00  00  00
11  00  00
00  00  00
00  00  11
00  00
11
>

\end{verbatim}
}

\newpage
3.30. When in doubt use brute force

\begin{quote}
{\sl When in doubt use brute force.}
Dennis Ritchie
\end{quote}

 In the beginning, and for several years, I had very little
 intuition about how the $â$ behaved in a Heyting Algebra...
 And to make things worse, there are lots of things
 that are important in Topos Theory -
 namely: the $ÂÂ$ operator, modalities, sheaves, forcing -
 It {\sl had} to be possible to visualize them -
 \msk
 That was my main motivation for working with ZSets, ZHAs, etc.
 \msk
 Status of the project:
 now I know how to visualise {\sl most} of the operations and theorems
 in Fourman/Scott79 -
 and {\sl some} things about sheaves and geometric morphisms,
 mainly from Peter Johnstone's Sketches of an Elephant''
 and now I am in a position to get help from adult toposophers! =) =) =)

%
% ---
\newpage
4. Categories
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
4.1. Categories
{\myttchars
\footnotesize
\begin{verbatim}
A category

C = (C_0, Hom_C, id_C, o_C; idL_C, idR_C, assoc_C)

is a directed graph on steroids.
C_0 is the set (<- version for children) of objects'' of C.
Hom_C(A,B) returns the set (<- same)
of arrows (morphisms'', maps'') from A to B.
id_C(A) returns and identity map'' id_A:A->A.
o_C tells how composable'' maps (whose tails and heads meet)
compose; we use ;'' to write the composition in diagrammatic order''.

f      g
A ---> B ---> C
---------->
(gof)=(f;g)

idL_C and idR_C tell us that identity maps are cancellable
at the left and at the right: (id_A;f)=f, (f;id_B)=f.
assoc_C tells us that composition is associative: (f;g);h=f;(g;h).

A proto-category is just this:

C^- = (C_0, Hom_C, id_C, o_C)

the properties'' idL_C, idR_C, assoc_C only make sense
when we know how to compare morphisms for equality.

\end{verbatim}
}

\newpage
4.2. Set is a category
{\myttchars
\footnotesize
\begin{verbatim}
This is our archetypal category:

Set = (Set_0, Hom_Set, id_Set, o_Set; idL_Set, idR_Set, assoc_Set)

The objects of Set are sets - so, for example,
{0,1}, {2,3,4,5,6}, {7,8,9}, \empty, \N, \R â Set_0.

The morphisms of Set are the maps between sets - so, for example,
Hom_Set({0,1}, {2,3,4,5,6}) has 2^5 elements (functions!),
Hom_Set({2,3,4,5,6}, {7,8,9}) has 5^3 elements.

Composition in Set is compostion of functions. For example:

2|->7
3|->8
4|->9
0|->4              5|->9
1|->2              6|->9
{0,1} ------> {2,3,4,5,6} -----> {7,8,9}
------------------------->
0|->9
1|->7

And id_{7,8,9} = {7|->7, 8|->8, 9|->9}.

\end{verbatim}
}

\newpage
4.3. ZPosets are categories
{\myttchars
\footnotesize
\begin{verbatim}
A ZPoset, like K_â*
(the "kite" with the (transitive-reflexive closure of) BM(K))
can be seen as a category, in which

Hom    (A,B) = / {(A,B)} when there is an arrow from A to B,
K_â*        |
\ empty   when there isn't an arrow from A to B.

For example:

((1,3),(0,2))        ((0,2),(1,0))
(1,3) -------------> (0,2) -------------> (1,0)
---------------------------------->
((1,3),(1,0))

Posets can be seen as categories in which
each Hom-set has at most one element.

Warning (for children!):
The can be seen'' is important!!!
Many slides ago we saw K_â* as a pair
made of a ZSet K and subset of KÃK...
But K_â* as a category'' is a 7-uple!
Abuse of language!

Also, morphisms here are funny things -
they are not functions, they are /pairs/!

\end{verbatim}
}

\newpage
4.4. Categories: associativity
{\myttchars
\footnotesize
\begin{verbatim}
Associativity assures us that
diagrams whose cells commute
commute fully.
Example:

A ---> B ---> C
|      |      |
v      v      v
D ---> E ---> F

ab;bc;cf = ab;(bc;cf)
= ab;(be;ef)
= (ab;be);ef

\end{verbatim}
}

\newpage
4.5. Categories: iso(morphisms) and identities
{\myttchars
\footnotesize
\begin{verbatim}
An iso is a map f:A->B
for which there is a fÂ:B->A
such that (f;fÂ)=id_A and (fÂ;f)=id_B.

f
A --> B
\   | \
id_A\ fÂ  \id_B
v v   v
A --> B
f

Inverses are unique. When we have both
(f;g)=id_A and (g;f)=id_B and
(f;h)=id_A and (h;f)=id_B
then we can prove that g=h:

g,h
B --> A            g = g;id_A
\   | \            = g;(f;h)
id_B\  f  \id_A       = (g;f);h
v v   v          = id_B;h
B --> A        = h
g,h

Note that we used identities (id_C) to define isos
and the properties (idL_C, idR_C)
that say that they identities are neutral elements
to prove that inverses are unique.

\end{verbatim}
}

\newpage
4.6. Functors
{\myttchars
\footnotesize
\begin{verbatim}
A functor F: C â D is:

F = (F_0, F_1; respids_F, respcomp_F)

it is made of an _action on objects_, F_0,
that takes objects of C to objects of D,
and an _action of morphisms_, F_1,
that takes morphisms in C to morphisms in D...
and properties'' (that appear after the ";"):

respids_F = âAâC_0. id_D(F_0(A)) = F_1(id_C(A))
respcomp_F = âA,B,Câ\C_0. âf:A->B, g:B->C. F_1(f;g)=F_1(f);F_1(g)

\end{verbatim}
}

\newpage
4.7. Functors - on diagrams
{\myttchars
\footnotesize
\begin{verbatim}
A functor F:\C->\D takes
1. composable maps in \C to composable maps in \D
2. diagrams in \C to diagrams in \D
3. commutative diagrams in \C to commutative diagrams in \D
4. isos in \C to isos in \D

Exercise / homework:
show that if the diagram at the left below commutes
then its image by F commutes too, and F_1(fÂ)=F_1(f)Â.
Note: it has lots of (common!) shorthands...
You will have to figure them all out.

f                        f
A --> B                 FA --> FB
\   | \                  \    | \
id\ fÂ  \id             id\  fÂ  \id
v v   v         F        v  v   v
A --> B    |---->        FA --> FB
|  f  |                   |  f  |
g|     |h                 g|     |h
v     v                   v     v
C --> D                  FC --> FD
k                         k

\end{verbatim}
}

\newpage
4.8. Functors: $(AÃ)$ and $({0,1}x)$
{\myttchars
\footnotesize
\begin{verbatim}
B |---> FB      B |--> F_0(B)
|       |       |        |
f|  |->  |Ff    f|  |->   |F_1(f)
v       v       v        v
C |---> FC      C |--> F_0(C)

F               F
\C ---> \D      \C ---> \D

B |---> (AÃ)B      B |--> (AÃ)_0(B)       B |--> AÃB
|       |          |        |             |       |
f|  |->  |(AÃ)f    f|  |->   |(AÃ)_1(f)   f|  |->  |»p.(Ïp,f(Ï'p))
v       v          v        v             v       v
C |---> (AÃ)C      C |--> (AÃ)_0(C)       C |--> AÃC

(AÃ)               (AÃ)                  (AÃ)
\Set ---> \Set     \Set ---> \Set       \Set ---> \Set

{2,3} |--> {0,1}Ã{2,3}
|            |
2|->4 |   |-->     | (0,2)|->(0,4), (1,2)|->(1,4),
3|->6 |            | (0,3)|->(0,6), (1,3)|->(1,6)
v            v
{4,5,6} |--> {0,1}Ã{4,5,6}

\end{verbatim}
}

\newpage
4.9. Functors: why $(AÃ)_1(f) = »p.(Ïp,f(Ï'p))$ ?

%:          p:?                           p:A{Ã}B
%:          -----                         -----
%:  p:?     Ï'p:?   f:BâC        p:A{Ã}B   Ï'p:B   f:BâC
%:  -----   --------------        -----   --------------
%:   Ïp:?    f(Ï'p):?              Ïp:A    f(Ï'p):C
%:   ----------------              ----------------
%:    (Ïp,f(Ï'p)):?                 (Ïp,f(Ï'p)):A{Ã}C
%:   ----------------              ----------------
%:    »p.(Ïp,f(Ï'p)):A{Ã}BâA{Ã}C     »p.(Ïp,f(Ï'p)):A{Ã}BâA{Ã}C
%:
%:    ^why1                          ^why2
\pu
$$\ded{why1} \quad \ded{why2}$$

How would someone {\sl find} the expression $»p.(Ïp,f(Ï'p))$?
Idea: let's try to construct a function $?:AÃBâAÃC$ from $f:BâC$...

%:            ?:A{Ã}B                      p:A{Ã}B
%:            -----Ï'                      -----
%:  ?:A{Ã}B     ?:B   f:BâC      p:A{Ã}B   Ï'p:B   f:BâC
%:  -----Ï   -------------app    -----   --------------
%:   ?:A       ?:C                Ïp:A    f(Ï'p):C
%:   ----------\ang{,}             ----------------
%:      ?:A{Ã}C                     (Ïp,f(Ï'p)):A{Ã}C
%:   -----------»                 ----------------
%:    ?:A{Ã}BâA{Ã}C               »p.(Ïp,f(Ï'p)):A{Ã}BâA{Ã}C
%:
%:    ^why3                       ^why4
\pu
$$\ded{why3}$$
% $$\ded{why3} \qquad \ded{why4}$$

\newpage
4.10. Categories with
{\myttchars
\footnotesize
\begin{verbatim}
Almost all the time in Category Theory
we work with categories with extra structure
(and extra properties).

For example, Set, and each ZHA, is
(1) a category with a terminal object
(2) a category with binary products
(3) a category with finite products (= 1+2)
(4) a category with exponentials (needs 2)
(5) a cartesian-closed category (= all the above)
(6) a category with an initial object
(7) a category with binary coproducts (a.k.a. binary sums)
(8) a category with finite coproducts (a.k.a. finite sums; = 6+7)
(9) a cartesian-biclosed category (= all the above)

\end{verbatim}
}

\newpage
4.11. BiCCCs
{\myttchars
\footnotesize
\begin{verbatim}
A Cartesian-biclosed category has these operations
(we use some nested uples for clarity):

(C_0, Hom, id, â,
(1,!),(Ã,Ï,Ï', <,>),(â,â,â),
(0,Â),(+,ι,ι', [,]))

We are omitting the properties'' that these operations obey.

Trick: a (bi-)Heyting Algebra has exactly the same structure
as a (bi-)CCC.
A (bi-)Heyting Algebra is a (bi-)CCC in which each Hom-set
has at most one element.

(See the handouts!)

\end{verbatim}
}

%
% ---
\newpage
5. Logic on subsets of ZDAGs
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
5.1. Order topologies
{\myttchars
\footnotesize
\begin{verbatim}
Let (A,R) be a graph.
Example: (A,R) = ({1,2,3}, {(1,3),(2,3)}).

1     2
\   /
v v
3

A _topology_ on a set X is a set of subsets of X (the "open sets").
A graph R â AÃA induces a topology on A.
Here's how:

O(A) = {UâA | (1âU â 3âU) â (2âU â 3âU)}
\---------/   \---------/
condition      condition
induced by     induced by
1->3          2->3

If we order the open sets by inclusion
we get a partial order, (O(A),â).
Let's draw it as a graph.

\end{verbatim}
}

\newpage
5.2. Order topologies (2)
{\myttchars
\footnotesize
\begin{verbatim}
{1,2,3}         1 1            â
^ ^            1            ^ ^
/   \          ^ ^          /   \
/     \        /   \        /     \
1       2    {1,3}  {2,3}   1 0     0 1    P       Q
\     /        ^     ^      1       1      ^     ^
\   /          \   /        ^     ^        \   /
v v            \ /          \   /          \ /
3             {3}           0 0           PâQ
^             1             ^
|             ^             |
|             |             |
{}            0 0            â
0

(A,R)       (O(A),â)       (O(A),â)

\end{verbatim}
}

\newpage
5.3. Topologies are Heyting Algebras
{\myttchars
\footnotesize
\begin{verbatim}
Look into almost any CT book
and you find this:

for any topological space (X,O(X))
the poset (O(X),â) is a Heyting Algebra.

A HA is a structure (Ω,â,â,â,â,â,â,Â)
obeying certain properties.

What are Ω,â,â,â,â,â,â,Â?

Ω := O(X)      the open sets are the truth values.
â := X         because â is true everywhere
â := {}        because â is true everywhere
â := â

PâQ := {xâX | xâP â xâQ}   PâQ is true where both P and Q are
PâQ := {xâX | xâP â xâQ}   PâQ is true where either P or Q are
PâQ := {xâX | xâP â xâQ}   PâQ is true where P implies Q       <- oops...

Problem: the definition of PâQ does not work always -
it _sometimes_ produces a non-open output even when
both its inputs are open... example:

0      0       1
0 0 -> 1 0  =  1 1
1 1    1 0     1 0

(open)  (open)  (non-open)

\end{verbatim}
}

\newpage
5.4. Order topologies: non-open subsets
{\myttchars
\footnotesize
\begin{verbatim}
A subset BâA is non-open when it has a 1 above a 0
with an arrow 1->0 between them... for example,
{2} is not open:

1     2    0     1
\   /      \   /
v v        v v
3          0

\end{verbatim}
}

\newpage
5.5. Order topologies: stable subsets
{\myttchars
\footnotesize
\begin{verbatim}
When I explain these things to children I find it better
to start using the term stable subset'' (or stable function)
instead of open subset''.

The idea:
1's are things'' (which are heavy),
0's are empty spaces''.
The 1's want to fall down.
For example, 010 is unstable:

0     1         0     0
\   /           \   /
v v    - - >    v v
0               1

Then
P(* *) = {0 0, 0 0, 0 1, 0 1, 1 0, 1 0, 1 1, 1 1}
*       0    1    0    1    0    1    0    1

O(* *) = {0 0, 0 0,      0 1,      1 0,      1 1}
*       0    1         1         1         1

The P' means parts'', but
The O' means open sets'',
for technical reasons that we will understand much later...
(Children don't know topology - I mean, usually)

\end{verbatim}
}

\newpage
5.6. Fixing the implication
{\myttchars
\footnotesize
\begin{verbatim}
The fix:

PâQ := {xâX | xâP â xâQ}    <-- bad
PâQ := {xâX | xâP â xâQ}Â°   <-- good ("Â°" means "interior")

\end{verbatim}
}

\newpage
5.7. Modal logic for children (...but not now)
{\myttchars
\footnotesize
\begin{verbatim}
We can do MUCH better than just adding an "Â°".
Let (A,R) be a graph, and (A,O(A)) its order topology.
These are two logics:

I = (Ω , â , â , â , â , â , â , Â )
I   I   I   I   I   I   I   I

M = (Ω , â , â , â , â , â , â , Â , â , â )
M   M   M   M   M   M   M   M   M   M

"I" is the intuitionistic logic we've been working on.
"M" is a modal logic (S4).
Ω_I = O(A)
Ω_M = P(A)

P ->  Q := â  (P ->  Q)
I       M      M

This gives us
1) Modal Logic for children
2) GÃ⊃dels embedding of intuitionistic logic into S4,
for children

But we won't go that way now!!!

\end{verbatim}
}

\newpage
5.8. Some order topologies are ZHAs
{\myttchars
\footnotesize
\begin{verbatim}
For example,

1
1 1
1 1
0
1 1
1 1
0       0
1                     1 0     0 1
/ \                    1 1     1 1
v   v                0       0       0
2     3     --->     1 0     0 0     0 1
|     |              1 0     1 1     0 1
v     v                   0       0
4     5                  0 0     0 0
1 0     0 1
0
0 0
0 0

\end{verbatim}
}

\newpage
5.9. The generators of a ZHA
{\myttchars
\footnotesize
\begin{verbatim}
Let (A,BM(A)) be a ZDAG, and
let (H,WM(H)) be a ZHA such that (H,WM(H)^*)â(O(A),â).
Let G=Gen(H) - the generators'' of H - be the points of H
with exactly one arrow going into them (in the ZDAG).
Then Gen(H) is /exactly/ the image of $A$ in $H$ by the inclusion 'â'!
Magic! =)
1
1 1
1 1
0
1 1
1 1
0       0
1                     1 0     0 1
/ \                    1 1     1 1
v   v                0       0       0
2     3     --->     1 0     0 0     0 1
|     |              1 0     1 1     0 1
v     v                   0       0
4     5                  0 0     0 0
1 0     0 1
0
0 0
0 0

Can we recover $(A,BM(A))$ from $GâH$?
Well, sort of.

\end{verbatim}
}

\newpage
5.10. The generators of a ZHA (2)
{\myttchars
\footnotesize
\begin{verbatim}
Let (A,BM(A)) be a ZDAG, and
let (H,WM(H)) be a ZHA such that (H,WM(H)^*)â(\Opens(A),â).
Let G=Gen(H).
Can we recover $(A,BM(A))$ from $GâH$?
Almost - we can make G inherit an order from H...
Important: we need to look at H as a ZPoset, not as a ZDAGs,
and we need to invert the direction of the arrows.

\end{verbatim}
}

\newpage
5.11. The generators of a ZHA (3)
{\myttchars
\footnotesize
\begin{verbatim}
Look: (A,BM(A)^*) â (G,R^*).

33            ..        32    13
32  23        32  ..       | \  |
32  13           22  13        ..  13     v  v v
20  12           21  12        ..  12      20    12
10  01       20  11        20  ..         |  / |
10  01        10  01       v v  v
00            ..        10    01

(A,BM(A))      (H,WM(H))        (G,R)
â(\Opens(A),â)

Now let's divide the generators in GâH into two classes
according to the direction of the (only) arrow
that points to them. In the example above we have
Gennw(H)={10,20,32} and Genne(H)={01,12,13}.
The order on G is the columns 32->20->10 and 13->12->01,
plus some intercolumn arrows.

\end{verbatim}
}

\newpage
5.12. The generators of a ZHA (4)
{\myttchars
\footnotesize
\begin{verbatim}
What happens when we "omit the other digit",
and write 1_, 2_, 3_... for the left-wall generators
and _1, _2, _3... for the right-wall generators?

33            ..        3_    _3
3_  23        3_  ..       | \  |
3_  _3           22  _3        ..  _3     v  v v
2_  _2           21  _2        ..  _2      2_    _2
1_  _1       2_  11        2_  ..         |  / |
1_  _1        1_  _1       v v  v
00            ..        1_    _1

(A,BM(A))      (H,WM(H))        (G,R)
â(\Opens(A),â)

It becomes easier to create homework problems!!!
We can specify the two-column graphs as
(height of the left column,
height of the right column,
inter-wall arrows from left to right,
inter-wall arrows from right to right)

The ZHA above is generated by the two-column graph
(3, 3, {3->2}, {2->1}).

\end{verbatim}
}

\newpage
5.13. The generators of a ZHA: homework ideas
{\myttchars
\footnotesize
\begin{verbatim}
1) Draw the ZHA correponding to each of the 2-column
graphs specified below:
(3, 4, {}, {})
(3, 4, {}, {_4->_4})
(3, 4, {}, {_4->_3})
(3, 4, {}, {_4->_2})
(3, 4, {}, {_3->_2})
(3, 4, {}, {_4->_3, _3->_2})
(3, 4, {_2,_1}, {})
(3, 4, {_2,_1}, {_4->_3})
(3, 4, {_2,_1}, {_4->_3, _3->_2})

2) Draw the ZHA etc etc for these string specs:
"123RRLL2L321"
(...)

3) Find the 2-column graph and the string spec that
generate each of the ZHAs below:
(...)

4) For each of the ZPosets below draw its topology as a graph.

o o
o o o      o o o     o o o
o o       o o

(They are not going to be ZDAG-ish or ZPoset-ish,
because when we have three independent points the
topology contains a cube)

\end{verbatim}
}

%
% ---
\newpage
6. Modalities for children
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
6.1. The axioms
{\myttchars
\footnotesize
\begin{verbatim}
A modality on Omega is an operation J: Ω -> Ω obeying these axioms:
M1: P <= J(P)
M2: J(J(P)) <= J(P)
M3: J(P&Q) = J(P)&J(Q)

What do these axioms _mean_ (e.g., geometrically, on ZDAGs)?
* Equivalent elements form diamond-shaped regions
* Stable elements form a sub-ZDAG
To understand and prove this we start with _consequences_ of M1, M2, M3

What familiar operations obey these axioms?
* I(P)   := P              (the "identity" modality)
* T(P)   := â              (the "true" modality)
* O_A(P) := A or P         (the "or" modality)
* E_A(P) := A -> P         (the "implication" (exponential) modality)
* B_A(P) := (P -> A) -> A  ("boolean quotient" - general case)
* B(P)   := B_â(P)         ("boolean quotient" - particular case))
= (P -> â) -> â
= ÂÂP

What other operations obey these axioms?
* Modalities on ZDAGs correspond to dividing by diagonal lines

\end{verbatim}
}

\newpage
6.2. Fourman/Scott1979: Sheaves and Logic''
This is an excerpt -- pages 329-331 -- from M.P. Fourman and D.S.
Scott's Sheaves and Logic'', that was published in SLNM0753
(Applications of Sheaves: Proceedings of the Research Symposium on
Applications of Sheaf Theory to Logic, Algebra and Analysis - Durham,
july 9-21, 1977'').

\bsk

\BF{2.18. ELEMENTARY J-OPERATORS.} In these examples $Ω$ is a given cHa.

(i) {\sl The closed quotient.} The operator is defined by
%
$$J_a p = a â p.$$
%
This is obviously a J-operator, and the congruence relation is:
%
$$aâp = aâq.$$
%
The set of fixed points (quotient lattice) is:
%
$$\setofst{p â Ω}{aâp}.$$

Classically speaking in the spatial case where $Ω=\Opens(X)$, the
quotient corresponds to the topology on the {\sl closed} subspace
complementary to the open set $a$.

This quotient makes the element $a$ false'' and is the least such.

\newpage
6.3. Fourman/Scott1979 (2)

(ii) {\sl The open quotient.} The operator is defined by:
%
% (find-slnm0753page (+ 14 330))
%
$$J^a p = aâp.$$
%
The congruence relation is:
%
$$aâp = aâq \qquad \text{(equivalently, a â pâq)}.$$
%
The set of fixed points is thus isomorphic to
%
$$Ω_a = \setofst{pâΩ}{pâa}.$$

Intuitionistically speaking in the spatial case, this quotient
corresponds to the topology on the open subspace $a$. This quotient
makes $a$ true'' and is the leat such.

\newpage
6.4. Fourman/Scott1979 (3)

(iii) {\sl The Boolean quotient}. The operator is defined by:
%
$$B_a p = (pâa)âa.$$
%
The congruence relation is:
%
$$pâa = qâ a.$$
%
The set of fixed points is
%
$$\setofst{pâΩ}{(pâa)âaâp}.$$

In case $a=â$, this is the well-known $ÂÂ$-quotient giving the
(complete) Boolean algebra of stable'' elements. For arbitrary $a$,
we could first form $Ω/J_a$ and follow this by the $ÂÂ$-quotient to
obtain $Ω/B_a$. (In general, if $JâK$, then $Ω/K$ is a quotient of
$Ω/J$.)

We remark that in general $Ω/J$ is a cBa iff $J=B_{J_â}$. Further, is
$Ω$ is already Boolean, then {\sl every} J-operator on $Ω$ is of the
form $B_a = J_a$.

\newpage
6.5. Fourman/Scott1979 (4)

(iv) {\sl The forcing quotient}. The operator is a combination of
previous ones:
%
$$(J_aâJ^b)p = (aâb)â(bâp).$$
%
The congruence relation is a conjunction:
%
$$aâb=aâq \quad \text{and} \quad bâp=bâq.$$
%
The set of fixed points is:
%
$$\setofst{pâΩ}{bâpâ aâp}.$$

The point of the quotient is that it provides the {\sl least}
J-operator such that $JaâJb$; that is, we take the least quotient that
forces'' $aâb$ to be true. If we want to force a sequence of
statements $a_iâb_i$, for $i<n$, the operator needed is $\bigvee_{i<n} (J_{a_i}âJ{b_i})$. It is important to note that in general sup's of
J-operators cannot be calculated pointwise. We shall see below,
however, that it is possible to find a finite expression for this
particular sup. (We owe this remark to John Cartmell).

\newpage
6.6. Fourman/Scott1979 (5)

(vi) {\sl A mixed quotient.} The interest of this example lies in the fact
that it has a neat finite definition:
%
$$(B_aâJ^a)p = (pâa)âp.$$
%
The congruence relation is:
%
$$(pâa)âp = (qâa)âq,$$
%
which is equivalent to the conjunction:
%
$$aâp = aâq \quad\text{and}\quad pâa = qâa.$$
%
The set of fixed points is:
%
$$\setofst{pâΩ}{(pâa)âp â p}.$$

It is difficult to make this set vivid except to say that it is the
set of elements p satisfying Pierce's law (for a fixed a).

\newpage
6.7. Fourman/Scott1979 (6)

If we take a polynomial in $â$, $â$, $â$, $â$, say $f(p,a,b,\ldots)$,
it is a decidable question whether for all $a$, $b$, $\ldots$ it
defines a J-operator. This does not, however, help us very much in
cataloguing such operators (nor in seeing what good they are!) Some
techniques can be developed from the following formulae, which were

\msk

\BF{2.19. PROPOSITION.} In the following, $K$ is an arbitrary
J-operator, $â$ is the constant function (the greatest J-operator with
the most trivial quotient), and $â$ is the least J-operator (namely,
the identity function on $Ω$):

$$\def\li#1 #2 #3 #4 #5 #6 #7 #8 {\text{#1}&#2&#3&#4& &\text{#5}&#6&#7&#8& \\} \begin{array}{rlclcrlclc} \li (i) J_aâJ_b = J_{aâb} (ii) J^aâJ^b = J^{aâb} \li (iii) J_aâJ_b = J_{aâb} (iv) J^aâJ^b = J^{aâb} \li (v) J_aâJ_a = â (vi) J_aâJ^a = â \li (vii) J_aâK = KâJ_a (viii) J^aâK = J^aâK \li (ix) J_aâB_a = B_a (x) J^aâB_b = B_{aâb} \end{array}$$

Proof. Equations (i)-(iv) are easy calculations; while (v) comes down
to showing $p=(aâp)â(aâp)$. Formula (vi) is a direct consequence of
(vii) (equally, of (viii)).

\newpage
6.8. How different modalities interact
{\myttchars
\footnotesize
\begin{verbatim}
(There is an algebra of modalities!)
How does a modality interact with â, â, â, etc?

What interesting things can we do with modalities?
* Quotients
* Sheafness, sheaves, sheafification (from topos theory)
* Geometric morphisms (from topos theory)

\end{verbatim}
}

\newpage
6.9. Diamond-shaped regions
{\myttchars
\footnotesize
\begin{verbatim}
A region (i.e., a subset) of a ZDAG is _diamond-shaped_ if it has
* a top element
* a bottom element
* all elements between the top and the bottom, and nothing else

Formally, the _diamond between A and B_ is
Db(A,B) := {P in Omega | A <= P <= B}

Example: in

33                                  ..
32  23                              ..  ..
22  13                              22  ..
12  03     we have Db(01,22) =      12  ..
11  02        {01,02,11,12,22} =    11  02
10  01                              ..  01
00                                  ..

(Note: the standard terminology is "intervals")

\end{verbatim}
}

\newpage
6.10. Stable and equivalent truth-values
{\myttchars
\footnotesize
\begin{verbatim}
Remember: a modality on Ω is an operation J: Ω -> Ω obeying these axioms:
M1: P â J(P)
M2: J(J(P)) â J(P)
M3: J(PâQ) = J(P)âJ(Q)

M1 means that applying J once moves up,
M2+M1 mean that applying J a second time does not move further up.
(What is M3?)

Let's say that P is _stable_ when P = J(P),
and that P and Q are _equivalent_ when J(P) = J(Q).

Formally:
St(P) := (P = J(P))        (returns true or false)
Sts   := {P in Om | St(P)  (returns a set)
P==Q  := (J(P) = J(Q))     (returns true or false)
E(P)  := {Q in Om | P==Q)  (returns a set)
Es    := {E(P) | P in Om}  (returns a partition)

\end{verbatim}
}

\newpage
6.11. Stable and equivalent truth-values (2)
{\myttchars
\footnotesize
\begin{verbatim}
Let's look at an example.
When J(P) := B(P) = not not P, we have

33                         33                   ..
32  23                     33  33               ..  ..
22  13                     33  33               ..  ..
Om ==   12  03    (P|->J(P)) ==    33  03     Sts ==    ..  03
11  02                     33  03               ..  ..
10  01                     10  03               10  ..
00                         00                   10

and the equivalence classes are:

..           ..          ..          33
..  ..       ..  ..      ..  ..      32  23
..  ..       ..  ..      ..  ..      22  13
..  ..       ..  ..      ..  03      12  ..
..  ..       ..  ..      ..  02      11  ..
..  ..       10  ..      ..  01      ..  ..
00           ..          ..          ..

i.e., Es = {{00}, {10}, {01,02,03}, {11,12,13,22,23,32,33}}

\end{verbatim}
}

\newpage
6.12. What is axiom M3? Introduction
{\myttchars
\footnotesize
\begin{verbatim}
Remember: a modality on Ω is an operation J: Ω -> Ω obeying these axioms:
M1: P â J(P)
M2: J(J(P)) â J(P)
M3: J(PâQ) = J(P)âJ(Q)

M3 implies _monotonicity_, which is:
Mo: P â Q implies J(P) â J(Q)
but this is not obvious. Let's prove that in several steps.

..
..  ..
..  ..  ..
..  ..  ..  ..
..  64  ..  46  ..            J(P)      J(Q)
..  ..  ..  ..  ..  ..              ^    ^
..  ..  ..  44  ..  ..  ..             \  /
..  ..  ..  ..  ..  ..  ..  ..         J(P)&J(Q)
..  ..  ..  ..  ..  ..  ..
..  ..  ..  ..  ..  ..
..  31  ..  13  ..              P        Q
..  ..  ..  ..                 ^      ^
..  11  ..                     \   /
..  ..                        P&Q
..
Let P=31, Q=13, J(P)=64, J(Q)=46.
Then PâQ=11 and J(P)âJ(Q)=44, but without M3 we wouldn't know
where is J(PâQ)=J(11)... it could be anything above 11.

M3 tells us that J(11)=J(PâQ)=J(P)âJ(Q)=64â46=44,
which is below J(P)=64 and J(Q)=46...
(Actually J(11) is the topmost value below J(P) and J(Q).)

\end{verbatim}
}

\newpage
6.13. What is axiom M3? Monotonicity for products
{\myttchars
\footnotesize
\begin{verbatim}
M3 implies that J(P&Q)=J(P)&J(Q),
so let's rewrite the "J(P)&J(Q)" as "J(P&Q)" in our diagram.
M3 implies that when we apply J to all elements of a
product diagram P <- P&Q -> Q, we do have arrows
in its image J(P) <- J(P&Q) -> J(Q).

Formally, this is
Mp: J(P&Q) <= J(P), and J(P&Q) <= J(Q)
("monotonicy for products")

..
..  ..
..  ..  ..
..  ..  ..  ..
..  64  ..  46  ..            J(P)      J(Q)
..  ..  ..  ..  ..  ..              ^    ^
..  ..  ..  44  ..  ..  ..             \  /
..  ..  ..  ..  ..  ..  ..  ..          J(P&Q)
..  ..  ..  ..  ..  ..  ..
..  ..  ..  ..  ..  ..
..  31  ..  13  ..              P        Q
..  ..  ..  ..                 ^      ^
..  11  ..                     \   /
..  ..                        P&Q
..

\end{verbatim}
}

\newpage
6.14. What is axiom M3? Monotonicity
{\myttchars
\footnotesize
\begin{verbatim}
When P <= Q we have P = P&Q,
and a part of the previous diagram collapses..
If P=P&Q=11, Q=13, J(P)=J(P&Q)=44, J(Q)=46,
and we have:

..
..  ..
..  ..  ..
..  ..  ..  ..
..  ..  ..  46  ..                      J(Q)
..  ..  ..  ..  ..  ..                   ^
..  ..  ..  44  ..  ..  ..                /
..  ..  ..  ..  ..  ..  ..  ..   J(P) = J(P&Q)
..  ..  ..  ..  ..  ..  ..
..  ..  ..  ..  ..  ..
..  ..  ..  13  ..                       Q
..  ..  ..  ..                        ^
..  11  ..                         /
..  ..                    P = P&Q
..

\end{verbatim}
}

\newpage
6.15. What is axiom M3? Monotonicity (2)
{\myttchars
\footnotesize
\begin{verbatim}
Formally:

----------------M3  ---------------
J(P&Q)=J(P)&J(Q)    J(P)&P(Q)<=J(Q)
------------Mp  :=  -----------------------------------
J(P&Q)<=J(Q)                  J(P&Q)<=J(Q)

P<=Q
=====
P=P&Q
-----------  ------------Mp
P<=Q           J(P)=J(P&Q)  J(P&Q)<=J(Q)
----------Mo  :=  -------------------------
J(P)<=J(Q)                 J(P)<=J(Q)

\end{verbatim}
}

\newpage
6.16. The sandwich lemma
{\myttchars
\footnotesize
\begin{verbatim}
From
M1: P <= J(P)
M2: J(J(P)) <= J(P)
M3: J(P&Q) = J(P)&J(Q)

We can prove that if P <= Q <= J(P) then P and Q (and J(P)) are equivalent.
More formally ("sandwich lemma"):

SL: If P <= Q <= J(P) then P==Q.

Proof:
Q<=J(P)
-------------Mo   -------------M2
P<=Q        J(Q)<=J(J(P))     J(J(P))<=J(P)
----------Mo   -------------------------------
P<=Q  Q<=J(P)          J(P)<=J(Q)            J(Q)<=J(P)
-------------SL   :=   --------------------------------
J(P)=J(Q)                       J(P)=J(Q)

\end{verbatim}
}

\newpage
6.17. The sandwich lemma: equivalence classes don't have holes
{\myttchars
\footnotesize
\begin{verbatim}
Sandwich lemma:

SL: If P<=Q<=J(P) then P==Q.

What does that mean? Let's look again at our example.
This was an equivalence class,

33
32  23
22  13
12  ..
11  ..
..  ..
..

and J(12) = 33.
Making P=12 and Q=22 in the sandwich lemma,
we have P <= Q <= J(P), i.e., 12 <= 22 <= 33,
and, by C1, P==Q, i.e., 12==22, i.e., J(12)=J(22)=33.

The sandwich lemma is very powerful.
If we know that J(11)=33, then,
using it for all elements between 11 and 33,
we get that J(12)=J(13)=J(22)=J(23)=J(32)=33.

The sandwich lemma says that equivalence classes do not have "holes".

\end{verbatim}
}

\newpage
6.18. Equivalence classes: the bottom element lemma
{\myttchars
\footnotesize
\begin{verbatim}
The axiom
M3: J(P&Q) = J(P)&J(Q)
can be extended to P&Q&R, P&Q&R&S, etc. Look:

J(P&Q&R) = J(P&(Q&R))
= J(P)&J(Q&R)
= J(P)&J(Q)&J(R)

What happens when we take the "&" of all the truth-values in an
equivalence class, and then we apply J to it?
Let's look at an example.
Let  E := {11,12,13,22,23,32,33}
and &E := 11&12&13&22&23&32&33     (= 11).

33
32  23
22  13
12  ..
11  ..
..  ..
..

J(&E) = J(11 & 12 & 13 & 22 & 23 & 32 & 33)
= J(11) & J(12) & J(13) & J(22) & J(23) & J(32) & J(33)
= 33 & 33 & 33 & 33 & 33 & 33 & 33
= 33

\end{verbatim}
}

\newpage
6.19. Equivalence classes: the bottom element lemma (2)
{\myttchars
\footnotesize
\begin{verbatim}
Let  E := {11,12,13,22,23,32,33}
and &E := 11&12&13&22&23&32&33     (= 11).

33
32  23
22  13
12  ..
11  ..
..  ..
..

J(&E) = J(11 & 12 & 13 & 22 & 23 & 32 & 33)
= J(11) & J(12) & J(13) & J(22) & J(23) & J(32) & J(33)
= 33 & 33 & 33 & 33 & 33 & 33 & 33
= 33

So, &E is ==-equivalent to all other elements of E,
and &E is below all other elements of E...
That means that &E is the bottom element of that equivalence class,
and, by the sandwich lemma, the equivalence class is made of
all elements between &E and J(&E).

TYPESET THIS IN RED:
(That only works for _finite_ conjunctions, but we are working only
with finite cases...)

\end{verbatim}
}

\newpage
6.20. Equivalence classes: the bottom element lemma (3)
{\myttchars
\footnotesize
\begin{verbatim}
A small modification of that previous argument leads to this:
let E be any non-empty set of equivalent elements of Om.
Then the diamond-shaped region

E' := D(&E,J(&E))

having &E as its bottom element and J(&E) as its top element
contains E, and all elements in E' are equivalent.

For example, in

33
32  23
22  13
12  ..
11  ..
..  ..
..

let E := {13, 22}; note that J(13)=J(22)=33, and that &E = 13&22 = 12.
Then

J(&E) = J(13 & 22)
= J(13) & J(22)
= 33 & 33
= 33...

\end{verbatim}
}

\newpage
6.21. Equivalence classes: the bottom element lemma (4)
{\myttchars
\footnotesize
\begin{verbatim}
let E := {13, 22}; note that J(13)=J(22)=33, and that &E = 13&22 = 12.
Then

J(&E) = J(13 & 22)
= J(13) & J(22)
= 33 & 33
= 33,

and all elements in the diamond-shaped region

E' := D(&E,J(&E)) = D(12,33) = {12,13,22,23,32,33}

are equivalent; this new lemma takes any arbitrary non-empty set of
equivalent elements, and extends it to a diamond-shaped set of
equivalent elements. In our example it extends E={13,22} to
E={12,13,22,23,32,33}, ie.,

..                  33
..  ..              32  23
22  13              22  13
..  ..    to:       12  ..
..  ..              ..  ..
..  ..              ..  ..
..                  ..

\end{verbatim}
}

\newpage
6.22. An operation dual to J
{\myttchars
\footnotesize
\begin{verbatim}
Let Eq(P) be the equivalence class of P.
Formally,

Eq(P) := {Q | J(P)=J(Q)}.

We know that J(P) returns the top element of Eq(P).
We saw, by the bottom element lemma, that each Eq(P) has a bottom element.
Let's denote that bottom element by B(P).
Formally, B(P) is the "&" of all elements of Eq(P).
(A finite conjunction because we are in the finite case!)

We have that Eq(P) is made of all elements between B(P) and J(P),
and nothing else...

\end{verbatim}
}

\newpage
6.23. How J interacts with $â$
{\myttchars
\footnotesize
\begin{verbatim}
We know (proofs later!) that "&" is monotonous on both its inputs,
and that P<=J(P) and that J is monotonous, i.e.,

P<=P'       Q<=Q'                   P<=Q
---------   ---------   -------    ----------
P&Q<=P'&Q   P&Q<=P&Q'   P<=J(P)    J(P)<=J(Q)

These things mean that for any truth-values P and Q we know some
relations between P&Q, J(P)&Q, ..., J(J(P)&J(Q)):

J(J(P)&J(Q))
^  ^   ^
/   |    \
/    |     \
J(J(P)&Q) J(P)&J(Q)  J(P&J(Q))
^ ^  ^     ^  ^  ^
|  \/       \/   |
|  /\       /\   |
J(P)&Q   J(P&Q)   P&J(Q)
^    ^     ^
\   |    /
\  |   /
P&Q
But M3 tells us that J(P&Q)=J(P)&J(Q), so at least the two middle
vertices in the cube-shaped diagram above yield the same result...
Actually we can prove more: J(P&Q) is equal to all the four upper
truth-values in the diagram above. Proofs:

J(J(P)&Q)    = J(J(P))&J(Q)    = J(P)&J(Q)
J(P&J(Q)) =    J(P)&J(J(Q)) = J(P)&J(Q)
J(J(P)&J(Q)) = J(J(P))&J(J(Q)) = J(P)&J(Q)

\end{verbatim}
}

\newpage
6.24. How J interacts with $â$
{\myttchars
\footnotesize
\begin{verbatim}
We know (proofs later!) that "â" is monotonous on both its inputs,
and (again!) that P<=J(P) and that J is monotonous, i.e.,

P<=P'       Q<=Q'                   P<=Q
---------   ---------   -------    ----------
PvQ<=P'vQ   PvQ<=PvQ'   P<=J(P)    J(P)<=J(Q)

These things mean that for any truth-values P and Q we know these
relations between PvQ, J(P)vQ, ..., J(J(P)&J(Q)):

J(J(P)âJ(Q))
^  ^   ^
/   |    \
/    |     \
J(J(P)âQ) J(P)âJ(Q)  J(PâJ(Q))
^ ^  ^     ^  ^  ^
|  \/       \/   |
|  /\       /\   |
J(P)âQ   J(PâQ)   PâJ(Q)
^    ^     ^
\   |    /
\  |   /
PâQ

But we know more. We can prove that we have J(J(P)âJ(Q))<=J(PâQ),

\end{verbatim}
}

\newpage
6.25. How J interacts with $â$ (2)
{\myttchars
\footnotesize
\begin{verbatim}
But we know more. We can prove that we have J(J(P)âJ(Q))<=J(PâQ),

------           ------
P<=PâQ           Q<=PâQ
------------Mo   ------------Mo
J(P)<=J(PâQ)     J(Q)<=J(PâQ)
---------------------------
J(P)âJ(Q)<=J(PâQ)
-----------------------Mo   ----------------M2
J(J(P)âJ(Q))<=J(J(PâQ))     J(J(PâQ))=J(PâQ)
--------------------------------------------
J(J(P)âJ(Q))<=J(PâQ)

and this implies that all the 4 truth-values in the upper lozenge are
equal...

\end{verbatim}
}

\newpage
6.26. How ZHAs are cut into equivalence classes
{\myttchars
\footnotesize
\begin{verbatim}
We saw that the equivalence classes of J are diamond-shaped regions,
but we don't know yet how which ways of splitting a ZHA into
diamond-shaped regions correspond to "J"s that obey M1, M2 and M3...
For example, does this correspond a valid J?

/\
55                   /  \
55  55                /   /\
55  55  35             /   /  \
55  55  35  35          /\  /\   \
51  55  33  35  35       /\ \/  \   \        (*)
50  51  33  33  35  35     \ \ \  /\  /
50  51  33  13  35        \ \/\/  \/
50  21  13  13           \/ /   /
21  13  13              \/   /
13  13                 \  /
13                    \/

It turns out that no.
Look at the frontiers between equivalence classes.
We will see two separate arguments.

\end{verbatim}
}

\newpage
6.27. How ZHAs are cut into equivalence classes (2)
{\myttchars
\footnotesize
\begin{verbatim}
The first, based on the fact that J(Q)=J(R) implies J(P&Q)=J(P&R),
shows that borders that make lambda and mirrored lambdas are not
possible,

/\         /\                  /\     /\
/\ \       / /\                /\/\   /\/\
\/\/       \/\/                \/ /   \ \/
\/         \/                  \/     \/

(lambda)  (mirrored lambda)     (y)   (mirrored y)

and a second one, based on the fact that St(P) and St(Q) implies
St(P&Q), that shows that borders that make "y"s and mirrored "y"s are
not possible.

\end{verbatim}
}

\newpage
6.28. Borders like lambdas are not possible
{\myttchars
\footnotesize
\begin{verbatim}
Lemma: if Q==R then P&Q==P&R  ("&' preserves equivalence").
Proof:

J(Q)=J(R)
-------------------
J(Q)=J(R)           J(P)&J(Q)=J(P)&J(R)
-------------&pe  :=  ===================
J(P&Q)=J(P&R)            J(P&Q)=J(P&R)

Diagrammatically, we can use "P&" to "move southwest", as here:

P     Q         52      34
\  /  \          \  /   \
P&Q    R          32      14
\  /             \   /
Q&R                12

In the diagram (*) we have J(34)=J(14)=35, but J(32)=33 and J(12)=13;
if we take P=52, Q=34, R=14, the lemma &pe would imply that J(32)=J(12),
which does not hold. Diagrammatically, the lemma "&pe" implies that
the lines marking the frontiers between different equivalence classes
cannot make either a "lambda" or its mirror image...

/\         /\
/\ \       / /\
\/\/       \/\/
\/         \/

(lambda)  (mirrored lambda)

\end{verbatim}
}

\newpage
6.29. Borders like "y"s are not possible
{\myttchars
\footnotesize
\begin{verbatim}
Lemma: St(P) and St(Q) implies St(P&Q)    ("& preserves stability")
Proof:

P=J(P)  Q=J(Q)
==============   ----------------M3
P=J(P)  Q=J(Q)         P&Q=J(P)&J(Q)    J(P)&J(Q)=J(P&Q)
--------------&ps  :=  ---------------------------------
P&Q=J(P&Q)                     P&Q=J(P&Q)

We start with the case in which our ZHA is a lozenge.
We know that equivalence classes are diamond-shaped regions.
When the ZHA is a lozenge, the equivalence classes are lozenges too.

Let's look at this example. Here are a ZHA H and a function J: H -> H
on it; J obeys M1 and M2 - remember the geometrical meaning of M1 and
M2! - and we want to show that that J cannot obey M3 too.

33                 33             /\
32  23             33  33          /  \
31  22  13         31  33  13       /\  /\
30  21  12  03     31  31  13  13    /  \/  \
20  11  02         31  13  13      \  /   /
10  01             13  13         \/   /
00                 13            \  /
\/

\end{verbatim}
}

\newpage
6.30. Borders like "y"s are not possible (2)
{\myttchars
\footnotesize
\begin{verbatim}
Let's look at this example. Here are a ZHA H and a function J: H -> H
on it; J obeys M1 and M2 - remember the geometrical meaning of M1 and
M2! - and we want to show that that J cannot obey M3 too.

33                 33             /\
32  23             33  33          /  \
31  22  13         31  33  13       /\  /\
30  21  12  03     31  31  13  13    /  \/  \
20  11  02         31  13  13      \  /   /
10  01             13  13         \/   /
00                 13            \  /
\/

Let P' be the truth-value at the left of the vertex of the "y",
and Q' be the truth-value at the right of the vertex of the "y".
In this example, P'=12 and Q'=21.
Let P be J(P'),
and Q be J(Q').
The line from P' to P points exactly northwest, and
the line from Q' to Q points exactly northeast;
because of this, P'&Q' is equal to P&Q, and P'&Q' is the truth-value
just below the vertex of the "y".
Let R be P&Q = P'&Q'.

P and Q are stable, and so, by "&ps", R=P&Q=P'&Q' must be stable too.
But, by hypothesis, the top element of the equivalence class of R is Q,
so R is not stable, and thus the J in our example cannot obey M3.

\end{verbatim}
}

\newpage
6.31. Stable elements and diamond-shaped regions
{\myttchars
\footnotesize
\begin{verbatim}
Two slogans:
Equivalent elements form diamond-shaped regions
Stable elements form a sub-ZHA

Definitions:

P==Q  := P* <-> Q*                (P==Q  is true or false)
St(P) := P == P*                  (St(P) is true or false)
Sts   := {P in Omega | P == P*}   (Sts   is a set)
Di(P) := {Q in Omega | P == Q}    (Di(P) is a set)
Dis   := {Di(P) | P in Omega}     (Dis   is a partition of Omega)

33             33              33
32  23         33  33          33  33
22  13         33  13          33  33
12  03         13  13          33  03
11  02         11  13          33  03
10  01         11  11          10  03
00             11              00

Pid            PJ              Pnotnot

\end{verbatim}
}

\newpage
6.32. Modalities induce Z-quotients
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
6.33. Z-quotients are modalities
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
6.34. Modalities correspond to morphisms of HAs
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

%
% ---
\newpage
7. Sheaves
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
7.1. Restriction, compatibility, glueing
{\myttchars
\footnotesize
\begin{verbatim}
2|->20       3|->300
3|->300      4|->4000
{2,3,4} {3,4,5}   4|->4000     5|->50
^       ^         -         -
\     /           \       /
\   /             v     v
{3,4}              3|->300
4|->4000

The domain of 20,300,4000 is {2,3,4}.
The domain of 300,4000,50 is {3,4,5}.
The common domain of 20,300,4000 and 300,4000,50
is {2,3,4}â{3,4,5} = {3,4}.
The restriction of 20,300,4000 to {3,4} is 300,4000.
The restriction of 300,4000,50 to {3,4} is 300,4000.   â same!
20,300,4000 and 300,4000,50 are compatible.

We are moving down, toward smaller sets, using intersections.
Is there a way to move up - to unions?
Yes, by glueing.
But we have to see some other things first.

\end{verbatim}
}

\newpage
7.2. Compatible families
{\myttchars
\footnotesize
\begin{verbatim}
Let's write the domain of a function in its subscript.
Suppose that f_A compat g_B compat h_C compat k_D,
and that EâAâBâCâD.
Then the restrictions of f_A, g_B, h_C, k_D to E all coincide!!!
The diagram below should make

A     B     C     D         f_A       g_B       h_C       k_D
AâB   BâC   CâD               ?_AâB     ?_BâC     ?_CâD
^    ^    ^                      \      |      /
\   |   /                        \     |     /
\  |  /                          \    |    /
\ | /                            v   v   v
E                                 ?_E

?_AâB = f_A|AâB = g_B|AâB   f_A|E = f_A|AâB|E = g_B|AâB|E = g_B|E
?_BâC = g_B|BâC = h_C|BâC   g_B|E = g_B|BâC|E = h_C|BâC|E = h_C|E
?_CâD = h_C|CâD = k_D|CâD   h_C|E = h_C|CâD|E = k_D|CâD|E = k_D|E

We say that the family {f_A, g_B, h_C, k_D} is
/pairwise-compatible/ when any two elements in it
are compatible - f_A compat g_B compat h_C compat k_D
plus f_A compat h_C, g_B compat k_D, f_A compat k_D.

\end{verbatim}
}

\newpage
7.3. Compatible families: naming
{\myttchars
\footnotesize
\begin{verbatim}
A notation trick...
Compare:

f_A       g_B       h_C       k_D       f_A       f_B       f_C       f_D
?_AâB     ?_BâC     ?_CâD               f_AâB     f_BâC     f_CâD
\      |      /                         \      |      /
\     |     /                           \     |     /
\    |    /                             \    |    /
v   v   v                               v   v   v
?_E                                     ?_E

?_AâB := f_A|AâB = g_B|AâB               f_AâB := f_A|AâB = f_B|AâB
?_BâC := g_B|BâC = h_C|BâC               f_BâC := f_B|BâC = f_C|BâC
?_CâD := h_C|CâD = k_D|CâD               f_CâD := f_C|CâD = f_D|CâD
?_E := f_A|E = g_B|E = h_C|E = k_D|E     f_E := f_A|E = f_B|E = f_C|E = f_D|E

A compatible family {f_A,f_B,f_C,f_D}
induces a bigger family having one f_U
for each empty set U that is smaller
than _some_ of the sets A, B, C, D...

And these f_U's are well-defined,
all ways of defining them from the
original {f_A,f_B,f_C,f_D} by restriction
yield the same result.

\end{verbatim}
}

\newpage
7.4. Saturating downwards
{\myttchars
\footnotesize
\begin{verbatim}
Remember that we had and operation â' on DAGs
that regarded each 1' as black paint that was too liquid
and that would flow down, painting the 0's below it
in black...

0           0
0 0         0 0
0 0 0       0 0 0
â 0 0 1 0  =  0 0 1 0
1 0 0       1 1 1
0 0         1 1
0           1

Let's use the same symbol, â, for an operation that
starts with a compatible family, say {f_A,f_B,f_C,f_D},
and produces a (possible much bigger!) family made of
all the restrictions of f_A, f_B, f_C, f_D.

Also:

dom f_A = A
dom {f_A, f_B, f_C, f_D} = {A, B, C, D}

\end{verbatim}
}

\newpage
7.5. An operation for all kinds of restrictions
{\myttchars
\footnotesize
\begin{verbatim}
This operation simplifies things magically.
(I learned it from Simmons's paper on Omega Sets).

U Â   V =     UâV
U Â g_V = (error)
f_U Â   V = f_U|UâV
f_U Â g_V = f_U|UâV

So:     U Â V = V Â U      is true always
f_U Â g_V = g_V Â f_U  is true iff f_U and g_V
are compatible

Now:      U Â {V, W} = {UÂV, UÂW} = {UâV, UâW}
U Â O(X)   = all (open) subsets of U    = â{U}
f_U Â O(X)   = all restrictions of f_U
{f_U,g_V,h_W}ÂO(X)   = all restrictions of f_U, g_V, h_W,
which yields somthing nice when
f_U, g_V, h_W are compatible,
and something messy when they are not.

We can define âA := AÂO(X), and this works for all interesting cases!

\end{verbatim}
}

\newpage
7.6. Sheaves of functions
{\myttchars
\footnotesize
\begin{verbatim}
For each open set UâR,
Câ(U,R) is the set of smooth functions from U to R.
Warning: here (a,b) sometimes mean an open interval, not a pair!

(4,6) |--> Câ((4,6),R)    f_{(4,6)}:(4,6)->R
^             |                 -
incl|             |restr            |restr
|             v                 v
(5,6) |--> Câ((5,6),R)    f_{(4,5)}:(4,5)->R

O(R) - - - - -> Set

We can regard Câ(-,R) as a (contravariant) functor.

Hey:

Câ(-,R): O(R)^op -> Set

is a sheaf because compatible families can be glued
in a unique way!

\end{verbatim}
}

\newpage
7.7. Limited functions are not sheaves
{\myttchars
\footnotesize
\begin{verbatim}
Let L(-,R): O(R)^op -> Set
be the contravariant functor that returns
the _limited_ functions on open sets.

Certain families of limited functions
are compatible, but their glueing is not limited,
so it "does not exist".

L(-,R) violates one of the conditions for being a sheaf:
that glueings must exist.
The other condition is that glueings must be unique.
To violate that we need to go away from the realm of
the presheaves of functions, and use arbitrary functors.

\end{verbatim}
}

\newpage
7.8. The evil presheaf
{\myttchars
\footnotesize
\begin{verbatim}
E_1           {0,1}
/   \          /   \   0|->3
/     \        /     \  1|->4
v       v      v       v
E = E_2      E_3 = {2}     {3,4}
\       /      \       /
\     /        \     /
v   v          v   v
E_4            {5}
|              |
|              | 5|->6
v              v
E_5            {6,7}

The compatible family {2,3} has two different glueings: 0 and 1.
The compatible family {2,4} can't be glued.
The compatible family {} has two different glueings: 6 and 7.

\end{verbatim}
}

\newpage
7.9. Sheaves in $Set^{K^\op}$
{\myttchars
\footnotesize
\begin{verbatim}
...with the "obvious" notion of sheafness, are the ones that obey:

A_1  = A_2 Ã_A_4 A_3
/   \
/     \
v       v
A = A_2      A_3
\       /
\     /
v   v
A_4
|
|
v
A_5 = 1

So: A_1 and A_5 carry only redundant information,
and sheaves on Set^K^op are equivalent to objects
of Set^V !!!

\end{verbatim}
}

%
% ---
\newpage
8. Toposes
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
8.1. A formal definition for children
{\myttchars
\footnotesize
\begin{verbatim}
A _pullback_ for the diagram A->C<-B is an object D,
together with morphisms A<-D->B, that behaves like this:

{(a,b)âAÃB | f(a)=g(b)} ----> B
|                 |
|                 | g
v       f         v
A --------------> C

A _subobject_ of A is a diagram A' -> A
that behaves like an inclusion.
Notation: A' >-> A means that the arrow is a monic.

A _subobject classifier_ is an object Ω
that behaves like {0,1},
plus an arrow 1 >-> Ω (called "true")
that makes the curved arrow at the left have an inverse.

{aâA | P(a)} ------> 1      A' ---------> 1
v              v      v             v
| <--\         |      | --\         |
|    |         |     i|   |         |
v    |    P    v      v   v         v
A -----------> Ω      A ----------> Ω
»a.aâi(A)

A _topos_ is a CCC that has pullbacks and a subobject classifier
(-> extra structure and extra properties).

\end{verbatim}
}

\newpage
8.2. The main theorems
{\myttchars
\footnotesize
\begin{verbatim}
1) CCCs are exactly the categories in which we can interpret
(the system »1 os simply-typed) »-calculus
2) HAs are exactly the categories in which we can interpret
(intuitionistic) propositional logic
3) Every HA is a CCC
4) Set is a CCC
5) Every ZHA is a HA
6) Every (O(X),â) is a HA

7) Every ZTopos is a CCC         <-- ZToposes are in the next slide
8) Every ZTopos is a topos

9) Topos are exactly the categories in which we can interpret
(the system IST of intuitionistic, typed) set theory

There are many other ways of constructing toposes,
but I believe that ZToposes are the perfect tool for
doing Topos Theory for Children -

\end{verbatim}
}

\newpage
8.3. ZToposes
{\myttchars
\footnotesize
\begin{verbatim}
When we did logic on subsets of a ZHA - K, say -
each truth-value P was in fact a K-shaped diagram, e.g.,

0       P_1
P = 1 0 = P_2   P_3
1       P_4
1       P_5

We are going to do the same with sets.
An object A of Set^(K^op) is a K-shaped diagram of sets
and maps.

A_1
/   \
v     v
A = A_2     A_3
\     /
v   v
A_4
|
v
A_5

A _notion of sheafness_ on Set^K^op is something that tells us
which objects of Set^K^op "are" sheaves.

The "sheaves" of Set^K^op form a subcategory of Set^K^op
which is also a topos.   <- Magic!!!
In the case of ZToposes these subcategories of sheaves are
not something weird and new - we have this:

for any ZDAG D,
for notion of sheafness on Set^D^op,
there is a ZDAG D'
such that Sh(Set^D^op)âSet^D'^op.

\end{verbatim}
}

\newpage
8.4. Quotes from the Elephant
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

%
% ---
\newpage
8.5. A translation diagram for Heyting Algebras
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
8.6. A translation diagram for BiCCCs
{\myttchars
\footnotesize
\begin{verbatim}
\end{verbatim}
}

\newpage
8.7. Do our operations $â,â,â$ on ZHAs really deserve their names?
{\myttchars
\footnotesize
\begin{verbatim}
Many slides ago we talked about Alice's logic and Bob's logic...

(copy)

and we were sort of leaving implicit that any other similar tuple, like

(random logic)

would be a logic'' in Alice's book-world...
But things are not like that!!!
I just explained a version for children first!!!!!!!!
What's missing:

structure     properties (new!)
/-----------\ /--------\
a logic = (Om,and,or,...;eq_T,eq...)

where eq_T, ... are the properties (equations) that T,...
have to obey to deserver their names'', to behave as expected''.
They are:

(...)

\end{verbatim}
}

\newpage
8.8. The properties of $â,â,â,â,â$: a diagram
{\myttchars
\footnotesize
\begin{verbatim}
[diagrammatic mnemonic]

[deduction rules (sequents with le)]

[forall-ish formulation]

\end{verbatim}
}

\newpage
8.9. Definition 4.1.1
{\myttchars
\footnotesize
\begin{verbatim}
Definition 4.1.1 (a) Let \scrE and \scrF be toposes. A /geometric
morphism/ f:\scrF -> \scrE consists of a pair of functors f_*:\scrF->\scrE

\end{verbatim}
}

%
% ---
%
% -
%L print(); print(table.concat(sectionnames, "\n"))
\pu

\end{document}

%
% Local Variables:
% coding: utf-8-unix
% ee-anchor-format: "Â«%sÂ»"
% End: