Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
% (find-angg "LATEX/2010unilog-current.tex")
% (find-dn4ex "edrx08.sty")
% (find-angg ".emacs.templates" "s2008a")
% (defun c  () (interactive) (find-zsh "cd ~/LATEX/ && ~/dednat4/dednat41 2010unilog-current.tex && latex    2010unilog-current.tex"))
% (defun cp () (interactive) (find-zsh "cd ~/LATEX/ && ~/dednat4/dednat41 2010unilog-current.tex && pdflatex 2010unilog-current.tex"))
% (eev "cd ~/LATEX/ && Scp 2010unilog-current.{dvi,pdf} edrx@angg.twu.net:slow_html/LATEX/")
% (defun d () (interactive) (find-dvipage "~/LATEX/2010unilog-current.dvi"))
% (find-angg "LUA/texpage.lua")
% (defun tpd () (interactive)        (find-sh (format "~/LUA/texpage.lua -xdvi ~/LATEX/2010unilog-current.tex %d" (line-number-at-pos))))
% (defun tp  () (interactive) (find-bgprocess (format "~/LUA/texpage.lua -xdvi ~/LATEX/2010unilog-current.tex %d" (line-number-at-pos))))
% (find-xdvi-page  "~/LATEX/2010unilog-current.dvi")
% (find-pspage   "~/LATEX/2010unilog-current.pdf")
% (find-xpdfpage "~/LATEX/2010unilog-current.pdf")
% (find-pspage   "~/LATEX/2010unilog-current.ps")
% (find-zsh0 "cd ~/LATEX/ && dvips -D 300 -o 2010unilog-current.ps 2010unilog-current.dvi")
% (find-zsh0 "cd ~/LATEX/ && dvips -D 600 -P pk -o 2010unilog-current.ps 2010unilog-current.dvi && ps2pdf 2010unilog-current.ps 2010unilog-current.pdf")
% (find-zsh0 "cd ~/LATEX/ && dvips -D 300 -o tmp.ps tmp.dvi")
% (find-pspage  "~/LATEX/tmp.ps")
% (find-anggfile "LATEX/" "2010unilog")
% (find-twusfile "LATEX/" "2010unilog")
% (ee-cp "~/LATEX/2010unilog-current.pdf" (ee-twupfile "LATEX/2010unilog-current.pdf") 'over)
% (ee-cp "~/LATEX/2010unilog-current.dvi" (ee-twupfile "LATEX/2010unilog-current.dvi") 'over)
% (ee-cp "~/LATEX/2010unilog-current.pdf" (ee-twusfile "LATEX/2010unilog-current.pdf") 'over)
% (ee-cp "~/LATEX/2010unilog-current.dvi" (ee-twusfile "LATEX/2010unilog-current.dvi") 'over)
% http://angg.twu.net/LATEX/2010unilog-current.dvi
% http://angg.twu.net/LATEX/2010unilog-current.pdf

% For the first frozen/official version:
% ('''ee-cp "~/LATEX/2010unilog-current.tex" (ee-twusfile "LATEX/2010unilog-2010jun21.tex") 'over)
% ('''ee-cp "~/LATEX/2010unilog-current.dvi" (ee-twusfile "LATEX/2010unilog-2010jun21.dvi") 'over)
% ('''ee-cp "~/LATEX/2010unilog-current.pdf" (ee-twusfile "LATEX/2010unilog-2010jun21.pdf") 'over)
% http://angg.twu.net/LATEX/2010unilog-2010jun21.dvi
% http://angg.twu.net/LATEX/2010unilog-2010jun21.pdf

% (find-sh0 "mkdir /tmp/pen/")
% (find-sh0 "sudo mount -o uid=$UID -t vfat /dev/sdb1 /tmp/pen/")
% (find-fline "/tmp/pen/")
% (find-sh0 "cp -v ~/LATEX/2010unilog-current.pdf /tmp/pen/2010unilog-current.pdf")
% (find-xpdfpage "/tmp/pen/2010unilog-current.pdf")
% (find-sh0 "sudo umount -o uid=$UID -t vfat /dev/sdb1 /tmp/pen/")

% This file:
%   (find-LATEX "2010unilog-current.tex")
% It contains some diagrams used in both:
%      (find-angg "LATEX/2009unilog-dnc.tex")
% and: (find-angg "LATEX/2009unilog-slides.tex")
% Last version: 2010apr20

% \documentclass[oneside]{book}
% \documentclass[a4paper,landscape,10pt]{article}
\documentclass[a4paper,10pt]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
% (find-LATEXfile "2009unilog-dnc.aux")
% (find-LATEXfile "2010unilog-current.aux")
\usepackage{edrx08}       % (find-dn4ex "edrx08.sty")
%L process "edrx08.sty"  -- (find-dn4ex "edrx08.sty")
\input edrxheadfoot.tex   % (find-dn4ex "edrxheadfoot.tex")
\usepackage[x11names]{xcolor} % (find-es "tex" "xcolor")
\usepackage[colorlinks]{hyperref} % (find-es "tex" "hyperref")
\begin{document}


% (find-elnode "Text Lines")
% (defun targetln-of-to () (save-excursion (eek "M-e") (line-number-at-pos)))
% (defun show-targetln-of-to () (interactive) (message "%d" (targetln-of-to)))
% (define-key eev-mode-map [f7] 'show-targetln-of-to)

% «.LLaRC»			(to "LLaRC")
% «.outsiders»			(to "outsiders")
% «.abstract»			(to "abstract")
% «.outline»			(to "outline")
% «.internal-diagram»		(to "internal-diagram")
% «.internal-diagram-2»		(to "internal-diagram-2")
% «.phys-notation»		(to "phys-notation")
%   «.INTRODUCTION»		(to "INTRODUCTION")
% «.curry-howard»		(to "curry-howard")
% «.standard-erasings»		(to "standard-erasings")
% «.generalization»		(to "generalization")
% «.where-to»			(to "where-to")
% «.why-topos-theory»		(to "why-topos-theory")
% «.lifting-basic-tt»		(to "lifting-basic-tt")
% «.downcasing-diags»		(to "downcasing-diags")
% «.downcasing-diags-2»		(to "downcasing-diags-2")
% «.topos-theory»		(to "topos-theory")
% «.trees-to-dictionaries»	(to "trees-to-dictionaries")
% «.first-ambiguities»		(to "first-ambiguities")
% «.ambiguities-comp»		(to "ambiguities-comp")
% «.ambiguities-assoc»		(to "ambiguities-assoc")
% «.more-on-wd»			(to "more-on-wd")
% «.proto-things»		(to "proto-things")
% «.dn-functors»		(to "dn-functors")
% «.adjunctions»		(to "adjunctions")
% «.cheap-and-exp-adjs»		(to "cheap-and-exp-adjs")
% «.cheap-and-exp-adjs-2»	(to "cheap-and-exp-adjs-2")
% «.prog-with-long-names»	(to "prog-with-long-names")
%   «.YONEDA-LEMMA»		(to "YONEDA-LEMMA")
% «.yoneda-lemma»		(to "yoneda-lemma")
% «.yoneda-lemma-2»		(to "yoneda-lemma-2")
%   «.MONADS»			(to "MONADS")
% «.monads»			(to "monads")
% «.monads-to-adjs»		(to "monads-to-adjs")
% «.kleisli»			(to "kleisli")
% «.kleisli-adj»		(to "kleisli-adj")
% «.eilenberg-moore»		(to "eilenberg-moore")
% «.comparison-theorem»		(to "comparison-theorem")
% «.becks-lemma»		(to "becks-lemma")
% «.becks-lemma-2»		(to "becks-lemma-2")
% «.monads-and-cohomology»	(to "monads-and-cohomology")
%   «.CCCs»			(to "CCCs")
% «.CCCs»			(to "CCCs")
% «.cheap-toposes»		(to "cheap-toposes")
% «.lcalc-in-a-CCC-1»		(to "lcalc-in-a-CCC-1")
% «.lcalc-in-a-CCC-2»		(to "lcalc-in-a-CCC-2")
% «.product-property»		(to "product-property")
% «.product-diagrams»		(to "product-diagrams")
% «.product-diagrams-2»		(to "product-diagrams-2")
% «.products-as-adjs»		(to "products-as-adjs")
% «.exponentials»		(to "exponentials")
% «.exponentials-2»		(to "exponentials-2")
% «.morphs-as-seqs»		(to "morphs-as-seqs")
%   «.HYPERDOCTRINES»		(to "HYPERDOCTRINES")
% «.hyperdoctrines»		(to "hyperdoctrines")
% «.subobjects»			(to "subobjects")
% «.subobjects-2»		(to "subobjects-2")
% «.subobjects-3»		(to "subobjects-3")
% «.subobjects-4»		(to "subobjects-4")
% «.cartesianness»		(to "cartesianness")
% «.cartesianness-2»		(to "cartesianness-2")
% «.pbs-are-cartesian»		(to "pbs-are-cartesian")
% «.cleavages»			(to "cleavages")
% «.cleavages-2»		(to "cleavages-2")
% «.cleavage-induces-cob»	(to "cleavage-induces-cob")
% «.adjs-to-change-of-base»	(to "adjs-to-change-of-base")
% «.nd-in-pred-set-quants»	(to "nd-in-pred-set-quants")
% «.rules-quantifiers»		(to "rules-quantifiers")
% «.rules-quantifiers-2»	(to "rules-quantifiers-2")
% «.rules-equality»		(to "rules-equality")
% «.adjs-to-cob-quants»		(to "adjs-to-cob-quants")
% «.adjs-to-cob-equality»	(to "adjs-to-cob-equality")
% «.adjs-to-cob-generic»	(to "adjs-to-cob-generic")
% «.adjs-to-cob-candidates»	(to "adjs-to-cob-candidates")
% «.Pand»			(to "Pand")
% «.Pand-2»			(to "Pand-2")
% «.Ptrue»			(to "Ptrue")
% «.Pimp»			(to "Pimp")
% «.BCCL»			(to "BCCL")
% «.BCCR»			(to "BCCR")
% «.Frobenius»			(to "Frobenius")
% «.cheap-hyps»			(to "cheap-hyps")
% «.pimp-implies-frob»		(to "pimp-implies-frob")
% «.pimp-implies-frob-2»	(to "pimp-implies-frob-2")
% «.pimp-implies-frob-3»	(to "pimp-implies-frob-3")
% «.BCCL-implies-BCCR»		(to "BCCL-implies-BCCR")
% «.equality-lemmas»		(to "equality-lemmas")
% «.lambda-calc-in-a-hyp»	(to "lambda-calc-in-a-hyp")
% «.prop-calc-in-a-hyp»		(to "prop-calc-in-a-hyp")
% «.fa-E-in-a-hyp»		(to "fa-E-in-a-hyp")
% «.fa-I-in-a-hyp»		(to "fa-I-in-a-hyp")
% «.ex-I-in-a-hyp»		(to "ex-I-in-a-hyp")
% «.ex-E-in-a-hyp»		(to "ex-E-in-a-hyp")
% «.equality-hofmann95»		(to "equality-hofmann95")
%   «.POLYMORPHISM»		(to "POLYMORPHISM")
% «.PL-cats»			(to "PL-cats")
% «.PL-cats-2»			(to "PL-cats-2")
%   «.TYPING-PROTO-THINGS»	(to "TYPING-PROTO-THINGS")
% «.uppercasing-names»		(to "uppercasing-names")
% «.uppercasing-names-2»	(to "uppercasing-names-2")
% «.uppercasing-names-3»	(to "uppercasing-names-3")
% «.uppercasing-names-4»	(to "uppercasing-names-4")
% «.currying-long-names»	(to "currying-long-names")
% «.typing-proto-cats»		(to "typing-proto-cats")
%   «.ETC»			(to "ETC")
% «.HAs-intro»			(to "HAs-intro")
% «.LT-intro»			(to "LT-intro")
% «.LT-intro-2»			(to "LT-intro-2")
% «.map-of-obvious-places»	(to "map-of-obvious-places")
% «.no-theorems»		(to "no-theorems")
% «.typing-proto-adjs»		(to "typing-proto-adjs")
% «.typing-proto-CCCs»		(to "typing-proto-CCCs")
% «.typing-proto-fibs»		(to "typing-proto-fibs")



% «.hyps»			(to "hyps")
% «.bcc»			(to "bcc")


\setlength{\parindent}{0em}

\par Downcasing Types
\par Eduardo Ochs
\par PURO/UFF, LLaRC
\par eduardoochs@gmail.com
\par http://angg.twu.net/
\bsk
\bsk
\par I first presented this, in an incomplete form,
\par at the UniLog'2010 (Cascais, Portugal, april 2010)...
\par The current version (see the footer for the date)
\par has many more slides, and I am still adding more.
\bsk
\bsk
\bsk
\bsk
\bsk
{\color{Firebrick4}
\par What you are reading is a work in progress.
\par Page 8 contains an outline, and explains
\par how close to being finished each section is.
\msk
% \par Correction: this is the first official release
% \par of these notes (date: 2010jun21). Page 7 contains an outline,
% \par and explains how close to being finished each section is.
% \msk
% \par This version can be downloaded from:
% \par \url{http://angg.twu.net/LATEX/2010unilog-2010jun21.dvi}
% \par \url{http://angg.twu.net/LATEX/2010unilog-2010jun21.pdf}
% \par I find navigation a bit better in the dvi, with xdvik.
% \msk
\par For the latest version look at:
\par \url{http://angg.twu.net/math-b.html}
\par or go straight to:
\par \url{http://angg.twu.net/LATEX/2010unilog-current.dvi}
\par \url{http://angg.twu.net/LATEX/2010unilog-current.pdf}
\par I find navigation a bit better in the dvi, with xdvik.
\par {\sl Comments are very welcome!}
}


% (find-LATEXfile "poep.tex" "never told the story")


% For "article":
% (find-dn4ex "edrx08.sty" "slides")
%\nolos
\def\myslide   #1#2{\newpage{\bf \textcolor{Chocolate4}{#1}}\par\label{#2}}
\def\myslide   #1#2{\newpage{\bf \textcolor{Firebrick4}{#1}}\par\label{#2}}

\mylosopen{tmp.los}
\def\myslide   #1#2{\newpage{\bf #1}\par\label{#2}\addtolos{#1}}
% \mylosopen{tmp.los}
% \def\myslide   #1#2{\newpage{\bf #1}\par\label{#2}}

% Experimental, 2010jun19:
\def\anchortargettext#1#2#3{\hypertarget{#1}{\href{\##2}{#3}}}
\def\tocline#1#2{\par #1 \dotfill #2}
\def\tocline#1#2{\par \anchortargettext{.#2}{#2}{#1} \dotfill #2}
\def\myslide#1#2{\newpage{\bf #1}\par\label{#2}\addtolos{#1}}
\def\myslide#1#2{\newpage{\bf \anchortargettext{\the\count0}{.\the\count0}{#1}}\par\label{#2}\addtolos{#1}}
% \def\addtolos#1{\addtocontents{mylos}{\protect\tocline{#1} {\thepage}}}
\def\tocsection#1{\par\msk {\leavevmode\phantom{x}#1:}}

\def\mysectiona#1#2{\addtocontents{mylos}{\protect\tocsection{#1}}}
\def\mysection#1#2{\newpage\mysectiona{#1}{#2}\vskip 2cm{\Large #1}}
\def\mysection#1#2{\addtocontents{mylos}{\protect\tocsection{#1}}}
                   



% (find-LATEXfile "2010unilog-current.aux")



\newpage
Index of the slides:
\msk
% To update the list of slides uncomment this line:
%\mylosopen{tmp.los}
%\makelos{tmp.los}
% then rerun LaTeX on this file, and insert the contents of "tmp.los"
% below, by hand (i.e., with "insert-file"):
% (find-fline "tmp.los")
% (insert-file "tmp.los")

\tocline {LLaRC} {5}
\tocline {Outsiders} {6}
\tocline {Abstract} {7}
\tocline {Outline} {8}
\tocline {The internal diagram of a map} {9}
\tocline {The internal diagram of a map (2)} {10}
\tocline {Physicists' notation} {11}
\tocsection {Introduction}
\tocline {Curry-Howard} {12}
\tocline {Erasings as projections} {13}
\tocline {Generalization is a kind of lifting} {14}
\tocline {Where we are heading} {15}
\tocline {Why topos theory (is important)} {16}
\tocline {Lifting basic topos theory} {17}
\tocline {Downcasing diagrams} {18}
\tocline {Downcasing diagrams (2)} {19}
\tocline {Can we make Topos Theory more accessible?} {20}
\tocline {From trees to dictionaries} {21}
\tocline {Ambiguities} {22}
\tocline {Ambiguities (2)} {23}
\tocline {Ambiguities (3)} {24}
\tocline {More on the `wd' symbol: the syntactical world} {25}
\tocline {The syntactical world: proto-things} {26}
\tocline {Downcasing functors} {27}
\tocline {Adjunctions} {28}
\tocline {Cheap and expensive adjunctions} {29}
\tocline {Cheap and expensive adjunctions (2)} {30}
\tocline {Programming with long names} {31}
\tocsection {The Yoneda Lemma}
\tocline {The Yoneda Lemma} {32}
\tocline {The Yoneda Lemma (2)} {33}
\tocsection {Monads}
\tocline {Monads} {34}
\tocline {From monads to adjunctions} {35}
\tocline {The Kleisli category of a monad} {36}
\tocline {The Kleisli adjunction of a monad} {37}
\tocline {The Eilenberg-Moore category of a monad} {38}
\tocline {The comparison theorem} {39}
\tocline {Beck's lemma} {40}
\tocline {Beck's lemma (2)} {41}
\tocline {Monads and cohomology} {42}
\tocsection {Cartesian Closed Categories}
\tocline {Cartesian Closed Categories} {43}
\tocline {Cheap and expensive toposes} {44}
\tocline {$\lambda $-calculus in a CCC: an example} {45}
\tocline {$\lambda $-calculus in a CCC: an example (2)} {46}
\tocline {The product property} {47}
\tocline {Product diagrams} {48}
\tocline {Product diagrams (2)} {49}
\tocline {Products as adjunctions} {50}
\tocline {Exponentials} {51}
\tocline {Exponentials (2)} {52}
\tocline {Morphisms as sequents} {53}
\tocsection {Hyperdoctrines}
\tocline {Hyperdoctrines} {54}
\tocline {Subobjects} {55}
\tocline {Subobjects (2)} {56}
\tocline {Subobjects (3)} {57}
\tocline {Subobjects (4)} {58}
\tocline {Cartesianness} {59}
\tocline {Cartesianness (2)} {60}
\tocline {Pullbacks are cartesian} {61}
\tocline {Cleavages} {62}
\tocline {Cleavages (2)} {63}
\tocline {Cleavage induces change-of-base} {64}
\tocline {Adjoints to change-of-base} {65}
\tocline {Semantics for ND in Pred(Set): quantifiers} {66}
\tocline {Rules for the quantifiers} {67}
\tocline {Rules for the quantifiers (2)} {68}
\tocline {Rules for equality} {69}
\tocline {Adjoints to change-of-base: quantifiers} {70}
\tocline {Adjoints to change-of-base: equality} {71}
\tocline {Adjoints to change-of-base: generic} {72}
\tocline {Adjoints to change-of-base: candidates} {73}
\tocline {Preservation of `and'} {74}
\tocline {Preservation of `and' (2)} {75}
\tocline {Preservation of `true'} {76}
\tocline {Preservation of `implies'} {77}
\tocline {Beck-Chevalley for the left adjoint} {78}
\tocline {Beck-Chevalley for the right adjoint} {79}
\tocline {Frobenius} {80}
\tocline {Cheap hyperdoctrines} {81}
\tocline {Pimp implies Frob} {82}
\tocline {Pimp implies Frob (2)} {83}
\tocline {Pimp implies Frob (3)} {84}
\tocline {BCCL implies BCCR} {85}
\tocline {Lemmas about equality} {86}
\tocline {$\lambda $-calculus in a hyperdoctrine} {87}
\tocline {Propositional calculus in a hyperdoctrine} {88}
\tocline {Interpreting `$\forall I$' in a hyperdoctrine} {89}
\tocline {Interpreting `$\forall E$' in a hyperdoctrine} {90}
\tocline {Interpreting `$\exists I$' in a hyperdoctrine} {91}
\tocline {Interpreting `$\exists E$' in a hyperdoctrine} {92}
\tocline {Equality types: Hofmann 1995} {93}
\tocsection {Models for polymorphism}
\tocline {PL categories} {94}
\tocline {PL categories (2)} {95}
\tocsection {Typing proto-categories}
\tocline {Uppercasing names} {96}
\tocline {Uppercasing names (2)} {97}
\tocline {Uppercasing names (3)} {98}
\tocline {Uppercasing names (4)} {99}
\tocline {Currying long names} {100}
\tocline {Typing proto-categories} {101}
\tocsection {Etc}
\tocline {Introduction to Heyting Algebras} {102}
\tocline {Introduction to Lawvere-Tierney Topologies} {103}
\tocline {Introduction to Lawvere-Tierney Topologies (2)} {104}
\tocline {Map of the world} {105}
\tocline {There are no (new) theorems in these slides} {106}
\tocline {Typing proto-adjunctions} {107}
\tocline {Typing proto-CCCs} {108}
\tocline {Typing proto-fibrations} {109}

\input 2010unilog-current.dnt



\def*{\ensuremath{\bullet}}

%:*&*\land *
%:*->>*\epito *
\def\cur  {\operatorname{cur}}
\def\uncur{\operatorname{uncur}}

\def\sm#1{\begin{smallmatrix}#1\end{smallmatrix}}
\def\psm#1{\left(\begin{smallmatrix}#1\end{smallmatrix}\right)}
\def\catAK{{\catA_T}}
\def\catAEM{{\catA^T}}
\def\KOBJ   #1#2{[#1 \diagxyto/-->/<150> #2]}
\def\EMOBJ  #1#2#3{[#1 \diagxyto/<-/<150>^{#3} #2]}
\def\EMOBJT #1#2{[#1 \diagxyto/<-/<150>^{#2} T#1]}
\def\EMOBJRL#1#2{[#1 \diagxyto/<-/<150>^{#2} RL#1]}

\def\LL{\Lambda}
\def\Eq{\operatorname{Eq}}

\def\ren    {¯{ren}}
\def\iso    {¯{iso}}

% This gives us a way to draw all the "standard
% erasings" of a tree from a single tree definition.
% Low-level words:
%
\def\archfull#1#2#3{#1\equiv #2:#3} \def\ARCHFULL    {\let\arch=\archfull}     
\def\archdnc#1#2#3{#1}              \def\ARCHDNC     {\let\arch=\archdnc}      
\def\archtermtype#1#2#3{#2:#3}      \def\ARCHTERMTYPE{\let\arch=\archtermtype}
\def\archterm#1#2#3{#2}             \def\ARCHTERM    {\let\arch=\archterm}     
\def\archtype#1#2#3{#3}             \def\ARCHTYPE    {\let\arch=\archtype}     
\def\rY#1{#1}                       \def\RY          {\let\r=\rY}              
\def\rN#1{}                         \def\RN          {\let\r=\rN}              
\def\ptypeY#1{#1}                   \def\PTYPEY      {\let\ptype=\ptypeY}      
\def\pytpeN#1{}                     \def\PTYPEN      {\let\ptype=\pytpeN}      
%
% High-level words:
%
\def\FULLRP{\ARCHFULL\RY\PTYPEY}
\def\FULLR {\ARCHFULL\RY\PTYPEN}
\def\FULLP {\ARCHFULL\RN\PTYPEY}
\def\FULL  {\ARCHFULL\RN\PTYPEN}
\def\TERMTYPERP{\ARCHTERMTYPE\RY\PTYPEY}
\def\TERMTYPER {\ARCHTERMTYPE\RY\PTYPEN}
\def\TERMTYPEP {\ARCHTERMTYPE\RN\PTYPEY}
\def\TERMTYPE  {\ARCHTERMTYPE\RN\PTYPEN}
\def\TERMRP{\ARCHTERM\RY\PTYPEY}
\def\TERMR {\ARCHTERM\RY\PTYPEN}
\def\TERMP {\ARCHTERM\RN\PTYPEY}
\def\TERM  {\ARCHTERM\RN\PTYPEN}
\def\TYPER {\ARCHTYPE\RY\PTYPEN}
\def\TYPE  {\ARCHTYPE\RN\PTYPEN}
\def\DNCR  {\ARCHDNC\RY\PTYPEN}
\def\DNC   {\ARCHDNC\RN\PTYPEN}

\def\adjwidth{150}
\def\monad#1#2#3#4{
  #1 \diagxyto/<-/<\adjwidth>^{#2} SB \diagxyto/->/<\adjwidth>^{#3} #4
}
\def\adjunction#1#2#3#4{
  #1 \two/<-`->/<\adjwidth>^{#2}_{#3} #4}

\def\limp{\mathbin{\limpchar}}

\def\Ids {\operatorname{Idls}}
\def\Spec{\operatorname{Spec}}
\def\MIds{\operatorname{MaxIdls}}

\def\ooo(#1,#2){\begin{picture}(0,0)\put(0,0){\oval(#1,#2)}\end{picture}}
\def\oooo(#1,#2){{\setlength{\unitlength}{1ex}\ooo(#1,#2)}}

\def\ctabular#1{\begin{tabular}{c}#1\end{tabular}}
\def\ltabular#1{\begin{tabular}{l}#1\end{tabular}}
\def\rtabular#1{\begin{tabular}{r}#1\end{tabular}}








% --------------------
% «LLaRC»  (to ".LLaRC")
% (s "LLaRC" "LLaRC")
\myslide {LLaRC} {LLaRC}

\par LLaRC =
\par Laboratório de Lógica e Representação do Conhecimento =
\par Laboratory of Logic and Representation of Knowledge
\par at PURO/UFF =
\par Pólo Universitário de Rio das Ostras/
\par Universidade Federal Fluminense
\msk
\par Rio das Ostras is city in the countryside of the
\par state of Rio de Janeiro, Brazil.
\par RO is $\sim$180Km away from Rio de Janeiro
\par and $\sim$150Km away from Niterói,
\par which is where the main campi of UFF are situated.
\msk
\par The LLaRC is a research laboratory that,
\par despite our efforts in the last two years, 8-(,
\par still doesn't have a physical room,
\par (the PURO has been facing severe space problems),
\par neither a decent internet connection
\par (we still have only about 3KB/s per machine at PURO),
\par and from nov/2009 to mar/2010 none of the printers
\par at PURO had toner...
\msk
\par We have decided that in order to give
\par {\sl some kind} of official existence to our current research
\par we would temporarily lower the bar for what we would ``publish'',
\par and work-in-progress versions of seminar notes, like these,
\par could be put in the LLaRC home page.
\msk
\par {\sl (We do not get brownie points for these).}
\bsk
{\color{Firebrick4}
\par {\sl This page should be removed for the final version, I guess...}
\par But the Silent Majority just repealed
\par in the last departmental meeting
\par an informal agreement that in my opinion
\par was the main tool that kept everyone working together
\par and in good spirits in spite of all difficulties...
\par Anyway: the details don't fit here,
\par I am saddened and pissed off,
\par and this page will be part of the first official
\par release of these notes. Cheers.
}

% (find-LATEXfile "poep.tex" "Alfred Kroeber")


% --------------------
% «outsiders»  (to ".outsiders")
% (s "Outsiders" "outsiders")
\myslide {Outsiders} {outsiders}

\par This is Category Theory (from here on: ``CT'')
\par done by an outsider, in a place where no one else
\par is doing research in CT, or even using CT in non-trivial ways...
\msk
\par If the ideas in these notes were perfect
\par AND crystal-clear AND had the best impact possible
\par then this is more or less what would happen:
\msk

* Local people close to me (non-CT-ists) would become able to read CT
books and articles;

\ssk

* CT-ists {\sl (would...)} find the method described here trivial, and
would start to circulate notes describing the archetypical models
behind several constructions that I've been struggling to understand
(sheafification, classifying toposes, *-autonomous categories,
differential categories, Kan extensions, the Grothendieck construction
on a fibration, schemes, parametric models, DTT on LCCCs, etc); I get
hold of their notes and understand everything;

\ssk

* Type theorists find out the right type systems for the syntactical
world, the real world and the projection; they also find classes of
type equations (for the ``hints'') that can be extracted from the
diagrams and solved automatically;

\ssk

* Proof-assistants people come up with very good ways to formalize CT
proofs by doing the syntactical part first, then completing the
details;

\ssk

* Parametricity people grok immediately everything here, and we work
together on the missing meta-theorems;

\ssk

* Philolophical Logic people would help me to fit these ideas in a
grander scheme of things: synthetical vs. analytical reasoning,
external diagrams vs. internal diagrams, the roles of intuition, of
archetypal models and generalization;

\ssk

* Diagrammatic logic people find out how to enrich my categorical
diagrams with some extra hints, so that diagrams like these, when
stored in a computer with the those extra hints would automatically
generate the derivation trees --- and the code for proof-assistants.

% (and for solving the type equations)




% --------------------
% «abstract»  (to ".abstract")
% (s "Abstract" "abstract")
\myslide {Abstract} {abstract}

I presented (a much shorter version of) this at UniLog'2010,

with this abstract:

\begin{quote}

  When we represent a category $\catC$ in a type system it becomes a
  7-uple, whose first four components --- class of objects, $\Hom$,
  $\id$, composition --- are ``structure''; the other three components
  are ``properties'', and only these last three involve equalities of
  morphisms.

  We can define a projection that keeps the ``structure'' and drops
  the ``properties'' part; it takes a category and returns a
  ``proto-category'', and it also acts on functors, isos, adjunctions,
  proofs, etc, producing proto-functors, proto-proofs, and so on.

  We say that this projection goes from the ``real world'' to the
  ``syntactical world''; and that it takes a ``real proof'', $P$, of
  some categorical fact, and returns its ``syntactical skeleton'',
  $P^-$. This $P^-$ is especially amenable to diagrammatic
  representations, because it has only the constructions from the
  original $P$ --- the diagram chasings have been dropped.

  We will show how to ``lift'' the proto-proofs of the Yoneda Lemma
  and of some facts about monads and about hyperdoctrines from the
  syntactical world to the real world. Also, we will show how each
  arrow in our diagrams is a term in a precise diagrammatic language,
  and how these diagrams can be read out as definitions. The
  ``downcased'' diagrams for hyperdoctrines, in particular, look as
  diagrams about $\Set$ (the archetypical hyperdoctrine), yet they
  state the definition of an arbitrary hyperdoctrine, plus
  (proto-)theorems.

\end{quote}

\par I am not totally sure that I fulfill all the promises of the abstract
\par in the current version of these slides.
\par (Actually I submitted a longer version of the abstract, where I promised
\par even more --- but what got published was the short version above).
\msk
\par In particular, the section on hyperdoctrines should be much clearer
\par and should contain at least the full translation and the full (proto-)proof
\par of lemma in page 9 in [Lawvere70] (``all constructions for $b=b'∧Qbb'$ are
\par isomorphic'') and for ``we only need to require adjoints to $^*$ and $\DD^*$,
\par plus a few cases of Frobenius and Beck-Chevalley'' in [Seely83] (page?)...
\par Also, my exposition of how to interpret ND in a hyperdoctrine is quite
\par incomplete --- the method for interpreting some subtrees of an ND
\par derivation as vertical morphisms (and then glueing the interpretations)
\par requires lots of details that I'm not going into...
\msk
\par But these slides are not intended to be totally self-contained ---
\par {\sl they are meant to help people to read the original papers!} 8-)






% --------------------
% «outline»  (to ".outline")
% (s "Outline" "outline")
\myslide {Outline} {outline}

* Introduction

* The Yoneda Lemma

* Monads

* Cartesian Closed Categories

* Hyperdoctrines

* Models for polymorphism

* Typing (proto-)fibrations

* Etc

\bsk

\par The introduction is quite good as it is now --- no urgent changes needed.
\msk
\par The section about the Yoneda Lemma needs more details ---
\par it shows just the first ideas, and doesn't show the implementation in Coq.
\msk
\par The section about monads is a curiosity, and it is there mostly to show
\par the power of the method. It is not especially interesting to type theorists.
\msk
\par The section about CCCs is quite good as it is now --- no urgent changes needed.
\msk
\par The section about hyperdoctrines is huge, but it still needs a lot of work ---
\par it is the main basic application (and the main testbed)  for Downcasing Types.
\par I need to make the translation between hyperdoctrine operations and
\par first-order logic very clear (for {\sl many} reasons), and in comparison
\par with how complete and clear I need that section to be it is still
\par vary incomplete, and very messy.
\msk
\par The section on ``models for polymorphism'' is in a very preliminary stage.
\par It should show how to translate (or: how to ``understand'')
\par at least four texts on models for polymorphic $ð$-calculus:
\par Seely's ``Categorical Semantics for Higher Order Polymorphic $ð$-Calculus'',
\par Reynolds's ``Polymorphism is not Set-Theoretic'',
\par Pitts's ``Polymorphism is Set-Theoretic, constructively'',
\par and chapter 8 of Jacobs's book, ``Categorical Logic and Type Theory''.
\msk
\par The section on ``typing proto-fibrations'' is in a very preliminary stage too.
\msk
\par The section ``Etc'' is currently just a handful of slides pointing to
\par other applications (works in progress).
\msk
\par The bilbiography section is missing.
\msk
\par Also, several important ideas for the method of downcasings came to me
\par while I was struggling to understand and translate two papers:
\par Blute, Cockett and Seely's ``Differential Categories'' (2005)
\par and Kock's ``A simple axiomatics for differentiation'' (1977).
\par My translations for parts of those papers will be included in a later
\par version.




\widemtos

% --------------------
% «internal-diagram»  (to ".internal-diagram")
% (s "The internal diagram of a map" "internal-diagram")
\myslide {The internal diagram of a map} {internal-diagram}
\msk
\par The idea of {\sl internal diagram of a map}
\par is crucial for understanding the method of downcasing types.
\par (It took me several years to identify it (!), and to find a
\par few scattered references to it in the literature ---
\par it is not mention often...)
\msk
\par In our early school years we used to see a function like
%
$$\begin{array}{ccrcl}
  \sqrt{\,·\,} &:& \N &\to& \R \\
            &&  n &\mto& \sqrt{n} \\
  \end{array}
$$
%
\par as the ``internal view'' below, in ``standard notation'' ---
\par only we used to draw it with `$\to$'s in place of the `$\mto$'s.
\msk

%D diagram N-to-R
%D 2Dx     100        +35 +20   +20   +30 +15 +15
%D 2D  100 External   \N  --->  \R               
%D 2D   +08           n   |-->  sn                  
%D 2D                                    
%D 2D  +20 internal   n0  |-->  r0    a0 |--> b0
%D 2D  +08 internal   n1  |-->  r1    a1 |--> b1
%D 2D  +08 Internal   n2  |-->  r2    a2 |--> b2
%D 2D  +10            n.  |-->  r.    a. |--> b.
%D 2D  +14            nn  |-->  rn    an |--> bn
%D 2D  +08            ns  |-->  rs    as |--> bs
%D 2D                                 
%D 2D  +20                stan           down
%D 2D
%D (( External .tex= \rtabular{external\\view} y+= 4 place
%D    Internal .tex= \rtabular{internal\\view} place
%D    stan     .tex= \ctabular{standard\\notation} place
%D    down     .tex= \ctabular{downcased\\notation} place
%D    \N \R -> .plabel= a \sqrt{\,·\,}
%D    n  sn .tex= \sqrt{n} |->
%D    n0 .tex= 0             r0 .tex= \sqrt{0} |->
%D    n1 .tex= 1             r1 .tex= \sqrt{1} |->
%D    n2 .tex= 2             r2 .tex= \sqrt{2} |->
%D    n. .tex= \vdots place  r. .tex= \vdots place
%D    nn .tex= n             rn .tex= \sqrt{n} |->
%D    n0 nn midpoint .TeX= \oooo(7,21) place
%D    r0 rn midpoint .TeX= \oooo(8,21) place
%D
%D    a2 .tex= 2             b2 .tex= \sqrt{2} |->
%D    an .tex= n             bn .tex= \sqrt{n} |->
%D    as .tex= n             bs .tex= r |->
%D
%D ))
%D enddiagram
%D
$$\diag{N-to-R}$$

\par The notation $n \mto \sqrt{n}$ is ``generic enough''
\par to let us reconstruct the definition of the function from it
\par (except maybe for the codomain; but let's not worry about that).
\par Note that from `$n \mto \sqrt{n}$' we can infer the ``syntactical action''
\par of the function: it puts the ``name'' of its argument under a `$\sqrt{\phantom{\,·\,}}$'.
\par We can define syntactical actions in \LaTeX:

\begin{verbatim}
      \def\myf#1{\sqrt{#1}}
      \def\myg#1{(#1)\sqrt{#1} - 42}
\end{verbatim}



% --------------------
% «internal-diagram-2»  (to ".internal-diagram-2")
% (s "The internal diagram of a map (2)" "internal-diagram-2")
\myslide {The internal diagram of a map (2)} {internal-diagram-2}
\msk
\par Not only `$n \mto \sqrt{n}$' is ``generic enough''
\par (to let us reconstruct $\sqrt{\,·\,}$ from it)
\par but also `$2 \mto \sqrt{2}$' can be ``generic enough''
\par in some contexts...
\par We can recognize it as the function that takes 2 to $\sqrt{2}$,
\par generalized ``to any value of 2''.

$$\diag{N-to-R}$$

\par We can think of `$2 \mto \sqrt{2}$' as being the
\par {\sl archetypal case} that we want to generalize.
\msk
\par We can also think of `$n \mto \sqrt{n}$' as being
\par an archetypical case (in a certain context, of course)
\par for a function from $\N$ to $\R$; then a further generalization
\par would be to move to a (possibly arbitrary) function
\par from $\N$ to $\R$, that we would downcase as `$n \mto r$'...




% --------------------
% «phys-notation»  (to ".phys-notation")
% (s "Physicists' notation" "phys-notation")
\myslide {Physicists' notation} {phys-notation}

\par We can also think in physicists' notation...
\par If we have a function whose graph is given by the equation $y=f(x)$,
\par then given $x_0, x_1, \ldots, x_n, x', x''$, we have default definitions
\par for $y_0, y_1, \ldots, y_n, y', y''$...
\par we define $y_0 = x_0$, $y' = f(x')$, etc.
\par The ``real action'' of the function is $x \mto f(x)$,
\par but its ``syntactical action'' on names like $x_0, x_1, \ldots, x_n, x', x''$
\par is to change `$x$'s to `$y$'s, but keep the ``decorations''.

%D diagram x-to-y
%D 2Dx     100        +35 +20   +20   +30 +15 +15
%D 2D  100 External   \N  --->  \R               
%D 2D   +08           n   |-->  sn                  
%D 2D                                    
%D 2D  +20 internal   n0  |-->  r0    a0 |--> b0
%D 2D  +08 internal   n1  |-->  r1    a1 |--> b1
%D 2D  +08 Internal   n2  |-->  r2    a2 |--> b2
%D 2D  +10            n.  |-->  r.    a. |--> b.
%D 2D  +14            nn  |-->  rn    an |--> bn
%D 2D  +08            ns  |-->  rs    as |--> bs
%D 2D                                 
%D 2D  +20                stan           down
%D 2D
%D (( External .tex= \rtabular{external\\view} y+= 4 place
%D    Internal .tex= \rtabular{internal\\view} place
%D    stan     .tex= \ctabular{standard\\notation} place
%D    down     .tex= \ctabular{downcased\\notation} place
%D    \N .tex= \R  \R       -> .plabel= a f
%D    n  .tex= x   sn .tex= f(x) |->
%D    n0 .tex= x_0           r0 .tex= y_0 |->
%D    n1 .tex= x_1           r1 .tex= y_1 |->
%D    n2 .tex= x_2           r2 .tex= y_2 |->
%D    n. .tex= \vdots place  r. .tex= \vdots place
%D    nn .tex= x_n           rn .tex= y_n |->
%D    n0 nn midpoint .TeX= \oooo(7,21) place
%D    r0 rn midpoint .TeX= \oooo(8,21) place
%D
%D    a2 .tex= x_2           b2 .tex= y_2 |->
%D    an .tex= x_n           bn .tex= y_n |->
%D    as .tex= x             bs .tex= y |->
%D
%D ))
%D enddiagram
%D
$$\diag{x-to-y}$$

\msk
\par I would downcase this function $f$ as $x \mto y$.
\par Note that the ``space of `$x$'s'', i.e., the set where $x_0, \ldots$ live,
\par is $\R$, and the ``space of `$y$'s'' is $\R$ too, which is a bit funny ---
\msk
\par If we start with sets $A = \{a_1,a_2,a_3\}$ and $B = \{b_1,b_2,b_3,b_4\}$
\par then it feels much more natural to downcase
\par a function $g: A \to B$ as `$a \mto b$'...
\msk
\par Sometimes we think of the two `$\R$'s in the $f: \R \to \R$ above
\par as being ``different copies'' of $\R$ --- maybe the horizontal and the
\par vertical axes in $\R^2$, thought as subsets, or submanifolds, of $\R^2$---
\par but I don't recall ever having seen the details fully worked out...
\par {\sl (To do: check Spivak's books)}
\bsk

% (find-books "__analysis/__analysis.el")
% (find-books "__analysis/__analysis.el" "spivak")

{\sl
\par I have never seen any thorough discussion of physicists' notation ---
\par how to parse it, how to formalize it, what are the usual defaults,
\par how it has changed through history, etc...
\par Anyone has any pointers, please?...
}











% --------------------
% «INTRODUCTION»  (to ".INTRODUCTION")
% (sec "Introduction" "INTRODUCTION")
\mysection {Introduction} {INTRODUCTION}


% --------------------
% «curry-howard»  (to ".curry-howard")
% (s "Curry-Howard" "curry-howard")
\myslide {Curry-Howard} {curry-howard}

\widemtos

%:
%:            [P∧Q]^1 	                [p,q]^1 	      
%:            -------	                -------	      
%:  [P∧Q]^1      Q     Q⊃R    [p,q]^1      q     q|->r    
%:  -------      ---------    -------      ---------    
%:     P             R	         p             r	      
%:     ---------------	         ---------------	      
%:         P∧R		             p,r		      
%:       -------1	           -------1	      
%:       P∧Q⊃P∧R                   p,q|->p,r              
%:
%:       ^logicaltree1
%:
$$\ded{logicaltree1}
  \qquad
  \TERMTYPERP\ded{archetypal-deriv-big}
$$


%:
%:                         [\arch{a,b}{p}{A×B}]^1
%:                         ------------------\r{'}
%:  [\arch{a,b}{p}{A×B}]^1     \arch{b}{'p}{B}         \arch{b|->c}{f}{B->C}
%:  ------------------\r{}    -------------------------------------\r{\app}
%:      \arch{a}{p}{A}                    \arch{c}{f('p)}{C}
%:      ------------------------------------------------\r{\ang,}
%:                  \arch{a,c}{\ang{p,f('p)}}{A×C}
%:       --------------------------------------------------\r{ð;}1
%:       \arch{a,b|->a,c}{ðp\ptype{¨(A×B)}.\ang{p,f('p)}}{A×B->A×C}
%:
%:           ^archetypal-deriv-big
%:
$$\DNC\ded{archetypal-deriv-big}
  \qquad
  \TERMTYPERP\ded{archetypal-deriv-big}
$$

\msk
\par The Curry-Howard isomorphism
\par (in its simplest form --- there are several)
\par establishes a correspondence between
\par trees in (propositional) Natural Deduction and
\par trees in (simply-typed) $ð$-calculus.
\msk
\par $ð$-calculus is {\sl the} language for expressing constructions.
\par The terms in the bottom of $ð$-calculus trees get bigger and bigger,
\par so people usually don't draw $ð$-calculus trees ---
\par they work ``algebraically'', just with term at the bottom.
\par {\sl A $ð$-calculus tree can be reconstructed from its bottom term.}
\par Humans like full $ð$-calculus trees, though,
\par because the trees explain the types of all subterms.
\msk
\par The tree at the bottom left above
\par describes the ``intuitive meaning'' behind 
\par the $ð$-calculus tree.




% --------------------
% «standard-erasings»  (to ".standard-erasings")
% (s "Erasings as projections" "standard-erasings")
\myslide {Erasings as projections} {standard-erasings}

%L forths["<.>"]  = function () pusharrow("<.>") end
%L forths["<-->"] = function () pusharrow("<-->") end

%:
%:  \arch{a,b}{p}{A×B}
%:  ------------------\r{'}
%:      \arch{b}{'p}{B}         \arch{b|->c}{f}{B->C}
%:      -------------------------------------\r{\app}
%:                  \arch{c}{f('p)}{C}
%:
%:                    ^archetypal-deriv
%:
%D diagram archderivs
%D 2Dx     100         +40   +40     +30           +50
%D 2D  100                       \foo{\FULLRP}
%D 2D      
%D 2D  +50      \foo{\TERMTYPERP}            \foo{\DNCR}
%D 2D          
%D 2D  +50 \foo{\TERMR}   \foo{\TYPE}        \foo{\DNC}   
%D 2D
%D (( \foo{\FULLRP} \foo{\TERMTYPERP} ->
%D    \foo{\FULLRP} \foo{\DNCR} ->
%D    \foo{\TERMTYPERP} \foo{\TERMR} ->
%D    \foo{\TERMTYPERP} \foo{\TYPE} ->
%D    \foo{\DNCR} \foo{\DNC} ->
%D    \foo{\TYPE} \foo{\DNC} <-->
%D    
%D ))
%D enddiagram
%D
$$\def\foo#1{#1\fcded{archetypal-deriv}}
  \diag{archderivs}
$$
\msk
\par The ``downcased tree'' at the bottom right above
\par is an ``intuitive view'' of the ($ð$-calculus) construction.
\par How do we formalize an ``intuitive construction'' like that?
\par Answer: {\sl erasings} act like {\sl projections}.
\par We add the missing information by {\sl lifting}
\par and then we erase some things.
\msk
\par Here's how we read the ``downcased tree'' aloud.
\par ``If we have a meaning for `$b$' and a meaning for `$b \mto c$'
\par we have a natural meaning for `$c$'\,''...
\par Linguistic tricks:
\par $*$ long names: `$b \mto c$' is a {\sl name}
\par $*$ no syntactical distinction between variables and non-atomic terms
\par $*$ `$b \mto c$' to `$B \to C$': the types can be recovered by {\sl uppercasing}
\par $*$ each bar is a {\sl definition}
\par $*$ indefinite articles: ``if I have a `$b$' and a `$b \mto c$' I have a `$c$'\.''...




% --------------------
% «generalization»  (to ".generalization")
% (s "Generalization is a kind of lifting" "generalization")
\myslide {Generalization is a kind of lifting} {generalization}

To generalize is the opposite of to specialize,

and specialization is obviously a projection.

\def\twoninenyninelemma#1#2{
  \fbox{
  $\begin{array}{rcl}
   2^{#2}-2^{#1} &=& 2^{1+#1}-2^{#1} \\
                 &=& 2^{1}·2^{#1}-2^{#1} \\
                 &=& 2·2^{#1}-1·2^{#1} \\
                 &=& (2-1)·2^{#1} \\
                 &=& 1·2^{#1} \\
                 &=& 2^{#1} \\
   \end{array}
  $}
}

%D diagram 2^100-2^99
%D 2Dx     100
%D 2D  100 2^{n+1}-2^n=2^n
%D 2D
%D 2D  +70 2^{100}-2^{99}=2^{99}
%D 2D
%D (( 2^{n+1}-2^n=2^n       .tex= \twoninenyninelemma{n}{n+1}
%D    2^{100}-2^{99}=2^{99} .tex= \twoninenyninelemma{99}{100}
%D    @ 0 @ 1 ->
%D ))
%D enddiagram
%D
$$\diag{2^100-2^99}$$

$2^{99+1}-2^{99}=2^{99}$ holds ``for any value of 99''...

We are going to see how to do something like this

for categories (esp.\ hyperdoctrines, $\approx$ toposes),

using ``dictionary tricks''.

\bsk
\bsk

How generalizations work?

How do we think?

What are the possible/usual roles of diagrams?

Which kinds of reasonings are closer to intuition?

I discovered something quite surprising at UniLog'2010...

(at the talks of Danielle Macbeth and Juan Luis Gastaldi)

\ssk

{\bf it is time to look for further conceptual tools}

{\bf in Kant and Frege!}




% --------------------
% «where-to»  (to ".where-to")
% (s "Where we are heading" "where-to")
\myslide {Where we are heading} {where-to}

% \ssk

{\bf Fact:} every ``pure'' term that deserves the name
%
$$(A,B) \mto (a,b \mto b,a)$$
%
is the (polymorphic) ``flip'' function.

\msk
\par More precisely:
\par we have a procedure, $T \mto P_T$, that produces
\par for each ``pure'' type $T$ (a term is {\sl pure}
\par when it has no constants besides the sorts)
\par a property $P_T$ that every pure term $t:T$ obeys.
\msk
\par This is called {\sl parametricity}.
\par (A good introductory reference:
\par Phil Wadler's ``{\sl Theorems for Free}'', 1988).
\msk
\par All the categorical constructions that I will show are ``pure'',
\par and it must be possible to use tools from parametricity to
\par prove meta-theorems about properties of pure constructions.
\msk
\par However, these tools (from parametricity)
\par are hard to understand, especially if we are
\par outside the Category Theory/$ð$-calculus communities,
\par without much acess to the ``oral culture'' of these areas.



% --------------------
% «why-topos-theory»  (to ".why-topos-theory")
% (s "Why topos theory (is improtant)" "why-topos-theory")
\myslide {Why topos theory (is important)} {why-topos-theory}

\par Models:
\par $*$ Sheaves form (Grothendieck) toposes
\par $*$ Every $\SetU$ is a topos ($\ot$ Non-Standard Analysis)
\par $*$ There are toposes with nilpotent infinitesimals ($\ot$ SDG)
\par $*$ There are toposes with polymorphism and parametricity
\par $*$ There are toposes in which everything is constructive/computable
\msk
\par By realizing that a certain category $\catC$ is
\par (or can be enlarged to) a topos
\par we immediately {\sl know} a lot about it...
\par We can carry a lot of our knowledge about $\Set$
\par (constructions, properties) to $\catC$,
\par and important constructions in $\catC$ may turn out
\par to correspond to something simple and well-known in $\Set$...
\msk
\par Topos theory (and Categorical Semantics in general)
\par is about {\sl translating knowledge}
\par and {\sl recycling theorems}.
\msk
\par And this point is becoming more and more important:
\par most {\sl proof assistants} are based on
\par {\sl (intuitionistic) type theories} whose models
\par do not fit well in ZFC
\par (Reynolds 1984: ``Polymorphism is not Set-Theoretic'')
\par and learning Topos Theory is (perhaps)
\par one of the best ways to make all this make sense...




% --------------------
% «lifting-basic-tt»  (to ".lifting-basic-tt")
% (s "Lifting basic ttopos theory" "lifting-basic-tt")
\myslide {Lifting basic topos theory} {lifting-basic-tt}

\par Here's a conjecture, whose {\sl technical} details
\par should not be deep:
\par it should be possible to develop and prove
\par almost all of the basic theory of toposes, modalities,
\par sheaves and geometrical morphisms
\par in the archetypical cases (i.e., in `$\Set^\bbD$'s),
\par where everything is very concrete,
\par and then lift all the constructions and proofs
\par to the general case.



% --------------------
% «downcasing-diags»  (to ".downcasing-diags")
% (s "Downcasing diagrams" "downcasing-diags")
\myslide {Downcasing diagrams} {downcasing-diags}
%
%D diagram fgP-abs
%D 2Dx      100    +30  +30
%D 2D  100 fgP <-| gP
%D 2D                <-|
%D 2D  +20 fgP' <-----| P
%D 2D
%D 2D  +15  A ---> B -> C
%D 2D        ---------->
%D 2D
%D (( fgP  .tex= f^*g^*P   gP .tex= g^*P
%D    fgP' .tex= (f;g)^*P                 P
%D    fgP  gP  <-|
%D    fgP fgP' <-> gP P <-|
%D    fgP'  P  <-|
%D    A B -> .plabel= a f
%D    B C -> .plabel= a g
%D    A C -> .slide= -7pt .plabel= b f;g
%D ))
%D enddiagram
%D
% $$\diag{fgP-abs}$$
%
%D diagram fgP-sst-short
%D 2Dx      100    +35  +30
%D 2D  100 fgP <-| gP
%D 2D                <-|
%D 2D  +20 fgP' <-----| P
%D 2D
%D 2D  +15  A ---> B -> C
%D 2D        ---------->
%D 2D
%D (( fgP  .tex= \ssst{a}{P}   gP .tex= \ssst{b}{P}
%D    fgP' .tex= \ssst{a}{P}                       P .tex= \ssst{c}{P}
%D    A B -> .plabel= a f
%D    fgP  gP  <-|
%D    fgP fgP' <-> gP P <-|
%D    fgP'  P  <-|
%D    B C -> .plabel= a g
%D    A C -> .slide= -7pt .plabel= b f;g
%D ))
%D enddiagram
%D
% $$\diag{fgP-sst-short}$$
%
%D diagram fgP-sst-long
%D 2Dx      100    +55  +30
%D 2D  100 fgP <-| gP
%D 2D                <-|
%D 2D  +20 fgP' <-----| P
%D 2D
%D 2D  +15  A ---> B -> C
%D 2D        ---------->
%D 2D
%D (( fgP  .tex= \ssst{a}{P(f(g(a))}   gP .tex= \ssst{b}{P(g(b))}
%D    fgP' .tex= \ssst{a}{P(f(g(a))}              P .tex= \ssst{c}{P(c)}
%D    fgP  gP  <-|
%D    fgP fgP' <-> gP P <-|
%D    fgP'  P  <-|
%D    A B -> .plabel= a f
%D    B C -> .plabel= a g
%D    A C -> .slide= -7pt .plabel= b f;g
%D ))
%D enddiagram
%D
% $$\diag{fgP-sst-long}$$
%
%D diagram fgP-dnc-long
%D 2Dx      100    +40  +30
%D 2D  100 fgP <-| gP
%D 2D                <-|
%D 2D  +20 fgP' <-----| P
%D 2D
%D 2D  +15  A ---> B -> C
%D 2D        ---------->
%D 2D
%D (( fgP  .tex= a||Pfga   gP .tex= b||Pgb
%D    fgP' .tex= a||Pfga                    P .tex= c||Pc
%D    A .tex= a B .tex= b C .tex= c
%D    fgP  gP  <=
%D    fgP fgP' <-> gP P <=
%D    fgP'  P  <=
%D    A B |-> .plabel= a b:=f(a)
%D    B C |-> .plabel= a c:=g(b)
%D    A C |-> .slide= -7pt .plabel= b c:=f(g(a))
%D ))
%D enddiagram
%D
% $$\diag{fgP-dnc-long}$$
%
%D diagram fgP-dnc-short
%D 2Dx      100    +30  +30
%D 2D  100 fgP <-| gP
%D 2D                <-|
%D 2D  +20 fgP' <-----| P
%D 2D
%D 2D  +15  A ---> B -> C
%D 2D        ---------->
%D 2D
%D (( fgP  .tex= P   gP .tex= P
%D    fgP' .tex= P                  P .tex= P
%D    A .tex= a B .tex= b C .tex= c
%D    fgP gP   <=
%D    fgP fgP' <-> gP P <=
%D    fgP' P   <=
%D    A B |-> # .plabel= a f
%D    B C |-> # .plabel= a g
%D    A C |-> .slide= -7pt .plabel= b \phantom{.}
%D ))
%D enddiagram
%D
% $$\diag{fgP-dnc-short}$$
%
% (find-LATEXfile "2010unilog-current.tex" "diagram yoneda-and-friends")
% (find-LATEX     "2010unilog-current.tex" "yoneda-lemma")
%
\def\fdiag#1{\fbox{\!\!\!$\diag{#1}$}}
\def\fdiag#1{\fbox{$\diag{#1}$}}
\def\ffdiag#1#2{\begin{tabular}{l}#2\\\fbox{$\diag{#1}$}\end{tabular}}
\def\fdiag#1{\ffdiag{#1}{foo}}
%
%D diagram fgP-all
%D 2Dx     100 +130
%D 2D  100 A   
%D 2D
%D 2D  +80 B   C
%D 2D
%D 2D  +80 D   E
%D 2D
%D (( A .tex= \ffdiag{fgP-abs}{abstract/generic:}       BOX
%D    B .tex= \ffdiag{fgP-sst-long}{archetypal"(long"form):}  BOX
%D    C .tex= \ffdiag{fgP-dnc-long}{downcased""(long"form):}  BOX
%D    D .tex= \ffdiag{fgP-sst-short}{archetypal"(shorthand):} BOX
%D    E .tex= \ffdiag{fgP-dnc-short}{downcased"(shorthand):} BOX
%D    A B -> B D ->
%D    A C -> C E ->
%D ))
%D enddiagram
%
%D diagram fgP-two
%D 2Dx     100 +130
%D 2D  100 A   
%D 2D
%D 2D  +80 B   C
%D 2D
%D 2D  +80 D   E
%D 2D
%D (( A .tex= \ffdiag{fgP-abs}{abstract/generic:}       BOX
%D    B .tex= \ffdiag{fgP-sst-long}{archetypal"(long"form):}  BOX
%D    C .tex= \ffdiag{fgP-dnc-long}{downcased""(long"form):}  BOX
%D    D .tex= \ffdiag{fgP-sst-short}{archetypal"(shorthand):} BOX
%D    E .tex= \ffdiag{fgP-dnc-short}{downcased"(shorthand):} BOX
%D    A B -> # B D ->
%D    # A C -> C E ->
%D ))
%D enddiagram
%

\msk
$\diag{fgP-all}$
\msk

     The ideas from the method of ``downcasing types''
\par are often used in disguise...
\par The way of structuring diagrams
\par (both for the generic case, in abstract notation,
\par and for the archetypal case --- plus its shorthands)
\par comes from what has to be done to make the corresponding diagrams
\par make sense in downcased notation.
\par The dictionary tricks --- which include
\par making `$P \mto g^*P$' stand for a functor,
\par and putting corresponding diagrams side to side ---
\par also come from downcased notation.
\par (Also the ideas like lifting, etc.)



% --------------------
% «downcasing-diags-2»  (to ".downcasing-diags-2")
% (s "Downcasing diagrams (2)" "downcasing-diags-2")
\myslide {Downcasing diagrams (2)} {downcasing-diags-2}
%
$$\diag{fgP-two}$$
%
     Also, the abstract/generic case often makes distinctions
\par that disappear when we look at the archetypical case...
\par For example, the archetypal fibration, $\CanSub(\Set)$,
\par is {\sl split}, and so $f^*g^* \ssst{c}{P} = (f;g)^*\ssst{c}{P}$;
\par in the generic case there's a canonical iso $f^*g^*P \bij (f;g)^*P$,
\par but it doesn't need to be the identity.
\msk
\par If we are {\sl trying to} model categorically
\par a certain archetypical case (by generalizing it ``in the right way'')
\par then {\sl certain} equalities in the archetypical case
\par should become at least canonical isos in the generic case...
\par in CCCs and hyperdoctrines ``one half'' (i.e., one direction)
\par of these canonical isos will comes from natural constructions;
\par what we will do is to {\sl impose} that the these natural constructions
\par should be invertible.
\msk
\par As we will work with (proto-){\sl structure} instead of with {\sl properties}
\par we will require ``proto-inverses'' instead of requiring {\sl invertibility}.





% --------------------
% «topos-theory»  (to ".topos-theory")
% (s "Can we make Topos Theory more accessible?" "topos-theory")
\myslide {Can we make Topos Theory more accessible?} {topos-theory}
\par Can we make Topos Theory more accessible using these techniques?
\par At the moment, unfortunately, {\sl not really} ---
\par the rules for the {\und{\bf classifier object}} are problematic.
\par However, one of the most interesting ideas in Topos Theory
\par is how we can interpret first-order logic {\sl inside} a topos ---
\par and this can also be done in hyperdoctrines.
\msk
\par Hyperdoctrines came a few years before toposes.
\par Hyperdoctrines are exactly the categories where
\par we can interpret (intuitionistic, typed) first-order logic.
\par The definition of a hyperdoctrine seems much more convoluted
\par that the definition of a topos, but that's because the presence
\par of a classifier object simplifies everything ---
\par if we add a classifier rule to the hyperdoctrine rules
\par we see that many of the rules that we had before
\par can be discarded --- they become redundant.




% --------------------
% «trees-to-dictionaries»  (to ".trees-to-dictionaries")
% (s "From trees to dictionaries" "trees-to-dictionaries")
\myslide {From trees to dictionaries} {trees-to-dictionaries}

\def\firstdict{
  \begin{array}{rcl}
  \angg{a} &:=& \angg{a,b} \\
  \angg{b} &:=& '\angg{a,b} \\
  \angg{c} &:=& \angg{b \mto c}(\angg{b}) \\
  \angg{a,c} &:=& \ang{\angg{a},\angg{c}} \\
  \angg{a,b \mto a,c} &:=& ð\angg{a,b}¨(A×B).\angg{a,c} \\
  \end{array}
}
\def\hintdict{
  \begin{array}{rcl}
  \angg{a,b} &\equiv& p \\
  \angg{b\mto c} &\equiv& f \\
  \end{array}
}

%D diagram tree-to-dict
%D 2Dx        100           +120
%D 2D  100               \fbox{$\hintdict$}
%D 2D
%D 2D  +55 \foo{\DNCR}   \foo{\TERMRP}
%D 2D
%D 2D  +70 \foo{\DNC}    \fbox{$\firstdict$}  
%D 2D
%D (( \foo{\DNC} \foo{\DNCR} ->
%D    \foo{\DNCR} \fbox{$\firstdict$} ->
%D    \fbox{$\firstdict$} \foo{\TERMRP} ->
%D    \fbox{$\hintdict$}  \foo{\TERMRP} ->
%D ))
%D enddiagram
%D
$$\def\foo#1{#1\fcded{archetypal-deriv-big}}
  \diag{tree-to-dict}
$$

\par Each bar of a downcased tree is a {\sl definition}.
\par If we list all these definitions together we get a
\par ``dictionary'' that {\sl almost} gives us back the $ð$-tree...
\par we need just a few more hints --- the standard names of the
\par variables and the constants.


% --------------------
% «first-ambiguities»  (to ".first-ambiguities")
% (s "Ambiguities" "first-ambiguities")
\myslide {Ambiguities} {first-ambiguities}

\msk

Liftings are not usually unique...

What should be the type of `$a$'? $A$ or $A'$?

To lift we usually need ``hints''.

The downcasing that starts with ``$a,a$'' below

is (apparently?) valid, but ambiguous.

{\sl I am not going to define what a good downcasing is.}

%:
%:  #1    #2
%:  --    --
%:  #3    #4
%:  --------
%:     #5
%:
%:     ^^5-ambigfive
%:

%D diagram ambig-aa-to-aa
%D 2Dx     100   +70
%D 2D  100 A×A'  A×A
%D 2D
%D 2D  +55 a,a'  a,a
%D 2D
%D (( A×A  .tex= \fbox{\dedambigfive{A×A}{A×A}{A}{A}{A×A}}
%D    A×A' .tex= \fbox{\dedambigfive{A×A'}{A×A'}{A'}{A}{A'×A}}
%D    a,a  .tex= \fbox{\dedambigfive{a,a}{a,a}{a}{a}{a,a}}
%D    a,a' .tex= \fbox{\dedambigfive{a,a'}{a,a'}{a'}{a}{a',a}}
%D    a,a' A×A' ->
%D    a,a' A×A ->
%D    A×A a,a ->
%D ))
%D enddiagram
%D
$$\diag{ambig-aa-to-aa}$$



% --------------------
% «ambiguities-comp»  (to ".ambiguities-comp")
% (s "Ambiguities (2)" "ambiguities-comp")
\myslide {Ambiguities (2)} {ambiguities-comp}

\msk

Composition is not well-behaved syntactically.

One solution (? --- or workaround) is to have

a rule `ren' that renames objects (i.e., create aliases)...

%:  :A×A->A  f:A->B    a,a'|->a  a|->b
%:  ----------------    ---------------
%:     ;f:A×A->B         a,a'|->b     
%:  
%:     ^comp-1            ^comp-2
%:  
%:  ':A×A->A  f:A->B   a,a'|->a'  a|->b
%:  ----------------    --------------- 
%:     ';f:A×A->B        a,a'|->b'     
%:  
%:     ^comp-3            ^comp-4
%:  
%:                                  a|->b      
%:                                 -------\ren 
%:                      a,a'|->a'  a'|->b'     
%:                      ------------------     
%:                        a,a'|->b'            
%:                                         
%:                        ^comp-5              
%:  
% $$\ded{comp-1} \qquad \ded{comp-2}$$
% $$\ded{comp-3} \qquad \ded{comp-4}$$
% $$\ded{comp-5}$$

$$\begin{array}{ccccc}
  \ded{comp-1} && \ded{comp-2} \\\\
  \ded{comp-3} && \ded{comp-4} && \ded{comp-5} \\
  \end{array}
$$




% --------------------
% «ambiguities-assoc»  (to ".ambiguities-assoc")
% (s "Ambiguities (3)" "ambiguities-assoc")
\myslide {Ambiguities (3)} {ambiguities-assoc}

Composition is associative, and that's

the reason why we can write $f;g;h$.

%D diagram comp-is-assoc
%D 2Dx     100   +30   +30   +30
%D 2D  100 A --> B --> C --> D
%D 2D
%D (( A B -> .plabel= a f
%D    B C -> .plabel= a g
%D    C D -> .plabel= a h
%D    A C -> .plabel= a f;g .slide= 12pt
%D    B D -> .plabel= b g;h .slide= -12pt
%D ))
%D enddiagram
%D
$$\diag{comp-is-assoc}$$


Twisting this idea a bit: 

we write $f;g;h$ to indicate that $(f;g);h = f;(g;h)$.

We have two different ``natural constructions''

for things that ``deserve the name'' $f;g;h$.

Downcasing them, we get:

%:
%:  a|->b  b|->c                     b|->c   c|->d
%:  ------------;                    -------------;
%:     a|->c       c|->d     a|->b      b|->d
%:     -----------------;    ----------------;
%:           a|->d                 a|->d
%:
%:           ^assoc-1              ^assoc-2
%:
%:               a|->b  b|->c  c|->d
%:               ===================
%:                      a|->d
%:
%:                      ^assoc-3
%:

%D diagram assocs
%D 2Dx     100  +50  +50
%D 2D  100 A1        A2
%D 2D
%D 2D  +40      A3
%D 2D
%D (( A1 .tex= \fbded{assoc-1}
%D    A2 .tex= \fbded{assoc-2}
%D    A3 .tex= \fbded{assoc-3}
%D    A1 A2 =
%D    A1 A3 ->  A2 A3 ->
%D ))
%D enddiagram
%D
$$\diag{assocs}$$

I used to express that the two ``obvious'' natural constructions

for $(a \mto d)$ from $(a \mto b)$, $(b \to c)$, $(c \to d)$ give the

same result by:

$$\welld\left[ \cded{assoc-3} \right]$$

The entry for that $\angg{\welld[\ldots]}$ in the dictionary would

have to say {\sl which} ``obvious constructions'' were involved.



% $$\ded{assoc-1} \qquad \ded{assoc-2}$$
% $$\ded{assoc-3}$$




% --------------------
% «more-on-wd»  (to ".more-on-wd")
% (s "More on the `wd' symbol" "more-on-wd")
\myslide {More on the `wd' symbol: the syntactical world} {more-on-wd}

% (find-LATEX "2009unilog-dnc.tex" "abstract")

A category $\catC$ is a tuple:

$$(\catC_0, \Hom_\catC, \id_\catC, ¢_\catC;
   \assoc_\catC, \idL_\catC, \idR_\catC)$$

\par Where the first four components are ``structure''
\par and the last three are ``properties'' --- equations.
\par The last three are `wd' things.
\msk
\par I used to carry all the `wd's around,
\par as if they were very very important.
\par I don't anymore.
\par It turns out that we can define a projection

%:  (\catC_0,\Hom_\catC,\id_\catC,¢_\catC;\assoc_\catC,\idL_\catC,\idR_\catC)
%:  -------------------------------------------------------------------------Ð{psyn}
%:      (\catC_0,\Hom_\catC,\id_\catC,¢_\catC)
%:
%:      ^proj-cat-1
%:
$$\ded{proj-cat-1}$$

\par that drops the equations.
\par This works for isos, functors, NTs, adjunctions, monads, etc, also.
\par We can do a ``projected version'' of Category Theory
\par and then lift the results back to the ``Real World''
\par (not automatically --- many steps have to be done by hand ---  but whatever).
\par I call the ``projected version'' the ``Syntactical World''.
\par The projection keeps the ``syntactical part'' --- the ``structure'' ---
\par and drops the ``equational part'' --- the ``properties''.

\bsk
\bsk

\par The ``projection on the syntactical world'', $\psyn$,
\par is the main operation that we are studying here.
\par {\bf Warning:} it will often be used implicitly!
\par {\bf Warning 2:} $\psyn$ can be defined in many different,
\par slightly incompatible ways, so before studying its meta-properties
\par we need to collect enough non-trivial examples of it at work...
\bsk
\par {\sl Each projection of a non-trivial categorical theorem, $T$}
\par {\sl into the syntactical world, $T^- := \psyn(T)$,}
\par {\sl gives a non-trivial example of a lifting:}
\par {\sl $T^-$ lifts to $T$.}




% --------------------
% «proto-things»  (to ".proto-things")
% (s "The syntactical world: proto-things" "proto-things")
\myslide {The syntactical world: proto-things} {proto-things}


\par I use the prefix ``proto'' to refer to the projected structures.
\par A {\sl proto-category} is a 4-uple $(\catC_0,\Hom_\catC,\id_\catC,¢_\catC)$.
\par A {\sl proto-functor} $F:\catA \to \catB$ is a 2-uple: $(F_0, F_1)$
\par (an ``action on objects'' and an ``action on morphisms'' ---
\par the equational components, $\respcomp$ and $\respids$, have been dropped).
\msk
\par Sometimes there are several possible ``design choices''
\par for a proto-structure...
\par I will just say which definitions of proto-things work best.
\par (No time for the full rationale today!)
\msk
\par A {\sl proto-inverse} for a morphism $f:A \to B$
\par is a just a morphism $f^{-1}:B \to A$.
\par Note that we don't have the conditions $f;f^{-1}=\id_A$ and $f^{-1};f=\id_B$,
\par so the name $f^{-1}$ may be a bit misleading.
\par A {\sl proto-iso} is a pair $(f,f^{-1})$, where $f^{-1}$
\par is a proto-inverse for $f$.
\msk
\par A {\sl proto-natural transformation} (``proto-NT'') $T:F \to G$
\par is just an operation $A \mto (FA \ton{T_A} GA)$
\par (we drop the ``square condition'' that says that for each
\par $f:A \to B$ the ``obvious square'' must commute).
\msk
\par A {\sl proto-inverse} for a (proto-)natural transformation $T:F \to G$
\par is just a (proto-)natural transformation $T^{-1}:G \to F$ ---
\par for each object $A$ the morphisms $TA$ and $T^{-1}A$ are the two
\par directions of a proto-iso.
\par A {\sl proto-natural isomorphism} is a proto-NT plus a
\par proto-inverse for it.
\msk

What are proto-products, proto-exponentials, proto-fibrations...?












% --------------------
% «dn-functors»  (to ".dn-functors")
% (s "Downcasing functors" "dn-functors")
\myslide {Downcasing functors} {dn-functors}

\msk

Fix a set $A$.

Let $(A×):\Set \to \Set$ denote the functor

that takes each set $B$ to $A×B$.

\bsk

``{\und {\sl The}}'' functor?

In some contexts the action on morphisms, $(A×)_1$,

is ``obvious'' once the action on objects, $(A×)_0$, is given.

How?

\bsk


% We downcase the diagram of the functor,

%D diagram functor1
%D 2Dx     100     +30
%D 2D  100 B |---> A×B
%D 2D      |        |
%D 2D      |  |->   |
%D 2D      v        v
%D 2D  +30 C |---> A×C
%D 2D
%D (( B A×B C A×C
%D    @ 0 @ 1 |-> .plabel= a A×
%D    @ 2 @ 3 |-> .plabel= b A×
%D    @ 0 @ 3 harrownodes nil 20 nil |->
%D    @ 0 @ 2 -> .plabel= l f
%D    @ 1 @ 3 -> .plabel= r \sm{(A×)f\;:=\hfill\\ðp:A×B.\ang{p,f('p)}}
%D ))
%D enddiagram
%D
%D diagram downfunctor1
%D 2Dx     100    +30
%D 2D  100 b ===> a,b
%D 2D      -        -
%D 2D      |  |->   |
%D 2D      v        v
%D 2D  +30 c ===> a,c
%D 2D
%D (( b a,b c a,c
%D    @ 0 @ 1 => @ 0 @ 2 |-> @ 1 @ 3 |-> @ 2 @ 3 =>
%D    @ 0 @ 3 harrownodes nil 20 nil |->
%D ))
%D enddiagram
%D
$$\diag{downfunctor1} \qquad \diag{functor1}$$

By lifting:

%:
%:   b|->c
%:  =========
%:  a,b|->a,c
%:
%:  ^smashed-Axf

%D diagram lifting-functor-1
%D 2Dx     100        +100
%D 2D  100 fulldnc   fullterms
%D 2D
%D 2D  +50 projected
%D 2D
%D (( fulldnc   .tex= \DNC\fcded{archetypal-deriv-big}
%D    fullterms .tex= \TERMP\fcded{archetypal-deriv-big}
%D    projected .tex= \fcded{smashed-Axf}
%D    projected fulldnc ->
%D    fulldnc fullterms ->
%D ))
%D enddiagram
%D
$$\diag{lifting-functor-1}$$

\msk

(a double bar is like a folded accordion)




% --------------------
% «adjunctions»  (to ".adjunctions")
% (s "Adjunctions" "adjunctions")
\myslide {Adjunctions} {adjunctions}

\msk

If $L$ and $R$ are functors going in opposite directions

between two categories, say,

$$\catB \two/<-`->/<150>^L_R \catA$$

then a {\sl proto-adjunction}, $L \dashv R$, is an 8-uple,

$$(\catA, \catB, L, R, \flat, \sharp, \eta, \ee)$$

that we draw as:

%D diagram adj1
%D 2Dx     100    +30     +30   +30
%D 2D  100 S1B   LA <---| A     T0A
%D 2D       |     |       |      |
%D 2D       |     |  <->  |      |
%D 2D       v     v       v      v
%D 2D  +30 S0B    B |---> RB    T1A
%D 2D
%D 2D  +20     \catB <=> \catA
%D 2D
%D (( S1B .tex= LRB S0B .tex= B
%D    S1B S0B -> .plabel= l _B
%D ))
%D (( T0A .tex= A T1A .tex= RLA
%D    T0A T1A -> .plabel= r \eta_A
%D ))
%D (( LA A B RB
%D    @ 0 @ 1 <-|
%D    @ 0 @ 2 -> .PLABEL= _(0.43) g^\flat
%D    @ 0 @ 2 -> .PLABEL= _(0.57) f
%D    @ 1 @ 3 -> .PLABEL= ^(0.43) g
%D    @ 1 @ 3 -> .PLABEL= ^(0.57) f^\sharp
%D    @ 0 @ 3 harrownodes nil 20 nil <-| sl^
%D    @ 0 @ 3 harrownodes nil 20 nil |-> sl_
%D    @ 2 @ 3 |->
%D ))
%D (( \catB \catA <- sl^ .plabel= a L
%D    \catB \catA -> sl_ .plabel= b R
%D ))
%D enddiagram
%D
$$\diag{adj1}$$

There is a lot of redundancy in this definition...

Most operations can be reconstructed from the others.

\bsk

Our archetypal adjunction will be this one:

(not the usual $F \dashv U$!)

%D diagram adj1-arch
%D 2Dx     100    +35     +30   +35
%D 2D  100 S1B   LA <---| A     T0A
%D 2D       |     |       |      |
%D 2D       |     |  <->  |      |
%D 2D       v     v       v      v
%D 2D  +30 S0B    B |---> RB    T1A
%D 2D
%D 2D  +20     \catB <=> \catA
%D 2D
%D (( S1B .tex= (B{->}C){×}C S0B .tex= C
%D    LA  .tex= A{×}B        A   .tex= A
%D    B   .tex= C            RB  .tex= B{->}C
%D    T0A .tex= A            T1A .tex= B{->}(A{×}B)
%D    \catB .tex= \Set  \catA .tex= \Set 
%D ))
%D (( S1B S0B -> .plabel= l \ev_{BC}
%D ))
%D (( T0A T1A -> .plabel= r \eta_A
%D ))
%D (( LA A B RB
%D    @ 0 @ 1 <-|
%D    @ 0 @ 2 -> .PLABEL= _(0.43) \uncur"g
%D    @ 0 @ 2 -> .PLABEL= _(0.57) f
%D    @ 1 @ 3 -> .PLABEL= ^(0.43) g
%D    @ 1 @ 3 -> .PLABEL= ^(0.57) \cur"f
%D    @ 0 @ 3 harrownodes nil 20 nil <-| sl^
%D    @ 0 @ 3 harrownodes nil 20 nil |-> sl_
%D    @ 2 @ 3 |->
%D ))
%D (( \catB \catA <- sl^ .plabel= a {×}B
%D    \catB \catA -> sl_ .plabel= b B{->}
%D ))
%D enddiagram
%D
$$\diag{adj1-arch}$$






% --------------------
% «cheap-and-exp-adjs»  (to ".cheap-and-exp-adjs")
% (s "Cheap and expensive adjunctions" "cheap-and-exp-adjs")
\myslide {Cheap and expensive adjunctions} {cheap-and-exp-adjs}

\msk

In the supermarket you can buy DeLuxe adjunctions,

that are expensive but come with all the bells and whistles,

and you can buy the cheap, minimal, economy models,

that come in kit form, and (apparently) do much less...

\msk

There are theorems that take cheap adjunctions and

produce expensive adjunctions from them --- for free.

\msk

In the Real World cheap and expensive adjunctions

are equivalent: if you do


%D diagram cheap-and-expensive-adjs
%D 2Dx     100         +70
%D 2D  100 expensive1  expensive2
%D 2D
%D 2D  +40 cheap1      cheap2
%D 2D
%D (( expensive1 .tex= (\catA,\catB,L,R,\flat,\sharp,\eta,\ee)
%D    expensive2 .tex= (\catA,\catB,L,R,\flat,\sharp,\eta,\ee)
%D    cheap1     .tex= (\catA,\catB,L,R_0,\;\;\sharp,\;\;\ee)
%D    cheap2     .tex= (\catA,\catB,L_0,R,\flat,\;\;\eta\;\;)
%D    @ 0 @ 2 |-> @ 0 @ 3 |->
%D    @ 2 @ 1 |-> @ 3 @ 1 |->
%D ))
%D enddiagram
%D
$$\diag{cheap-and-expensive-adjs}$$

you get the original expensive adjunction back.

In the Syntactical World you may get something different,

but that doesn't matter.


% --------------------
% «cheap-and-exp-adjs-2»  (to ".cheap-and-exp-adjs-2")
% (s "Cheap and expensive adjunctions (2)" "cheap-and-exp-adjs-2")
\myslide {Cheap and expensive adjunctions (2)} {cheap-and-exp-adjs-2}

\msk

An ``expensive'' proto-adjunction $L \dashv R$ is an 8-uple:
%
$$(\catA, \catB, L, R, \flat, \sharp, \eta, \ee).$$
%
Here is how to reconstruct some of its components from the other ones.
%
% Here is how.
%
%            L1(alpha) := flat(sc(alpha), eta(src(alpha)))
%            flat(g)   := sc(L1(g),     eps(unR0(tgt(g))))
% eps(B) := flat(id(R0(B)))                          eta(A) := sharp(id(L0(A)))
%            sharp(f) := sc(eta(unL0, src(f)),      R1(f))
%            R1(beta)  := sharp(sc(eta(src(beta)),  beta))
%
%D diagram adj-reconstruction-LR
%D 2Dx     100     +30    +40     +30     +40     +30
%D 2D  100                L0 <--| L1
%D 2D                     |        |
%D 2D                     |     |  |
%D 2D                     |     |  v
%D 2D  +30                | <-| | L3
%D 2D                     |     v  |
%D 2D                     v        v
%D 2D  +18                L4 |--> L5
%D 2D                               
%D 2D  +15                F0 <--| F1
%D 2D                   / |        |
%D 2D                   | |  <--|  |
%D 2D                   | v        v
%D 2D  +30 C0 <--| C1   | F2 <--| F3     U0 <--| U1             
%D 2D      |        |   | |              |        |             
%D 2D  +12 |        |   \ |       S0     |        |             
%D 2D      |  <--|  |    vv        |\    |  |-->  |             
%D 2D  +6  |        |     F4       | |   |        |             
%D 2D      v        v              v |   v        v             
%D 2D  +12 C2 |--> C3     S1 |--> S2 |   U2 |--> U3             
%D 2D                     |        | |    
%D 2D                     |  |-->  | /    
%D 2D                     v        vv     
%D 2D  +30                S3 |--> S4      
%D 2D                                     
%D 2D  +15                R0 <--| R1                
%D 2D                     |        |                
%D 2D                     v  |     |                
%D 2D  +18                R2 | |-> |
%D 2D                     |  |     |
%D 2D                     |  v     |
%D 2D                     v        v
%D 2D  +30                R4 |--> R5
%D 2D
%D 2D
%D (( F0 .tex= LA  F1 .tex= A
%D    F2 .tex= LRB F3 .tex= RB
%D    F4 .tex= B
%D    F0 F1 <-|
%D    F0 F4 -> .slide= -16pt .plabel= l \sm{g^\flat\;:=\\Lg;_B}
%D    F0 F2 -> .plabel= l Lg
%D    F1 F3 -> .plabel= r g
%D    F0 F3 harrownodes nil 20 nil <-|
%D    F2 F3 <-|
%D    F2 F4 -> .plabel= l _B
%D ))
%D ((             S0 .tex= A
%D    S1 .tex= LA S2 .tex= RLA
%D    S3 .tex= B  S4 .tex= RB
%D    S0 S2 -> .plabel= r \eta_A
%D    S1 S2 |->
%D    S1 S3 -> .plabel= l f
%D    S2 S4 -> .plabel= r Rf
%D    S0 S4 -> .slide= 16pt .plabel= r \sm{f^\sharp\;:=\\\eta_A;Rf}
%D    S1 S4 harrownodes nil 20 nil |->
%D    S3 S4 |->
%D    S3 S4 -> .plabel= l _B
%D ))
%D (( C0 .tex= LRB C1 .tex= RB
%D    C2 .tex= B   C3 .tex= RB
%D    C0 C1 <-|
%D    C0 C2 -> .plabel= l \sm{_B\;:=\\{\id_{RB}}^\flat}
%D    C1 C3 -> .plabel= r \id_{RB}
%D    C2 C3 |->
%D    C0 C3 harrownodes nil 20 nil <-|
%D ))
%D (( U0 .tex= LA U1 .tex= A
%D    U2 .tex= LA U3 .tex= RLA
%D    U0 U1 <-|
%D    U0 U2 -> .plabel= l \id_{LA}
%D    U1 U3 -> .plabel= r \sm{\eta_A\;:=\\{\id_{LA}}^\sharp}
%D    U2 U3 |->
%D    U0 U3 harrownodes nil 20 nil |->
%D ))
%D (( L0 .tex= LA' L1 .tex= A'
%D                 L3 .tex= A
%D    L4 .tex= LA  L5 .tex= RLA
%D    L0 L1 <-|
%D    L0 L4 -> .plabel= l \sm{L\aa\;:=\\(\aa;\eta_A)^\flat}
%D    L1 L5 -> .slide= -10pt
%D    L1 L3 -> .plabel= r \aa
%D    L3 L5 -> .plabel= r \eta_A
%D    L4 L5 |->
%D    L0 L5 harrownodes nil 20 5   <-|
%D ))
%D (( R0 .tex= LRB R1 .tex= RB
%D    R2 .tex= B
%D    R4 .tex= B'  R5 .tex= RB'
%D    R0 R1 <-|
%D    R0 R2 -> .plabel= l \ee_B
%D    R2 R4 -> .plabel= l \bb
%D    R0 R4 -> .slide= 10pt
%D    R1 R5 -> .plabel= r \sm{R\bb\;:=\\(\ee_B;\bb)^\sharp}
%D    R4 R5 |->
%D    R0 R5 harrownodes 5   20 nil |->
%D ))
%D enddiagram
%D
$$\diag{adj-reconstruction-LR}$$



% --------------------
% «prog-with-long-names»  (to ".prog-with-long-names")
% (s "Programming with long names" "prog-with-long-names")
\myslide {Programming with long names} {prog-with-long-names}

\widemtos

\newsavebox{\myboxsrc}
\newsavebox{\myboxdnc}
\newsavebox{\myboxltx}

\setbox0=\hbox{%
\begin{minipage}[c]{5.5cm}
\myttchars
\par \verb!«a,b|->a,c» = function («a,b»)!
\par \verb!    local a = pi1(«a,b»)!
\par \verb!    local b = pi2(«a,b»)!
\par \verb!    local c = «b|->c»(b)!
\par \verb!    local «a,c» = {a, c}!
\par \verb!    return «a,c»!
\par \verb!  end!
\end{minipage}%
}
\savebox{\myboxsrc}{\copy0}

\setbox0=\hbox{%
\begin{minipage}[c]{5.5cm}
\par $\angg{a,b\mto a,c}$\verb! = function (!$\angg{a,b}$\verb!)!
\par \verb!    local a = pi1(!$\angg{a,b}$\verb!)!
\par \verb!    local b = pi2(!$\angg{a,b}$\verb!)!
\par \verb!    local c = !$\angg{b\mto c}$\verb!(b)!
\par \verb!    local !$\angg{a,c}$\verb! = {a, c}!
\par \verb!    return !$\angg{a,c}$
\par \verb!  end!
\end{minipage}%
}
\savebox{\myboxltx}{\copy0}

\setbox0=\hbox{%
\begin{minipage}[c]{4.5cm}
\par \verb!dnc00 = function (dnc01)!
\par \verb!    local a = pi1(dnc01)!
\par \verb!    local b = pi2(dnc01)!
\par \verb!    local c = dnc02(b)!
\par \verb!    local dnc03 = {a, c}!
\par \verb!    return dnc03!
\par \verb!  end!
\end{minipage}%
}
\savebox{\myboxdnc}{\copy0}

%D diagram programming-with-long-names
%D 2Dx      100  +120
%D 2D   100 SRC  DNC
%D 2D
%D 2D   +80 LTX
%D 2D
%D (( SRC .tex= \fbox{\usebox{\myboxsrc}}
%D    LTX .tex= \fbox{\usebox{\myboxltx}}
%D    DNC .tex= \fbox{\usebox{\myboxdnc}}
%D    SRC LTX ->
%D    SRC DNC ->
%D ))
%D enddiagram
%D

$$\diag{programming-with-long-names}$$

\bsk



Note that diagrams are perfectly good as names.

We can have:

%D diagram adjunction1
%D 2Dx      100      +25
%D 2D  100 a,b <---| a  
%D 2D       |        |  
%D 2D       |  <->   |  
%D 2D       v        v  
%D 2D  +25  c |---> b{|->}c
%D 2D
%D (( a,b a
%D    c b{|->}c
%D    @ 0 @ 1 <=
%D    @ 0 @ 2 |->
%D    @ 1 @ 3 |->
%D    @ 0 @ 3 harrownodes nil 20 nil <->
%D    @ 2 @ 3 =>
%D ))
%D enddiagram
%D

\msk
$\angg{\diag{adjunction1}}$\verb! := {...}!
\msk

In the (ascii) source code this would be:

\msk
{\myttchars
\verb!«\diag{adjunction1}» := {...}!
}




% --------------------
% «YONEDA-LEMMA»  (to ".YONEDA-LEMMA")
% (sec "The Yoneda Lemma" "YONEDA-LEMMA")
\mysection {The Yoneda Lemma} {YONEDA-LEMMA}


% --------------------
% «yoneda-lemma»  (to ".yoneda-lemma")
% (s "The Yoneda Lemma" "yoneda-lemma")
\myslide {The Yoneda Lemma} {yoneda-lemma}

% \def\pdiagwithboxes#1{\left(\diagprep{#1}\diag{#1}\right)}
% \def\fdiagwithboxes#1{\fbox{\!\!\!$\diagprep{#1}\diag{#1}$}}

\def\pdiag#1{\left(\diagprep{#1}\diag{#1}\right)}
\def\fdiag#1{\fbox{\!\!\!$\diagprep{#1}\diag{#1}$}}

%D diagram pdiagluniv
%D 2Dx     100    +18
%D 2D  100        #1
%D 2D             -
%D 2D           #4|
%D 2D             v
%D 2D  +16 #2 ==> #3
%D 2D
%D (( #1 #3 |-> .plabel= l #4
%D    #2 #3  =>
%D ))
%D enddefpdiagram 4

\def\ctabular#1{\begin{tabular}{c}#1\end{tabular}}
\def\ltabular#1{\begin{tabular}{c}#1\end{tabular}}
% \def\fdiagwithboxest#1#2{\ltabular{#2 \\ \fdiagwithboxes{#1}}}
\def\fdiagest#1#2{\ltabular{#2 \\ \fdiag{#1}}}

\def\pdiagpreuniv#1#2#3{\pdiagluniv{#1}{#2}{#3}{}}
\def\pdiagetauniv#1#2#3{\pdiagluniv{#1}{#2}{#3}{\eta}}
\def\pdiaguniv   #1#2#3{\pdiagluniv{#1}{#2}{#3}{\text{univ}}}

\def\piso{\scriptscriptstyle\text{(iso)}}

%D diagram pdiagntvv
%D 2Dx     100    +15   +15
%D 2D  100        #2    #4
%D 2D             -     -
%D 2D   +8 #1 -.> | |-> |
%D 2D             v     v
%D 2D   +8        #3    #5
%D 2D
%D (( #1   #2 #3   #4 #5
%D    @ 1 @ 2 |->  @ 3 @ 4 |->
%D    @ 0 @ 1 @ 2 midpoint -> .plabel= a *
%D    @ 1 @ 4 harrownodes nil 16 nil |-> .plabel= a #6
%D ))
%D enddefpdiagram 6

%D diagram pdiagntve
%D 2Dx     100    +15   +15
%D 2D  100        #2
%D 2D             -
%D 2D  +8  #1 -.> | |-> #4
%D 2D             v
%D 2D  +8        #3
%D 2D
%D (( #1   #2 #3   #4
%D    @ 1 @ 2 |->
%D    @ 0 @ 1 @ 2 midpoint -> .plabel= a *
%D    @ 1 @ 2 midpoint #4 |-> .plabel= a #5
%D ))
%D enddefpdiagram 5

%D diagram eta-sharp-in-adjunctions
%D 2Dx     100      +60
%D 2D  100 preuniv  ntvv
%D 2D
%D (( preuniv .tex= \pdiagetauniv{a}{a^L}{a^{LR}}        BOX
%D    ntvv    .tex= \pdiagntvv{c}{a^L}{c}{a}{c^R}{\piso} BOX
%D    @ 0 @ 1 <->
%D ))
%D OUTBOXES
%D enddiagram
%D
% $$\fdiagwithboxes{eta-sharp-in-adjunctions}$$

%D diagram lemma-on-preuniversals
%D 2Dx     100      +60
%D 2D  100 preuniv  ntvv
%D 2D
%D (( preuniv .tex= \pdiagpreuniv{a}{b}{b^R}    BOX
%D    ntvv    .tex= \pdiagntvv{c}{b}{c}{a}{c^R}{} BOX
%D    @ 0 @ 1 <->
%D ))
%D OUTBOXES
%D enddiagram
%D
% $$\fdiagwithboxes{lemma-on-preuniversals}$$

%D diagram def-of-univ-arrow
%D 2Dx     100      +60
%D 2D  100 preuniv  ntvv
%D 2D
%D (( preuniv .tex= \pdiaguniv{a}{b}{b^R}              BOX
%D    ntvv    .tex= \pdiagntvv{c}{b}{c}{a}{c^R}{\piso} BOX
%D    @ 0 @ 1 <->
%D ))
%D OUTBOXES
%D enddiagram
%D
% $$\fdiagwithboxes{def-of-univ-arrow}$$

%D diagram yoneda-lemma
%D 2Dx     100      +60
%D 2D  100 preuniv  ntvv
%D 2D
%D 2D  +40 b^R      ntve
%D 2D
%D (( preuniv .tex= \pdiagpreuniv{*}{b}{b^R}      BOX
%D    ntvv    .tex= \pdiagntvv{c}{b}{c}{*}{c^R}{} BOX
%D    b^R
%D    ntve    .tex= \pdiagntve{c}{b}{c}{c^R}{}    BOX
%D    @ 0 @ 1 <->
%D    @ 0 @ 2 <->
%D    @ 1 @ 3 <->
%D ))
%D OUTBOXES
%D enddiagram
%D
% $$\fdiagwithboxes{yoneda-lemma}$$

%D diagram def-of-univ-arrow-and-elt
%D 2Dx     100      +60
%D 2D  100 preuniv  ntvv
%D 2D
%D 2D  +45 b^R      ntve
%D 2D
%D (( preuniv .tex= \pdiaguniv{*}{b}{b^R}              BOX
%D    ntvv    .tex= \pdiagntvv{c}{b}{c}{*}{c^R}{\piso} BOX
%D    b^R     .tex= \ctabular{$b^R$\\(universal\\element)}
%D    ntve    .tex= \ctabular{$\pdiagntve{c}{b}{c}{c^R}{\piso}$\\($R$"is"representable\\and"is"represented"by"$B$)}    BOX
%D    @ 0 @ 1 <->
%D    @ 0 @ 2 <->
%D    @ 1 @ 3 <->
%D ))
%D OUTBOXES
%D enddiagram
%D
% $$\fdiagwithboxes{def-of-univ-arrow-and-elt}$$

%D diagram yoneda-corollary
%D 2Dx     100      +62
%D 2D  100 preuniv  ntvv
%D 2D
%D 2D  +40 a|->b    ntve
%D 2D
%D (( preuniv .tex= \pdiagpreuniv{*}{b}{a|->b}      BOX
%D    ntvv    .tex= \pdiagntvv{c}{b}{c}{*}{a|->c}{} BOX
%D    a|->b
%D    ntve    .tex= \pdiagntvv{c}{b}{c}{a}{c}{}     BOX
%D    @ 0 @ 1 <->
%D    @ 0 @ 2 <->
%D    @ 1 @ 3 <->
%D ))
%D OUTBOXES
%D enddiagram
%D
% $$\fdiagwithboxes{yoneda-corollary}$$

%D diagram yoneda-and-friends
%D 2Dx      100        +125
%D 2D  100  eta-sharp
%D 2D
%D 2D  +60 pre-univs   univ-arrow
%D 2D
%D 2D  +80  yoneda-L   univ-elt
%D 2D
%D 2D +100  yoneda-C
%D 2D
%D (( eta-sharp  .tex= \fdiagest{eta-sharp-in-adjunctions}{$(\eta<->\sharp)$"in"adjunctions:} BOX
%D    pre-univs  .tex= \fdiagest{lemma-on-preuniversals}{Lemma"on"preuniversals:}   BOX
%D    yoneda-L   .tex= \fdiagest{yoneda-lemma}{Yoneda"Lemma:} BOX
%D    yoneda-C   .tex= \fdiagest{yoneda-corollary}{Corollary:} BOX
%D    univ-arrow .tex= \fdiagest{def-of-univ-arrow}{Definition"of"universal"arrow:} BOX
%D    univ-elt   .tex= \fdiagest{def-of-univ-arrow-and-elt}{Definitions"of"universal"element\\and"representable"functor:} BOX
%D      y+= 2.5
%D    @ 0 @ 1 |->
%D    @ 1 @ 2 |->
%D    @ 2 @ 3 |->
%D    @ 0 @ 4 |->
%D    @ 4 @ 5 |->
%D ))
%D OUTBOXES
%D enddiagram
%D
$$\thinmtos
  \diag{yoneda-and-friends}
$$




% --------------------
% «yoneda-lemma-2»  (to ".yoneda-lemma-2")
% (s "The Yoneda Lemma (2)" "yoneda-lemma-2")
\myslide {The Yoneda Lemma (2)} {yoneda-lemma-2}

%D diagram yoneda-and-friends-small
%D 2Dx      100        +125
%D 2D  100 pre-univs
%D 2D
%D 2D  +75  yoneda-L
%D 2D
%D (( pre-univs  .tex= \fdiagest{lemma-on-preuniversals}{Lemma"on"preuniversals:}   BOX
%D    yoneda-L   .tex= \fdiagest{yoneda-lemma}{Yoneda"Lemma:} BOX
%D    @ 0 @ 1 |->
%D ))
%D OUTBOXES
%D enddiagram
%D

We can formalize the previous diagram in type system

(or in a programming language --- say, ML or Coq).

Let's look at a miniature.

\msk
$\thinmtos
  \diag{yoneda-and-friends-small}
$
\msk

In the top box:

$B : \catB_0$

$A : \catA_0$

$R : \catB \to \Set$

$a \mto b^R \equiv g : \Hom_\catA(A, RB)$

$\pdiagpreuniv{a}{b}{b^R} \equiv (A, B, g)$

$c \funto (b \mto c) \equiv \Hom_\catB(B,-) : \catB \to \Set$

$c \funto (a \mto c^R) \equiv C \mto \Hom_\catA(A,RC) \equiv \Hom_\catA(A,R-) : \catB \to \Set$

\def\Nat{\operatorname{Nat}}
\def\mot{\mapsot}

$\pdiagntvv{c}{b}{c}{a}{c^R}{} \equiv T : \Nat(\Hom_\catB(B,-), \Hom_\catA(A,R-))$

$g \mot T := ðT.(T B \id_B)$

$g \mto T := ðf.(ðC.ðg.(f;Rg))$

\msk

When we move to the bottom box we specialize:

$\bbA:=\Set$

$A:=1\equiv\{*\}$

$* : 1$





% --------------------
% «MONADS»  (to ".MONADS")
% (sec "Monads" "MONADS")
\mysection {Monads} {MONADS}


% --------------------
% «monads»  (to ".monads")
% (s "Monads" "monads")
\myslide {Monads} {monads}

\msk

% (find-LATEX "2009unilog-dnc.tex" "proto-monads")

A {\sl protomonad} for a proto-endofunctor $T: \catA \to \catA$ is a
4-uple:
%
$$(\catA, T, \eta, \mu)$$
%
that we draw as:
%
$$A \diagxyto/->/<150>^{\eta_A} TA \diagxyto/<-/<150>^{\mu_A} TTA$$

\msk

A {\sl proto-comonad} for a proto-endofunctor $S: \catB \to \catB$ is a
4-uple:
%
$$(\catB, S, , )$$
%
that we draw as:
%
$$B \diagxyto/<-/<150>^{_B} SB \diagxyto/->/<150>^{_B} SSB$$

\msk

Each proto-adjunction induces both a proto-monad and a proto-comonad.

We draw all these together as:
%
%D diagram adj-with-monads-1
%D 2Dx     100    +30     +30   +30
%D 2D  100 S2B
%D 2D       ^
%D 2D       |
%D 2D       |
%D 2D  +30 S1B   LA <---| A     T0A
%D 2D       |     |       |      |
%D 2D       |     |  <->  |      |
%D 2D       v     v       v      v
%D 2D  +30 S0B    B |---> RB    T1A
%D 2D                            ^
%D 2D  +15                       |
%D 2D                            |
%D 2D  +15     \catB <=> \catA  T2A
%D 2D
%D (( S2B .tex= LRLRB S1B .tex= LRB S0B .tex= B
%D    S2B S1B <- .plabel= l \sm{_B\;:=\\L\eta_{RB}}
%D    S1B S0B -> .plabel= l \sm{_B\;:=\\\id_{RB}{}^\flat}
%D ))
%D (( T0A .tex= A T1A .tex= RLA T2A .tex= RLRLA
%D    T0A T1A -> .plabel= r \sm{\eta"A\;:=\\\id_{LA}{}^\sharp}
%D    T1A T2A <- .plabel= r \sm{\mu"A\;:=\\R\ee_{LA}}
%D ))
%D (( LA A B RB
%D    @ 0 @ 1 <-|
%D    @ 0 @ 2 -> .PLABEL= _(0.43) g^\flat
%D    @ 0 @ 2 -> .PLABEL= _(0.57) f
%D    @ 1 @ 3 -> .PLABEL= ^(0.43) g
%D    @ 1 @ 3 -> .PLABEL= ^(0.57) f^\sharp
%D    @ 0 @ 3 harrownodes nil 20 nil <-| sl^
%D    @ 0 @ 3 harrownodes nil 20 nil |-> sl_
%D    @ 2 @ 3 |->
%D ))
%D (( \catB \catA <- sl^ .plabel= a L
%D    \catB \catA -> sl_ .plabel= b R
%D ))
%D enddiagram
%D
$$\diag{adj-with-monads-1}$$
%:
%:
%:                   LA                             RB
%:           -----------------\ee          -----------------\sharp
%:           \ee_{LA}:LRLA->LA             \eta_{RB}:RB->RLRB
%:  -----------------------------R    -------------------------L
%:  \mu_A:=R\ee_{LA}:RLRLA->RLA     _B:=L\eta_{RB}:LRB->LRLRB
%:
%:  ^def-muA                                   ^def-deltaB
%:
$$\ded{def-muA} \qquad \ded{def-deltaB}$$




% --------------------
% «monads-to-adjs»  (to ".monads-to-adjs")
% (s "From monads to adjunctions" "monads-to-adjs")
\myslide {From monads to adjunctions} {monads-to-adjs}

An expensive adjunction comes with a monad.

If we erase the `$\flat$', the `$\sharp$', etc of this adjunction

and leave only the monad, can we reconstruct

the original adjunction from that?

The answer is {\bf no}.

But we can construct two adjunctions from the monad,

$\adjunction{\catA_T}{L_T}{R_T}{\catA}$ \qquad (Kleisli)

$\adjunction{\catA^T}{L^T}{R^T}{\catA}$ \qquad (Eilenberg-Moore)

that are related to the original adjunction

$\adjunction{\catB}{L}{R}{\catA}$

in interesting ways ---

by comparison functors $F_T$ and $F^T$.

%D diagram comparisons
%D 2Dx     100     +35      +35
%D 2D  100       \catA_T
%D 2D
%D 2D  +35 \catB           \catA
%D 2D
%D 2D  +35       \catA^T
%D 2D
%D ((       \catA_T
%D    \catB         \catA
%D          \catA^T
%D    @ 0 @ 1 ->     .plabel= l F_T
%D    @ 1 @ 3 ->     .plabel= l F^T
%D    @ 0 @ 2 <- sl^ .plabel= a L_T
%D    @ 0 @ 2 -> sl_ .plabel= b R_T
%D    @ 1 @ 2 <- sl^ .PLABEL= ^(0.46) L
%D    @ 1 @ 2 -> sl_ .PLABEL= _(0.46) R
%D    @ 3 @ 2 <- sl^ .plabel= a L^T
%D    @ 3 @ 2 -> sl_ .plabel= b R^T
%D ))
%D enddiagram
%D
$$\diag{comparisons}$$


% To explain carefully what a comparison functor is...

%D diagram comparison
%D 2Dx     100     +40
%D 2D  100 \catB'
%D 2D
%D 2D  +20         \catA
%D 2D
%D 2D  +20 \catB
%D 2D
%D (( \catB' \catA \catB
%D    @ 0 @ 2 ->     .plabel= l F
%D    @ 0 @ 1 <- sl^ .plabel= a L'
%D    @ 0 @ 1 -> sl_ .plabel= b R'
%D    @ 2 @ 1 <- sl^ .plabel= a L
%D    @ 2 @ 1 -> sl_ .plabel= b R
%D ))
%D enddiagram
%D
%$$\diag{comparison}$$






% --------------------
% «kleisli»  (to ".kleisli")
% (s "The Kleisli category of a monad" "kleisli")
\myslide {The Kleisli category of a monad} {kleisli}

\msk

$\catA_T$ has the same objects as $\catA$,

but we write them in a funny way ---

$\KOBJ{A}{TA}$ instead of $A$ ---

because $\Hom_{\catA_T} \neq \Hom_{\catA}$ and $¢_{\catA_T} \neq ¢_{\catA}$.

$[f]: \KOBJ{A}{TA} \to \KOBJ{C}{TC}$ \quad (in $\catA_T$)

is $f:A \to TC$ in $\catA$.

$[f];[g]:=[f;Tg;\mu_E]$.

%:
%:  A
%:  ------------\eta
%:  \eta_A:A->TA
%:  -----------------------------------\ren
%:  [\eta_A]:\KOBJ{A}{TA}->\KOBJ{A}{TA}
%:  -----------------------------------------------------\ren
%:  \id_{[A-"->TA]}:\Hom_\catAK(\KOBJ{A}{TA},\KOBJ{A}{TA})
%:
%:  ^typing-id-kleisli
%:
% $$\ded{typing-id-kleisli}$$

%D diagram kleisli-id-and-comp
%D 2Dx     100    +60   +30    +30
%D 2D  100 A0     A{}
%D 2D       |        \
%D 2D       |         \
%D 2D       v          v
%D 2D  +30 A1           TA
%D 2D
%D 2D  +15 KA     A
%D 2D       |       \
%D 2D       |        \
%D 2D       v         v
%D 2D  +30 KC     C ..> TC
%D 2D       |       \      \
%D 2D       |        \      \
%D 2D       v         v      v
%D 2D  +30 KE     E ..> TE <-- TTE
%D 2D
%D (( A0 .tex= \KOBJ{A}{TA} BOX
%D    A1 .tex= \KOBJ{A}{TA} BOX
%D    A0 A1 -> .plabel= r \id_{[A-"->TA]:=[\eta_A]}
%D ))
%D (( A{} TA -> .plabel= r \eta_A
%D ))
%D (( KA .tex= \KOBJ{A}{TA} BOX
%D    KC .tex= \KOBJ{C}{TC} BOX
%D    KE .tex= \KOBJ{E}{TE} BOX
%D    KA KC -> .plabel= r [f]
%D    KC KE -> .plabel= r [g]
%D    KA KE -> .slide= 27pt .plabel= r \sm{[f];[g]\;:=\\"[f;Tg;\mu_E]}
%D ))
%D (( A TC -> .plabel= r f
%D    C TC -->
%D    C TE -> .plabel= r g   TC TTE -> .plabel= r Tg
%D    E TE --> TE TTE <- .plabel= b \mu_E
%D ))
%D enddiagram
%D
$$\diag{kleisli-id-and-comp}
$$

%D diagram L_T1-and-R_T1
%D 2Dx     100       +40
%D 2D  100 LTA <---| A
%D 2D       |        |
%D 2D       |   <-|  |
%D 2D       v        |
%D 2D  +30 LTA' <--| A'
%D 2D
%D 2D  +20 LTC |---> TC
%D 2D       |        |
%D 2D       |   |->  |
%D 2D       v        |
%D 2D  +30 LTC' |--> TC'
%D 2D
%D (( LTA  .tex= \KOBJ{A}{TA}   BOX   A
%D    LTA' .tex= \KOBJ{A'}{TA'} BOX   A'
%D    @ 0 @ 1 <-|
%D    @ 0 @ 2 -> .plabel= l \sm{L_T\aa\;:=\\{}[\aa;\eta_{A'}]}
%D    @ 1 @ 3 -> .plabel= r \aa
%D    @ 2 @ 3 <-|
%D    @ 0 @ 3 harrownodes nil 20 nil <-|
%D ))
%D ((
%D    LTC  .tex= \KOBJ{C}{TC}   BOX   TC
%D    LTC' .tex= \KOBJ{C'}{TC'} BOX   TC'
%D    @ 0 @ 1 |->
%D    @ 0 @ 2 -> .plabel= l [\cc]
%D    @ 1 @ 3 -> .plabel= r \sm{R_T([\cc])\;:=\\{}T\cc;\mu_{C'}}
%D    @ 2 @ 3 |->
%D    @ 0 @ 3 harrownodes nil 20 nil |->
%D ))
%D enddiagram
%D
$$\diag{L_T1-and-R_T1}$$

Proving that $¢_{\catA_T}$ is non-trivial, by the way ---

but in the syntactical world that doesn't matter.



% --------------------
% «kleisli-adj»  (to ".kleisli-adj")
% (s "The Kleisli adjunction of a monad" "kleisli-adj")
\myslide {The Kleisli adjunction of a monad} {kleisli-adj}

%D diagram kleisli-adj
%D 2Dx     100    +50     +35   +35
%D 2D  100 S2B   KA' <--| A'
%D 2D       ^     |       |
%D 2D       |     |  <-|  |
%D 2D       |     v       v
%D 2D  +35 S1B   KA <---| A     T0A
%D 2D       |     |       |      |
%D 2D       |     |  <->  |      |
%D 2D       v     v       v      v
%D 2D  +30 S0B   KC |---> TC    T1A
%D 2D             |       |      ^
%D 2D  +15        |  |->  |      |
%D 2D             v       v      |
%D 2D  +15       KC' |--> TC'   T2A
%D 2D
%D 2D  +20     \catAK <=> \catA
%D 2D
%D (( KA' .tex= \KOBJ{A'}{TA'} BOX
%D    KA  .tex= \KOBJ{A}{TA} BOX
%D    KC  .tex= \KOBJ{C}{TC} BOX
%D    KC' .tex= \KOBJ{C'}{TC'} BOX
%D    KA'  A' <-|
%D    KA' KA -> .plabel= l \sm{L_T\aa\;:=\\{}[\aa;\eta_{A'}]}
%D     A'  A -> .plabel= r \aa
%D    KA'  A harrownodes nil 20 nil <-|
%D    KA A <-|
%D    KA KC -> .PLABEL= _(0.41) f^\flat:=[f]
%D    KA KC -> .PLABEL= _(0.59) [g]
%D     A TC -> .PLABEL= ^(0.41) f
%D     A TC -> .PLABEL= ^(0.59) [g]^\sharp:=g
%D    KA TC harrownodes nil 20 nil <-| sl^
%D    KA TC harrownodes nil 20 nil |-> sl_
%D    KC TC |-> 
%D    KC KC' -> .plabel= l [\cc]
%D    TC TC' -> .plabel= r \sm{R_T([\cc])\;:=\\{}T\cc;\mu_{C'}}
%D    KC' TC' |-> 
%D    KC TC' harrownodes nil 20 nil |->
%D ))
%D (( \catAK \catA
%D    @ 0 @ 1 <- sl^ .plabel= a L_T
%D    @ 0 @ 1 -> sl_ .plabel= b R_T
%D ))
%D (( S2B .tex= \KOBJ{TTC}{TTTC} BOX
%D    S1B .tex= \KOBJ{TC}{TTC}   BOX
%D    S0B .tex= \KOBJ{C}{TC}     BOX
%D    S2B S1B <- .plabel= l \sm{\dd_{[C-"->TC]}\;:=\\L_T(\eta_{(R_T[C-"->TC])})\;=\\L_T(\eta_{TC})\;=\\{}[\eta_{TC};\eta_{TTC}]}
%D    S1B S0B -> .plabel= l \sm{\ee_{[C-"->TC]}\;:=\\{}[\id_{TC}]}
%D ))
%D (( T0A .tex= A
%D    T1A .tex= TA
%D    T2A .tex= TTA
%D    T0A T1A -> .plabel= r \eta_A
%D    T1A T2A <- .plabel= r \mu_A
%D ))
%D enddiagram
%D
$$\diag{kleisli-adj}
$$



% --------------------
% «eilenberg-moore»  (to ".eilenberg-moore")
% (s "The Eilenberg-Moore category of a monad" "eilenberg-moore")
\myslide {The Eilenberg-Moore category of a monad} {eilenberg-moore}

A {\sl proto-algebra} for a monad $(\catA, T, \eta, \mu)$ is a pair $(A,\; \aa:TA \to T)$.

An {\sl algebra} for a monad $(\catA, T, \eta, \mu)$ is a proto-algebra $(A, \aa)$

that obeys $T\aa;\aa=\mu_A;\aa$.

A {\sl proto-morphism} $f:(A,\aa) \to (C,\cc)$ of (proto-)algebras 

is just a morphism $f:A \to C$.

A {\sl morphism} of algebras is a proto-morphism $f$

that obeys $\aa;f = Tf;\cc$.

The {\sl proto-Eilenberg-Moore category} of a monad $(\catA, T, \eta, \mu)$

has the proto-algebras as objects and the proto-morphisms of

(proto-)algebras as morphisms. We write it as $\catA^T$.

The {\sl Eilenberg-Moore category} of a monad $(\catA, T, \eta, \mu)$,

$\catA^T$, has the algebras as objects and the morphisms of

algebras as morphisms. We also write it as $\catA^T$,

Here is the adjunction $\adjunction{\catA^T}{L^T}{R^T}{\catA}$:


%D diagram em-adj
%D 2Dx     100    +50       +40    +30
%D 2D  100 S2B
%D 2D       ^
%D 2D       |
%D 2D       |
%D 2D  +30 S1B    EMA <---| A     T0A
%D 2D       |      |        |      |
%D 2D       |      |   <->  |      |
%D 2D       v      v        v      v
%D 2D  +30 S0B    EMC |---> TC    T1A
%D 2D                              ^
%D 2D  +15                         |
%D 2D                              |
%D 2D  +15      \catAEM <=> \catA T2A
%D 2D
%D (( EMA .tex= \EMOBJT{TA}{\mu_A} BOX
%D    EMC .tex= \EMOBJT{C}{\cc}    BOX
%D    EMA A <-|
%D    EMA EMC -> .PLABEL= _(0.41) f^\flat:=Tf;\cc
%D    EMA EMC -> .PLABEL= _(0.59) g
%D      A  TC -> .PLABEL= ^(0.41) f
%D      A  TC -> .PLABEL= ^(0.59) g^\sharp:=\eta_A;g
%D    EMA  TC harrownodes nil 20 nil <-| sl^
%D    EMA  TC harrownodes nil 20 nil |-> sl_
%D    EMC  TC |-> 
%D ))
%D (( \catAEM \catA
%D    @ 0 @ 1 <- sl^ .plabel= a L^T
%D    @ 0 @ 1 -> sl_ .plabel= b R^T
%D ))
%D (( S2B .tex= \EMOBJT{TTC}{TT\cc} BOX
%D    S1B .tex= \EMOBJT{TC}{T\cc} BOX
%D    S0B .tex= \EMOBJT{C}{\cc}   BOX
%D    S2B S1B <- .plabel= l \dd_\cc:=T\eta_C?
%D    S1B S0B -> .plabel= l \ee_\cc:=\cc
%D ))
%D (( T0A .tex= A
%D    T1A .tex= TA
%D    T2A .tex= TTA
%D    T0A T1A -> .plabel= r \eta_A
%D    T1A T2A <- .plabel= r \mu_A
%D ))
%D enddiagram
%D
$$\diag{em-adj}
$$




% --------------------
% «comparison-theorem»  (to ".comparison-theorem")
% (s "The comparison theorem" "comparison-theorem")
\myslide {The comparison theorem} {comparison-theorem}

\msk

Everything fits in this diagram:

\def\red#1{{\color{red}#1}}
\def\ph{\red}
\def\ph{\phantom}

%% (find-dn4 "experimental.lua" "thereplusxy")
%L thereplusxy = function (dx, dy, tag)
%L     ds[1] = storenode({x = ds[1].x + dx, y = ds[1].y + dy, tag = tag})
%L     return ds[1]
%L   end
%L forths["there+xy:"] = function ()
%L     thereplusxy(getwordasluaexpr(), getwordasluaexpr(), getword())
%L   end

%D diagram kleisli-and-em
%D 2Dx     100         +50       +50
%D 2D  100          / k1
%D 2D	           //  - /\
%D 2D	          //   |  \\
%D 2D	         //    v   \\
%D 2D  +20      //    k2    \\
%D 2D	      //   //    \\  \\
%D 2D	     \/   //      \\  \\
%D 2D  +20 r1 <================= o1
%D 2D	   -  \\//          \\ //-
%D 2D	   |  /\\            \// |
%D 2D	   v \/ \\           //v v
%D 2D  +20 r2 ===\\=========//=> o2
%D 2D	      \\  \\       //  /\
%D 2D	        \\  \/    \/  //
%D 2D  +20       \\    em1   //
%D 2D	          \\    -   //
%D 2D	           \\   |  //
%D 2D	            \/  v //
%D 2D  +20             em2
%D 2D
%D (( k1  .tex= \KOBJ{A}{RLA} BOX
%D    k2  .tex= \KOBJ{C}{RLC} BOX    k1  place k2  place
%D    em1 .tex= \EMOBJ{RLA}{RLRLA}{\mu_A} BOX
%D    em2 .tex= \EMOBJ{RLC}{RLRLC}{\mu_C} BOX  em1 place em2 place
%D    r1  .tex= LA   o1  .tex= A
%D    r2  .tex= LC   o2  .tex= RLC
%L    comp_KL, comp_KR, comp_EML, comp_EMR = 9, 6, 16, 14
%D    k1  there+xy: -comp_KL  0 k1L  .tex= \ph{A}
%D    k2  there+xy: -comp_KL  0 k2L  .tex= \ph{C}
%D    k1  there+xy:  comp_KR  0 k1R  .tex= \ph{RLA}
%D    k2  there+xy:  comp_KR  0 k2R  .tex= \ph{RLC}
%D    em1 there+xy: -comp_EML 0 em1L .tex= \ph{RLA}
%D    em2 there+xy: -comp_EML 0 em2L .tex= \ph{RLC}
%D    em1 there+xy:  comp_EMR 0 em1R .tex= \ph{RLRLA}
%D    em2 there+xy:  comp_EMR 0 em2R .tex= \ph{RLRLC}
%D    o1 o2 ->
%D    r1 r2 ->
%D    k1 k2 ->
%D    em1 em2 ->
%D    k1R  o1   <-| k2R  o2   |->
%D    r1   o1   <-| r2   o2   |->
%D    em1R o1   <-| em2R o2   |->
%D    k1L  r1   |-> k2L  r2   |->
%D    r1   em1L |-> r2   em2L |->
%D    k1R  k2R  midpoint o1 o2 midpoint dharrownodes nil 20 nil <->
%D    r1   r2   midpoint o1 o2 midpoint dharrownodes nil 25 nil <->
%D    em1R em2R midpoint o1 o2 midpoint dharrownodes nil 15 nil <->
%D ))
%D enddiagram
%


$$\diag{comparisons}
 \qquad
 \diag{kleisli-and-em}
$$
%:
%:  [g]:\KOBJ{A}{RLA}->\KOBJ{C}{RLC}
%:  --------------------------------\ren
%:            g:A->RLC
%:        --------------\flat
%:        F_T([g]):=g^\flat:LA->LC
%:
%:        ^F_T_1
%:
$$\ded{F_T_1}$$
%:
%:           A
%:          --L     
%:          LA                          B           
%:   -----------------\ee          ------------\ee    
%:   \ee_{LA}:LRLA->LA             \ee_B:LRB->B       
%:  --------------------R         -------------R          
%:  \mu_A=R\ee_{LA}:RLRLA->RLA    R\ee_B:RLRB->RB            
%:                                                  
%:     ^F^T_1                         ^F^T_2        
%:
$$\ded{F^T_1} \qquad \ded{F^T_2}$$



% --------------------
% «becks-lemma»  (to ".becks-lemma")
% (s "Beck's lemma" "becks-lemma")
\myslide {Beck's lemma} {becks-lemma}

From Beck's thesis (1967), reprinted at:

\url{http://www.tac.mta.ca/tac/reprints/articles/2/tr2abs.html}

\msk

% (find-angg ".emacs.papers" "beck")
% (find-beckthesispage 8 "tripleable")
% (find-beckthesistext)

\begin{quote}

DEFINITION 3. The adjoint pair $\aa:F \dashv U$ is tripleable if
$\Phi: B \to A^T$ is an equivalence of categories.

DEFINITION 3'. A functor $U: B \to A$ is tripleable if $U$ has a left adjoint $F$ and the
adjoint pair $F \dashv U$ is tripleable.

(...)

THEOREM 1. Let $\aa: F \dashv U$ be an adjoint pair.

(1) If $B$ has coequalizers, then there exists a left adjoint
$\hat\Phi \dashv \Phi$.

Assuming the existence of $\hat\Phi$:

(2) If $U$ preserves coequalizers, then the unit of $\hat\Phi \dashv
\Phi$ is an isomorphism $AT \ton{\equiv} \hat\Phi\Phi$.

(3) If $U$ reflects coequalizers, then the counit is an isomorphism
$\Phi \hat\Phi \ton{\equiv} B$.

Finally, in the presence of (2), (3) can be replaced by:

(3') If $U$ reflects isomorphisms, then the counit is an isomorphism
$\Phi \hat\Phi \ton{\equiv} B$.

\end{quote}

\msk

I will call item (1) of Theorem 1 ``Beck's Lemma''.

In our notation this will be:

if in an adjunction $\adjunction{\catB}{L}{R}{\catA}$

the category $\catB$ has coequalizers then

the comparison functor $F^T: \catB \to \catA^T$

has a left adjoint, $\LL$ (i.e. we have an adjunction $\LL \dashv F^T$).

We need to construct $\LL_0$, $\LL_1$, $\flat^T$, $\sharp^T$.



% --------------------
% «becks-lemma-2»  (to ".becks-lemma-2")
% (s "Beck's lemma (2)" "becks-lemma-2")
\myslide {Beck's lemma (2)} {becks-lemma-2}

Sketch of the proof (a construction, actually):

Let's will write $\LL$ as $\EMOBJT{A}{\aa} \mto \LL_\aa$.

\msk

The action of $\LL$ on objects:

for each object $\EMOBJT{A}{\aa}$ in $\catA^T$ we need to produce

an object $\LL_\aa$ in $\catB$.

We define it as the coequalizer of $\ee_{LA}$ and $L\aa$.

%:
%:          A               \EMOBJT{A}{\aa}
%:         --L              ---------------\ren
%:         LA               \aa:RLA->A
%:  -----------------\ee   -------------L
%:  \ee_{LA}:LRLA->LA      L\aa:LRLA->LA
%:  ------------------------------------¯{coeq}
%:        q_\aa:LA->>\LL_\aa
%:        ------------------¯{tgt}
%:          \LL_\aa
%:
%:          ^qaa-as-coeq
%:
%:
$$\ded{qaa-as-coeq}$$


The action of $\LL$ on morphisms ($\LL_h := (Lh;q_\aa)/q_{\aa'}$),

and the transpositions:

% (fooi "\\cc" "\\aa" "LC" "LA")
%D diagram becks-LL-on-morphisms
%D 2Dx     100   +45   +40     +60
%D 2D  100 LRLA' LA' \LL_\aa'  \aa'
%D 2D
%D 2D  +40 LRLA  LA  \LL_\aa   \aa
%D 2D
%D 2D  +40             B       RB
%D 2D
%D 2D  +40             B'      RB'
%D 2D
%D (( \aa' y+= 50
%D    \aa  y+= 50
%D    RB  y+= 50
%D    RB' y+= 50
%D    \LL_\aa' .tex= \LL_{\aa'}
%D        \aa' .tex= \EMOBJRL{A'}{\aa'} BOX
%D        \aa  .tex= \EMOBJRL{A}{\aa} BOX
%D        RB  .tex= \EMOBJRL{RB}{R_B} BOX
%D ))
%D (( # Top fork:
%D    LRLA'  LA'   -> sl^ .plabel= a \ee_{LA'}
%D    LRLA'  LA'   -> sl_ .plabel= b L\aa'    
%D    LA' \LL_\aa' ->>    .plabel= a q_{\aa'}
%D    \aa' \LL_\aa' |->
%D    # Bottom fork:
%D    LRLA LA -> sl^ .plabel= a \ee_{LA}
%D    LRLA LA -> sl_ .plabel= b L\aa
%D    LA \LL_\aa ->> .plabel= b q_\aa
%D    \aa \LL_\aa |->
%D    # Things between the two forks:
%D    LA' LA      ->  .plabel= m Lh
%D    LA' \LL_\aa ->  .plabel= m Lh;q_\aa
%D    \LL_\aa' \LL_\aa --> .plabel= m \LL_h
%D    \aa' \aa -> .plabel= r h
%D    \LL_\aa' \LL_\aa midpoint \aa' \aa midpoint dharrownodes nil 18 nil <-|
%D    \LL_\aa     B    midpoint \aa  RB midpoint dharrownodes nil 18   4 <-| sl^ .plabel= a \flat^T
%D    \LL_\aa     B    midpoint \aa  RB midpoint dharrownodes   4 18 nil |-> sl_ .plabel= b \sharp^T
%D    # The bottom stuff:
%D    LA B --> .plabel= l \sm{g^\bb,\\q_\aa;f}
%D    \LL_\aa B -> .PLABEL= _(0.42) g^{\flat^T}
%D    \LL_\aa B -> .PLABEL= _(0.58) f
%D    \aa RB   -> .PLABEL= ^(0.42) g
%D    \aa RB   -> .PLABEL= ^(0.56) f^{\sharp^T}
%D    B RB |->
%D ))
%D enddiagram
%D
$$\diag{becks-LL-on-morphisms}$$

\vskip -8ex

% The transpositions are given by:
%
%:
%:   \EMOBJRL{A}{\aa}
%:   ==================
%:   q_\aa:LA->>\LL_\aa   f:\LL_\aa->B
%:   ---------------------------------;
%:     q_\aa;f:LA->B
%:     ----------------------\sharp
%:     f^{\sharp^T}:=\;(q_\aa;f)^\sharp:A->RB
%:
%:        ^LL-sharp
%:
%:     ------------------------------------\ren
%:     f^{\sharp^T}:\EMOBJRL{A}{\aa}->\EMOBJRL{RB}{R\ee_B}
%:
$$\ded{LL-sharp} \phantom{mmmmmmmmmmmmmmm}$$
%:

%:
%:
%:                     g:\EMOBJRL{A}{\aa}->\EMOBJRL{RB}{R_B}
%:                     ------------------
%:   \EMOBJRL{A}{\aa}      g:A->RB
%:  ==================    -------------\flat
%:  q_\aa:LA->>\LL_\aa    g^\flat:LA->B
%:  -----------------------------------¯{fact.through.coeq}
%:      g^{\flat^T}:=\;g^\flat/q_\aa:\LL_\aa->B
%:
%:        ^LL-flat
%:
%:      ------------------------\ren
%:        g^{\flat^T}:\LL_\aa->B
%:
$$\ded{LL-flat}$$




% --------------------
% «monads-and-cohomology»  (to ".monads-and-cohomology")
% (s "Monads and cohomology" "monads-and-cohomology")
\myslide {Monads and cohomology} {monads-and-cohomology}

Quoting again from Beck's thesis (p.12)...

\begin{quote}

{\bf 2. Cohomology}

Adjoint functors, it is now well known, lead to cohomology ([Eilenberg
\& Moore (1965a), Godement (1958), Mac Lane (1963)] --- or to homotopy
[Huber (1961)]). If
%
$$\und{A} \ton{F} \und{B} \ton{A} \und{A} \qquad (F \dashv U)$$
%
is an adjoint pair, objects of the form $AFÝ|B|$ are regarded as {\sl
``free'' relative to the underlying object functor $U$}. The counit
%
$$XUF \ton{X\ee} X$$
%
is intuitively the first step of a functorial free resolution of any
object $XÝ|\und{B}|$. By iterating $UF$ one extends $X$ to a {\sl free
simplicial resolution} of $X$, and defines derived functors as usual
in homological algebra. Here we only consider the simplest case, that
of defining {\sl cohomology groups}
%
$$H^n(X, Y), \qquad n \ge 0,$$
%
{\sl of an object $XÝ|\und{B}|$ with coefficients in an abelian group
object $YÝ|\und{B}|$, relative to the given underlying object functor
$U:\und{B} \to A$} (having a left adjoint). Tripleableness of $F
\dashv U$ will not play any appreciable role until we discuss special
properties of the cohomology in \S3. We now recall the details of the
construction of the cohomology groups. Some of the terms used are
clarified in the proof of Theorem 2, which summarizes the main
properties the cohomology possesses.

\end{quote}

How much of that has nice syntactical proofs?

(I don't know yet!)




% --------------------
% «CCCs»  (to ".CCCs")
% (sec "Cartesian Closed Categories" "CCCs")
\mysection {Cartesian Closed Categories} {CCCs}


% --------------------
% «CCCs»  (to ".CCCs")
% (s "Cartesian Closed Categories" "CCCs")
\myslide {Cartesian Closed Categories} {CCCs}

A {\sl Cartesian Closed Category} (``CCC'') $(\catC, ×, 1, \to)$

is a category $\catC$ plus a ``cartesian closed structure'' $(×, 1, \to)$ on it.

Again, we will have cheap ways and expensive ways to specify $(×, 1, \to)$.

The cheap ways (there will be several of them)

will appear from formalizing this diagram:

%D diagram CCC-1
%D 2Dx     100 +30 +30 +25 +30 +30
%D 2D  100     P0      T0  E0  E1
%D 2D
%D 2D  +30 P1  P2  P3  T1  E2  E3
%D 2D
%D (( P0 .tex= A   P1 .tex= B P2 .tex= B×C P3 .tex= C
%D    P0 P1 -> .plabel= a f
%D    P0 P2 -> .plabel= m \ang{f,g}
%D    P0 P3 -> .plabel= a g
%D    P1 P2 <- .plabel= b \pi
%D    P2 P3 -> .plabel= b \pi'
%D ))
%D (( T0 .tex= A T1 .tex= 1 -> .plabel= r !
%D ))
%D (( E0 .tex= A×B E1 .tex= A
%D    E2 .tex= C E3 .tex= B{->}C
%D    E0 E1 <-|
%D    E0 E2 -> .PLABEL= _(0.43) \uncur"g
%D    E0 E2 -> .PLABEL= _(0.57) f
%D    E1 E3 -> .PLABEL= ^(0.43) g
%D    E1 E3 -> .PLABEL= ^(0.57) \cur"f
%D    E0 E3 harrownodes nil 20 nil <-| sl^
%D    E0 E3 harrownodes nil 20 nil |-> sl_
%D    E2 E3 |->
%D ))
%D enddiagram
%D
$$\diag{CCC-1}$$

\msk

Another way --- the ``adjoint presentation'' of a CCC ---

will be by requiring that the functors $A \mto (A×A)$,

$A \mto *$, and $A \mto A×B$ (note that for each object $B$ of $\catC$

we have a different $A \mto A×B$) all have right adjoints:

%D diagram CCC-2
%D 2Dx     100 +30 +30 +30 +30 +30
%D 2D  100 P0  P1  T0  T1  E0  E1
%D 2D
%D 2D  +30 P2  P3  T2  T3  E2  E3
%D 2D
%D (( P0 .tex= (A,A)  P1 .tex= A
%D    P2 .tex= (B,C)  P3 .tex= B×C
%D    P0 P1 <-|
%D    P0 P2 -> .PLABEL= _(0.43) (h;\pi,h;\pi')
%D    P0 P2 -> .PLABEL= _(0.57) (f,g)	      
%D    P1 P3 -> .PLABEL= ^(0.43) h	      
%D    P1 P3 -> .PLABEL= ^(0.57) \ang{f,g}     
%D    P0 P3 harrownodes nil 20 nil <-| sl^
%D    P0 P3 harrownodes nil 20 nil |-> sl_
%D    P2 P3 |->
%D ))
%D (( T0 .tex= *  T1 .tex= A
%D    T2 .tex= *  T3 .tex= 1
%D    T0 T1 <-|
%D    T0 T2 -> .PLABEL= _(0.43) \id
%D    T0 T2 -> .PLABEL= _(0.57) \id
%D    T1 T3 -> .PLABEL= ^(0.43) g
%D    T1 T3 -> .PLABEL= ^(0.57) !
%D    T0 T3 harrownodes nil 20 nil <-| sl^
%D    T0 T3 harrownodes nil 20 nil |-> sl_
%D    T2 T3 |->
%D ))
%D (( E0 .tex= A×B E1 .tex= A
%D    E2 .tex= C E3 .tex= B{->}C
%D    E0 E1 <-|
%D    E0 E2 -> .PLABEL= _(0.43) \uncur"g
%D    E0 E2 -> .PLABEL= _(0.57) f      
%D    E1 E3 -> .PLABEL= ^(0.43) g      
%D    E1 E3 -> .PLABEL= ^(0.57) \cur"f  
%D    E0 E3 harrownodes nil 20 nil <-| sl^
%D    E0 E3 harrownodes nil 20 nil |-> sl_
%D    E2 E3 |->
%D ))
%D enddiagram
%D
$$\diag{CCC-2}$$

The adjoint presentation is quite elegant, but if we

expand all the details we see that it is much more expensive

than the other ones.


\bsk
\bsk

By the way: a (cheap) topos, $(\catC, ×, 1, \to, \Om)$,

is a CCC plus a ``classifier object'', $\Om$,

where the $\Om$ obeys this magic axiom,

that has {\sl lots} of consequences:

%D diagram classifier
%D 2Dx     100    +30
%D 2D  100 B' --> 1
%D 2D      |      |
%D 2D      |      |
%D 2D      v      v
%D 2D  +30 B ---> \Om
%D 2D
%D (( B' 1 -> .plabel= a !
%D    B' B >->  1 \Om >->
%D    B \Om -> .plabel= b P
%D    B' relplace 7 7 \pbsymbol{7}
%D    B relplace 7 -7 \searrow
%D ))
%D enddiagram
%D
$$\diag{classifier}$$



% --------------------
% «cheap-toposes»  (to ".cheap-toposes")
% (s "Cheap and expensive toposes" "cheap-toposes")
\myslide {Cheap and expensive toposes} {cheap-toposes}

\par What matters to us is:
\par a CCC is a category in which we can interpret $ð$-calculus;
\par a topos is a category in which we can interpret (a kind of) set theory;
\par a hyperdoctrine is a category in which we can interpret first-order logic.
\par (I'm simplifying things a little bit, but anyway).
\msk
\par When we buy a cheap topos it takes a lot of work
\par to build the constructions that interpret first-order logic in it...
\par in a hyperdoctrine they sort of come out-of-the-box.
\msk
\par An expensive topos has all the structure and
\par properties of an expensive hyperdoctrine
\par plus a few more.
\msk 
\par The category of sets, $\Set$, is a topos, and therefore
\par if you go to the supermarket with the intent of buying
\par the category of sets you will find it there in several
\par different presentations... the more expensive ones
\par have all the hyperdoctrine rules, all the topos rules,
\par plus some.



% --------------------
% «lcalc-in-a-CCC-1»  (to ".lcalc-in-a-CCC-1")
% (s "$ð$-calculus in a CCC: an example" "lcalc-in-a-CCC-1")
\myslide {$ð$-calculus in a CCC: an example} {lcalc-in-a-CCC-1}

We can interpret the $ð$-construction
%:
%:           A   f:B->C
%:  =================================
%:  ðd¨(A×B).\ang{d,f('d)}:A×B->A×C
%:
%:  ^int-ex-1
%:
$$\ded{int-ex-1}$$

in a Cartesian Closed Category as this diagram:

%D diagram cat-LC-1
%D 2Dx     100   +40     +40
%D 2D  100       A×B --> B
%D 2D          /  |  \   |
%D 2D         /   |   \  |
%D 2D        v    v    v v
%D 2D  +40 A <-- A×C --> C
%D 2D
%D (( A×B B -> .plabel= a \pi'
%D    A×B A -> .plabel= a \pi
%D    A×B A×C -> .plabel= m \sm{ðd¨(A×B).\\\ang{d,f('d)}}
%D    A×B C ->
%D    B C -> .plabel= r f
%D    A A×C <-
%D    A×C C ->
%D ))
%D enddiagram
%D
$$\diag{cat-LC-1}$$

\msk

And we can interpret its ``internalization'',
%:  
%:              A  B  C
%:  ======================================================
%:  ðf¨(B{->}C).ðd¨(A×B).\ang{d,f('d)}:(B->C)->(A×B->A×C)
%:
%:  ^int-ex-2
%:
$$\ded{int-ex-2}$$

using this diagram:
%
%D diagram cat-LC-2
%D 2Dx      100    +25      +40       +45   +0   +55
%D 2D  100 A×B <------- (A×B)×(B->C)
%D 2D       |  \            |     \
%D 2D       |   \           |      \
%D 2D       |    v          v       v
%D 2D  +35  |      B <-- (B->C)×B --> B->C
%D 2D       |               |
%D 2D  +20  |      *        |               A0   A1
%D 2D       v               v
%D 2D  +35  A <-- A×C ----> C               A2   A3
%D 2D
%D (( (A×B)×(B->C) .tex= (B{->}C){×}(A{×}B)
%D    (B->C)×B     .tex= (B{->}C){×}B
%D    B->C         .tex= B{->}C
%D    *            .tex= (\ldots)
%D    *            .tex= (B{->}C){×}(A{×}B) x+= 5 y+= -3
%D    A×C                                   x+= 5
%D    A×B (A×B)×(B->C) <-
%D    A×B A ->
%D    A×B B ->
%D    (A×B)×(B->C) * =
%D    (A×B)×(B->C) B ->
%D    (A×B)×(B->C) (B->C)×B ->
%D    (A×B)×(B->C) B->C ->
%D    B (B->C)×B <-
%D    (B->C)×B B->C ->
%D    (B->C)×B C -> .plabel= r \ev
%D    * A -> * C -> * A×C ->
%D    A A×C <-
%D    A×C C ->
%D ))
%D (( A0 .tex= (B{->}C)×(A{×}B)
%D    A1 .tex= (B{->}C)
%D    A2 .tex= A×C
%D    A3 .tex= (A{×}B){->}(A{×}C)
%D    A0 A1 <-|
%D    A0 A2 ->
%D    A1 A3 -> .plabel= r \sm{ðf¨(B{->}C).\\ðd¨(A×B).\\\ang{d,f('d)}}
%D    A2 A3 |->
%D    A0 A3 harrownodes nil 20 nil |-> .plabel= a \cur
%D ))
%D enddiagram
%D
$$\diag{cat-LC-2}$$



% --------------------
% «lcalc-in-a-CCC-2»  (to ".lcalc-in-a-CCC-2")
% (s "$ð$-calculus in a CCC: an example (2)" "lcalc-in-a-CCC-2")
\myslide {$ð$-calculus in a CCC: an example (2)} {lcalc-in-a-CCC-2}

...but in a case like this the diagrams

are secondary, and for most $ð$-terms they are

unbearably big... we should focus on the trees.


$$\diag{cat-LC-2}$$

%:                               {}
%:                         ------------------'
%:                         (b|->c),(a,b)|-a,b
%:  ------------------'   ------------------;'   --------------------
%:  (b|->c),(a,b)|-a,b     (b|->c),(a,b)|-b        (b|->c),(a,b)|-b|->c
%:  ------------------;   --------------------------------------------\app
%:  (b|->c),(a,b)|-a         (b|->c),(a,b)|-c
%:  -----------------------------------------\ang,
%:           (b|->c),(a,b)|-a,c
%:           ------------------\cur
%:            b|->c|-a,b|->a,c
%:
%:            ^int-ex-seqs
%:
%:
%:           [a,b]^1                  '                               [d]^1
%:           -------                -----                              -----
%:  [a,b]^1     b     b|->c    '   ';'                      [d]^1   'd    f
%:  -------     -----------   ----  --------                    -----   --------
%:     a            c         ';  \ang{,';'};\ev            d      f('d)
%:     --------------         -----------------------            --------------
%:          a,c               \ang{';,\ang{,';'};\ev}       \ang{d,f('d)}
%:        -------1          ------------------------------      -----------------
%:        a,b|->a,c         \cur"\ang{';,\ang{,';'};\ev}   ðd.\ang{d,f('d)}
%:
%:        ^int-ex-dnc       ^int-ex-cat                          ^int-ex-lambda
%:
%:
% $$\ded{int-ex-2}$$
% $$\ded{int-ex-3}$$
% $$\ded{int-ex-4}$$


%D diagram cat-LC-trees
%D 2Dx     100 +80 +75
%D 2D  100     A
%D 2D
%D 2D  +70 B   C   D
%D 2D
%D (( A .tex= \fcded{int-ex-seqs}
%D    B .tex= \fcded{int-ex-cat}
%D    C .tex= \fcded{int-ex-lambda}
%D    D .tex= \fcded{int-ex-dnc}
%D    A B -> A C -> A D ->
%D ))
%D enddiagram
%D
$$\diag{cat-LC-trees}$$






% --------------------
% «product-property»  (to ".product-property")
% (s "The product property" "product-property")
\myslide {The product property} {product-property}

\def\pdiag#1{\left(\diag{#1}\right)}
\def\fdiag#1{\fbox{\!\!\!$\diag{#1}$}}
\def\prodprop   {Ð{prod}}
\def\prodpropnat{Ð{prod}^\nat}

For any diagram of the form $B \diagxyto/<-/<150>^p P \diagxyto/->/<150>^{p'} C$
in a category $\catC$

we have a natural operation,

%D diagram prodprop-1
%D 2Dx     100
%D 2D  100 A
%D 2D      v
%D 2D  +30 P
%D 2D
%D (( A P -> .plabel= l h
%D ))
%D enddiagram
%
%D diagram prodprop-2
%D 2Dx     100 +20 +20
%D 2D  100     A
%D 2D
%D 2D  +30 B       C
%D 2D
%D (( A B -> .plabel= m h;p
%D    A C -> .plabel= m h;p'
%D ))
%D enddiagram
%
%D diagram propprop-3
%D 2Dx       100        +80      
%D 2D  100  PP1         PP2
%D 2D
%D 2D  +30 (A,P)    (A,B)×(A,C)
%D 2D
%D 2D  +8    h      (h;p,\,h;p')
%D 2D
%D (( PP1 .tex= \pdiag{prodprop-1} BOX
%D    PP2 .tex= \pdiag{prodprop-2} BOX |->
%D    (A,P)       .tex= \Hom_\catC(A,P)
%D    (A,B)×(A,C) .tex= \Hom_\catC(A,B)×\Hom_\catC(A,C) ->
%D    h (h;p,\,h;p') |->
%D ))
%D enddiagram
%D
$$\diag{propprop-3}$$

\par whose action is to compose any given $h:A \to P$ with $p$ and $p'$.
\par Both $\Hom_\catC(-,P)$ and $\Hom_\catC(-,B)×\Hom_\catC(-,C)$ are
\par (contravariant) functors from $\catC^\op$ to $\Set$,
\par and the operation above is a natural transformation
\par $$\prodpropnat: \Hom_\catC(-,P) \to \Hom_\catC(-,B)×\Hom_\catC(-,C)$$
\bsk
\par The {\sl product property} for a diagram $B \diagxyto/<-/<150>^p P \diagxyto/->/<150>^{p'} C.$
\par is an inverse for the ``natural'' natural transformation above.


% --------------------
% «product-diagrams»  (to ".product-diagrams")
% (s "Product diagrams" "product-diagrams")
\myslide {Product diagrams} {product-diagrams}

\par Whenever we write $B \diagxyto/<-/<150>^\pi B×C \diagxyto/->/<150>^{'} C$,
\par using the product symbol in the middle object, it will be implicit
\par that the $B×C$ must ``deserve its name'': that is, we must have
\par ``projection maps'' $$ and $'$ (here they were shown explicitly),
\par and the diagram $B \diagxyto/<-/<150>^\pi B×C \diagxyto/->/<150>^{'} C$
\par must have the product property.
\msk
\par We can draw the two natural transformations together as:

%D diagram prodprop-4
%D 2Dx     100
%D 2D  100 A
%D 2D
%D 2D  +20 B×C
%D 2D
%D (( A B×C ->
%D ))
%D enddiagram
%
%D diagram prodprop-5
%D 2Dx     100 +15 +15
%D 2D  100     A
%D 2D
%D 2D  +20 B       C
%D 2D
%D (( A B -> A C ->
%D ))
%D enddiagram
%D
$$A^\op 
  \diagxyto/->/<150>^.
  (\pdiag{prodprop-4}
   \two/->`<-/<200>^{\prodpropnat}_{\prodprop}
   \pdiag{prodprop-5})
$$

\par but note that the projection maps did not appear in the picture...
\par As we can make diagram stand for whatever we want
\par (because diagrams are valid as long names)
\par we will take diagrams of this form as meaning:

%D diagram prodprop-compact
%D 2Dx     100  +30    +30
%D 2D  100      A
%D 2D
%D 2D  +30 B <- B×C -> C
%D 2D
%D (( A B   -> .plabel= a f
%D    A B×C -> .plabel= m \ang{f,g}
%D    A C   -> .plabel= a g
%D    B×C B -> .plabel= b \pi
%D    B×C C -> .plabel= b \pi'
%D ))
%D enddiagram
%D
$$\diag{prodprop-compact}$$

\par a diagram $B \diagxyto/<-/<150>^\pi B×C \diagxyto/->/<150>^{'} C$,
\par plus the product property for it,
\par plus a syntactical cue for how to name the results of $\prodprop$;
\par in this case, this is:
:
%:  f:A->B  g:A->C
%:  --------------
%:  (f,g):\Hom_\catC(A,B)×\Hom_\catC(A,C)          f:A->B  g:A×C
%:  ---------------------------\prodprop_A  or:  ----------------\prodprop
%:     \ang{f,g}:A->B×C                          \ang{f,g}:A->B×C
%:
%:     ^prodproprule-1                           ^prodproprule-2
%:
$$\ded{prodproprule-1}$$
%
or, more briefly:
%
$$\ded{prodproprule-2}$$
%
although this will be an abuse of language, in a sense ---


% --------------------
% «product-diagrams-2»  (to ".product-diagrams-2")
% (s "Product diagrams (2)" "product-diagrams-2")
\myslide {Product diagrams (2)} {product-diagrams-2}

$$\diag{prodprop-compact}$$

Note that if we write the rule $\prodprop$ as:
%:
%:  (f:A->B,\;g:A->C)
%:  -----------------\prodprop
%:   \ang{f,g}:A->B×C
%:
%:   ^prodproprule3
%:
$$\ded{prodproprule3}$$
%
then it is exactly the inverse of:
%
%:  h:A->B×C
%:  ========\prodpropnat
%:  (h;:A->B,\;h;:A->C)
%:
%:  ^prodproprule4
%:
%:                      
%:  h:A->B×C    h:A->B×C
%:  ========    ========
%:  h;:A->B    h;:A->C
%:  --------------------\ang{,}
%:  (h;:A->B,\;h;:A->C)
%:
%:     ^prodproprule5
%:
$$\ded{prodproprule4}
  \quad := \quad
  \ded{prodproprule5}
$$

\msk
\par We will repeat this pattern all over the place:
\par for some derived rule, $Ð{blah}^\nat$, an inverse $Ð{blah}$.
\msk

\par Note that if you were given just
     $B \diagxyto/<-/<150>^\pi B×C \diagxyto/->/<150>^{'} C$ and
%
$$A^\op 
  \diagxyto/->/<150>^.
  (\pdiag{prodprop-4}
   \two/->`<-/<200>^{\prodpropnat}_{\prodprop}
   \pdiag{prodprop-5})
$$
\par then you would have to figure out the ``natural construction''
\par for $\prodpropnat$ yourself; and then $\prodprop$ would be its inverse.

% --------------------
% «products-as-adjs»  (to ".products-as-adjs")
% (s "Products as adjunctions" "products-as-adjs")
\myslide {Products as adjunctions} {products-as-adjs}

\par If we rewrite the previous NT using the category $\catC×\catC$
\par and we flip the positions of the two vertical arrows
\par it becomes:

%D diagram prod-as-adj-0
%D 2Dx      100          +30
%D 2D  100 (A,A) <-----| A  
%D 2D        |           |  
%D 2D        |           |  
%D 2D        v           v  
%D 2D  +25 (B,C) |----> B×C 
%D 2D
%D (( (A,A) A   (B,C) B×C
%D    @ 0 @ 2 ->
%D    @ 1 @ 3 ->
%D    @ 0 @ 3 harrownodes nil 20 nil <- sl^ .plabel= a  \prodpropnat
%D    @ 0 @ 3 harrownodes nil 20 nil -> sl_ .plabel= b  \prodprop
%D
%D ))
%D enddiagram
%D
$$A^\op
  \diagxyto/->/<150>^.
  \pdiag{prod-as-adj-0}
$$

\par which looks almost like an adjunction...
\par In fact, if for any two objects $B$ and $C$ of $\catC$
\par we have a product object $B×C$ (that ``deserves its name'',
\par i.e., comes with $$, $'$, and the product property)
\par then we have this adjunction,

%D diagram prod-as-adj-1
%D 2Dx        100        +45          +40   +40
%D 2D  100 (B×C,B×C)    (A,A) <-----| A     {A}
%D 2D          |          |           |      |
%D 2D          |          |           |      |
%D 2D          v          v           v      |
%D 2D  +30  {(B,C)}     (B,C) |----> B×C    A×A
%D 2D
%D 2D  +20           \catC×\catC -> \catC
%D 2D
%D (( (A,A)  A
%D    (B,C) B×C
%D    @ 0 @ 1 <-| .plabel= a \Delta
%D    @ 0 @ 2 -> .PLABEL= _(0.43) h^\flat:=(h;,h;')
%D    @ 0 @ 2 -> .PLABEL= _(0.57) (f,g)
%D    @ 1 @ 3 -> .PLABEL= ^(0.43) h
%D    @ 1 @ 3 -> .PLABEL= ^(0.57) (f,g)^\sharp:=\ang{f,g}
%D    @ 2 @ 3 |-> .plabel= b ×
%D    @ 0 @ 3 harrownodes nil 20 nil <-| sl^ .plabel= a  \flat=\prodpropnat
%D    @ 0 @ 3 harrownodes nil 20 nil |-> sl_ .plabel= b \sharp=\prodprop
%D ))
%D (( (B×C,B×C) {(B,C)} -> .plabel= l (,')
%D ))
%D (( {A} A×A -> .plabel= r \ang{\id,\id}
%D ))
%D (( \catC×\catC \catC
%D    @ 0 @ 1 <- sl^ .plabel= a \Delta
%D    @ 0 @ 1 -> sl_ .plabel= b ×
%D ))
%D enddiagram
%D
$$\diag{prod-as-adj-1}$$

\par where the action of $×$ on a morphism $(\bb,\cc):(B,C) \to (B',C')$
\par of $\catC×\catC$ yields $\bb×\cc := \ang{\pi;\bb,\pi';\cc}$:

%D diagram prod1
%D 2Dx     100  +40    +40
%D 2D  100 B    B×C    C
%D 2D
%D 2D
%D 2D  +40 B'   B'×C'  C'
%D 2D
%D (( B B×C <- .plabel= a \pi
%D    B×C C -> .plabel= a \pi'
%D    B  B' -> .plabel= l \bb
%D    B×C B' -> .plabel= m \pi;\bb
%D    B×C B'×C' -> .plabel= m \ang{\pi;\bb,\pi';\cc}
%D    B×C C' -> .plabel= m \pi';\cc
%D    C  C' -> .plabel= l \bb
%D    B' B'×C' <- .plabel= a \pi
%D    B'×C' C' -> .plabel= a \pi'
%D    
%D    
%D ))
%D enddiagram
%D
$$\diag{prod1}$$




% --------------------
% «exponentials»  (to ".exponentials")
% (s "Exponentials" "exponentials")
\myslide {Exponentials} {exponentials}

\par In a category with binary products, $(\catC,×)$,
\par an object deserves the name $B{\to}C$
\par if it comes with an evaluation map,
\par $\ev: (B{\to}C){×}B \to C$, and an inverse, $\cur$,
\par for the ``uncurrying'' operation:

%D diagram uncurrying
%D 2Dx       100     +40
%D 2D  100   F0 <--| F1
%D 2D      / |        |
%D 2D      | |  <--|  |
%D 2D      | v        v
%D 2D  +30 | F2 <--| F3
%D 2D      | |  
%D 2D      \ |  
%D 2D       vv  
%D 2D  +30   F4 
%D 2D
%D (( F0 .tex= A{×}B        F1 .tex= A
%D    F2 .tex= (B{->}C){×}B F3 .tex= B{->}C
%D    F4 .tex= C
%D    F0 F1 <-|
%D    F0 F4 -> .slide= -27pt .plabel= l \sm{\uncur"g\;:=\\g×B;\,\ev}
%D    F0 F2 -> .plabel= l g×B
%D    F1 F3 -> .plabel= r g
%D    F0 F3 harrownodes nil 20 nil <-|
%D    F2 F3 <-|
%D    F2 F4 -> .plabel= l \ev
%D ))
%D enddiagram
%D
$$\diag{uncurrying}$$

This, again, looks like an adjunction:

%D diagram exp-as-adj-0
%D 2Dx       100        +30
%D 2D  100 A{×}B <----| A  
%D 2D        |          |  
%D 2D        |          |  
%D 2D        v          v  
%D 2D  +25   C |----> B{->}C 
%D 2D
%D (( A{×}B A   C B{->}C
%D    @ 0 @ 2 ->
%D    @ 1 @ 3 ->
%D    @ 0 @ 3 harrownodes nil 20 nil <- sl^ .plabel= a  \uncur
%D    @ 0 @ 3 harrownodes nil 20 nil -> sl_ .plabel= b  \cur
%D ))
%D enddiagram
%D
$$A^\op
  \diagxyto/->/<150>^.
  \pdiag{exp-as-adj-0}
$$

\par where the top functor, $A \mto A×B$, is known.
\msk
\par Let's fix the object $B$.
\par If we have the action of $C \mto B{\to}C$
\par on objects --- i.e., for each $C$
\par we have $B{\to}C$, $\ev_{BC}$ and $\cur_{BC}$ ---
\par then we can build $(B{\to})_1$.
\par The trick comes from slide 21 (its bottom rectangle):

% (find-LATEXfile "2010unilog-current.aux" "\\newlabel{cheap-and-exp-adjs}")

%D diagram (B->)_1
%D 2Dx     100     +40
%D 2D  100 R0 <--| R1
%D 2D      |        |
%D 2D      v  |     |
%D 2D  +20 R2 | |-> |
%D 2D      |  |     |
%D 2D      |  v     |
%D 2D      v        v
%D 2D  +30 R4 |--> R5
%D 2D
%D (( R0 .tex= (B{->}C){×}B R1 .tex= B{->}C
%D    R2 .tex= C
%D    R4 .tex= C'  R5 .tex= B{->}C'
%D    R0 R1 <-|
%D    R0 R2 -> .plabel= l \ev_{BC}
%D    R2 R4 -> .plabel= l \cc
%D    R0 R4 -> .slide= 10pt
%D    R1 R5 -> .plabel= r \sm{B{->}\cc\;:=\\\cur(\ev_{BC};\cc)}
%D    R4 R5 |->
%D    R0 R5 harrownodes 5   20 nil |->
%D ))
%D enddiagram
%D
$$\diag{(B->)_1}$$

\par {\sl We have just built an andjunction $(B{×}) \dashv (B{\to})$}
\par {\sl from an operation $C \mto B{\to}C$.}


% --------------------
% «exponentials-2»  (to ".exponentials-2")
% (s "Exponentials (2)" "exponentials-2")
\myslide {Exponentials (2)} {exponentials-2}

\par It turns out that we can also construct
\par a functor $(B^\op,C) \mto B{\to}C$.
\par Its action on objects is obvious;
\par its action on morphisms takes
\par each $(\bb^\op,\cc):(B^\op,C) \to (B^{\prime\op},C')$
\par to $(\bb{\to}\cc) := (\to_1)(\bb^\op,\cc) := \cur(\ang{,';\bb};\ev;\cc)$,

%D diagram (->)_1
%D 2Dx         100          +50
%D 2D  100  (B^\op,C) |--> B{->}C
%D 2D            |           |
%D 2D            |    |->    |
%D 2D            v           v
%D 2D  +30 (B'^\op,C') |-> B'{->}C'
%D 2D
%D (( (B^\op,C) B{->}C
%D    (B'^\op,C') .tex= (B^{\prime\op},C') B'{->}C'
%D    @ 0 @ 1 |->
%D    @ 0 @ 2 -> .plabel= l (\bb^\op,\cc)
%D    @ 1 @ 3 -> .plabel= r \sm{(\bb{\to}\cc)\;:=\\(\to_1)(\bb^\op,\cc)\;:=\\\cur(\ang{,';\bb};\ev;\cc)}
%D    @ 2 @ 3 |->
%D
%D ))
%D enddiagram
%D
$$\diag{(->)_1}$$

where $\cur(\ang{,';\bb};\ev;\cc)$ is:

%:
%:      B  C
%:     ------
%:     B{->}C   b'|-b          B  C
%:  =====================  ------------
%:  (b|->c),b'|-(b|->c),b  (b|->c),b|-c  c|-c'
%:  ------------------------------------------
%:               (b|->c),b'|-c'
%:             ------------------
%:             (b|->c)|-(b'|->c')
%:
%:             ^exp1-dnc
%:
%:       B  C
%:      ------
%:      B{->}C   \bb:B'->B                      B  C
%:  ========================================  --------\ev
%:  \ang{_{(B{->}C)B'},'_{(B{->}C)B'};\bb}  \ev_{BC}     \cc:C->C'
%:  ---------------------------------------------------------------;;
%:               \ang{,';\bb};\ev;\cc
%:             ----------------------------\cur
%:             \cur(\ang{,';\bb};\ev;\cc)
%:
%:             ^exp1-std
%:
$$\ded{exp1-dnc}$$
$$\ded{exp1-std}$$

\par But how can we find a definition
\par like the one above for $(\bb{\to}\cc)$ ---
\par without using brute force?


% --------------------
% «morphs-as-seqs»  (to ".morphs-as-seqs")
% (s "Morphisms as sequents" "morphs-as-seqs")
\myslide {Morphisms as sequents} {morphs-as-seqs}

We can lift the natural deduction tree
%:
%:  [b']^1  b'|->b
%:  -------------
%:       b        [b|->c]^2
%:       ------------------
%:              c           c|->c'
%:              ------------------
%:                       c'
%:                    -------1
%:                    b'|->c'
%:                -----------------2
%:               (b|->c)|->(b'|->c')
%:
%:               ^nd-to-seq-1
%:
$$\ded{nd-to-seq-1}$$

\par to something that looks more like
\par sequent calculus, in the sense that the hypotheses
\par are always listed explicitly before the `$\vdash$',
\par and names with `$\vdash$' stand for morphisms:
%:
%:  ------------'
%:  (b|->c),b'|-b'     b'|-b
%:  ------------------------;   -------------------
%:       (b|->c),b'|-b          (b|->c),b'|-(b|->c)
%:       -----------------------------------------\app
%:              (b|->c),b'|-c                           c|-c'
%:              ---------------------------------------------;
%:                       (b|->c),b'|-c'
%:                     -----------------\cur
%:                     (b|->c)|-(b'|->c')
%:
%:                     ^nd-to-seq-2
%:
$$\ded{nd-to-seq-2}$$

I don't want to get into the details of this now...

% but let me list some derived rules
% that are useful for this kind of lifting:
% app \name \wreath






% --------------------
% «HYPERDOCTRINES»  (to ".HYPERDOCTRINES")
% (sec "Hyperdoctrines" "HYPERDOCTRINES")
\mysection {Hyperdoctrines} {HYPERDOCTRINES}

\def\parphst{\par\indent\phantom{$*$ }}


% --------------------
% «hyperdoctrines»  (to ".hyperdoctrines")
% (s "Hyperdoctrines" "hyperdoctrines")
\myslide {Hyperdoctrines} {hyperdoctrines}
\par The following is the precise definition of a hyperdoctrine.
\par It is too technical, so we will spend the next slides dissecting it.
\msk
\par A hyperdoctrine is a (cloven) fibration, $p:\bbE \to \bbB$,
\par plus some extra structure:
\par $*$ the base category $\bbB$ is a CCC
\parphst (i.e., $(\bbB, ×, 1, \to)$ is a CCC))
\par $*$ each fiber $\bbE_B$ is a CCC
\parphst (i.e., each $(\bbE_B, ∧, §, ⊃)$ is a CCC)
\par $*$ for each map $g:B \to C$ in $\bbB$
\parphst the change-of-base functor $f^*$ has adjoints $Î_f \dashv f^* \dashv ý_f$
\par $*$ change-of-base preserves $∧$, $§$, $⊃$ modulo iso
\parphst ($\Pand$, $\Ptrue$, $\Pimp$)
\par $*$ the left and right Beck-Chevalley conditions hold
\parphst ($\BCCL$, $\BCCR$)
\par $*$ the Frobenius condition holds
\parphst ($\Frob$)
\bsk
\par The precise definition of what a fibration is
\par is quite technical. I will give it in full here ---
\par it will take several slides --- but if you are a
\par non-specialist you should only pay only attention
\par to the last two operations: change-of-base functors
\par and the isomorphism between two changes of base
\par for the same $g:B \to C$.






% --------------------
% «subobjects»  (to ".subobjects")
% (s "Subobjects" "subobjects")
\myslide {Subobjects} {subobjects}

\par Our archetypical fibration will be $\Cod: \CanSub(\Set) \to \Set$,
\par where the ``codomain functor'', $\Cod$, takes each
\par ``canonical subobject'' $P$ in $\Set$
\par (where $P$ is an inclusion map $\sst{bÝB}{P(b)} \ito B$)
\par and returns its codomain, $B$.
\msk
\par The categorical way to describe ``injective maps''
\par is via the notion of ``monic''.
\par The monic arrows of $\Set$ are exactly the injective maps.
\par In $\Set$ {\sl some} injective maps are inclusions.
\par Let's regard $\Set$ as category with a (given) distinguished
\par class of monics --- the ``inclusions''.
\par A {\sl subobject of $B$} is a monic $A \monicto B$
\par with codomain $B$.
\par A {\sl canonical subobject of $B$} is an inclusion $B' \ito B$
\par with codomain $B$.
\msk
\par Two subobjects of $B$, $B' \monicto B$ and $B'' \monicto B$
\par are {\sl isomorphic} when there is an iso $B' \bij B''$
\par making the obvious triangle commute:
%
%D diagram subobjs-1
%D 2Dx     100 +15 +15
%D 2D  100 B' <--> B''
%D 2D
%D 2D  +20     B
%D 2D
%D (( B' B'' <->
%D    B'  B >->
%D    B'' B >->
%D ))
%D enddiagram
%D
$$\diag{subobjs-1}$$

\par Each subobject $f: B' \monicto B$
\par is isomorphic to a unique canonical subobject of $B$:
%
%D diagram subobjs-2
%D 2Dx     100     +25   +50
%D 2D  100 B' <--> B'' = B'''
%D 2D
%D 2D  +30         B
%D 2D
%D (( B'' .tex= ¯{Im(f)}
%D    B' B'' <->
%D    B'  B >-> .plabel= l f
%D    B'' B `->
%D    B''' .tex= \sst{bÝB}{f^{-1}(b)\neq\emp}
%D    B'' B''' =
%D ))
%D enddiagram
%D
$$\diag{subobjs-2}$$



% --------------------
% «subobjects-2»  (to ".subobjects-2")
% (s "Subobjects (2)" "subobjects-2")
\myslide {Subobjects (2)} {subobjects-2}

We will use the following notations for

canonical subobjects. In the archetypal case,

%D diagram pdiagcansub
%D 2Dx     100
%D 2D  100 #1
%D 2D  +18 #2
%D 2D
%D (( #1 #2 `->
%D ))
%D enddefpdiagram 2

%D diagram cansubs
%D 2Dx     100  +55  +55
%D 2D  100 T1   T2
%D 2D
%D 2D  +30 P1   P2   E
%D 2D
%D 2D  +30 A1   A2   B
%D 2D
%D (( T1 .tex= \tbox{explicit,\\long"form:}
%D    T2 .tex= \tbox{shorthand\\(note"the"`$||$'!):}
%D    P1 .tex= \pdiagcansub{\sst{aÝA}{P(a)}}{A} BOX
%D    A1 .tex= A
%D    P2 .tex= \ssst{a}{P(a)}
%D    A2 .tex= A
%D    E  .tex= \bbE=\CanSub(\Set)
%D    B  .tex= \bbB=\Set
%D    T1 place T2 place
%D    P1 place A1 place
%D    P2 place A2 place
%D    E B -> .plabel= r p=\Cod
%D ))
%D enddiagram
%D
$$\def\tbox#1{\begin{tabular}{l}#1\end{tabular}}
  \diag{cansubs}
$$

and in the generic/abstract case,

%D diagram fib-notation
%D 2Dx     100 +20
%D 2D  100 P   E
%D 2D
%D 2D  +20 A   B
%D 2D
%D (( P place A place
%D    E .tex= \bbE
%D    B .tex= \bbB
%D    E B -> .plabel= r p
%D ))
%D enddiagram
%D
$$\diag{fib-notation}$$

$\bbE$ is the ``entire category'',

$\bbB$ is the ``base category'',

$p$ is the ``projection'',

$P$ is a ``proposition over $A$''.

\msk

Note that instead of drawing a vertical arrow

$P \mto pP{=}A$ we just draw $P$ over $A$.

(We will do the same for morphisms, by the way).

\msk



% --------------------
% «subobjects-3»  (to ".subobjects-3")
% (s "Subobjects (3)" "subobjects-3")
\myslide {Subobjects (3)} {subobjects-3}

\par If $B$ is an object of $\bbB$, the {\sl fiber over $B$}, $\bbE_B$,
\par is the subcategory of $\bbE$ composed of the objects and morphisms
\par of $\bbE$ that are taken to $B$ and $\id_B$ by the projection $p$.
\msk
\par Being ``over $B$'' means ``belonging to $\bbE_B$''.
\par A morphism of $\bbE$ is said to be {\sl vertical} if its image
\par is an identity in $\bbB$.
\par We will have a notion of ``horizontal morphisms'' too,
\par but it will be harder to formalize --- it will involve {\sl cartesianness}.
\par Let's start with an example.
\msk
\par Every map $g:B \to C$ in the base category
\par induces a ``change-of-base functor'', $g^*:\bbE_C \to \bbE_B$,
\par and a natural transformation $\ov{g}:g^* \to \id_{\bbE_C}$,
\par as in the diagram below:

%D diagram cob-1
%D 2Dx         100            +50     +35        +35 
%D 2D  100 {b||Q(b)} -\               Q ----\
%D 2D          |       \              |      \
%D 2D          v        v             v       v
%D 2D  +30 {b||R(gb)} -> {c||R(c)}   g^*R -----> R
%D 2D          |              |       |          |
%D 2D          v              v       v          v
%D 2D  +30 {b||S(gb)} -> {c||S(c)}   g^*S -----> S
%D 2D
%D 2D  +20    {B} ---------> {C}      B -------> C
%D 2D
%D (( {b||Q(b)}  .tex= \ssst{b}{Q(b)}
%D    {b||R(gb)} .tex= \ssst{b}{R(g(b))}  {c||R(c)}  .tex= \ssst{c}{R(c)}
%D    {b||S(gb)} .tex= \ssst{b}{S(g(b))}  {c||S(c)}  .tex= \ssst{c}{S(c)}
%D    @ 0 @ 1 -> @ 0 @ 2 ->
%D    @ 1 @ 2 ->
%D    @ 1 @ 3 -> @ 2 @ 4 ->
%D    @ 3 @ 4 ->
%D    {B} {C} -> .plabel= a g
%D ))
%D (( Q g^*R R g^*S S
%D    @ 0 @ 1 -> .plabel= l k @ 0 @ 2 -> .plabel= r j
%D    @ 1 @ 2 -> .plabel= a \ov"g_R
%D    @ 1 @ 3 -> .plabel= l g^*i
%D    @ 2 @ 4 -> .plabel= r i
%D    @ 3 @ 4 -> .plabel= a \ov"g_S
%D    B C -> .plabel= a g
%D ))
%D enddiagram
%D
$$\diag{cob-1}$$

\par The vertical map $i:R \to S$ exists iff $\sst{c}{R(c)} \subseteq \sst{c}{S(c)}$,
\par i.e., if $ýc.R(c)⊃S(c)$.
\par The diagonal map $j:Q \to S$ exists iff its factorization through $\ov{g}_R$, $k$,
\par exists (because every map in $\bbE$ factors as ``vertical map followed by
\par an horizontal map'', and we shall see), and:
\par the vertical map $k:Q \to g^*R$ exists iff $\sst{b}{Q(b)} \subseteq \sst{b}{R(g(b))}$,
\par i.e., if $ýb.Q(b)⊃R(g(b))$ --- so the vertical/horizontal factorization
\par gives us a way to interpret diagonal morphisms ``logically''.




% --------------------
% «subobjects-4»  (to ".subobjects-4")
% (s "Subobjects (4)" "subobjects-4")
\myslide {Subobjects (4)} {subobjects-4}

The horizontal maps of the diagram
%
$$\diag{cob-1}$$

are pullbacks in $\Set$:

%D diagram cob-2
%D 2Dx     100  +50
%D 2D  100 A0   A1
%D 2D
%D 2D  +20 A2   A3
%D 2D
%D 2D  +20 B0   B1
%D 2D
%D 2D  +20 B2   B3
%D 2D
%D (( A0 .tex= \sst{b}{R(g(b))}  A1 .tex= \sst{c}{R(c)}
%D    A2 .tex= B                 A3 .tex= C
%D    B0 .tex= \sst{b}{S(g(b))}  B1 .tex= \sst{c}{S(c)}
%D    B2 .tex= B                 B3 .tex= C
%D    A0 A1 -> A0 A2 `-> A1 A3 `-> A2 A3 ->
%D    A0 relplace 7 7 \pbsymbol{7}
%D    B0 B1 -> B0 B2 `-> B1 B3 `-> B2 B3 ->
%D    B0 relplace 7 7 \pbsymbol{7}
%D ))
%D enddiagram
%D
$$\diag{cob-2}$$

{\sl And so what?...}




% --------------------
% «cartesianness»  (to ".cartesianness")
% (s "Cartesianness" "cartesianness")
\myslide {Cartesianness} {cartesianness}

% (find-LATEX "2009unilog-dnc.tex")
% (find-LATEX "2009unilog-dnc.tex" "proto-cart-morphs")

\par A {\sl vee} in a category $\bbE$ is a pair
\par of morphisms in $\bbE$, $(h':P \to R, \; g':Q \to R)$
\par with common codomain.
\par A {\sl completion} for a vee $(h':P \to R, \; g':Q \to R)$
\par is an arrow $f': P \to Q$ making the triangle commute.
\par A functor $p: \bbE \to \bbB$ takes completions of $(h',g')$
\par to completions of $(ph', pg')$; let's call this induced map $Ðp_{h'g'}^\nat$.
\msk
\par A vee $(h',g')$ in $\bbE$ has {\sl unique liftings} (for $p: \bbE \to \bbB$)
\par if the map $Ðp_{h'g'}$ induced by $p$ is a bijection.
\par A map $g':Q \to R$ in $\bbE$ is {\sl cartesian}
\par if any vee $(h',g')$ with $g'$ as its ``lower leg''
\par has unique liftings.

%D diagram vee-over-vee
%D 2Dx      100 +25 +35
%D 2D  100  P
%D 2D
%D 2D  +25      Q   R
%D 2D
%D 2D  +20 pP
%D 2D
%D 2D  +25     pQ  pR
%D 2D
%D (( P R  -> .plabel= a h'
%D    P Q --> .plabel= b f'
%D    Q R  -> .plabel= b g'
%D    pP .tex= A{=}pP
%D    pQ .tex= B{=}pQ
%D    pR .tex= C{=}pR
%D    pP pR  -> .plabel= a h=ph'
%D    pP pQ --> .plabel= b f=pf'
%D    pQ pR  -> .plabel= b g=pg'
%D    P pQ varrownodes nil 20 5 -> .plabel= l Ðp_{h'g'}^\nat
%D ))
%D enddiagram

$$\diag{vee-over-vee}$$

\par To make things more manageable we will use
\par some shorthands: $A:=pP$, $B:=pQ$, $C:=pR$,
\par $f:=pf'$, $g:=pg'$, $h:=ph'$, 
\par Invertibility of $Ðp_{h'g'}^\nat$ means that
\par for any completion $f$ for the vee $(h,g)$
\par there is exactly one completion $f':P \to Q$ for $(h',g')$
\par ``over $f$'', i.e., such that $f=pf'$.




% --------------------
% «cartesianness-2»  (to ".cartesianness-2")
% (s "Cartesianness (2)" "cartesianness-2")
\myslide {Cartesianness (2)} {cartesianness-2}

\par A {\sl proto-vee} in a category $\bbE$ is a pair
\par of morphisms in $\bbE$, $(h':P \to R, \; g':Q \to R)$
\par with common codomain.
\par A {\sl proto-completion} for a vee $(h':P \to R, \; g':Q \to R)$
\par is an arrow $f': P \to Q$ \mycrossover{making the triangle commute}.
\par A functor $p: \bbE \to \bbB$ takes proto-completions of $(h',g')$
\par to proto-completions of $(ph', pg')$; let's call this induced map $Ðp_{h'g'}^\nat$.
\msk
\par Note that this new induced map has a bigger domain...
\par the old one had to act on all completions,
\par the new one has to act on all {\sl proto-}completions.
\msk
\par A {\sl vee with proto-unique liftings}
\par is a triple $(h',g',Ðp_{h'g'})$,
\par where $Ðp_{h'g'}$ is a proto-inverse for $Ðp_{h'g'}^\nat$.

%D diagram vee-over-vee-2
%D 2Dx      100 +25 +35
%D 2D  100  P
%D 2D
%D 2D  +25      Q   R
%D 2D
%D 2D  +20 pP
%D 2D
%D 2D  +25     pQ  pR
%D 2D
%D (( P R  -> .plabel= a h'
%D    P Q --> .plabel= b f'
%D    Q R  -> .plabel= b g'
%D    pP .tex= A{=}pP
%D    pQ .tex= B{=}pQ
%D    pR .tex= C{=}pR
%D    pP pR  -> .plabel= a h=ph'
%D    pP pQ --> .plabel= b f=pf'
%D    pQ pR  -> .plabel= b g=pg'
%D    P pQ varrownodes nil 20 5 -> sl_ .PLABEL= _(0.40) Ðp_{h'g'}^\nat
%D    P pQ varrownodes nil 20 0 <- sl^ .PLABEL= ^(0.60) Ðp_{h'g'}
%D ))
%D enddiagram

$$\diag{vee-over-vee-2}$$

\par {\sl Proto-cartesianness} for an arrow $g'$
\par is the assurance that any vee $(h',g')$ with lower leg $g'$
\par has proto-unique liftings.
\par More formally:
\par a {\sl proto-cartesian morphism} is a pair $(g',\cart)$,
\par where $\cart \equiv (P, h' \mto Ðp_{h'g'})$ is an operation
\par that produces all the required proto-inverses.




% --------------------
% «pbs-are-cartesian»  (to ".pbs-are-cartesian")
% (s "Pullbacks are cartesian" "pbs-are-cartesian")
\myslide {Pullbacks are cartesian} {pbs-are-cartesian}

\par Cartesian maps are not so weird
\par as the preceding definition suggests...
\msk
\par {\sl Fact.} When $p=\Cod$, ``pullback squares are cartesian''.
\par The core of the proof is the following diagram.

\def\poo#1#2#3{\begin{pmatrix}
    #1 \\
    \scriptstyle{#2} \dnto \phantom{\scriptstyle{#2}} \\
    #3 \\
    \end{pmatrix}
  }
\def\poom#1#2{(#1,#2)}
\def\poom#1#2{\begin{smallmatrix}#1,\\#2\end{smallmatrix}}
\def\poom#1#2{\left(\begin{smallmatrix}#1,\\#2\end{smallmatrix}\right)}
\def\poom#1#2{\begin{smallmatrix}#1\\#2\end{smallmatrix}}
\def\poom#1#2{\psm{#1\\#2}}
%
%D diagram pullbacks-are-cartesian
%D 2Dx     100 +40  +50
%D 2D  100 AA
%D 2D
%D 2D  +30     BB   CC
%D 2D
%D 2D  +15 A
%D 2D
%D 2D  +30     B    C
%D 2D
%D (( AA .tex= \poo{A''}{a}{A}
%D    BB .tex= \poo{B×_{C}C''}{\pi}{B}
%D    CC .tex= \poo{C''}{c}{C}
%D    AA BB -> .plabel= l  f'=\poom{\ang{a;f,\,h''}}{f}
%D    BB CC -> .plabel= b g'=\poom{\pi'}{g}
%D    AA CC -> sl^^ .plabel= a h'=\poom{h''}{h}
%D    A B -> .plabel= l f
%D    B C -> .plabel= b g
%D    A C -> .plabel= a h
%D ))
%D enddiagram
%D
%D diagram pullbacks-are-cartesian-2
%D 2Dx     100   +40    +50
%D 2D  100 A''
%D 2D
%D 2D  +30 A    B×C''   C''
%D 2D
%D 2D  +30       B      C
%D 2D
%D (( B×C'' .tex= B×_{C}C''
%D    A'' C''   -> .plabel= a h''
%D    A'' A     -> .plabel= l a
%D    A'' B×C'' -> .plabel= m \ang{a;f,\,h''}
%D    B×C'' C'' -> .plabel= b \pi'
%D    B×C'' B   -> .plabel= l \pi
%D    C''   C   -> .plabel= r c
%D    A     B   -> .plabel= b f
%D    B     C   -> .plabel= b g
%D
%D ))
%D enddiagram
%D
$$\diag{pullbacks-are-cartesian}
  \quad
  \diag{pullbacks-are-cartesian-2}
$$

The arrow $g'=\poom{\pi'}{g}$ is a ``pullback square''.

Fix any $h'=\poom{h''}{h}$ with the same codomain as $g'$.

For any completion $f$ of the lower vee $(h, g)$,

its lifting is $f'=\poom{\ang{a;f,\,h''}}{f}$.




% --------------------
% «cleavages»  (to ".cleavages")
% (s "Cleavages" "cleavages")
\myslide {Cleavages} {cleavages}

\par Here's the abstract view of cartesianness \& friends ---
\par formulated in a way that projects well into the syntactical world.
\par Note that the conditions $pR=C$, $pg'=g$, etc, are always implicit;
\par the conditions $h=f;g$ and $h'=f';g'$ are implicit
\par whenever $f,g$ (resp. $f',g'$) are defined
\par {\sl and when we are in the real world;}
\par in the syntactical world they are irrelevant.

$$\diag{vee-over-vee-2}$$

\par {\sl Unique liftings} for a vee $(h', g')$ is an inverse $Ðp_{h'g'}$
\par for the natural operation $Ðp_{h'g'}^\nat$.
\par {\sl Cartesianness} for an arrow $g'$
\par is an operation $Ð{cart}_{g'} \equiv (P,h' \mto Ðp_{h'g'})$.
\par A {\sl cartesian lifting} for $g:B \to C$ at $R$
\par is a triple $Ð{clift}_{gR} \equiv (Q, g', Ð{cart}_{g'})$.
\par A {\sl family of cartesian liftings} for $g:B \to C$
\par is an operation $Ð{clifts}_g \equiv (R \mto Ð{clift}_{gR})$.
\par A {\sl cleavage} (for the functor $p: \bbE \to \bbB$)
\par is an operation $Ð{cleavage} \equiv (g \mto Ð{clifts}_g)$.
\msk
\par Or all at once:
\par a cleavage (for the functor $p: \bbE \to \bbB$) is an operation
\par $Ð{cleavage} \equiv (g \mto (R \mto (Q, g', (P,h' \mto (f \mto f')))))$,
\par or, more detailedly,
\par $Ð{cleavage} \equiv (B,C,g \mto (R \mto (Q, g', (A,P,h,h' \mto (f \mto f')))))$.
\msk
\par A {\sl cloven fibration} is a 4-uple $(\bbB, \bbE, p, Ð{cleavage})$,
\par where $p:\bbE \to \bbB$ and $Ð{cleavage}$ is a cleavage for $p$.
\msk
\par One further subtlety is needed to make this work in the
\par syntactical world: as we need a restricted version of
\par equality to be able to say ``$P$ is over $A$'', ``$f'$ is over $f$'', etc,
\par $\bbE$ should be a ``category defined over $\bbB$''.
\par (Details later!)



% --------------------
% «cleavages-2»  (to ".cleavages-2")
% (s "Cleavages (2)" "cleavages-2")
\myslide {Cleavages (2)} {cleavages-2}


\par A cleavage is
\par $Ð{cleavage} \equiv (B,C,g \mto (R \mto (Q, g', (A,P,h,h' \mto (f \mto f')))))$,
\par but that specification is too long (for humans).
\ssk
\par If we underline the letters whose values
\par are subsumed from subsequent ones, we get:
{
\def\u#1{\und{#1}}
\par $Ð{cleavage} \equiv (\u B,\u C,g \mto (R \mto (\u Q, g', (\u A,\u P,\u h,h' \mto (f \mto f')))))$,
}
\par and if we erase the ``redundant'' letters, we get:
\par $Ð{cleavage} \equiv g \mto (R \mto g', (h', f \mto f'))$
\par which is equivalent to:
\par $Ð{cleavage} \equiv g, R \mto g', (f, h' \mto f')$

%D diagram vee-over-vee-3
%D 2Dx      100 +25 +35
%D 2D  100  P
%D 2D
%D 2D  +25      Q   R
%D 2D
%D 2D  +10 pP
%D 2D
%D 2D  +25     pQ  pR
%D 2D
%D (( P R --> .plabel= a h'
%D    P Q --> .plabel= b f'
%D    Q R  -> .plabel= b g'
%D    pP .tex= A
%D    pQ .tex= B
%D    pR .tex= C
%D    pP pR --> .plabel= a h
%D    pP pQ --> .plabel= b f
%D    pQ pR  -> .plabel= b g
%D    # P pQ varrownodes nil 20 5 -> sl_ .PLABEL= _(0.40) Ðp_{h'g'}^\nat
%D    # P pQ varrownodes nil 20 0 <- sl^ .PLABEL= ^(0.60) Ðp_{h'g'}
%D ))
%D enddiagram

$$\diag{vee-over-vee-3}$$

\par Let's call the $Q$ and the $g'$ produced by the cleavage $g^*R$ and $\ov{g}_R$:

%D diagram vee-over-vee-4
%D 2Dx      100 +25 +35
%D 2D  100  P
%D 2D
%D 2D  +25      Q   R
%D 2D
%D 2D  +10 pP
%D 2D
%D 2D  +25     pQ  pR
%D 2D
%D (( Q .tex= Q=g^*R
%D    P R --> .plabel= a h'
%D    P Q --> .plabel= b f'
%D    Q R  -> .plabel= b g'=\ov{g}_R
%D    pP .tex= A
%D    pQ .tex= B
%D    pR .tex= C
%D    pP pR --> .plabel= a h
%D    pP pQ --> .plabel= b f
%D    pQ pR  -> .plabel= b g
%D    # P pQ varrownodes nil 20 5 -> sl_ .PLABEL= _(0.40) Ðp_{h'g'}^\nat
%D    # P pQ varrownodes nil 20 0 <- sl^ .PLABEL= ^(0.60) Ðp_{h'g'}
%D ))
%D enddiagram

$$\diag{vee-over-vee-4}$$

\par If we consider $Ð{cleavage}$ as fixed, we get an operation
\par $f,g,h' \mto f'$
\par that factors $f'$ through the cartesian lifting of $g$ at $R = \tgt f'$,
\par and if we make $f=\id_B$ (and thus $A:=B$), then we get an operation
\par $g,h' \mto f'$
\par where now $f'$ is a vertical morphism.
\par It can be simplified. As $g := h := ph'$, it becomes
\par $h' \mto f'$,
\par the factorization of a ``diagonal'' morphism in $\bbE$, $h'$,
\par into a vertical morphism, $f'$, followed by a horizontal one, $g' = \ov{ph'}_{\tgt h'}$.
\msk
\par This factorization is reversible, in a sense:
\par given $f'$ vertical and $g'$ cartesian (horizontal --- not necessarily a $\ov{g}_R$),
\par their composite $h'$ is ``diagonal'' (``$h'$ diagonal'' means just ``$h' Ý \bbE$'').







% --------------------
% «cleavage-induces-cob»  (to ".cleavage-induces-cob")
% (s "Cleavage induces change-of-base" "cleavage-induces-cob")
\myslide {Cleavage induces change-of-base} {cleavage-induces-cob}

\par A cheap cloven fibration is just a 4-uple $(\bbB, \bbE, p, Ð{cleavage})$;
\par An expensive one also comes with change-of-base functions,
\par factorization through cartesian morphisms,
\par rules that say that the composites of cartesians are cartesian,
\par a family of adjunctions $R \mto (p_R \dashv Ð{clift_R})$ {\quad [$\ot$ {\it complete this}]},
\par isos between different changes of base, etc.
\msk
\par Here's how to build the action on morphisms
\par of a change-of-base functor $g^*$
\par ($(g^*)_0$ comes from cartesian liftings):

%D diagram cleav-induces-cob
%D 2Dx     100 +5         +35
%D 2D  100 g^*R' -------> R'
%D 2D       \             |
%D 2D        \            |
%D 2D         v           v
%D 2D  +25     g^*R ----> R
%D 2D
%D 2D  +15 A
%D 2D
%D 2D  +25     B -------> C
%D 2D
%D (( g^*R' R'
%D    g^*R  R
%D    @ 0 @ 1  -> .plabel= a \ov{g}_{R'}
%D    @ 0 @ 2 --> .plabel= l \sm{g^*r:=f'\\:=Ðp_{h'g'}f}
%D    @ 0 @ 3  -> .plabel= m \phantom{o}h':=\ov{g}_{R'};r 
%D    @ 1 @ 3  -> .plabel= r r
%D    @ 2 @ 3  -> .plabel= b g':=\ov{g}_{R}
%D ))
%D (( A .tex= A{:=}B
%D    A B -> .plabel= l f:=\id_B
%D    B C -> .plabel= b g
%D    A C -> .plabel= a h:=g
%D ))
%D enddiagram
%D
$$\diag{cleav-induces-cob}$$










% --------------------
% «adjs-to-change-of-base»  (to ".adjs-to-change-of-base")
% (s "Adjoints to change-of-base" "adjs-to-change-of-base")
\myslide {Adjoints to change-of-base} {adjs-to-change-of-base}

% (find-LATEX "2009unilog-dnc.tex" "dn-arch-hyperdoctrine")

\par In the archetypal case, $p = \Cod: \CanSub(\Set) \to \Set$,
\par {\sl every change-of-base functor $f^*$ has both a left and a right adjoint.}
\par In some cases these adjoints have simple forms.
\msk
\par Some terminology...
\par a map $\pi:A×B \to A$ is a ``projection'',
\par and the correspondent $\pi^*: \bbE_A \to \bbE_{A×B}$ is a ``weakening functor'';
\par a map $\pi:A×B \to A×B×B$ is a ``diagonal'',
\par and the correspondent $\dd^*: \bbE_{A×B×B} \to \bbE_{A×B}$ is a ``contraction functor''.
\par A $\pi^*$ ``introduces a dummy variable'',
\par a $\dd^*$ ``collapses two variables''.

%D diagram adjs-to-change-of-base-set
%D 2Dx     100     +60    +35     +35    +30     +40    
%D 2D  100 A0 ===> A1     B0 ===> B1     C0 ===> C1     
%D 2D      -       -      -       -      -       -                                             
%D 2D      |  <->  |      |  <->  |      |  <->  |                                             
%D 2D      v       v      v       v      v       v            
%D 2D  +20 A2 <=== A3     B2 <=== B3     C2 <=== C3     
%D 2D      -       -      -       -      -       -                                             
%D 2D      |  <->  |      |  <->  |      |  <->  |                                             
%D 2D      v       v      v       v      v       v            
%D 2D  +20 A4 ===> A5     B4 ===> B5     C4 ===> C5     
%D 2D                                                   
%D 2D  +15 a0 |--> a1     b0 |--> b1     c0 |--> c1     
%D 2D
%D (( A0 .tex= \ssst{a,b}{P(a,b)}  A1 .tex= \ssst{a}{Îb.P(a,b)}
%D    A2 .tex= \ssst{a,b}{Q(a)}    A3 .tex= \ssst{a}{Q(a)}
%D    A4 .tex= \ssst{a,b}{R(a,b)}  A5 .tex= \ssst{a}{ýb.P(a,b)}
%D    a0 .tex= A×B  a1 .tex= A
%D    A0 A1 |->
%D    A0 A2 -> A1 A3 -> A0 A3 harrownodes nil 20 nil <->
%D    A2 A3 <-|
%D    A2 A4 -> A3 A5 -> A2 A5 harrownodes nil 20 nil <->
%D    A4 A5 |->
%D    a0 a1 -> .plabel= a \pi
%D ))
%D (( B0 .tex= P      B1 .tex= Î_fP
%D    B2 .tex= f^*Q   B3 .tex= Q
%D    B4 .tex= R      B5 .tex= ý_fR
%D    b0 .tex= A      b1 .tex= B
%D    B0 B1 |->
%D    B0 B2 -> B1 B3 -> B0 B3 harrownodes nil 20 nil <->
%D    B2 B3 <-|
%D    B2 B4 -> B3 B5 -> B2 B5 harrownodes nil 20 nil <->
%D    B4 B5 |->
%D    b0 b1 -> .plabel= a f
%D ))
%D enddiagram
%D
$$\diag{adjs-to-change-of-base-set}$$

\msk

%D diagram adjs-to-change-of-base-dnc
%D 2Dx     100     +30    +30     +35    +30     +40    
%D 2D  100 A0 ===> A1     B0 ===> B1     C0 ===> C1     
%D 2D      -       -      -       -      -       -                                             
%D 2D      |  <->  |      |  <->  |      |  <->  |                                             
%D 2D      v       v      v       v      v       v            
%D 2D  +20 A2 <=== A3     B2 <=== B3     C2 <=== C3     
%D 2D      -       -      -       -      -       -                                             
%D 2D      |  <->  |      |  <->  |      |  <->  |                                             
%D 2D      v       v      v       v      v       v            
%D 2D  +20 A4 ===> A5     B4 ===> B5     C4 ===> C5     
%D 2D                                                   
%D 2D  +15 a0 |--> a1     b0 |--> b1     c0 |--> c1     
%D 2D
%D (( A0 .tex= Pab  A1 .tex= Îb.Pab
%D    A2 .tex= Qa   A3 .tex= Qa
%D    A4 .tex= Rab  A5 .tex= ýb.Rab
%D    a0 .tex= a,b  a1 .tex= a
%D    A0 A1 =>
%D    A0 A2 |-> A1 A3 |-> A0 A3 harrownodes nil 20 nil <->
%D    A2 A3 <=
%D    A2 A4 |-> A3 A5 |-> A2 A5 harrownodes nil 20 nil <->
%D    A4 A5 =>
%D    a0 a1 |->
%D ))
%D (( B0 .tex= Pab    B1 .tex= b{=}b'{∧}Pabb
%D    B2 .tex= Qabb   B3 .tex= Qabb'
%D    B4 .tex= Rab    B5 .tex= b{=}b'{⊃}Rab
%D    b0 .tex= a,b  b1 .tex= a,b,b'
%D    B0 B1 =>
%D    B0 B2 |-> B1 B3 |-> B0 B3 harrownodes nil 20 nil <->
%D    B2 B3 <=
%D    B2 B4 |-> B3 B5 |-> B2 B5 harrownodes nil 20 nil <->
%D    B4 B5 =>
%D    b0 b1 |->
%D ))
%D (( C0 .tex= Pa    C1 .tex= Îa.a{=}fb{∧}Pa
%D    C2 .tex= Qfa   C3 .tex= Qb
%D    C4 .tex= Ra    C5 .tex= ýa.a{=}fb{⊃}Pa
%D    c0 .tex= a     c1 .tex= b
%D    C0 C1 =>
%D    C0 C2 |-> C1 C3 |-> C0 C3 harrownodes nil 20 nil <->
%D    C2 C3 <=
%D    C2 C4 |-> C3 C5 |-> C2 C5 harrownodes nil 20 nil <->
%D    C4 C5 =>
%D    c0 c1 |-> .plabel= a f
%D ))
%D enddiagram
%D
$$\diag{adjs-to-change-of-base-dnc}$$




% --------------------
% «nd-in-pred-set-quants»  (to ".nd-in-pred-set-quants")
% (s "Semantics for ND in Pred(Set): quantifiers" "nd-in-pred-set-quants")
\myslide {Semantics for ND in Pred(Set): quantifiers} {nd-in-pred-set-quants}

%D diagram semantics-for-quants-1
%D 2Dx      100    +25     +35   +25
%D 2D  100         P' ===> ÆP'   
%D 2D              -       -     
%D 2D              |  |->  |     
%D 2D              v       v     
%D 2D  +30  P0     P ====> ÆP   LRQ0
%D 2D       -      -       -     -
%D 2D       |      |  |->  |     |
%D 2D       |      |  <-|  |     |
%D 2D       v      v       v     v
%D 2D  +30 RLP0    Q* <=== Q     Q0
%D 2D              -       -     
%D 2D              |  <-|  |     
%D 2D              v       v     
%D 2D  +30 LRR1    Q'* <== Q'    Q1
%D 2D       -      -       -     -
%D 2D       |      |  <-|  |     |
%D 2D       |      |  |->  |     |
%D 2D       v      v       v     v
%D 2D  +30  R1     R ====> åR   RLQ1
%D 2D              -       -     
%D 2D              |  |->  |     
%D 2D              v       v     
%D 2D  +30         R' ===> åR'   
%D 2D                            
%D 2D  +20         b |---> a     
%D 2D
%D (( P'  .tex= P'xy  ÆP' .tex= Îy.P'xy  =>
%D    P   .tex= Pxy   ÆP  .tex= Îy.Pab   =>
%D    Q*  .tex= Qx     Q  .tex=    Qx    <=
%D    Q'* .tex= Q'x    Q' .tex=    Q'x   <=
%D    R   .tex= Rxy   åR  .tex= ýy.Rxy   =>
%D    R'  .tex= R'xy  åR' .tex= ýy.R'xy  =>
%D
%D     P0  .tex= Pxy      LRQ0 .tex= Îy.Qx
%D    RLP0 .tex= Îy'.Pxy'  Q0  .tex= Qx
%D    LRR1 .tex= ýy'.Rxy'  Q1  .tex= Qx
%D     R1  .tex= Rxy       RLQ1 .tex= ýy.Qx
%D
%D    b   .tex= x,y    a  .tex= x
%D ))
%D ((  P'  P  |->
%D    ÆP' ÆP  |->
%D     P' ÆP  harrownodes nil 20 nil |-> .plabel= a Î_
%D
%D    P0 RLP0 |-> .plabel= l \eta_{Î_}
%D     P   Q* |-> 
%D    ÆP   Q  |-> 
%D     P   Q  harrownodes nil 20 nil |-> sl^ .plabel= a Î_\pi^\flat 
%D     P   Q  harrownodes nil 20 nil <-| sl_ .plabel= b Î_\pi^\sharp
%D   LRQ0 Q0 |-> .plabel= r _{Î_}
%D
%D    Q*  Q'* |->
%D    Q   Q'  |->
%D    Q*  Q'   harrownodes nil 20 nil <-| .plabel= a \phantom{o}\pi^*
%D
%D   LRR1 R1 |-> .plabel= l _{ý_}
%D    Q'*  R |-> 
%D    Q'  åR |-> 
%D    Q'* åR  harrownodes nil 20 nil <-| sl^ .plabel= a ý_\pi^\flat 
%D    Q'* åR  harrownodes nil 20 nil |-> sl_ .plabel= b ý_\pi^\sharp
%D   Q1 RLQ1 |-> .plabel= r \eta_{ý_}
%D
%D     R   R' |->
%D    åR  åR' |->
%D     R  åR' harrownodes nil 20 nil |-> .plabel= a ý_\pi
%D
%D     b a -> .plabel= a \pi
%D ))
%D enddiagram
%D

%D diagram semantics-for-quants-2
%D 2Dx      100    +20     +30   +20
%D 2D  100         P' ===> ÆP'   
%D 2D              -       -     
%D 2D              |  |->  |     
%D 2D              v       v     
%D 2D  +30  P0     P ====> ÆP   LRQ0
%D 2D       -      -       -     -
%D 2D       |      |  |->  |     |
%D 2D       |      |  <-|  |     |
%D 2D       v      v       v     v
%D 2D  +30 RLP0    Q* <=== Q     Q0
%D 2D              -       -     
%D 2D              |  <-|  |     
%D 2D              v       v     
%D 2D  +30 LRR1    Q'* <== Q'    Q1
%D 2D       -      -       -     -
%D 2D       |      |  <-|  |     |
%D 2D       |      |  |->  |     |
%D 2D       v      v       v     v
%D 2D  +30  R1     R ====> åR   RLQ1
%D 2D              -       -     
%D 2D              |  |->  |     
%D 2D              v       v     
%D 2D  +30         R' ===> åR'   
%D 2D                            
%D 2D  +20         b |---> a     
%D 2D
%D ((  P'  .tex= \sm{0000\\0001}    ÆP' .tex= \sm{0001} =>
%D     P   .tex= \sm{0001\\0011}    ÆP  .tex= \sm{0011} =>
%D     Q*  .tex= \sm{0111\\0111}     Q  .tex= \sm{0111} <=
%D     Q'* .tex= \sm{0001\\0001}     Q' .tex= \sm{0001} <=
%D     R   .tex= \sm{0011\\0111}    åR  .tex= \sm{0011} =>
%D     R'  .tex= \sm{0111\\1111}    åR' .tex= \sm{0111} =>
%D				   
%D     P0  .tex= \sm{0001\\0011}   LRQ0 .tex= \sm{0111} 
%D    RLP0 .tex= \sm{0011\\0011}    Q0  .tex= \sm{0111} 
%D    LRR1 .tex= \sm{0011\\0011}    Q1  .tex= \sm{0001} 
%D     R1  .tex= \sm{0011\\0111}   RLQ1 .tex= \sm{0001} 
%D
%D    b   .tex= x,y    a  .tex= x
%D ))
%D ((  P'  P  |->
%D    ÆP' ÆP  |->
%D     P' ÆP  harrownodes nil 20 nil |->
%D
%D    P0 RLP0 |->
%D     P   Q* |-> 
%D    ÆP   Q  |-> 
%D     P   Q  harrownodes nil 20 nil |-> sl^
%D     P   Q  harrownodes nil 20 nil <-| sl_
%D   LRQ0 Q0 |->
%D
%D    Q*  Q'* |-->
%D    Q   Q'  |-->
%D    Q*  Q'   harrownodes nil 20 nil <-|
%D
%D   LRR1 R1 |->
%D    Q'*  R |-> 
%D    Q'  åR |-> 
%D    Q'* åR  harrownodes nil 20 nil <-| sl^
%D    Q'* åR  harrownodes nil 20 nil |-> sl_
%D   Q1 RLQ1 |->
%D
%D     R   R' |->
%D    åR  åR' |->
%D     R  åR' harrownodes nil 20 nil |->
%D
%D     b a -> .plabel= a \pi
%D ))
%D enddiagram
%D


$$\diag{semantics-for-quants-1}
  \qquad
  \diag{semantics-for-quants-2}
$$





% --------------------
% «rules-quantifiers»  (to ".rules-quantifiers")
% (s "Rules for the quantifiers" "rules-quantifiers")
\myslide {Rules for the quantifiers} {rules-quantifiers}

\par Now our task is to understand why, and in which sense,
\par the adjoints to change-of-base that were just mentioned
\par are ``admissible''.
\msk
\par In Natural Deduction we have six rules:
\par $ÎI$, $ÎE$, $ýI$, $ýE$, ${=}I$, ${=}E$
\par (a package with all six will be called `$Îý{=}IE$')
\par and some of them only started to make sense to me (years ago!)
\par when I saw how to translate them to a sequent-calculus like form,
\par and how to interpret sequents as inclusions between subsets ---
\par so we will see each of them in its ND form, in the corresponding SC form,
\par and in a ``set-like'' form, involving functions, sets and subsets.
\msk
\par An important idea:
\par {\sl any subtree} of a derivation in natural deduction
\par ``has semantics'', i.e., can be interpreted as an inclusion
\par between subsets.
\msk
\par The rules are:

$$\begin{array}{cc|cc}
  \ded{r-exI-nd} &&& \ded{r-exE-nd} \\
         &&& \\
  \hline &&& \\
  \ded{r-faI-nd} &&& \ded{r-faE-nd} \\
         &&& \\
  \hline &&& \\
  \ded{r-eqI-nd} &&& \ded{r-eqE-nd} \\
         &&& \\
  \end{array}
$$

\par but each of these (apparently) small trees
\par packs a {\sl huge} amount of information.


% --------------------
% «rules-quantifiers-2»  (to ".rules-quantifiers-2")
% (s "Rules for the quantifiers (2)" "rules-quantifiers-2")
\myslide {Rules for the quantifiers (2)} {rules-quantifiers-2}

Here are the translations...

\def\sstinc#1#2#3{\sst{#1}{#2} \subseteq \sst{#1}{#3}}
\def\sstinc#1#2#3{\sst{#1}{#2} \ito \sst{#1}{#3}}

\widemtos

%:*=*{=}*


%:
%:                         Qa
%:                         :::
%:                         Rab         \bb  ýb.Rab   	
%:  			  ------ýI     -----------ýE          	
%:  			  ýb.Rab          Ra\bb               	
%:			                                      
%:  			  ^r-faI-nd       ^r-faE-nd           
%:
%:         \sstinc{a,b}{Qa}{Rab}       (a|->\bb):A->B  \ssst{a,b}{Rab}
%:         ----------------------ýI    -----------------------------ýE
%:  	   \sstinc{a}{Qa}{ýb.Rab}        \sstinc{a}{ýb.Rab}{Ra\bb}	
%:	                                                               
%:  	      ^r-faI-st                    ^r-faE-st                    
%:
%:                     a,b;Qa|-Rab      a|->\bb    \ssst{a,b}{Rab}
%:                     -----------ýI    --------------------------ýE
%:  	               a;Qa|-ýb.Rab          a;ýb.Rab|-Ra\bb
%:	                                                               
%:  	               ^r-faI-sc                ^r-faE-sc                    
%:
%:            
%:
%:
%:
%:                                               [Pab]^1  Qa 
%:          		               	              :::::: 
%:          		  Pa\bb        	Îb.Pab        Ra	    
%:          		  ------ÎI     	----------------ÎE   
%:          		  Îb.Pab       	     Ra		    
%:			               	                      
%:          		  ^r-exI-nd    	     ^r-exE-nd       
%:
%:  (a|->\bb):A->B  \ssst{a,b}{Pab}       \sstinc{a,b}{Pab∧Qa}{Ra}
%:  -------------------------------ÎI   ---------------------------ÎE
%:  \sstinc{a}{Pa\bb}{Îb.Pab}           \sstinc{a}{(Îb.Pab)∧Qa}{Ra}
%:
%:                        ^r-exI-st           ^r-exE-st
%:
%:          a|-\bb  \ssst{a,b}{Pab}       a,b;Pab,Qa|-Ra
%:          -----------------------ÎI     ---------------ÎE
%:             a;Pa\bb|-Îb.Pab            a;Îb.Pab,Qa|-Ra
%:
%:                        ^r-exI-sc           ^r-exE-sc
%:
%:
%:                                      b=b'  Pabb  
%:  			   ---=I      	----------=E
%:  			   b=b         	   Pabb'	  
%:			              	            
%:  			   ^r-eqI-nd  	   ^r-eqE-nd
%:
%:                      B                     \ssst{a,b,b'}{Pabb}
%:  		------------------=I    ---------------------------------=E
%:  		\sstinc{b}{§}{b=b}      \sstinc{a,b,b'}{b=b'∧Pabb}{Pabb'}
%:		                                                           
%:  		  ^r-eqI-st                ^r-eqE-st                       
%:
%:                            B             \ssst{a,b,b'}{Pabb'}
%:                        --------=I    -----------------------=E
%:                        b;§|-b=b      a,b,b';b=b',Pabb|-Pabb'
%:
%:  		          ^r-eqI-sc            ^r-eqE-sc                       
%:
%:
%:
$$\begin{array}{c|c}
  \ded{r-exI-nd} & \ded{r-exE-nd} \\ \\
  \ded{r-exI-st} & \ded{r-exE-st} \\ \\
  \ded{r-exI-sc} & \ded{r-exE-sc} \\ \\
  \hline \\
  \ded{r-faI-nd} & \ded{r-faE-nd} \\ \\
  \ded{r-faI-st} & \ded{r-faE-st} \\ \\
  \ded{r-faI-sc} & \ded{r-faE-sc} \\ \\
  \hline \\
  \ded{r-eqI-nd} & \ded{r-eqE-nd} \\ \\
  \ded{r-eqI-st} & \ded{r-eqE-st} \\ \\
  \ded{r-eqI-sc} & \ded{r-eqE-sc} \\
  \end{array}
$$



% ****************
% ****************
% ****************
% ****************
% ****************
% ****************
% ****************

% Add: figures for quantification
% create figures for eq
% The typing of each of the rules


% --------------------
% «rules-equality»  (to ".rules-equality")
% (s "Rules for equality" "rules-equality")
\myslide {Rules for equality} {rules-equality}

%:***

The three primitive rules for equality in Natural Deduction are:
%:
%:                                 [Pabb']^1	    
%:			            :::::::	    
%:            b=b'  Pabb     Pabb    Qabb'	    
%:   ---=I    ----------=E   -------------¯{subst};1
%:   b=b         Pabb'          Qabb                
%:
%:   ^peq-=I     ^peq-=E        ^peq-subst
%:
$$\ded{peq-=I} \qquad \ded{peq-=E} \qquad \ded{peq-subst}$$

The four derived rules below deserve proper names.

Expensive ND systems come with them built-in,

but in cheap ND system we have to build them ourselves.
%:
%:  ===¯{refl}           ---=I
%:  b=b             :=   b=b
%:
%:  ^refl-short          ^refl-long
%:
%:                           ---=I
%:  b=b'               b=b'  b=b
%:  ====¯{sym}         ---------=E
%:  b'=b            :=   b'=b
%:
%:  ^sym-short           ^sym-long
%:
%:  b=b'  b'=b''        b'=b''  b=b'      
%:  =======¯{trans}     ------------=E 
%:   b=b''	    :=   b=b''	    
%:                                    
%:   ^trans-short        ^trans-long   
%:
%:                                     [Qabb]^1
%:                                    ---------1
%:                              b=b'  Qabb⊃Qabb
%:                              ---------------=E
%:  b=b'  Qabb'          Qabb'    Qabb'⊃Qabb
%:  ==========="=E'      -------------------
%:     Qabb          :=     Qabb
%:
%:     ^=E'-short           ^=E'-long
%:
$$\begin{array}{rcl}
  \ded{refl-short}  &:=& \ded{refl-long}  \\ \\
  \ded{sym-short}   &:=& \ded{sym-long}   \\ \\
  \ded{trans-short} &:=& \ded{trans-long} \\
  \ded{=E'-short}   &:=& \ded{=E'-long}   \\
  \end{array}
$$



% --------------------
% «adjs-to-cob-quants»  (to ".adjs-to-cob-quants")
% (s "Adjoints to change-of-base: quantifiers" "adjs-to-cob-quants")
\myslide {Adjoints to change-of-base: quantifiers} {adjs-to-cob-quants}

% (find-dn4 "experimental.lua" "addlayer")
%L abbrevs = addlayer(abbrevs)
%L -- abbrevs = removelayer(abbrevs)
%:*=*{=}*
%:**{∧}*
%:**{⊃}*

\def\pcded#1{\left(\cded{#1}\right)}
\def\dzhbox#1{\hbox to 0pt{$#1$}}
\def\lpcded#1{\dzhbox{\hss\pcded{#1}}}
\def\rpcded#1{\dzhbox{\pcded{#1}\hss}}

%D diagram adjs-to-pi*-dnc
%D 2Dx         100     +35
%D 2D  100 100 P' ===> ÆP'
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +50 +30 P ====> ÆP
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          |  <-|  |
%D 2D          v       v
%D 2D  +40 +30 Q* <=== Q
%D 2D          -       -
%D 2D          |  <-|  |
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +40 +30 R ====> åR
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +50 +30 R' ===> åR'
%D 2D          
%D 2D  +20 +20 b |---> a
%D 2D
%D (( P' .tex= P'ab  ÆP' .tex= Îb.P'ab  =>
%D    P  .tex= Pab   ÆP  .tex= Îb.Pab   =>
%D    Q* .tex= Qa     Q  .tex=    Qa    <=
%D    R  .tex= Rab   åR  .tex= ýb.Rab   =>
%D    R' .tex= R'ab  åR' .tex= ýb.R'ab  =>
%D    b  .tex= a,b    a  .tex= a
%D ))
%D ((  P'  P  |-> .plabel= l    p
%D    ÆP' ÆP  |-> .plabel= r Æ_p\;:=
%D     P' ÆP  harrownodes nil 20 nil |->
%D    ÆP' ÆP  midpoint x+= 20 .TeX= \rpcded{Sigma-pi-dnc} place
%D
%D     P   Q* |-> .PLABEL= _(0.42) g
%D     P   Q* |-> .PLABEL= _(0.58) =:\;f^\sharp
%D    ÆP   Q  |-> .PLABEL= ^(0.41) g^\flat\;:=
%D    ÆP   Q  |-> .PLABEL= ^(0.59) f
%D     P   Q  harrownodes nil 20 nil |-> sl^
%D     P   Q  harrownodes nil 20 nil <-| sl_
%D     P   Q* midpoint x+= -20 .TeX= \lpcded{Sigma-pi-sharp-dnc} place
%D    ÆP   Q  midpoint x+=  20 .TeX= \rpcded{Sigma-pi-flat-dnc}  place
%D
%D     Q*  R |-> .PLABEL= _(0.42) =:\;k^\flat
%D     Q*  R |-> .PLABEL= _(0.58) h
%D     Q  åR |-> .PLABEL= ^(0.43) k
%D     Q  åR |-> .PLABEL= ^(0.57) h^\sharp\;:=
%D     Q* åR  harrownodes nil 20 nil <-| sl^
%D     Q* åR  harrownodes nil 20 nil |-> sl_
%D    Q*   R  midpoint x+= -20 .TeX= \lpcded{Pi-pi-flat-dnc} place
%D     Q  åR  midpoint x+=  20 .TeX= \rpcded{Pi-pi-sharp-dnc}  place
%D
%D     R   R' |-> .plabel= l    r
%D    åR  åR' |-> .plabel= r å_r\;:=
%D     R  åR' harrownodes nil 20 nil |->
%D    åR  åR' midpoint x+= 20 .TeX= \rpcded{Pi-pi-dnc} place
%D
%D     b a -> .plabel= a \pi
%D ))
%D enddiagram
%D
$$\diag{adjs-to-pi*-dnc}$$

%:
%:                                     [P'ab]^1     
%:			                :::p	      
%:                                      Pab	        
%:     			               ------ÎI     
%:     			     Îb.P'ab   Îb.Pab	      
%:     			     ----------------ÎE     
%:     			           Îb.Pab	      
%:			                            
%:     			           ^Sigma-pi-dnc    
%:			                            
%:    Pab		               [Pab]^1      
%:   ------ÎI		               :::::g	      
%:   Îb.Pab		      Îb.Pab    Qa	      
%:   ::::::f		      ------------ÎE	      
%:     Qa		          Qa		      
%:			                            
%:     ^Sigma-pi-sharp-dnc        ^Sigma-pi-flat-dnc
%:
%:     Qa                        Qa	       
%:     ::k                       ::h	       
%:  b  ýb.Rab                   Rab	       
%:  ---------ýE                 ---ýI	       
%:     Rab                     ýb.Rab	       
%:     			                       
%:     ^Pi-pi-flat-dnc         ^Pi-pi-sharp-dnc
%:                               
%:                             b  ýb.Rab
%:                             -----ýE
%:                              Rab	       
%:			         ::r	       
%:			        R'ab	       
%:			        ---ýI	       
%:			       ýb.R'ab	       
%:			                       
%:			       ^Pi-pi-dnc
%:
% $$\diag{adjs-to-pi*-dnc}
%   \qquad
%   \begin{array}{ccc}
%                            & \ded{Sigma-pi-dnc}      \\ \\
%   \ded{Sigma-pi-sharp-dnc} & \ded{Sigma-pi-flat-dnc} \\ \\
%   \ded{Pi-pi-flat-dnc}     & \ded{Pi-pi-sharp-dnc}   \\ \\
%                            & \ded{Pi-pi-dnc}         \\ \\
%   \end{array}
% $$




% --------------------
% «adjs-to-cob-equality»  (to ".adjs-to-cob-equality")
% (s "Adjoints to change-of-base: equality" "adjs-to-cob-equality")
\myslide {Adjoints to change-of-base: equality} {adjs-to-cob-equality}

%D diagram adjs-to-delta*-dnc
%D 2Dx         100     +40
%D 2D  100 100 P' ===> ÆP'
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +50 +30 P ====> ÆP
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          |  <-|  |
%D 2D          v       v
%D 2D  +50 +30 Q* <=== Q
%D 2D          -       -
%D 2D          |  <-|  |
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +50 +30 R ====> åR
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +50 +30 R' ===> åR'
%D 2D      
%D 2D  +20 +20 b |---> a
%D 2D
%D (( P' .tex= P'ab  ÆP' .tex= b{=}b'{∧}P'ab  =>
%D    P  .tex= Pab   ÆP  .tex= b{=}b'{∧}Pab   =>
%D    Q* .tex= Qabb   Q  .tex=          Qabb' <=
%D    R  .tex= Rab   åR  .tex= b{=}b'{⊃}Rab   =>
%D    R' .tex= R'ab  åR' .tex= b{=}b'{⊃}R'ab  =>
%D    b  .tex= a,b    a  .tex= a,b,b'
%D ))
%D ((  P'  P  |-> .plabel= l    p
%D    ÆP' ÆP  |-> .plabel= r Æ_p\;:=
%D     P' ÆP  harrownodes nil 20 nil |->
%D    ÆP' ÆP  midpoint x+= 20 .TeX= \rpcded{Sigma-delta-dnc} place
%D
%D     P   Q* |-> .PLABEL= _(0.42) g
%D     P   Q* |-> .PLABEL= _(0.58) =:\;f^\sharp
%D    ÆP   Q  |-> .PLABEL= ^(0.41) g^\flat\;:=
%D    ÆP   Q  |-> .PLABEL= ^(0.59) f
%D     P   Q  harrownodes nil 20 nil |-> sl^
%D     P   Q  harrownodes nil 20 nil <-| sl_
%D     P   Q* midpoint x+= -20 .TeX= \lpcded{Sigma-delta-sharp-dnc} place
%D    ÆP   Q  midpoint x+=  20 .TeX= \rpcded{Sigma-delta-flat-dnc}  place
%D
%D     Q*  R |-> .PLABEL= _(0.42) =:\;k^\flat
%D     Q*  R |-> .PLABEL= _(0.58) h
%D     Q  åR |-> .PLABEL= ^(0.43) k
%D     Q  åR |-> .PLABEL= ^(0.57) h^\sharp\;:=
%D     Q* åR  harrownodes nil 20 nil <-| sl^
%D     Q* åR  harrownodes nil 20 nil |-> sl_
%D     Q*  R  midpoint x+= -20 .TeX= \lpcded{Pi-delta-flat-dnc} place
%D     Q  åR  midpoint x+=  20 .TeX= \rpcded{Pi-delta-sharp-dnc}  place
%D
%D     R   R' |-> .plabel= l    r
%D    åR  åR' |-> .plabel= r å_r\;:=
%D     R  åR' harrownodes nil 20 nil |->
%D    åR  åR' midpoint x+= 20 .TeX= \rpcded{Pi-delta-dnc} place
%D
%D     b a -> .plabel= a \dd
%D ))
%D enddiagram
%D
$$\diag{adjs-to-delta*-dnc}$$

% $$\diag{adjs-to-delta*-dnc}
%   \qquad
%   \begin{array}{ccc}
%                               & \ded{Sigma-delta-dnc}      \\ \\
%   \ded{Sigma-delta-sharp-dnc} & \ded{Sigma-delta-flat-dnc} \\ \\
%   \ded{Pi-delta-flat-dnc}     & \ded{Pi-delta-sharp-dnc}   \\ \\
%                               & \ded{Pi-delta-dnc}         \\ \\
%   \end{array}
% $$

%:
%:
%:                                      b=b'∧P'ab
%:                                      ---------
%:                           b=b'∧P'ab   P'ab
%:                           ---------   :::p
%:                              b=b'     Pab
%:                              ------------
%:                                b=b'∧Pab
%:                           
%:                                ^Sigma-delta-dnc
%:
%:                                       b=b'∧Pab
%:                                       ---------
%:            [b=b'∧Pab]^1     b=b'∧Pab     Pab
%:              :::::f	       --------     ::::g
%:   b=b∧Pab    Qabb'             b=b'      Qabb
%:   --------------¯{subst};1     --------------=E
%:         Qabb                        Qabb'
%:
%:         ^Sigma-delta-sharp-dnc      ^Sigma-delta-flat-dnc
%:
%:                [Qabb']^1            [b=b']^1  Qabb'
%:                ::::::::k		    ----------=E'
%:         Qabb   b=b'⊃Rab		       Qabb	    
%:  ---=I  ---------------¯{subst};1	       ::::h	    
%:  b=b        b=b⊃Rab		               Rab	    
%:  ------------------		          --------1	    
%:          Rab			          b=b'⊃Rab      
%:
%:          ^Pi-delta-flat-dnc            ^Pi-delta-sharp-dnc
%:
%:                                 [b=b']^1  b=b'⊃Rab
%:                                 ----------------
%:                                        Rab
%:                                        :::r
%:                                       R'ab
%:                                     ---------1
%:                                     b=b'⊃R'ab
%:
%:                                     ^Pi-delta-dnc
%:


% --------------------
% «adjs-to-cob-generic»  (to ".adjs-to-cob-generic")
% (s "Adjoints to change-of-base: generic" "adjs-to-cob-generic")
\myslide {Adjoints to change-of-base: generic} {adjs-to-cob-generic}


%:*=*{=}*
%:**{∧}*
%:**{⊃}*


%D diagram adjs-to-f*-dnc
%D 2Dx         100     +40
%D 2D  100 100 P' ===> ÆP'
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +70 +30 P ====> ÆP
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          |  <-|  |
%D 2D          v       v
%D 2D  +70 +30 Q* <=== Q
%D 2D          -       -
%D 2D          |  <-|  |
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +70 +30 R ====> åR
%D 2D          -       -
%D 2D          |  |->  |
%D 2D          v       v
%D 2D  +70 +30 R' ===> åR'
%D 2D      
%D 2D  +20 +20 b |---> a
%D 2D
%D (( P' .tex= P'x  ÆP' .tex= Îx.tx=y∧P'x  =>
%D    P  .tex= Px   ÆP  .tex= Îx.tx=y∧Px   =>
%D    Q* .tex= Qtx   Q  .tex= Qy           <=
%D    R  .tex= Rx   åR  .tex= ýx.tx=y⊃Rx   =>
%D    R' .tex= R'x  åR' .tex= ýx.tx=y⊃R'x  =>
%D    b  .tex= x     a  .tex= y
%D ))
%D ((  P'  P  |-> .plabel= l    p
%D    ÆP' ÆP  |-> .plabel= r Æ_fp\;:=
%D     P' ÆP  harrownodes nil 20 nil |->
%D    ÆP' ÆP  midpoint x+= 20 .TeX= \rpcded{Sigma-t-dnc} place
%D
%D     P   Q* |-> .PLABEL= _(0.42) g
%D     P   Q* |-> .PLABEL= _(0.58) =:\;f^\sharp
%D    ÆP   Q  |-> .PLABEL= ^(0.41) g^\flat\;:=
%D    ÆP   Q  |-> .PLABEL= ^(0.59) f
%D     P   Q  harrownodes nil 20 nil |-> sl^
%D     P   Q  harrownodes nil 20 nil <-| sl_
%D     P   Q* midpoint x+= -20 .TeX= \lpcded{Sigma-t-sharp-dnc} place
%D    ÆP   Q  midpoint x+=  20 .TeX= \rpcded{Sigma-t-flat-dnc}  place
%D
%D     Q*  R |-> .PLABEL= _(0.42) =:\;k^\flat
%D     Q*  R |-> .PLABEL= _(0.58) h
%D     Q  åR |-> .PLABEL= ^(0.43) k
%D     Q  åR |-> .PLABEL= ^(0.57) h^\sharp\;:=
%D     Q* åR  harrownodes nil 20 nil <-| sl^
%D     Q* åR  harrownodes nil 20 nil |-> sl_
%D     Q*  R  midpoint x+= -20 .TeX= \lpcded{Pi-t-flat-dnc} place
%D     Q  åR  midpoint x+=  20 .TeX= \rpcded{Pi-t-sharp-dnc}  place
%D
%D     R   R' |-> .plabel= l    r
%D    åR  åR' |-> .plabel= r å_fr\;:=
%D     R  åR' harrownodes nil 20 nil |->
%D    åR  åR' midpoint x+= 20 .TeX= \rpcded{Pi-t-dnc} place
%D
%D     b a -> .plabel= a \dd
%D ))
%D enddiagram
%D
$$\diag{adjs-to-f*-dnc}$$


%:
%:
%:                                                       [tx=y∧P'x]^1 
%:  				                         ------------ 
%:  				           [tx=y∧P'x]^1    P'x    	   
%:  				           ------------    ::p   	   
%:  				             tx=y          Px   	   
%:  				             ----------------	   
%:  				                 tx=y∧Px		   
%:  				                 ------------ÎI	   
%:  				       tx=y∧P'x  Îx.tx=y∧Px	   
%:  				       ---------------------ÎE	   
%:  				              Îx.tx=y∧Px		   
%:				                                      
%:  				              ^Sigma-t-dnc            
%:
%:                                                          [tx=y∧Px]^1  
%:					                    ----------   
%:   §                 [tx=y∧Px]^1	       [tx=y∧Px]^1     Px	     
%:  ::t^*¯{refl}       -----------ÎI	       -----------    :::g	     
%:  tx=tx         Px   Îx.tx=y∧Px	            tx=y      Qtx	     
%:  ----------------     ::f		            ============= 	     
%:      tx=tx∧Px         Qy		Îx.tx=y∧Px       Qy		     
%:      -------------------¯{subst};1	-------------------ÎE;1	     
%:                 Qtx			         Qy			     
%:					                                 
%:                 ^Sigma-t-sharp-dnc	         ^Sigma-t-flat-dnc       
%:
%:                                       [tx=y]^1		      
%:					 --------¯{sym}	      
%:					  y=tx          Qy	      
%:					  ----------------¯{sub}' 
%:                         Qfx		        Qtx		      
%:                    :::::::::::::t^*k	        :::h	      
%:    §            x  ýx'.tx'=tx⊃Rx	        Rx		      
%:    :t^*¯{refl}  ----------------ýE	     -------1	      
%:   tx=tx          tx=tx⊃Rx		     tx=y⊃Rx	      
%:   -----------------------		   ----------ýI	      
%:            Rx			   ýx.tx=y⊃Rx	      
%:					                          
%:            ^Pi-t-flat-dnc		  ^Pi-t-sharp-dnc         
%:
%:                                                 x  ýx.tx=y⊃Rx	 
%:   					           -------------ýE	 
%:   					[tx=y]^1     tx=y⊃Rx	 
%:   					--------------------	 
%:   					        Rx			 
%:   					        ::r		 
%:   					        R'x		 
%:   					      --------1		 
%:   					      tx=y⊃R'x		 
%:   					    -----------ýI		 
%:   					    ýx.tx=y⊃R'x		 
%:					                            
%:   					    ^Pi-t-dnc               
%:
%:



% --------------------
% «adjs-to-cob-candidates»  (to ".adjs-to-cob-candidates")
% (s "Adjoints to change-of-base: candidates" "adjs-to-cob-candidates")
\myslide {Adjoints to change-of-base: candidates} {adjs-to-cob-candidates}

\def\Eq{\operatorname{Eq}}
\def\EqDB{\Eq_{\DD_B}\!\!\!§\!_B}

\par Remember that:
\par $\DD_B := \ang{\id_B,\id_B} : B \to B×B$,
\par $\dd_{AB} := \ang{\id_{A×B},'_{AB}} : A×B \to (A×B)×B$.

\bsk

\par If $f:A \to B$ and $PÝ\bbE_A$ then we can define
\par $Î_fP := Î_{\pi_{BA}}((\id_B×f)^*\EqDB∧\pi^{\prime*}_{BA}P)$:
%:
%:   
%:  A->^fB               B                                   
%:  --------   -----------------                      
%:  B×A->B×B  \ssst{b,b'}{b{=}b'}   \ssst{a}{Pa}     
%:  -----------------------------   ------------
%:     \ssst{b,a}{b{=}fa}           \ssst{b,a}{Pa}   
%:     -------------------------------------------   
%:            \ssst{b,a}{b{=}fa∧Pa}                          
%:            ----------------------                         
%:            \ssst{b}{Îa.b{=}fa∧Pa}                         
%:
%:            ^foo                                           
%:
%:     f        B					     
%:   -------  -----				     
%:   \id_B×f  \EqDB          P			     
%:   ----------------   -------------------	     
%:   (\id_B×f)^*\EqDB   \pi^{\prime*}_{BA}P	     
%:   --------------------------------------	     
%:   (\id_B×f)^*\EqDB∧\pi^{\prime*}_{BA}P	     
%:  ------------------------------------------------
%:  Î_{\pi_{BA}}((\id_B×f)^*\EqDB∧\pi^{\prime*}_{BA}P)
%:                                                  
%:     ^bar                                         
%:
$$\ded{foo} \qquad \ded{bar}$$

\msk

\par If $PÝ\bbE_{A×B}$ then we can define
\par $\Eq_{\dd_{AB}} P := (\pi'_{AB}×\id_B)^*\EqDB∧_{(A×B)B}^*P$:
%:
%:   
%:             B                                                 B
%:    -----------------                                        -----
%:   \ssst{b,b'}{b{=}b'}        \ssst{a,b}{Pab}                \EqDB                  P
%:  -----------------------   --------------------    ------------------------  -------------
%:  \ssst{(a,b),b'}{b{=}b'}   \ssst{(a,b),b'}{Pab}    (\pi'_{AB}×\id_B)^*\EqDB  _{(A×B)B}^*P
%:  ----------------------------------------------    ---------------------------------------
%:       \ssst{(a,b),b'}{b{=}b'∧Pab}                   (\pi'_{AB}×\id_B)^*\EqDB∧_{(A×B)B}^*P
%:
%:         ^foo-abb'                                     ^bar-abb'
%:
$$\ded{foo-abb'} \qquad \ded{bar-abb'}$$













%%%%%
%
% «hyps»  	(to ".hyps")
%
%%%%%

\def\foo#1{
$$\diag{#1-std}$$

$$\begin{array}{rcl}
  \ded{#1nat-short-std} &:=& \ded{#1nat-std} \\ \\
  \ded{#1-std}          &&                   \\
  \end{array}
$$
}

\def\foowide#1{
$$\diag{#1-std}$$

$$\begin{array}{l}
  \ded{#1nat-short-std} \qquad := \\
  \qquad \ded{#1nat-std}          \\ \\
  \ded{#1-std}                    \\
  \end{array}
$$
}



% --------------------
% «Pand»  (to ".Pand")
% (s "Preservation of `and'" "Pand")
\myslide {Preservation of `and'} {Pand}

\foo{Pand}


% --------------------
% «Pand-2»  (to ".Pand-2")
% (s "Preservation of `and' (2)" "Pand-2")
\myslide {Preservation of `and' (2)} {Pand-2}

In the archetypal model, $\CanSub(\Set)$,

the arrows $\Pandnat$ and $\Pand$ exist for trivial reasons:

$f^*P∧f^*Q = \ssst{a}{Pfa∧Qfa} = \ssst{a}{P(f(a))∧Q(f(a))}$ \quad and

$f^*(P∧Q)  = \ssst{a}{Pfa∧Qfa} = \ssst{a}{P(f(a))∧Q(f(a))}$

are the {\sl same subobject}.

%D diagram Pand-archetyp
%D 2Dx    100     +70      +70
%D 2D 100 A0 <============ A1
%D 2D	   ^  ^             ^
%D 2D	   |   \      <-|   |
%D 2D	   -    -           -
%D 2D +20 A2 <--| A3 <==== A4
%D 2D	   -    -           -
%D 2D	   |   /      <-|   |
%D 2D	   v  v             v
%D 2D +20 A5 <============ A6
%D 2D
%D 2D +15 aa |-----------> ab
%D 2D
%D (( A0 .tex= \ssst{a}{Pfa}                                   A1 .tex= \ssst{b}{Pb}
%D    A2 .tex= \ssst{a}{Pfa∧Qfa}  A3 .tex= \ssst{a}{Pfa∧Qfa}   A4 .tex= \ssst{b}{Pb∧Qb}
%D    A5 .tex= \ssst{a}{Pfa}                                   A6 .tex= \ssst{b}{Qb}
%D        aa x+= 10 .tex= A       ab .tex= B
%D    A0 A1 <-|
%D    A0 A2 <- A0 A3 <-
%D    A1 A4 <-
%D    A0 A3 midpoint A1 A4 midpoint harrownodes nil 20 nil <-|
%D    A2 A3 <- sl^ .plabel= a {î} A2 A3 -> sl_ .plabel= b \Pand  A3 A4 <-|
%D    A2 A5 -> A3 A5 ->
%D    A4 A6 ->
%D    A3 A5 midpoint A4 A6 midpoint harrownodes nil 20 nil <-|
%D    A5 A6 <-|
%D    aa ab -> .plabel= a f
%D ))
%D enddiagram

$$\diag{Pand-archetyp}$$

\msk

The same will happen for $\Ptrue$ and $\Pimp$,

and for {\sl some forms} of $\Frob$, $\BCCL$ and $\BCCR$

(the details for $\Frob$, $\BCCL$ and $\BCCR$ are in [Seely83])




% --------------------
% «Ptrue»  (to ".Ptrue")
% (s "Preservation of `true'" "Ptrue")
\myslide {Preservation of `true'} {Ptrue}

\foo{Ptrue}

% --------------------
% «Pimp»  (to ".Pimp")
% (s "Preservation of `implies'" "Pimp")
\myslide {Preservation of `implies'} {Pimp}

\foowide{Pimp}


% --------------------
% «BCCL»  (to ".BCCL")
% (s "Beck-Chevalley for the left adjoint" "BCCL")
\myslide {Beck-Chevalley for the left adjoint} {BCCL}

\foo{BCCL}

% --------------------
% «BCCR»  (to ".BCCR")
% (s "Beck-Chevalley for the right adjoint" "BCCR")
\myslide {Beck-Chevalley for the right adjoint} {BCCR}

\foo{BCCR}


% --------------------
% «Frobenius»  (to ".Frobenius")
% (s "Frobenius" "Frobenius")
\myslide {Frobenius} {Frobenius}

\foo{Frob}

%:
%:      f:A->B                              f:A->B
%:   ===========\Ptruenat                -----------\Ptrue
%:   f^*§_B|-§_A                         §_A|-f^*§_B         
%:
%:    ^Ptruenat-short-std                ^Ptrue-std                  
%:
%:       f   P  Q                           f   P   Q           
%:  ===================\Pandnat          -------------------\Pand   
%:  f^*(P∧Q)|-f^*P∧f^*Q                  f^*P∧f^*Q|-f^*(P∧Q)
%:                                                                                    
%:     ^Pandnat-short-std                ^Pand-std                  
%:
%:       f   Q  R                            f   Q  R           
%:  ===================\Pimpnat          -------------------\Pimp   
%:  f^*P∧f^*Q|-f^*(Q⊃R)                  f^*(Q⊃R)|-f^*P⊃f^*Q
%:                                                                                    
%:     ^Pimpnat-short-std                ^Pimp-std                  
%:

%D diagram Ptrue-std
%D 2Dx    100      +30
%D 2D 100 T0 <==== T1
%D 2D	   -
%D 2D	   |
%D 2D	   v
%D 2D +20 T2
%D 2D
%D 2D +15 ta |---> tb
%D 2D
%D (( T0 .tex= f^*§_B  T1 .tex= §_B
%D    T2 .tex= §_A
%D    ta .tex= A      tb .tex= B
%D    T0 T1 <-|
%D    T0 T2 -> sl_ .plabel= l \Ptruenat
%D    T0 T2 <- sl^ .plabel= r \Ptrue
%D    ta tb -> .plabel= a f
%D ))
%D enddiagram
%:
%:       B
%:      ---§
%:   f  §_B
%:   ------·^*
%:   f^*§_B
%:   -----------!
%:   f^*§_B|-§_A
%:
%:   ^Ptruenat-std

%D diagram Pand-std
%D 2Dx    100     +45      +45
%D 2D 100 A0 <============ A1
%D 2D	   ^  ^             ^
%D 2D	   |   \      <-|   |
%D 2D	   -    -           -
%D 2D +20 A2 <--| A3 <==== A4
%D 2D	   -    -           -
%D 2D	   |   /      <-|   |
%D 2D	   v  v             v
%D 2D +20 A5 <============ A6
%D 2D
%D 2D +15 aa |-----------> ab
%D 2D
%D (( A0 .tex= f^*P                          A1 .tex= P
%D    A2 .tex= f^*P&f^*Q  A3 .tex= f^*(P&Q)  A4 .tex= P&Q
%D    A5 .tex= f^*Q                          A6 .tex= Q
%D        aa x+= 10 .tex= A       ab .tex= B
%D    A0 A1 <-|
%D    A0 A2 <- A0 A3 <-
%D    A1 A4 <-
%D    A0 A3 midpoint A1 A4 midpoint harrownodes nil 20 nil <-|
%D    A2 A3 <- sl^ .plabel= a {î} A2 A3 -> sl_ .plabel= b \Pand  A3 A4 <-|
%D    A2 A5 -> A3 A5 ->
%D    A4 A6 ->
%D    A3 A5 midpoint A4 A6 midpoint harrownodes nil 20 nil <-|
%D    A5 A6 <-|
%D    aa ab -> .plabel= a f
%D ))
%D enddiagram
%:
%:      P  Q              P   Q
%:      ------           -----'
%:   f  P∧Q|-P            P∧Q|-Q
%:  -------------·^*   -------------·^*
%:  f^*(P∧Q)|-f^*P      f^*(P∧Q)|-f^*Q
%:  ----------------------------------\ang{,}
%:         f^*(P∧Q)|-f^*P∧f^*Q
%:
%:         ^Pandnat-std


%D diagram Pimp-std
%D 2Dx    100    +60                 +55   +60
%D 2D 100 B0 <-> B0' <============== B1
%D 2D	  -/\                        -/\
%D 2D	  | \\                       | \\
%D 2D	  v  \\                      v  \\
%D 2D +20 B2 <\\==================== B3  \\
%D 2D	   \\  \\                     \\  \\
%D 2D +25   \\   B4 <===================== B5
%D 2D	     \\  -                      \\ -
%D 2D	      \\ |                       \\|
%D 2D	       \/v                        Vv
%D 2D +20        B6                        B7
%D 2D
%D 2D +0  b0 |---------------------> b1
%D 2D	     |->                        |->
%D 2D +35        b2 |--------------------> b3
%D 2D
%D ((
% (fooi "Q" "R" "P" "Q")
%D    B0 .tex= f^*(Q⊃R)&f^*Q  B0' .tex= f^*((Q⊃R)&Q)   B1 .tex= (Q⊃R)&Q
%D    B2 .tex= f^*R           B3  .tex= R
%D    B4 .tex= f^*(Q⊃R)       B5 .tex= Q⊃R
%D    B6 .tex= f^*Q⊃f^*R      B7 .tex= Q⊃R
%D    B0  B0' <- sl^ .plabel= a {î}
%D    B0  B0' -> sl_ .plabel= b ÐP&
%D    B0' B1 <-| B0 B2 -> B0' B2 -> B1 B3 -> B2 B3 <-|
%D    B0 B4 <-| B2 B6 |->
%D    B1 B5 <-| B3 B7 |->
%D    B4 B5 <-| B5 B7 -> .plabel= r \id
%D    B4 B6 -> sl_ .plabel= l î B4 B6 <- sl^ .plabel= r ÐP⊃
%D    B0' B2 midpoint B1 B3 midpoint  harrownodes nil 20 nil <-|
%D    B0  B2 midpoint B4 B6 midpoint dharrownodes nil 20 nil |->
%D    B1  B3 midpoint B5 B7 midpoint dharrownodes nil 20 nil <-|
%D ))
%D (( b0 b2 midpoint .TeX= A b1 b3 midpoint .TeX= B -> .plabel= a f
%D ))
%D enddiagram
%:
%:                                               Q  R 
%:                                               ----⊃
%:                                               Q⊃R
%:                                               ---\id
%:         Q   R                            Q⊃R|-Q⊃R
%:         -----⊃                           --------\uncur
%:     f    Q⊃R         Q                f  (Q⊃R)∧Q|-R
%:   ---------------------------\Pand    ------------·^*
%:   f^*(Q⊃R)∧f^*Q|-f^*((Q⊃R)∧Q)         f^*((Q⊃R)∧Q)|-f^*R
%:   ------------------------------------------------------;
%:                 f^*(Q⊃R)∧f^*Q|-f^*R
%:                 -------------------\cur
%:                 f^*(Q⊃R)|-f^*Q⊃f^*R
%:   
%:                 ^Pimpnat-std
%:
%:





%%%%%
%
% «bcc»  (to ".bcc")
%
%%%%%

%:
%:         c f c' f' P                           c f c' f' P                   
%:  ===========================\BCCLnat   ---------------------------\BCCL  
%:  Î_{c'}f^{\prime*}P|-f^*Î_cP           f^*Î_cP|-Î_{c'}f^{\prime*}P          
%:                                                                             
%:  ^BCCLnat-short-std                    ^BCCL-std                        
%:
%:         c f c' f' P                           c f c' f' P                   
%:  ===========================\BCCRnat   ---------------------------\BCCR  
%:  f^*ý_cP|-ý_{c'}f^{\prime*}P           ý_{c'}f^{\prime*}P|-f^*ý_cP
%:                                                                             
%:  ^BCCRnat-short-std                       ^BCCR-std                        
%:

%D diagram BCCL-std
%D 2Dx    100     +45                +55   +45
%D 2D 100 B0 <====================== B1
%D 2D	  -\\                        -\\
%D 2D	  | \\                       | \\
%D 2D	  v  \\                      v  \\
%D 2D +20 B2 <\\> B2' ============== B3  \\
%D 2D	   /\  \/                     /\  \/
%D 2D +15   \\   B4                    \\  B5
%D 2D	     \\  -                      \\ -
%D 2D	      \\ |                       \\|
%D 2D	       \\v                        \v
%D 2D +20        B6 <===================== B7
%D 2D
%D 2D +10 b0 |---------------------> b1
%D 2D	     |->                        |->
%D 2D +35        b2 |--------------------> b3
%D 2D
%D ((
%D    B0 .tex= f^{\prime*}P                                      B1 .tex= P
%D    B2 .tex= c^{\prime*}f^*Î_cP  B2' .tex= f^{\prime*}c^*Î_cP  B3 .tex= c^*Î_cP
%D    B4 .tex= Î_{c'}f^{\prime*}P                                B5 .tex= Î_cP
%D    B6 .tex= f^*Î_cP                                           B7 .tex= Î_cP
%D    B0 B1 <-| B0 B2 -> B0 B2' -> B1 B3 -> B2 B2' <-> B2' B3 <-|
%D    B0 B4 |-> B1 B5 |->
%D    B2 B6 <-| B3 B7 <-|
%D    B6 B7 <-| B5 B7 -> .plabel= r \id
%D    B4 B6 -> sl_ .plabel= l î B4 B6 <- sl^ .plabel= r \BCCL
%D    B0 B2' midpoint B1 B3 midpoint  harrownodes nil 20 nil <-|
%D    B0  B2 midpoint B4 B6 midpoint dharrownodes nil 20 nil |->
%D    B1  B3 midpoint B5 B7 midpoint dharrownodes nil 20 nil <-|
%D ))
%D (( b0 .tex= A×_{B}C b1 .tex= C b2 .tex= A b3 .tex= B
%D    b0 b1 -> .plabel= b f'
%D    b0 b2 -> .plabel= l c'
%D    b1 b3 -> .plabel= r c
%D    b2 b3 -> .plabel= a f
%D    b0 relplace 20 7 \pbsymbol{7}
%D ))
%D enddiagram

%D diagram BCCR-std
%D 2Dx    100    +45                 +55   +45
%D 2D 100 B0 <-> B0' <============== B1
%D 2D	  -/\                        -/\
%D 2D	  | \\                       | \\
%D 2D	  v  \\                      v  \\
%D 2D +20 B2 <\\==================== B3  \\
%D 2D	   \\  \\                     \\  \\
%D 2D +15   \\   B4 <===================== B5
%D 2D	     \\  -                      \\ -
%D 2D	      \\ |                       \\|
%D 2D	       \/v                        Vv
%D 2D +20        B6                        B7
%D 2D
%D 2D +10 b0 |---------------------> b1
%D 2D	     |->                        |->
%D 2D +35        b2 |--------------------> b3
%D 2D
%D ((
%D    B0 .tex= c^{\prime*}f^*ý_cP  B0' .tex= f^{\prime*}c^*ý_cP  B1 .tex= c^*ý_cP
%D    B2 .tex= f^{\prime*}P        B3  .tex= P
%D    B4 .tex= f^*ý_cP             B5 .tex= ý_cP
%D    B6 .tex= ý_{c'}f^{\prime*}P     B7 .tex= ý_cP
%D    B0  B0' <-> B0' B1 <-| B0 B2 -> B0' B2 -> B1 B3 -> B2 B3 <-|
%D    B0 B4 <-| B2 B6 |->
%D    B1 B5 <-| B3 B7 |->
%D    B4 B5 <-| B5 B7 -> .plabel= r \id
%D    B4 B6 -> sl_ .plabel= l î B4 B6 <- sl^ .plabel= r \BCCR
%D    B0' B2 midpoint B1 B3 midpoint  harrownodes nil 20 nil <-|
%D    B0  B2 midpoint B4 B6 midpoint dharrownodes nil 20 nil |->
%D    B1  B3 midpoint B5 B7 midpoint dharrownodes nil 20 nil <-|
%D ))
%D (( b0 .tex= A×_{B}C b1 .tex= C b2 .tex= A b3 .tex= B
%D    b0 b1 -> .plabel= b f'
%D    b0 b2 -> .plabel= l c'
%D    b1 b3 -> .plabel= r c
%D    b2 b3 -> .plabel= a f
%D    b0 relplace 20 7 \pbsymbol{7}
%D ))
%D enddiagram

%:
%:       P  c
%:       ----Î_0
%:       Î_cP
%:       ----\id
%:       Î_cP|-Î_cP
%:       ----------Î^\sharp
%:  f'   P|-c^*Î_cP                           (f';c)=(c';f)    Î_cP
%:  --------------------------------·^*  ======================================
%:  f^{\prime*}P|-f^{\prime*}c^*Î_cP     f^{\prime*}c^*Î_cP|-c^{\prime*}f^*Î_cP
%:  ---------------------------------------------------------------------------;
%:           f^{\prime*}P|-c^{\prime*}f^*Î_cP
%:           --------------------------------Î^\flat
%:           Î_{c'}f^{\prime*}P|-f^*Î_cP
%:
%:           ^BCCLnat-std
%:
%:                                               P  c                          
%:                                               ----ý_0                       
%:                                               ý_cP                          
%:                                               ----\id                       
%:                                               ý_cP|-ý_cP                    
%:                                               ----------ý^\flat             
%:       (f';c)=(c';f)    ý_cP              f'   c^*ý_cP|-P                    
%:  ======================================  --------------------------------·^*
%:  c^{\prime*}f^*ý_cP|-f^{\prime*}c^*ý_cP  f^{\prime*}c^*ý_cP|-f^{\prime*}P
%:  ------------------------------------------------------------------------;
%:           c^{\prime*}f^*ý_cP|-f^{\prime*}P
%:           --------------------------------ý^\sharp
%:           f^*ý_cP|-ý_{c'}f^{\prime*}P
%:
%:           ^BCCRnat-std
%:


%%%%%
%
% «frobenius»  (to ".frobenius")
%
%%%%%

%:
%:       f   P  Q                        f    P  Q          
%:  =====================\Frobnat        ---------------------\Frob
%:  Î_f(P∧f^*Q)|-(Î_fP)∧Q                Î_f(P∧f^*Q)|-(Î_fP)∧Q                
%:                                                                                      
%:     ^Frobnat-short-std                 ^Frob-std                   
%:

%D diagram Frob-std
%D 2Dx    100          +45 +35 +10
%D 2D 100 B0 ================> B1
%D 2D	  ^                  ^ ^ 
%D 2D	  |                 /  | 
%D 2D	  -                \   - 
%D 2D +20 B2 ========> B3 <--> B3'
%D 2D	  -                /   - 
%D 2D	  |                 \  |
%D 2D	  v                  v v
%D 2D +20 B4 <================ B5         
%D 2D
%D 2D +15 b0 |-----------> b1
%D 2D
%D ((
%D    B0 .tex= P                            B1  .tex=  Î_fP
%D    B2 .tex= P&f^*Q  B3 .tex= Î_f(P&f^*Q) B3' .tex= (Î_fP)&Q
%D    B4 .tex= f^*Q                         B5  .tex=     Q
%D    B0 B1 |->   B2 B0 -> B3 B1 -> B3' B1 ->
%D    B4 B5 <-|   B2 B4 -> B3 B5 -> B3' B5 ->
%D    B2 B3 |->   B3 B3' -> sl^ .plabel= a î  B3 B3' <- sl_ .plabel= b \Frob
%D    B0 B2 midpoint B1 B3 midpoint  harrownodes nil 20 nil |->
%D    B2 B4 midpoint B3 B5 midpoint  harrownodes nil 20 nil |->
%D ))
%D (( b0 .tex= A b1 .tex= B   b0 b1 -> .plabel= a f
%D ))
%D enddiagram

%:
%:           f  Q                f   Q      
%:           ---·^*             ----·^*
%:       P   f^*Q            P    f^*Q
%:       ---------         ------------'
%:       P∧f^*Q|-P   f      P∧f^*Q|-f^*Q
%:   -----------------Î_f   --------------{Î_f}^\flat
%:   Î_f(P∧f^*Q)|-Î_fP      Î_f(P∧f^*Q)|-Q
%:   -------------------------------------\ang{,}
%:              Î_f(P∧f^*Q)|-(Î_fP)∧Q
%:
%:              ^Frobnat-std
%:




% --------------------
% «cheap-hyps»  (to ".cheap-hyps")
% (s "Cheap hyperdoctrines" "cheap-hyps")
\myslide {Cheap hyperdoctrines} {cheap-hyps}

A {\sl cheap hyperdoctrine} is a structure like this:

$$\def\lside{\bbH=(}
  \def\lphantom{\phantom{\lside}}
  %
  \begin{array}{l}
  \lside    \bbB, ×, 1, \to, \\
  \lphantom \bbE, ∧, §, ⊃, \\
  \lphantom p, Ð{cleavage}, \\
  \lphantom \Pand, \Ptrue, \Pimp, \\
  \lphantom Î_ \dashv * \dashv ý_p, \\
  \lphantom \Eq_\DD \dashv \DD^*, \\
  \lphantom \BCCex_\pi, \BCCfa_\pi) \\
  \end{array}
$$

Note that $\Frob$ does not appear,

and that $\BCCL$ and $\BCCR$ are stated only for 

very special cases --- $\BCCex$, $\BCCfa$, $\BCCeq$

(details soon!)



% --------------------
% «pimp-implies-frob»  (to ".pimp-implies-frob")
% (s "Pimp implies Frob" "pimp-implies-frob")
\myslide {Pimp implies Frob} {pimp-implies-frob}

\par {\sl Fact:} we can reconstruct $\Frob$ from $\Pimp$.
\par (Note: this is a yellow-belt categorical proof,
\par but for some reason I find it difficult)
\par First we need a derived rule:

%:
%:                            Î_f(P∧f^*Q)|-R
%:                            ------------Î^\sharp
%:                            P∧f^*Q|-f^*R
%:                            ------------⊃^\sharp
%:                            P|-f^*Q⊃f^*R
%:                            ===========;\Pimp
%:                            P|-f^*(Q⊃R)
%:                            ---------Î^\flat
%:  Î_f(P∧f^*Q)|-R            Î_fP|-Q⊃R
%:  ==============\Pimp'      ---------⊃^\flat
%:     Î_fP∧Q|-R         :=   Î_fP∧Q|-R
%:
%:     ^frob-from-pimp-1      ^frob-from-pimp-2
%:
$$\ded{frob-from-pimp-1} \quad := \quad \ded{frob-from-pimp-2}$$
%
\par where `$;\Pimp$' is composition with `$\Pimp$', as below.
\par Note that all the bars in the derivation at the right above
\par are bijections; the inverse of `$;\Pimp$' is `$;\Pimpnat$'.
%:
%:
%:                                                f  Q  R
%:                                         -------------------\Pimp
%:  P|-f^*Q⊃f^*R           P|-f^*Q⊃f^*R    f^*Q⊃f^*R|-f^*(Q⊃R)
%:  ===========;\Pimp	   -----------------------------------;
%:  P|-f^*(Q⊃R)        :=              P|-f^*(Q⊃R)      
%:
%:  ^;Pimp1                            ^;Pimp2
%:
%:
%:                                                f  Q  R
%:                                         ===================\Pimpnat
%:  P|-f^*(Q⊃R)             P|-f^*(Q⊃R)    f^*(Q⊃R)|-f^*Q⊃f^*R
%:  ===========;\Pimpnat    -----------------------------------;
%:  P|-f^*Q⊃f^*R         :=              P|-f^*Q⊃f^*R
%:
%:  ^;Pimpnat1                           ^;Pimpnat2
%:
$$\ded{;Pimp1}    \quad := \quad \ded{;Pimp2}$$
$$\ded{;Pimpnat1} \quad := \quad \ded{;Pimpnat2}$$

\msk
\par Now make $R := Î_f(P∧f^*Q)$.
\par We get the tree at the right, below,
\par that becomes our definition of $\Frob$
\par as a derived rule (involving $\Pimp$).
%:             
%:                                        f  P  Q		     
%:             			        ===========	     
%:             			        Î_f(P∧f^*Q)	     
%:				  ------------------------\id   
%:       f  P  Q		  Î_f(P∧f^*Q)|-Î_f(P∧f^*Q)	     
%:  ===================\Frob	  ========================\Pimp'
%:  Î_fP∧Q|-Î_f(P∧f^*Q)       :=     Î_fP∧Q|-Î_f(P∧f^*Q)
%:
%:    ^frob-from-pimp-3              ^frob-from-pimp-4
%:
$$\ded{frob-from-pimp-3} \quad := \quad \ded{frob-from-pimp-4}$$



% --------------------
% «pimp-implies-frob-2»  (to ".pimp-implies-frob-2")
% (s "Pimp implies Frob (2)" "pimp-implies-frob-2")
\myslide {Pimp implies Frob (2)} {pimp-implies-frob-2}

\msk

% (find-angg ".emacs.papers" "lawvere")
% (find-lawvere70page  6 "Substitutivity of equality")
% {\sl Remark:} $\Pimp \funto \Frob$ is $(2)\funto(1)$ in p.6 of [Lawvere70].

\par Here is the construction as a diagram.
\par We start with $R:=Î_f(P∧f^*Q)$ and with the arrow marked `$(\id)$',
\par and we build the arrow $Î_fP∧Q \vdash R = Î_f(P∧f^*Q)$, that is `$\Frob$'.

%D diagram frob-and-pimp
%D 2Dx          100       +40    +35     +40
%D 2D  100    Î_fP∧Q <--------| Î_fP              # 0      1
%D 2D           ^ |  \           ^   \            # 8 2      3
%D 2D           | |   \          |    \           #
%D 2D           | v    v         |     v          # 4      5 9
%D 2D  +25 Î_f(P∧f^*Q) -> R |----------> Q⊃R      #   6      7
%D 2D            ^        -      |        -
%D 2D            |        |      |        |
%D 2D            -        |      -        v
%D 2D  +35     P∧f^*Q <---|----| P --> f^*(Q⊃R)
%D 2D                \    |        \     ^ -
%D 2D                 \   |         \    | |
%D 2D                  v  v          v   | v
%D 2D  +25              f^*R |-------> f^*Q⊃f^*R
%D 2D
%D ((  Î_fP∧Q       Î_fP              
%D             R          Q⊃R      
%D     P∧f^*Q         P              
%D            f^*R      f^*Q⊃f^*R
%D
%D    Î_f(P∧f^*Q)
%D                      f^*(Q⊃R)
%D    @ 0 @ 1 <-|
%D    @ 0 @ 8 -> sl_ .plabel= l \Frob  @ 0 @ 8 <- sl^ .plabel= r \nat
%D    @ 0 @ 2  -> @ 1 @ 3  ->
%D    @ 8 @ 2  -> .plabel= b (\id)   @ 2 @ 3 |->
%D    @ 8 @ 4 <-| @ 1 @ 5 <-|
%D    @ 2 @ 6 |-> @ 3 @ 9 |->
%D    @ 4 @ 5 <-| @ 5 @ 9  ->
%D    @ 4 @ 6  -> @ 5 @ 7  ->
%D    @ 9 @ 7 -> sl_ .plabel= l \nat @ 9 @ 7 <- sl^ .plabel= r \Pimp
%D    @ 6 @ 7 |->
%D
%D    @ 0 @ 3 harrownodes nil 20 4 <- sl^ .plabel= a ⊃^\flat
%D    @ 0 @ 3 harrownodes 4 20 nil -> sl_ .plabel= b ⊃^\sharp
%D
%D    @ 0 @ 6 varrownodes 6 20 nil <- sl_ .plabel= l Î^\flat
%D    @ 0 @ 6 varrownodes 9 20 nil -> sl^ .plabel= r Î^\sharp
%D
%D    @ 1 @ 7 varrownodes nil 20 4 <- sl_ .plabel= l Î^\flat
%D    @ 1 @ 7 varrownodes nil 20 2 -> sl^ .plabel= r Î^\sharp
%D
%D    @ 4 @ 7 harrownodes nil 20 4 <- sl^ .plabel= a ⊃^\flat
%D    @ 4 @ 7 harrownodes 4 20 nil -> sl_ .plabel= b ⊃^\sharp
%D ))
%D enddiagram
%D
$$\diag{frob-and-pimp}$$



% --------------------
% «pimp-implies-frob-3»  (to ".pimp-implies-frob-3")
% (s "Pimp implies Frob (3)" "pimp-implies-frob-3")
\myslide {Pimp implies Frob (3)} {pimp-implies-frob-3}

In the notation of [Lawvere70] (p.6), this is stated and proved as:

\bsk

{\sc Definition-Theorem.} {\sl In any eed, the following are equivalent:}

\ssk

(1) Frobenius Reciprocity holds,

(2) For any $f:X \to Y$, $\aa$, $\psi$ in $P(Y)$
    \quad
    $f·(\aa \funto \psi) \diagxyto/->/<200>^\approx f·\aa \funto f·\psi$

(3) For any $f:X \to Y$, $\psi \in P(X)$, $\aa \in P(Y)$
    \quad
    $((f·\aa) ∧ \phi)Æf \diagxyto/->/<200>^\approx \aa∧(\phiÆf)$

\msk

{\sc Proof.} The second conditions means that the diagram of functors
(**) commutes up to natural equivalence. Hence replacing each functor
by its left adjoint also yields a diagram which commutes up to
canonical natural equivalence: (*). But the latter is just the third
condition. Conversely if the third condition holds, we can replace the
functors in the latter diagram by their right adjoints, yielding the
second condition.

%
%D diagram frob-and-pimp-lawvere70
%D 2Dx          100       +40    +35     +40
%D 2D  100    Î_fP∧Q <--------| Î_fP              # 0      1
%D 2D           ^ |  \           ^   \            # 8 2      3
%D 2D           | |   \          |    \           #
%D 2D           | v    v         |     v          # 4      5 9
%D 2D  +25 Î_f(P∧f^*Q) -> R |----------> Q⊃R      #   6      7
%D 2D            ^        -      |        -
%D 2D            |        |      |        |
%D 2D            -        |      -        v
%D 2D  +35     P∧f^*Q <---|----| P --> f^*(Q⊃R)
%D 2D                \    |        \     ^ -
%D 2D                 \   |         \    | |
%D 2D                  v  v          v   | v
%D 2D  +25              f^*R |-------> f^*Q⊃f^*R
%D 2D
%D ((  Î_fP∧Q       Î_fP              
%D             R          Q⊃R      
%D     P∧f^*Q         P              
%D            f^*R      f^*Q⊃f^*R
%D
%D    Î_f(P∧f^*Q)
%D                      f^*(Q⊃R)
%D
%D            R   .tex=          \psi
%D          Q⊃R   .tex=     \aa=>\psi
%D      f^*(Q⊃R)  .tex=  f·(\aa=>\psi)
%D         f^*R   .tex=        f·\psi
%D    f^*Q⊃f^*R   .tex= f·\aa=>f·\psi
%D        P       .tex=          \phi
%D        P∧f^*Q  .tex=  (f·\aa)∧\phi
%D    Î_f(P∧f^*Q) .tex= ((f·\aa)∧\phi)Æf
%D     Î_fP       .tex=          \phiÆf
%D     Î_fP∧Q     .tex=      \aa∧\phiÆf
%D
%D    @ 0 @ 1 <-|
%D    @ 0 @ 8 -> sl_ .plabel= l \Frob  @ 0 @ 8 <- sl^ .plabel= r \nat
%D    @ 0 @ 2  -> @ 1 @ 3  ->
%D    @ 8 @ 2  -> .plabel= b (\id)   @ 2 @ 3 |->
%D    @ 8 @ 4 <-| @ 1 @ 5 <-|
%D    @ 2 @ 6 |-> @ 3 @ 9 |->
%D    @ 4 @ 5 <-| @ 5 @ 9  ->
%D    @ 4 @ 6  -> @ 5 @ 7  ->
%D    @ 9 @ 7 -> sl_ .plabel= l \nat @ 9 @ 7 <- sl^ .plabel= r \Pimp
%D    @ 6 @ 7 |->
%D
%D    @ 0 @ 3 harrownodes nil 20 4 <- sl^ .plabel= a =>^\flat
%D    @ 0 @ 3 harrownodes 4 20 nil -> sl_ .plabel= b =>^\sharp
%D
%D    @ 0 @ 6 varrownodes 6 20 nil <- sl_ .plabel= l Æ^\flat
%D    @ 0 @ 6 varrownodes 9 20 nil -> sl^ .plabel= r Æ^\sharp
%D
%D    @ 1 @ 7 varrownodes nil 20 4 <- sl_ .plabel= l Æ^\flat
%D    @ 1 @ 7 varrownodes nil 20 2 -> sl^ .plabel= r Æ^\sharp
%D
%D    @ 4 @ 7 harrownodes nil 20 4 <- sl^ .plabel= a =>^\flat
%D    @ 4 @ 7 harrownodes 4 20 nil -> sl_ .plabel= b =>^\sharp
%D ))
%D enddiagram
%D
%D diagram frob-and-pimp-lawvere70-squares
%D 2Dx     100 +35 +25
%D 2D  100 A0  A1
%D 2D  +15         (*)
%D 2D  +15 A2  A3
%D 2D
%D 2D  +20 B0  B1
%D 2D  +15         (**)
%D 2D  +15 B2  B3
%D 2D
%D (( A0 .tex= P(Y) A1 .tex= P(Y)
%D    A2 .tex= P(X) A3 .tex= P(X)
%D    A0 A1 <- .plabel= a \aa∧(\;)
%D    A0 A2 <- .plabel= l (\;)Æf
%D    A1 A3 <- .plabel= r (\;)Æf
%D    A2 A3 <- .plabel= a (f·\aa)∧(\;)
%D    (*) place
%D ))
%D (( B0 x+= 8
%D    B1 x+= 8
%D    B2 x+= 8
%D    B3 x+= 8
%D    (**) x+= 8
%D ))
%D (( B0 .tex= P(Y) B1 .tex= P(Y)
%D    B2 .tex= P(X) B3 .tex= P(X)
%D    B0 B1 -> .plabel= a \aa=>(\;)
%D    B0 B2 -> .plabel= l f·(\;)
%D    B1 B3 -> .plabel= r f·(\;)
%D    B2 B3 -> .plabel= a (f·\aa)=>(\;)
%D    (**) place
%D ))
%D enddiagram
%D
$$\diag{frob-and-pimp-lawvere70}
  % \quad
  \hskip -7pt
  \diag{frob-and-pimp-lawvere70-squares}
$$

\bsk
\bsk
\par Note that he only draws the squares (*) and (**),
\par with the categories and the functors;
\par the cube with objects, morphisms, and `$\mto$'s for functors
\par is a kind of ``internal view'' of the categories and functors involved ---
\par and such ``internal views'' are only very rarely drawn
\par in the (standard?) Category Theory literature.



% --------------------
% «BCCL-implies-BCCR»  (to ".BCCL-implies-BCCR")
% (s "BCCL implies BCCR" "BCCL-implies-BCCR")
\myslide {BCCL implies BCCR} {BCCL-implies-BCCR}

\par Also, $\BCCL$ implies $\BCCR$ (and vice-versa),
\par by an argument similar to the previous one.
\par Here are the diagrams; we won't get into the details.

%D diagram BCCL-implies-BCCR-0
%D 2Dx     100 +25
%D 2D  100 X   Y
%D 2D
%D 2D  +25 Z   W
%D 2D
%D (( X Y -> .plabel= a a
%D    X Z -> .plabel= l l
%D    Y W -> .plabel= r r
%D    Z W -> .plabel= b b
%D    X relplace 7 7 \pbsymbol{7}
%D ))
%D enddiagram
%D

%D diagram BCCL-implies-BCCR
%D 2Dx       100       +40   +35     +40
%D 2D  100           l^*Q |------> ý_al^*Q    #   0   1
%D 2D               ^  ^         ^   | ^      # 2   3 8
%D 2D              /   |        /BCCR| |      #
%D 2D             /    |       /     v |      # 9 4   5
%D 2D  +25   a^*P <--------| P --> r^*ý_bQ    # 6   7
%D 2D         -        |     -        ^
%D 2D         |        |     |        |
%D 2D         v        -     |        -
%D 2D  +35 Î_la^*P --> Q |---|----> ý_bQ
%D 2D        | ^     ^       |     ^
%D 2D     nat| |BCCL/        |    /
%D 2D        v |   /         v   /
%D 2D  +25 b^*Î_rP <------| Î_rP
%D 2D
%D ((       l^*Q    ý_al^*Q
%D     a^*P       P 
%D            Q      ý_bQ
%D    b^*Î_rP   Î_rP
%D
%D                 r^*ý_bQ
%D    Î_la^*P
%D    @ 4 @ 0 |-> @ 0 @ 1 |->
%D    @ 4 @ 5 |-> @ 5 @ 8 |->
%D    @ 3 @ 2 |-> @ 2 @ 9 |->
%D    @ 3 @ 7 |-> @ 7 @ 6 |->
%D    @ 2 @ 0  -> @ 3 @ 1  -> .plabel= l (\id) 
%D    @ 6 @ 4  -> @ 7 @ 5  ->
%D    @ 3 @ 8  -> @ 9 @ 4  ->
%D    @ 9 @ 6 -> sl_ .plabel= l \nat       @ 9 @ 6 <- sl^ .PLABEL= ^(0.34) \BCCL
%D    @ 1 @ 8 -> sl_ .PLABEL= _(0.65) \BCCR  @ 1 @ 8 <- sl^ .plabel= r \nat
%D
%D    @ 0 @ 3 harrownodes 4 20 nil -> sl^ .plabel= a ý^\sharp
%D    @ 0 @ 3 harrownodes nil 20 4 <- sl_ .plabel= b ý^\flat
%D
%D    @ 0 @ 6 varrownodes nil 20 6 -> sl_ .plabel= l Î^\flat
%D    @ 0 @ 6 varrownodes nil 20 9 <- sl^ .plabel= r Î^\sharp
%D
%D    @ 1 @ 7 varrownodes 4 20 nil -> sl_ .plabel= l Î^\flat
%D    @ 1 @ 7 varrownodes 2 20 nil <- sl^ .plabel= r Î^\sharp
%D
%D    @ 4 @ 7 harrownodes 4 20 nil -> sl^ .plabel= a ý^\sharp
%D    @ 4 @ 7 harrownodes nil 20 4 <- sl_ .plabel= b ý^\flat
%D ))
%D enddiagram
%D
$$\diag{BCCL-implies-BCCR-0}
  \qquad
  \diag{BCCL-implies-BCCR}
$$




% --------------------
% «equality-lemmas»  (to ".equality-lemmas")
% (s "Lemmas about equality" "equality-lemmas")
\myslide {Lemmas about equality} {equality-lemmas}

%:***

%D diagram frob-lemma-0
%D 2Dx     100 +45 +45 +20
%D 2D  100 E0      E1
%D 2D  +20 E2  E3  E4
%D 2D  +20 E5      E6  E7
%D 2D  +15 B0      B1  B2
%D 2D
%D (( E0 .tex= P                             E1 .tex= Æ_fP
%D    E2 .tex= P∧f^*Q  E3 .tex= Æ_f(P∧f^*Q)  E4 .tex= Æ_fP∧Q
%D    E5 .tex= f^*Q                          E6 .tex= Q      E7 .tex= E7
%D    B0 .tex= A                             B1 .tex= B      B2 .tex= B2
%D    E0 E1 |->
%D    E2 E0  -> E3 E1  -> E4 E1 ->
%D    E2 E3 |-> E3 E4 <->
%D    E2 E5  -> E3 E6  -> E4 E6 ->
%D    E5 E6 <-|                     # E6 E7 <-|
%D    B0 B1  -> .plabel= a f        # B1 B2 -> .plabel= a g
%D                                  # B0 B2 -> sl__ .plabel= b \id
%D ))
%D enddiagram

%D diagram frob-lemma-1
%D 2Dx     100 +35 +40 +20
%D 2D  100 E0      E1
%D 2D  +20 E2  E3  E4
%D 2D  +20 E5      E6  E7
%D 2D  +15 B0      B1  B2
%D 2D
%D (( E0 .tex= P                             E1 .tex= Æ_fP
%D    E2 .tex= P∧R     E3 .tex= Æ_f(P∧R)     E4 .tex= Æ_fP∧R
%D    E5 .tex= R                             E6 .tex= g^*R   E7 .tex= R
%D    B0 .tex= A                             B1 .tex= B      B2 .tex= A
%D    E0 E1 |->
%D    E2 E0  -> E3 E1  -> E4 E1 ->
%D    E2 E3 |-> E3 E4 <->
%D    E2 E5  -> E3 E6  -> E4 E6 ->
%D    E5 E6 <-|                     E6 E7 <-|
%D    B0 B1  -> .plabel= a f        B1 B2 -> .plabel= a g
%D                                  B0 B2 -> sl__ .plabel= b \id
%D ))
%D enddiagram

%D diagram frob-lemma-2
%D 2Dx     100 +45 +40 +20
%D 2D  100 E0      E1
%D 2D  +20 E2  E3  E4
%D 2D  +20 E5      E6  E7
%D 2D  +15 B0      B1  B2
%D 2D
%D (( E0 .tex= §                             E1 .tex= Æ_f§
%D    E2 .tex= f^*Q    E3 .tex= Æ_ff^*Q      E4 .tex= Æ_f§∧Q
%D    E5 .tex= f^*Q                          E6 .tex= Q      E7 .tex= E7
%D    B0 .tex= A                             B1 .tex= B      B2 .tex= B2
%D    E0 E1 |->
%D    E2 E0  -> E3 E1  -> E4 E1 ->
%D    E2 E3 |-> E3 E4 <->
%D    E2 E5  -> E3 E6  -> E4 E6 ->
%D    E5 E6 <-|                     # E6 E7 <-|
%D    B0 B1  -> .plabel= a f        # B1 B2 -> .plabel= a g
%D                                  # B0 B2 -> sl__ .plabel= b \id
%D ))
%D enddiagram

%D diagram frob-lemma-3
%D 2Dx     100 +35 +40 +20
%D 2D  100 E0      E1
%D 2D  +20 E2  E3  E4
%D 2D  +20 E5      E6  E7
%D 2D  +15 B0      B1  B2
%D 2D
%D (( E0 .tex= §                             E1 .tex= Æ_f§
%D    E2 .tex= R       E3 .tex= Æ_fR         E4 .tex= Æ_f§∧R
%D    E5 .tex= R                             E6 .tex= g^*R   E7 .tex= R
%D    B0 .tex= A                             B1 .tex= B      B2 .tex= A
%D    E0 E1 |->
%D    E2 E0  -> E3 E1  -> E4 E1 ->
%D    E2 E3 |-> E3 E4 <->
%D    E2 E5  -> E3 E6  -> E4 E6 ->
%D    E5 E6 <-|                     E6 E7 <-|
%D    B0 B1  -> .plabel= a f        B1 B2 -> .plabel= a g
%D                                  B0 B2 -> sl__ .plabel= b \id
%D ))
%D enddiagram

%D diagram frob-lemma-5
%D 2Dx     100 +30 +45 +30
%D 2D  100 E0      E1
%D 2D  +20 E2  E3  E4
%D 2D  +20 E5      E6  E7
%D 2D  +15 B0      B1  B2
%D 2D
%D (( E0 .tex= §                             E1 .tex= Æ_f§
%D    E2 .tex= f^*Q    E3 .tex= Æ_ff^*Q      E4 .tex= Æ_f§∧g^*f^*Q
%D    E5 .tex= f^*Q                          E6 .tex= g^*f^*Q E7 .tex= f^*Q
%D    B0 .tex= A                             B1 .tex= B       B2 .tex= A
%D    E0 E1 |->
%D    E2 E0  -> E3 E1  -> E4 E1 ->
%D    E2 E3 |-> E3 E4 <->
%D    E2 E5  -> E3 E6  -> E4 E6 ->
%D    E5 E6 <-|                     E6 E7 <-|
%D    B0 B1  -> .plabel= a f        B1 B2 -> .plabel= a g
%D                                  B0 B2 -> sl__ .plabel= b \id
%D ))
%D enddiagram

%D diagram frob-lemmas
%D 2Dx     100     +125
%D 2D  100 Frob0   Frob1
%D 2D  +80 Frob2   Frob3
%D 2D  +80         Frob5
%D 2D
%D (( Frob0 .tex= \diag{frob-lemma-0} BOX
%D    Frob1 .tex= \diag{frob-lemma-1} BOX
%D    Frob2 .tex= \diag{frob-lemma-2} BOX
%D    Frob3 .tex= \diag{frob-lemma-3} BOX
%D    Frob5 .tex= \diag{frob-lemma-5} BOX
%D    
%D    Frob0 x+= 0 y+= -3.5 place   Frob1 x+= 0 place
%D    Frob2 x+= 3 y+= -3.5 place   Frob3 x+= 3 place
%D                                 Frob5 x+= 8 place
%D
%D ))
%D enddiagram
%D
$$\diag{frob-lemmas}$$

%D diagram frob-lemmas-substs
%D 2Dx     100      +65
%D 2D  100 Frob0    Frob1
%D 2D
%D 2D  +35 Frob2    Frob3
%D 2D
%D 2D  +35          Frob5
%D 2D
%D (( Frob0 .tex= Ð{Frob0}
%D    Frob1 .tex= Ð{Frob1}
%D    Frob2 .tex= Ð{Frob2}
%D    Frob3 .tex= Ð{Frob3}
%D    Frob5 .tex= Ð{Frob5}
%D    Frob0 Frob1 -> .plabel= b \flbox{Q}{g^*R}{f^*g^*R}{R}
%D    Frob0 Frob2 -> .plabel= l \flbox{P}{§}{§∧f^*Q}{f^*Q}
%D    Frob1 Frob3 -> .plabel= r \flbox{P}{§}{§∧f^*Q}{f^*Q}
%D    Frob2 Frob3 -> .plabel= b \flbox{Q}{g^*R}{f^*g^*R}{R}
%D    Frob3 Frob5 -> .plabel= r \flbox{R}{f^*Q}{f^*g^*f^*Q}{f^*Q}
%D ))
%D enddiagram
%D
$$\def\flbox#1#2#3#4{\begin{array}{c} #1 := #2 \\ #3 :\cong #4 \end{array}}
  \diag{frob-lemmas-substs}
$$

%:**{∧}*





% --------------------
% «lambda-calc-in-a-hyp»  (to ".lambda-calc-in-a-hyp")
% (s "$ð$-calculus in a hyperdoctrine" "lambda-calc-in-a-hyp")
\myslide {$ð$-calculus in a hyperdoctrine} {lambda-calc-in-a-hyp}

\par As the base category $\bbB$ of a hyperdoctrine is a CCC
\par we can interpret $ð$-calculus in it.
\par In diagrams:

%D diagram CCC-HL1
%D 2Dx     100 +30 +30 +25 +30 +30
%D 2D  100     P0      T0  E0  E1
%D 2D
%D 2D  +30 P1  P2  P3  T1  E2  E3
%D 2D
%D (( P0 .tex= A   P1 .tex= B P2 .tex= B×C P3 .tex= C
%D    P0 P1 -> .plabel= a f
%D    P0 P2 -> .plabel= m \ang{f,g}
%D    P0 P3 -> .plabel= a g
%D    P1 P2 <- .plabel= b \pi
%D    P2 P3 -> .plabel= b \pi'
%D ))
%D (( T0 .tex= A T1 .tex= 1 -> .plabel= l !
%D ))
%D (( E0 .tex= A×B E1 .tex= A
%D    E2 .tex= C E3 .tex= B{->}C
%D    E0 E1 <-|
%D    E0 E2 -> .PLABEL= _(0.43) \uncur"g
%D    E0 E2 -> .PLABEL= _(0.57) f
%D    E1 E3 -> .PLABEL= ^(0.43) g
%D    E1 E3 -> .PLABEL= ^(0.57) \cur"f
%D    E0 E3 harrownodes nil 20 nil <-| sl^
%D    E0 E3 harrownodes nil 20 nil |-> sl_
%D    E2 E3 |->
%D ))
%D enddiagram
%D
$$\diag{CCC-HL1}$$

%D diagram CCC-HL2
%D 2Dx     100 +30 +30 +25 +30 +30    +35 
%D 2D  100     P0      T0  E0  E1     E0' 
%D 2D			       	          
%D 2D  +30 P1  P2  P3  T1  E2  E3     E2' 
%D 2D
%D (( P0 .tex= A   P1 .tex= B P2 .tex= B{×}C P3 .tex= C
%D    P0 P1 -> .plabel= a a|-b
%D    P0 P2 -> .plabel= m a|-\ang{b,c}
%D    P0 P3 -> .plabel= a a|-c
%D    P1 P2 <- .plabel= b p|-b
%D    P2 P3 -> .plabel= b p|-b'
%D ))
%D (( T0 .tex= A T1 .tex= 1 -> .plabel= l a|-*
%D ))
% %D (( E0' .tex= (B{->}C){×}B  E2' .tex= C
% %D    E0' E2' -> .plabel= c \ev_{BC}
% %D ))
%D (( E0 .tex= A×B E1 .tex= A
%D    E2 .tex= C E3 .tex= B{->}C
%D    E0 E1 <-|
%D    E0 E2 -> .PLABEL= _(0.43) a,b|-fb
%D    E0 E2 -> .PLABEL= _(0.57) a,b|-c
%D    E1 E3 -> .PLABEL= ^(0.43) a|-f
%D    E1 E3 -> .PLABEL= ^(0.57) a|-ðb¨B.c
%D    E0 E3 harrownodes nil 20 nil <-| sl^
%D    E0 E3 harrownodes nil 20 nil |-> sl_
%D    E2 E3 |->
%D ))
%D enddiagram
%D
$$\diag{CCC-HL2}$$

In a sequent-calculus-like form:
%:
%:   B  C        a|-b  a|-c           B  C    B  C
%:   ----×_0    ------------\ang{,}   ----   -----'
%:    B×C       a|-\ang{b,c}          p|-p   p|-'p
%:
%:   ^HL-x0     ^HL-ang               ^HL-pi  ^HL-pi'
%:
%:                A
%:   -1         ----!
%:   1          a|-*
%:
%:   ^HL-1      ^HL-!
%:
%:   B  C         B  C        a,b|-c
%:   ----{->}_0   ----\app    ---------\cur
%:   B{->}C       b,f|-fb     a|-ðb¨B.c
%:
%:   ^HL-->0      ^HL-ev      ^HL-cur
%:
$$\begin{array}{cccc}
  \ded{HL-x0}  & \ded{HL-ang} & \ded{HL-pi} & \ded{HL-pi'} \\ \\
  \ded{HL-1}   & \ded{HL-!}                                \\ \\
  \ded{HL-->0} & \ded{HL-ev}  & \ded{HL-cur} \\
  \end{array}
$$

% (find-LATEXfile "proof.sty" "\\def\\DeduceSym")
\makeatletter
\def\DeduceSym{\vtop{\baselineskip4\p@ \lineskiplimit\z@
    \vbox{\hbox{.}\hbox{.}\hbox{.}}\hbox{.}}}
\def\DeduceSym{\vtop{\baselineskip4\p@ \lineskiplimit\z@
    \vbox{\hbox{.}\hbox{.}}\hbox{.}}}
\makeatother

In natural deduction form (in downcased notation):
%:
%:   a  a
%:   :  :
%:   b  c          b,c    b,c
%:   ----\ang{,}   ---   ---'
%:   b,c            b      c
%:
%:   ^HLD-1         ^HLD-2 ^HLD-3
%:
%:   a
%:   -!
%:   *
%:
%:   ^HLD-4
%:
%:   a     a	         a  [b]^1    
%:   :     :	         ::::        
%:   b   b|->c	          c         
%:   ---------\app	-----ð;1    
%:      c		b|->c       
%:                  
%:      ^HLD-5          ^HLD-6      
%:
$$\begin{array}{cccc}
  \ded{HLD-1} & \ded{HLD-2} & \ded{HLD-3} \\ \\
  \ded{HLD-4}                             \\ \\
  \ded{HLD-5} & \ded{HLD-6}               \\
  \end{array}
$$



% --------------------
% «prop-calc-in-a-hyp»  (to ".prop-calc-in-a-hyp")
% (s "Propositional calculus in a hyperdoctrine" "prop-calc-in-a-hyp")
\myslide {Propositional calculus in a hyperdoctrine} {prop-calc-in-a-hyp}

\par As each fiber $\bbE_B$ of a hyperdoctrine is a CCC
\par we can interpret propositional calculus in it.
\par In diagrams:

%D diagram CCC-HP1
%D 2Dx     100 +30 +30 +25 +30 +30
%D 2D  100     P0      T0  E0  E1
%D 2D
%D 2D  +30 P1  P2  P3  T1  E2  E3
%D 2D
%D (( P0 .tex= P   P1 .tex= Q P2 .tex= Q∧R P3 .tex= R
%D    P0 P1 ->  # .plabel= a f
%D    P0 P2 ->  # .plabel= m \ang{f,g}
%D    P0 P3 ->  # .plabel= a g
%D    P1 P2 <-  # .plabel= b \pi
%D    P2 P3 ->  # .plabel= b \pi'
%D ))
%D (( T0 .tex= P T1 .tex= §_B ->   # .plabel= l !
%D ))
%D (( E0 .tex= P∧Q E1 .tex= P
%D    E2 .tex= R E3 .tex= Q⊃R
%D    E0 E1 <-|
%D    E0 E2 ->  # .PLABEL= _(0.43) \uncur"g
%D    E0 E2 ->  # .PLABEL= _(0.57) f
%D    E1 E3 ->  # .PLABEL= ^(0.43) g
%D    E1 E3 ->  # .PLABEL= ^(0.57) \cur"f
%D    E0 E3 harrownodes nil 20 nil <-| sl^
%D    E0 E3 harrownodes nil 20 nil |-> sl_
%D    E2 E3 |->
%D ))
%D enddiagram
%D
$$\diag{CCC-HP1}$$

%D diagram CCC-HP2
%D 2Dx     100 +30 +30 +25 +30 +30    +35 
%D 2D  100     P0      T0  E0  E1     E0' 
%D 2D			       	          
%D 2D  +30 P1  P2  P3  T1  E2  E3     E2' 
%D 2D
%D (( P0 .tex= A   P1 .tex= B P2 .tex= B{×}C P3 .tex= C
%D    P0 P1 -> .plabel= a a|-b
%D    P0 P2 -> .plabel= m a|-\ang{b,c}
%D    P0 P3 -> .plabel= a a|-c
%D    P1 P2 <- .plabel= b p|-b
%D    P2 P3 -> .plabel= b p|-b'
%D ))
%D (( T0 .tex= A T1 .tex= 1 -> .plabel= l a|-*
%D ))
% %D (( E0' .tex= (B{->}C){×}B  E2' .tex= C
% %D    E0' E2' -> .plabel= c \ev_{BC}
% %D ))
%D (( E0 .tex= A×B E1 .tex= A
%D    E2 .tex= C E3 .tex= B{->}C
%D    E0 E1 <-|
%D    E0 E2 -> .PLABEL= _(0.43) a,b|-fb
%D    E0 E2 -> .PLABEL= _(0.57) a,b|-c
%D    E1 E3 -> .PLABEL= ^(0.43) a|-f
%D    E1 E3 -> .PLABEL= ^(0.57) a|-ðb¨B.c
%D    E0 E3 harrownodes nil 20 nil <-| sl^
%D    E0 E3 harrownodes nil 20 nil |-> sl_
%D    E2 E3 |->
%D ))
%D enddiagram
%D
% $$\diag{CCC-HP2}$$

In a sequent-calculus-like form:
%:
%:    Q  R       P|-Q  P|-R         Q  R       Q   R
%:    ----∧      ----------∧I       ----∧E_1   -----∧E_2
%:     Q∧R         P|-Q∧R           Q∧R|-Q     Q∧R|-R
%:
%:     ^HP-x0      ^HP-ang          ^HP-pi     ^HP-pi'
%:
%:                P
%:   -1         ----§I
%:   §_B        P|-§_B
%:
%:   ^HP-1      ^HP-!
%:
%:   Q  R         Q  R          P,Q|-R
%:   ----⊃        ----\ev       ---------⊃I
%:   Q⊃R         (Q⊃R)∧Q|-R     P|-Q⊃R
%:
%:   ^HP-->0      ^HP-ev        ^HP-cur
%:
$$\begin{array}{cccc}
  \ded{HP-x0}  & \ded{HP-ang} & \ded{HP-pi} & \ded{HP-pi'} \\ \\
  \ded{HP-1}   & \ded{HP-!}                                \\ \\
  \ded{HP-->0} & \ded{HP-ev}  & \ded{HP-cur} \\
  \end{array}
$$

% (find-LATEXfile "proof.sty" "\\def\\DeduceSym")
\makeatletter
\def\DeduceSym{\vtop{\baselineskip4\p@ \lineskiplimit\z@
    \vbox{\hbox{.}\hbox{.}\hbox{.}}\hbox{.}}}
\def\DeduceSym{\vtop{\baselineskip4\p@ \lineskiplimit\z@
    \vbox{\hbox{.}\hbox{.}}\hbox{.}}}
\makeatother

In natural deduction form (in downcased notation):
%:
%:   P  P
%:   :  :
%:   Q  R          Q∧R      Q∧R
%:   ----∧I        ---∧E_1  ---∧E_2
%:   Q∧R            Q        R
%:
%:   ^HPD-1         ^HPD-2   ^HPD-3
%:
%:   P
%:   -§I
%:   §_B
%:
%:   ^HPD-4
%:
%:   P     P	         P  [Q]^1    
%:   :     :	         ::::        
%:   Q   Q⊃R	          R         
%:   ---------⊃E	-----⊃I;1    
%:      R		Q⊃R       
%:                  
%:      ^HPD-5          ^HPD-6      
%:
$$\begin{array}{cccc}
  \ded{HPD-1} & \ded{HPD-2} & \ded{HPD-3} \\ \\
  \ded{HPD-4}                             \\ \\
  \ded{HPD-5} & \ded{HPD-6}               \\
  \end{array}
$$





% --------------------
% «fa-I-in-a-hyp»  (to ".fa-I-in-a-hyp")
% (s "Interpreting `$ýI$' in a hyperdoctrine" "fa-I-in-a-hyp")
\myslide {Interpreting `$ýI$' in a hyperdoctrine} {fa-I-in-a-hyp}

%D diagram fa-I-std
%D 2Dx      100      +25
%D 2D  100 ^*Q <--| Q
%D 2D       |        |
%D 2D       |  |->   |
%D 2D       v        v
%D 2D  +25  R |--> ý_R
%D 2D
%D 2D  +15 A×B ----> A
%D 2D
%D (( ^*Q Q
%D    R ý_R
%D    @ 0 @ 1 <-|
%D    @ 0 @ 2 -> @ 1 @ 3 ->
%D    @ 2 @ 3 |->
%D    @ 0 @ 3 harrownodes nil 20 nil |->
%D    A×B .tex= A{×}B A -> .plabel= a \pi
%D ))
%D enddiagram
%D
% $$\diag{fa-I-std}$$

%D diagram fa-I-dnc
%D 2Dx      100      +30
%D 2D  100 ^*Q <--| Q
%D 2D       |        |
%D 2D       |  |->   |
%D 2D       v        v
%D 2D  +25  R |--> ý_R
%D 2D
%D 2D  +15 A×B ----> A
%D 2D
%D (( ^*Q .tex= Qa     Q .tex= Qa
%D       R .tex= Rab ý_R .tex= ýb.Rab
%D    @ 0 @ 1 <=
%D    @ 0 @ 2 |-> @ 1 @ 3 |->
%D    @ 2 @ 3 =>
%D    @ 0 @ 3 harrownodes nil 20 nil |->
%D    A×B .tex= a,b A .tex= a |-> .plabel= a \pi
%D ))
%D enddiagram
%D
% $$\diag{fa-I-dnc}$$

%:  
%:                      ^*Q|-R      
%:                      -------ýI  
%:                      Q|-ý_R    
%:                                      
%:                      ^fa-I-std-seq                
%:                                      
%:     Qa                         
%:     :                         
%:    Rab            a,b;Qa|-Rab
%:  ------ýI         ----------ýI 
%:  ýb.Rab           a;Qa|-ýb.Rab       
%:                                        
%:  ^fa-I-dnc-dn     ^fa-I-dnc-seq
%:  
%:  
% $$\ded{fa-I-std-seq}$$
% $$\ded{fa-I-dnc-dn} \qquad \ded{fa-I-dnc-seq}$$

%D diagram fa-I-all
%D 2Dx       100      +55     +60
%D 2D  100          stq-seq   std
%D 2D
%D 2D  +60 dnc-dn   dnc-seq   dnc
%D 2D
%D (( stq-seq .tex= \ded{fa-I-std-seq} y+= 5 place
%D    dnc-dn  .tex= \ded{fa-I-dnc-dn}  y+= 5 place
%D    dnc-seq .tex= \ded{fa-I-dnc-seq} y+= 5 place
%D    std    .tex= \diag{fa-I-std} BOX       place
%D    dnc    .tex= \diag{fa-I-dnc} BOX x+= 2 place
%D
%D ))
%D enddiagram
%D
$$\diag{fa-I-all}$$



% --------------------
% «fa-E-in-a-hyp»  (to ".fa-E-in-a-hyp")
% (s "Interpreting `$ýE$' in a hyperdoctrine" "fa-E-in-a-hyp")
\myslide {Interpreting `$ýE$' in a hyperdoctrine} {fa-E-in-a-hyp}

%D diagram fa-E-std
%D 2Dx     100     +35     +30
%D 2D  100 Q0                   	
%D 2D	    ^                   	
%D 2D	    |                   	
%D 2D	    v                   	
%D 2D  +25 Q1 <--| Q2 <--| Q3  
%D 2D	    |       |       |  
%D 2D	    |  <-|  |  <-|  |  
%D 2D	    v       v       v  
%D 2D  +25 R1 <--| R2 |--> R3
%D 2D	                             	
%D 2D	   <id,f>      \pi      
%D 2D  +15 A |--> A×B |--> A{}  
%D 2D	     |-----id---->    
%D 2D
%D (( Q0 .tex= Q
%D    Q1 .tex= \ang{\id,f}^*^*Q   Q2 .tex= ^*Q   Q3 .tex= Q  
%D    R1 .tex= \ang{\id,f}^*R      R2 .tex= R      R3 .tex= ý_R
%D    Q0 Q1 <->
%D    Q1 Q2 <-| Q2 Q3 <-|
%D    Q1 R1 ->  Q2 R2 ->  Q3 R3 ->
%D    R1 R2 <-| R2 R3 |->
%D    Q1 R2 harrownodes nil 20 nil <-|
%D    Q2 R3 harrownodes nil 20 nil <-|
%D ))
%D (( A A×B A{}  
%D    @ 0 @ 1 -> .plabel= a \ang{\id,f}
%D    @ 1 @ 2 -> .plabel= a \pi
%D    @ 0 @ 2 -> .plabel= b \id  .slide= -7pt
%D ))
%D enddiagram
%D
% $$\diag{fa-E-std}$$

%D diagram fa-E-dnc
%D 2Dx     100     +35     +30
%D 2D  100 Q0                   	
%D 2D	    ^                   	
%D 2D	    |                   	
%D 2D	    v                   	
%D 2D  +25 Q1 <--| Q2 <--| Q3  
%D 2D	    |       |       |  
%D 2D	    |  <-|  |  <-|  |  
%D 2D	    v       v       v  
%D 2D  +25 R1 <--| R2 |--> R3
%D 2D	                             	
%D 2D	   <id,f>      \pi      
%D 2D  +15 A |--> A×B |--> A{}  
%D 2D	     |-----id---->    
%D 2D
%D (( Q0 .tex= Qa
%D    Q1 .tex= Qa   Q2 .tex= Qa   Q3 .tex= Qa  
%D    R1 .tex= Rab' R2 .tex= Rab  R3 .tex= ýb.Rab
%D    Q0 Q1 <->
%D    Q1 Q2 <= Q2 Q3 <=
%D    Q1 R1 |->  Q2 R2 |->  Q3 R3 |->
%D    R1 R2 <= R2 R3 =>
%D    Q1 R2 harrownodes nil 20 nil <-|
%D    Q2 R3 harrownodes nil 20 nil <-|
%D ))
%D (( A .tex= a A×B   .tex= a,b   A{} .tex= a 
%D    @ 0 @ 1 |-> .plabel= a \ang{\id,f}
%D    @ 1 @ 2 |-> .plabel= a \pi
%D    @ 0 @ 2 |-> .plabel= b \id  .slide= -7pt
%D ))
%D enddiagram
%D
% $$\diag{fa-E-dnc}$$

%:  
%:                      f  Q|-ý_R      
%:                      ------------ýE  
%:                      Q|-\ang{\id,f}^*R    
%:                                      
%:                      ^fa-E-std-seq                
%:                                      
%:           Qa                         
%:            :                         
%:  a|-b'  ýb.Rab     a|-b'  a;Qa|-ýb.Rab   
%:  -------------ýE   -----------------ýE 
%:       Rab'             a;Qa|-Rab'        
%:                                        
%:       ^fa-E-dnc-dn     ^fa-E-dnc-seq
%:  
%:  
% $$\ded{fa-E-std-seq}$$
% $$\ded{fa-E-dnc-dn} \qquad \ded{fa-E-dnc-seq}$$

%D diagram fa-E-all
%D 2Dx       100      +78     +80
%D 2D  100          stq-seq   std
%D 2D
%D 2D  +85 dnc-dn   dnc-seq   dnc
%D 2D
%D (( stq-seq .tex= \ded{fa-E-std-seq} y+= 5 place
%D    dnc-dn  .tex= \ded{fa-E-dnc-dn}  y+= 5 place
%D    dnc-seq .tex= \ded{fa-E-dnc-seq} y+= 5 place
%D    std    .tex= \diag{fa-E-std} BOX       place
%D    dnc    .tex= \diag{fa-E-dnc} BOX x+= 8 place
%D
%D ))
%D enddiagram
%D
$$\diag{fa-E-all}$$







% --------------------
% «ex-I-in-a-hyp»  (to ".ex-I-in-a-hyp")
% (s "Interpreting `$ÎI$' in a hyperdoctrine" "ex-I-in-a-hyp")
\myslide {Interpreting `$ÎI$' in a hyperdoctrine} {ex-I-in-a-hyp}

%D diagram ex-I-std
%D 2Dx     100     +45     +30
%D 2D  100 P0 <--| P1 <--| P2
%D 2D      |        |       |
%D 2D      |  <-|   |  <-|  |id
%D 2D      v        v       v
%D 2D  +25 P3 <--| P4 <--| P5
%D 2D
%D 2D  +15 A ----> A×B --> A{}
%D 2D
%D (( P0 .tex= \ang{\id,f}^*P       P1 .tex= P       P2 .tex= Î_P
%D    P3 .tex= \ang{\id,f}^*^*Î_P P4 .tex= ^*Î_P P5 .tex= Î_P
%D    P0 P1 <-| P1 P2 <-|
%D    P0 P3  -> P1 P4  -> P2 P5 -> .plabel= r \id
%D    P3 P4 <-| P4 P5 |->
%D    @ 0 @ 4 harrownodes nil 20 nil <-|
%D    @ 1 @ 5 harrownodes nil 20 nil <-|
%D ))
%D (( A A×B .tex= A{×}B A{}
%D    @ 0 @ 1 -> .plabel= a \ang{\id,f}
%D    @ 1 @ 2 -> .plabel= a \pi
%D    @ 0 @ 2 -> sl__ .plabel= b \id
%D ))
%D enddiagram
%D
% $$\diag{ex-I-std}$$

%D diagram ex-I-dnc
%D 2Dx     100     +35     +35
%D 2D  100 P0 <--| P1 <--| P2
%D 2D      |        |       |
%D 2D      |  <-|   |  <-|  |id
%D 2D      v        v       v
%D 2D  +25 P3 <--| P4 <--| P5
%D 2D
%D 2D  +15 A ----> A×B --> A{}
%D 2D
%D (( P0 .tex= Pab'       P1 .tex= Pab       P2 .tex= Îb.Pab
%D    P3 .tex= Îb.Pab     P4 .tex= Îb.Pab    P5 .tex= Îb.Pab
%D    P0 P1 <=  P1 P2 <=
%D    P0 P3 |-> P1 P4 |-> P2 P5 |-> .plabel= r \id
%D    P3 P4 <=  P4 P5 =>
%D    @ 0 @ 4 harrownodes nil 20 nil <-|
%D    @ 1 @ 5 harrownodes nil 20 nil <-|
%D ))
%D (( A .tex= a A×B .tex= a,b A{} .tex= a
%D    @ 0 @ 1 |-> .plabel= a \ang{\id,f}
%D    @ 1 @ 2 |-> .plabel= a \pi
%D    @ 0 @ 2 |-> sl__ .plabel= b \id
%D ))
%D enddiagram
%D
% $$\diag{ex-I-dnc}$$

%:  
%:                       f     P      
%:                   --------------------ýI  
%:                   \ang{\id,f}^*P|-Î_P    
%:                                      
%:                      ^ex-I-std-seq                
%:                                      
%:                             
%:                              
%:    Pab'           a|-b'  \ssst{a,b}{Pab}
%:  ------ÎI         ----------------------ÎI 
%:  Îb.Pab             a;Pab'|-Îb.Pab       
%:                                        
%:  ^ex-I-dnc-dn       ^ex-I-dnc-seq
%:  
%:  
% $$\ded{ex-I-std-seq}$$
% $$\ded{ex-I-dnc-dn} \qquad \ded{ex-I-dnc-seq}$$

%D diagram ex-I-all
%D 2Dx       100      +60     +95
%D 2D  100          stq-seq   std
%D 2D
%D 2D  +60 dnc-dn   dnc-seq   dnc
%D 2D
%D (( stq-seq .tex= \ded{ex-I-std-seq} y+= 5 place
%D    dnc-dn  .tex= \ded{ex-I-dnc-dn}  y+= 5 place
%D    dnc-seq .tex= \ded{ex-I-dnc-seq} y+= 5 place
%D    std    .tex= \diag{ex-I-std} BOX       place
%D    dnc    .tex= \diag{ex-I-dnc} BOX x+= 2 place
%D
%D ))
%D enddiagram
%D
$$\diag{ex-I-all}$$




% --------------------
% «ex-E-in-a-hyp»  (to ".ex-E-in-a-hyp")
% (s "Interpreting `$ÎE$' in a hyperdoctrine" "ex-E-in-a-hyp")
\myslide {Interpreting `$ÎE$' in a hyperdoctrine} {ex-E-in-a-hyp}


%D diagram exE-std
%D 2Dx    100    +40     +45         +25   +40
%D 2D 100 B0                         B1
%D 2D	  -/\                        -/\
%D 2D	  | \\                       | \\
%D 2D	  v  \\                      v  \\
%D 2D +20 B2 <\\==================== B3  \\
%D 2D	   \\  \\                     \\  \\
%D 2D +25   \\   B4 =====================> B5
%D 2D	     \\  -                      \\ -
%D 2D	      \\ |                       \\|
%D 2D	       \/v                        Vv
%D 2D +20        B6 <--> B6' <============ B7
%D 2D
%D 2D +0  b0 |---------------------> b1
%D 2D	     |->                        |->
%D 2D +35        b2 |--------------------> b3
%D 2D
%D (( B0 .tex= P∧^*Q                B1 .tex= Î_P∧Q
%D    B2 .tex= ^*R           B3  .tex= R
%D    B4 .tex= P       B5 .tex= Î_P
%D    B6 .tex= ^*Q⊃^*R  B6' .tex= ^*(Q⊃R)    B7 .tex= Q⊃R
%D    B0 B2 ->
%D    B1 B3 -> B2 B3 <-|
%D    B0 B4 <-| B2 B6 |->
%D    B1 B5 <-| B3 B7 |->
%D    B4 B5 <-| B5 B7 ->    B6' B7 <-|
%D    B4 B6 ->
%D    B4 B6' ->
%D    B6 B6' <- sl^ .plabel= a \nat
%D    B6 B6' -> sl_ .plabel= b \Pimp
%D    B4 B6' midpoint B5 B7 midpoint  harrownodes nil 20 nil |->
%D    B0  B2 midpoint B4 B6 midpoint dharrownodes nil 15 nil |->
%D    B1  B3 midpoint B5 B7 midpoint dharrownodes nil 15 nil <-|
%D ))
%D (( b0 b2 midpoint .TeX= A×B b1 b3 midpoint .TeX= A -> .plabel= a \pi
%D ))
%D enddiagram

$$\diag{exE-std}$$


%D diagram exE-dnc
%D 2Dx    100    +40     +45         +25   +40
%D 2D 100 B0                         B1
%D 2D	  -/\                        -/\
%D 2D	  | \\                       | \\
%D 2D	  v  \\                      v  \\
%D 2D +20 B2 <\\==================== B3  \\
%D 2D	   \\  \\                     \\  \\
%D 2D +25   \\   B4 =====================> B5
%D 2D	     \\  -                      \\ -
%D 2D	      \\ |                       \\|
%D 2D	       \/v                        Vv
%D 2D +20        B6 <--> B6' <============ B7
%D 2D
%D 2D +0  b0 |---------------------> b1
%D 2D	     |->                        |->
%D 2D +35        b2 |--------------------> b3
%D 2D
%D (( B0 .tex= Pab∧Qa            B1 .tex= (Îb.Pab)∧Qa
%D    B2 .tex= Ra                B3 .tex= Ra
%D    B4 .tex= Pab                   B5 .tex= Îb.Pab
%D    B6 .tex= Qa⊃Ra   B6' .tex= Qa⊃Ra  B7 .tex= Qa⊃Ra
%D    B0 B2 |->
%D    B1 B3 |-> B2 B3 <=
%D    B0 B4 <= B2 B6 =>
%D    B1 B5 <= B3 B7 =>
%D    B4 B5 <= B5 B7 |->    B6' B7 <=
%D    B4 B6 |->
%D    B4 B6' |->
%D    B6 B6' <-| sl^ .plabel= a \nat
%D    B6 B6' |-> sl_ .plabel= b \Pimp
%D    B4 B6' midpoint B5 B7 midpoint  harrownodes nil 20 nil |->
%D    B0  B2 midpoint B4 B6 midpoint dharrownodes nil 15 nil |->
%D    B1  B3 midpoint B5 B7 midpoint dharrownodes nil 15 nil <-|
%D ))
%D (( b0 b2 midpoint .TeX= a,b b1 b3 midpoint .TeX= a |->
%D ))
%D enddiagram

$$\diag{exE-dnc}$$

\bsk

%:
%:                        P∧^*Q|-^*R
%:                        ------------ÎE
%:                        Î_P∧Q|-R
%:
%:                        ^ex-I-std-seq
%:
%:        [Pab]^1  Qa
%:             :::::
%:   Îb.Pab    Ra         a,b;Pab,Qa|-Ra
%:   ------------ÎE;1     ---------------ÎE
%:      Ra                a;Îb.Pab,Qa|-Ra
%:
%:      ^ex-E-dnc-dn      ^ex-E-dnc-seq
%:
$$\begin{array}{ccc}
                    && \ded{ex-I-std-seq} \\
  \ded{ex-E-dnc-dn} && \ded{ex-E-dnc-seq} \\
  \end{array}
$$



% --------------------
% «equality-hofmann95»  (to ".equality-hofmann95")
% (s "Equality types: Hofmann 1995" "equality-hofmann95")
\myslide {Equality types: Hofmann 1995} {equality-hofmann95}

\par A diagram for the rules Id-Intro and Id-Elim-J
\par as they appear in Martin Hofmann's PhD thesis (p.21):
\par (Note: my the diagram is for a slightly weaker Id-Elim-J...
\par in the rule the type $$ may depend on the value of $p$)

% (find-angg ".emacs.papers" "hofmann")
% (find-hofmannthesispage (+ 12  21) "Id-Intro")
% (find-hofmannthesispage (+ 12  21) "Id-Elim-J")

%D diagram hofmann95-equality
%D 2Dx     100     +45    +50
%D 2D  100         A0 |-> A1
%D 2D              |       |
%D 2D              |  |->  |
%D 2D              v       v
%D 2D  +30         A2 <-| A3
%D 2D
%D 2D  +10 B0 <---------| B1
%D 2D      |               |
%D 2D      |      <-|      |
%D 2D      v               v
%D 2D  +30 B2 <---------| B3
%D 2D
%D 2D  +10 C0 <--| C1 <-| C2
%D 2D      |       |       |
%D 2D      |  <-|  |  <-|  |
%D 2D      v       v       v
%D 2D  +30 C3 <--| C4 |-> C5
%D 2D
%D 2D  +15         D0 --> D1
%D 2D  +10 D2 ----------> D3
%D 2D  +10 D4 ---> D5 --> D6
%D 2D
%D ((                       A0 .tex= 1            A1 .tex= ¯{Id}_(x,y)
%D                          A2 .tex= [y:=x]      A3 .tex= 
%D    B0 .tex= ¯{Id}_(N_1,N_2)                   B1 .tex= ¯{Id}_(x,y)
%D    B2 .tex= \mysubst                          B3 .tex= 
%D    C0 .tex= 1            C1 .tex= 1            C2 .tex= ¯{Id}_(x,y)
%D    C3 .tex= ¯{Id}_(M,M) C4 .tex= ¯{Id}_(x,x) C5 .tex= ¯{Id}_(x,y)
%D                          D0 .tex= (\vagx)      D1 .tex= (\vagxy)
%D    D2 .tex= (\vag)                             D3 .tex= (\vagxy)
%D    D4 .tex= (\vag)       D5 .tex= (\vagx)      D6 .tex= (\vagxy)
%D ))
%D (( A0 A1 |->
%D    A0 A2 -> .plabel= l \va,x,y;p|-M
%D    A1 A3 -> .plabel= r \va,x,y;p|-¯J_{,}(M,x,y,p)
%D    A2 A3 <-|
%D    A0 A3 harrownodes nil 20 nil |-> sl^ .plabel= a Æ^\flat
%D
%D    B0 B1 <-|
%D    B0 B2 -> .plabel= l \text{(Id-Elim-J)}"\quad"\va|-¯J_{,}(M,N_1,N_2,P)
%D    B1 B3 ->
%D    B1 B3 -> .plabel= r \va,x,y;p|-¯J_{,}(M,x,y,p)
%D    B2 B3 <-|
%D    B0 B3 harrownodes nil 20 nil <-| sl_
%D    B0 B3 harrownodes nil 20 nil <-| sl_ .plabel= a *
%D
%D    C0 C1 <-| C1 C2 <-|
%D    C0 C3 -> .plabel= l \text{(Id-Intro)}"\quad"\va|-¯{Refl}_(M)
%D    C1 C4 ->
%D    C2 C5 -> .plabel= r \va,x,y;p|-p
%D    C3 C4 <-| C4 C5 |->
%D    C0 C4 harrownodes nil 20 nil <-| .plabel= b *
%D    C1 C5 harrownodes nil 20 nil <-| .plabel= b Æ^\sharp
%D
%D    D0 D1 -> .plabel= a y:=x
%D    D2 D3 -> .plabel= m x:=N_1,y:=N_2
%D    D4 D5 -> .plabel= b x:=M
%D    D5 D6 -> .plabel= b y:=x
%D ))
%D enddiagram
%D
$$\def\mysubst{[x:=N1][y:=N2][p:=P]}
  \def\va{\vec a}
  \def\vag{\va¨\GG}
  \def\vagx{\va¨\GG,x¨}
  \def\vagxy{\va¨\GG,x¨,y¨}
  \diag{hofmann95-equality}
$$



% --------------------
% «POLYMORPHISM»  (to ".POLYMORPHISM")
% (sec "Models for polymorphism" "POLYMORPHISM")
\mysection {Models for polymorphism} {POLYMORPHISM}

% --------------------
% «PL-cats»  (to ".PL-cats")
% (s "PL categories" "PL-cats")
\myslide {PL categories} {PL-cats}

\par The paper [Seely87] (``Categorical Semantics
\par for Higher Order Polymorphic Lambda Calculus''),
\par shows how to interpret polymorphic $ð$-calculus
\par in a hyperdoctrine with a universal object.
\par Its rules $(ÆI)$, $(ÆE)$, $(åI)$, $(åE)$
\par correspond (very roughly) to our $(ýI)$, $(ýE)$, $(ÎI)$, $(ÎE)$,
\par and are stated as this in the paper (in the section (1.1.4)):
\msk
\par $(ÆI)$ If $\aa$ is an indeterminate of order $A$, $ÝØ$, $ÝA$,
\par then $I_{Æ\aa·,}Ý[/\aa]⊃Æ\aaÝA·$. When clear from the context,
\par we shall denote this term by $I_$, or even by $I$; in particular,
\par if $bÝ[/\aa]$, then $I(b)ÝÆ\aaÝA·$.
\msk
\par $(ÆE)$ If $aÝ⊃$, $\aa$ an indeterminate of order $A$
\par which is not free in $$ nor in the type of any free variable in $a$,
\par then $¯V\aaÝA·aÝ(Æ\aaÝA·)⊃$.
\msk
\par $(åI)$ If $aÝ$, $\aa$ an indeterminate of order $A$ which is not free
\par in the type of any free variable in $a$, then $\LL\aaÝA·aÝå\aaÝA·$.
\msk
\par $(åE)$ If $aÝå\aaÝA·a$, $ÝA$, then $a\{\}Ý[/\aa]$,
\par where $[/aa$ is $$ with $$ replacing $\aa$.
\msk
\par In a diagram:

%:*Ý*{Ý}*

%D diagram rstone-plc-faexie-seely
%D 2Dx     100     +40    +40
%D 2D  100         A0 |-> A1
%D 2D              |       |
%D 2D              |  |->  |
%D 2D              v       v
%D 2D  +30         A2 <-| A3
%D 2D
%D 2D  +10 B0 <--| B1 |-> B2
%D 2D      |       |       |
%D 2D      |  <-|  |  <-|  |
%D 2D      v       v       v
%D 2D  +30 B3 <--| B4 <-| B5
%D 2D
%D 2D  +10 C0 <--| C1 <-| C2
%D 2D      |       |       |
%D 2D      |  <-|  |  <-|  |
%D 2D      |       |  |->  |
%D 2D      v       v       v
%D 2D  +30 C3 <--| C4 |-> C5
%D 2D
%D 2D  +15 D0 ---> D1 --> D2
%D 2D
%D ((                    A0 .tex=          A1 .tex= Æ\aaÝA.
%D                       A2 .tex=          A3 .tex= 
%D    B0 .tex= [/\aa]  B1 .tex=          B2 .tex= Æ\aaÝA.
%D    B3 .tex= Æ\aaÝA.  B4 .tex= Æ\aaÝA.  B5 .tex= Æ\aaÝA.
%D    C0 .tex=          C1 .tex=          C2 .tex= 
%D    C3 .tex= [/\aa]  C4 .tex=          C5 .tex= å\aaÝA.
%D    D0 .tex= B         D1 .tex= B{×}A     D2 .tex= B
%D ))
%D (( A0 A1 |->
%D    A0 A2 -> .PLABEL= _(0.43) a
%D    A1 A3 -> .PLABEL= ^(0.43) ¯V\aaÝA.a"\quad"(ÆE)
%D    A2 A3 <-|
%D    A0 A3 harrownodes nil 20 nil |-> sl^ .plabel= a Æ^\flat
%D
%D    B0 B1 <-| B1 B2 |->
%D    B0 B3 -> .PLABEL= _(0.57) (ÆI)"\quad"I_{Æ\aa.,}
%D    B1 B4 ->
%D    B2 B5 -> .PLABEL= ^(0.57) \id
%D    B3 B4 <-| B4 B5 <-|
%D    B0 B4 harrownodes nil 20 nil <-| sl_
%D    B1 B5 harrownodes nil 20 nil <-| sl_ .plabel= b Æ^\sharp
%D
%D    C0 C1 <-| C1 C2 <-|
%D    C0 C3 -> .PLABEL= _(0.43) (åE)"\quad"\aa\{\}
%D    C1 C4 -> .PLABEL= _(0.57) a
%D    C2 C5 -> .PLABEL= ^(0.43) a
%D    C2 C5 -> .PLABEL= ^(0.57) \LL\aaÝA.a"\quad"(åI)
%D    C3 C4 <-| C4 C5 |->
%D    C0 C4 harrownodes nil 20 nil <-| sl^
%D    C1 C5 harrownodes nil 20 nil <-| sl^ .plabel= a å^\flat
%D    C1 C5 harrownodes nil 20 nil |-> sl_ .plabel= b å^\sharp
%D
%D    D0 D1 -> .plabel= a b\,|-\ang{b,}
%D    D1 D2 -> .plabel= a \pi
%D ))
%D enddiagram
%D
$$\diag{rstone-plc-faexie-seely}$$


% --------------------
% «PL-cats-2»  (to ".PL-cats-2")
% (s "PL categories (2)" "PL-cats-2")
\myslide {PL categories (2)} {PL-cats-2}

\par Here is a Rosetta stone for translating between the paper's notation
\par and the (``standard'') notation for hyperdoctrines that we use here.
\par In the middle rectangle the iso $\ang{\id,}^*^*Î_P \bij Î_P$
\par has been collapsed --- we show only the object $Î_P$.

%D diagram rstone-plc-faexie-std
%D 2Dx     100     +40    +40
%D 2D  100         A0 |-> A1
%D 2D              |       |
%D 2D              |  |->  |
%D 2D              v       v
%D 2D  +30         A2 <-| A3
%D 2D
%D 2D  +10 B0 <--| B1 |-> B2
%D 2D      |       |       |
%D 2D      |  <-|  |  <-|  |
%D 2D      v       v       v
%D 2D  +30 B3 <--| B4 <-| B5
%D 2D
%D 2D  +10 C0 <--| C1 <-| C2
%D 2D      |       |       |
%D 2D      |  <-|  |  <-|  |
%D 2D      |       |  |->  |
%D 2D      v       v       v
%D 2D  +30 C3 <--| C4 |-> C5
%D 2D
%D 2D  +15 D0 ---> D1 --> D2
%D 2D 
%D (( # Names for a future DNC version (unused):
%D                       A0 .tex= Pba       A1 .tex= Îa.Pba
%D                       A2 .tex= Qb        A3 .tex= Qb
%D    B0 .tex= Pb       B1 .tex= Pba       B2 .tex= Îa.Pba
%D    B3 .tex= Îa.Pba    B4 .tex= Îa.Pba    B5 .tex= Îa.Pba
%D    C0 .tex= Qb        C1 .tex= Qb        C2 .tex= Qb
%D    C3 .tex= Rb       C4 .tex= Rba       C5 .tex= ýa.Rba
%D    D0 .tex= B         D1 .tex= B{×}A     D2 .tex= B
%D ))
%D (( # Names for the objects in the "std" diagram: 
%D                            A0 .tex= P         A1 .tex= Î_P
%D                            A2 .tex= ^*Q      A3 .tex= Q
%D    B0 .tex= \ang{\id,}^*P B1 .tex= P         B2 .tex= Î_P
%D    B3 .tex= Î_P           B4 .tex= ^*Î_P   B5 .tex= Î_P
%D    C0 .tex= Q              C1 .tex= ^*Q      C2 .tex= Q
%D    C3 .tex= \ang{\id,}^*R C4 .tex= R         C5 .tex= ý_R
%D    D0 .tex= B              D1 .tex= B{×}A     D2 .tex= B
%D ))
%D (( A0 A1 |->
%D    A0 A2 -> .PLABEL= _(0.43) g
%D    A1 A3 -> .PLABEL= ^(0.43) g^\flat
%D    A2 A3 <-|
%D    A0 A3 harrownodes nil 20 nil |-> sl^ .plabel= a Î_^\flat
%D
%D    B0 B1 <-| B1 B2 |->
%D    B0 B3 -> .PLABEL= _(0.57) \ang{\id,}^*\eta_P
%D    B1 B4 -> .PLABEL= _(0.57) \eta_P
%D    B2 B5 -> .PLABEL= ^(0.57) \id
%D    B3 B4 <-| B4 B5 <-|
%D    B0 B4 harrownodes nil 20 nil <-| sl_
%D    B1 B5 harrownodes nil 20 nil <-| sl_ .plabel= b Î^\sharp
%D
%D    C0 C1 <-| C1 C2 <-|
%D    C0 C3 -> .PLABEL= _(0.43) \ang{\id,}^*k^\flat
%D    C1 C4 -> .PLABEL= _(0.43) k^\flat
%D    C1 C4 -> .PLABEL= _(0.57) h
%D    C2 C5 -> .PLABEL= ^(0.43) k
%D    C2 C5 -> .PLABEL= ^(0.57) h^\sharp
%D    C3 C4 <-| C4 C5 |->
%D    C0 C4 harrownodes nil 20 nil <-| sl^
%D    C1 C5 harrownodes nil 20 nil <-| sl^ .plabel= a å^\flat
%D    C1 C5 harrownodes nil 20 nil |-> sl_ .plabel= b å^\sharp
%D
%D    D0 D1 -> .plabel= a \ang{\id,}
%D    D1 D2 -> .plabel= a \pi
%D ))
%D enddiagram
%D
$$\diag{rstone-plc-faexie-seely}$$

$$\diag{rstone-plc-faexie-std}$$






% --------------------
% «TYPING-PROTO-THINGS»  (to ".TYPING-PROTO-THINGS")
% (sec "Typing proto-categories" "TYPING-PROTO-THINGS")
\mysection {Typing proto-categories} {TYPING-PROTO-THINGS}


% --------------------
% «uppercasing-names»  (to ".uppercasing-names")
% (s "Uppercasing names" "uppercasing-names")
\myslide {Uppercasing names} {uppercasing-names}

\par When I defined a (proto-)cleavage,
\par several slides ago, I said that it was:
%
%D diagram vee-over-vee-mini
%D 2Dx      100 +25 +35
%D 2D  100  P
%D 2D
%D 2D  +25      Q   R
%D 2D
%D 2D  +20 pP
%D 2D
%D 2D  +25     pQ  pR
%D 2D
%D (( P R  -> .plabel= a h'
%D    P Q  -> .plabel= b f'
%D    Q R  -> .plabel= b g'
%D    pP .tex= A
%D    pQ .tex= B
%D    pR .tex= C
%D    pP pR  -> .plabel= a h
%D    pP pQ  -> .plabel= b f
%D    pQ pR  -> .plabel= b g
%D    P pQ varrownodes nil 20 0 <- .PLABEL= ^(0.55) Ðp
%D ))
%D enddiagram

$$\diag{vee-over-vee-mini}$$

\par $Ð{cleavage} \; \equiv$
\par $B,C,R,g \mto Q,g',(A,P,f \mto f')$
\msk
\par Let's formalize this.
\msk
\par A (proto-)cleavage (for a projection functor $p:\bbE \to \bbB$)
\par is anything that ``deserves the name''
\par $B,C,R,g \mto Q,g',(A,P,f \mto f')$
\par that is, a cleavage for $p:\bbE \to \bbB$
\par is any object of a certain type ---
\par where that type is the uppercasing of
\par $B,C,R,g \mto Q,g',(A,P,f \mto f').$
\msk
\par How do we uppercase names as complex as that?
\par How do we extract the necessary ``hints''
\par from the accompanying diagrams?
\par Can this always be done unambiguosly?





% --------------------
% «uppercasing-names-2»  (to ".uppercasing-names-2")
% (s "Uppercasing names (2)" "uppercasing-names-2")
\myslide {Uppercasing names (2)} {uppercasing-names-2}

\par Let's start with a simpler problem.
\par We have a set $A$ and families of sets

$$\begin{array}{l}
  a¨A                          \vdash B_a \\
  a¨A,b¨B_a                    \vdash C_{ab} \\
  a¨A,b¨B_a,c¨C_{ab}           \vdash D_{abc} \\
  a¨A,b¨B_a,c¨C_{ab},d¨D_{abc} \vdash E_{abcd} \\
  \end{array}
$$

\par and we want to find the type ---
\par written in standard notation for $ð$-calculus with
\par dependent types (i.e., with `$Æ$'s and `$å$'s) ---
\par of:
%
$$a,b,c \vdash d,e.$$

\par A convention: `$\E[\aa]$' will mean ``the space of `$\aa$'s''.
\par We will add lots of `$\E[\ldots]$' entries to our dictionary
\par to keep track of the types.

\msk

Remember:

$$\begin{array}{r}
       (a,b) : Æa¨A.B_a \\
  (a \mto b) : åa¨A.B_a \\
  \end{array}
$$
%
So:

$$\def\lsmash#1{\hbox to 0pt{#1\hss}}
  \def\ph#1{#1}
  \def\ph#1{}
  \begin{array}{rclcl}
         \E[a] &\equiv& A \\
         \E[b] &\equiv& B_a \lsmash{\qquad ($\ot$ which depends on $a$)} \\
       \E[a,b] &\equiv& Æa¨\E[a].\E[b] &\equiv& Æa¨A.B_a \ph{oooo} \\
  \E[a \mto b] &\equiv& åa¨\E[a].\E[b] &\equiv& åa¨A.B_a \\
  \end{array}
$$



% --------------------
% «uppercasing-names-3»  (to ".uppercasing-names-3")
% (s "Uppercasing names (3)" "uppercasing-names-3")
\myslide {Uppercasing names (3)} {uppercasing-names-3}

We want to uppercase

$$a,b,c \mto d,e.$$

We start by adding the missing parentheses:

$$(a,(b,c)) \mto (d,e)$$

\def\substbox#1{\left[\sm{#1}\right]}
\def\substabc{\substbox{a:=t,\\b:='t,\\c:=''t}}
\def\substabcangg{\substbox{a:=\angg{a},\\b:=\angg{b},\\c:=\angg{c}}}

Then:
%
$$\begin{array}{rcl}
               \E[a,(b,c)] &\equiv& Æa¨\E[a].(Æb¨\E[b].\E[c]) \\
                           &\equiv& Æa¨A.(Æb¨B_a.C_{ab}) \\
                           &\equiv& Æa¨A.Æb¨B_a.C_{ab} \\
                   \E[d,e] &\equiv& Æd¨\E[d].\E[e] \\
                           &\equiv& Æd¨D_{abc}.E_{abcd} \\
  \E[(a,(b,c)) \mto (d,e)] &\equiv& å(a,(b,c))¨\E[a,(b,c)].\E[d,e] \\
                           &\equiv& å(a,(b,c))¨(Æa¨A.Æb¨B_a.C_{ab}).(Æd¨D_{abc}.E_{abcd}) \\
                           &\equiv& åt¨(Æa¨A.Æb¨B_a.C_{ab}).((Æd¨D_{abc}.E_{abcd})\substabc) \\
  \end{array}
$$

where the `$[\ldots]$' on the last line is a substitution box, and:
%
$$\def\a{(t)}
  \def\b{('t)}
  \def\c{(''t)}
  (Æd¨D_{abc}.E_{abcd})\substabc = Æd¨D_{\a\b\c}.E_{\a\b\c d}
$$
%
when we use then name `$a,(b,c)$' for `$t$' then it is obvious that:
%
$$\begin{array}{rcl}
    \angg{a} &:=&  \angg{a,(b,c)} \\
  \angg{b,c} &:=& '\angg{a,(b,c)} \\
    \angg{b} &:=&     \angg{b,c} \\
    \angg{c} &:=&    '\angg{b,c} \\
  \end{array}
$$
%
and so we can avoid choosing a name for the $t \equiv a,(b,c)$,

and we can omit the substitution box...

Long names save the day! \quad 8-)



% --------------------
% «uppercasing-names-4»  (to ".uppercasing-names-4")
% (s "Uppercasing names (4)" "uppercasing-names-4")
\myslide {Uppercasing names (4)} {uppercasing-names-4}

To summarize:
%
$$\begin{array}{rcl}
  \angg{\E[a]} &:=& A \\
  \angg{\E[b]} &:=& B_{a} \\
  \angg{\E[c]} &:=& C_{ab} \\
  \angg{\E[d]} &:=& D_{abc} \\
  \angg{\E[e]} &:=& E_{abcd} \\
  \angg{a,(b,c)} &:=& t \\
    \\
  \angg{\E[b,c]} &:=& Æb¨\angg{\E[b]}.\angg{\E[c]} \\
  \angg{\E[a,(b,c)]} &:=& Æa¨\angg{\E[a]}.\angg{\E[b,c]} \\
  \angg{a} &:=& \angg{a,(b,c)} \\
  \angg{b,c} &:=& '\angg{a,(b,c)} \\
  \angg{b} &:=& \angg{b,c} \\
  \angg{c} &:=& '\angg{b,c} \\
  \angg{\E[d,e]} &:=& Æd¨\angg{\E[d]}.\angg{\E[e]} \\
  \angg{\E[(a,(b,c)) \mto (d,e)]} &:=& å\angg{a,(b,c)}¨\angg{\E[a,(b,c)]}.(\angg{\E[d,e]}\substabcangg) \\
  \end{array}
$$

New terminology: a thing like $\angg{a,b}$ ---

a long name within double angle brackets ---

is {\sl bracketed long name}, or, for short, a {\sl blong name}.

\msk

The dictionary treats blong names as macros.

The dictionary above has two parts.

In the top part we have the ``terminals''.

In the bottom part we have ``(real) macros'' (non-terminals).


\msk

The definition for $\angg{a,(b,c)}$ could have been omitted ---

the preprocessor would then substitute $\angg{a,(b,c)}$ by {\tt dnc006},

which would be a perfectly acceptable name for a variable

(in, say, Coq).


% --------------------
% «currying-long-names»  (to ".currying-long-names")
% (s "Currying long names" "currying-long-names")
\myslide {Currying long names} {currying-long-names}

%L forths["3="] = function () pusharrow(">\\dir3{=}>") end
%L forths["3="] = function () pusharrow(">=>") end
%L forths["==="] = function () pusharrow("=") end
% (find-angg ".emacs.papers" "xypic")
% (find-xyreferpage 17 "Figure 5: Kernel library <dir>ectionals")

There are natural bijections

%D diagram currying-long-names
%D 2Dx     100    +55
%D 2D  100 t1 === f_1
%D 2D       ^   
%D 2D       |   
%D 2D       v   
%D 2D  +25 t2 === f_2
%D 2D       ^   
%D 2D       |   
%D 2D       v   
%D 2D  +25 t3 === f_3
%D 2D       ^   
%D 2D       |   
%D 2D       v   
%D 2D  +25 t4 === f_4
%D 2D       ^   
%D 2D       |   
%D 2D       v   
%D 2D  +25 t5 === f_5
%D 2D
%D (( t1 .tex=   (a,(b,c))|->(d,e)   f_1 ===
%D    t2 .tex=  a|->((b,c)|->(d,e))  f_2 ===
%D    t3 .tex= a|->(b|->(c|->(d,e))) f_3 ===
%D    t4 .tex=  (a,b)|->(c|->(d,e))  f_4 ===
%D    t5 .tex=   ((a,b),c)|->(d,e)   f_5 ===
%D    t1 t2 <->
%D    t2 t3 <->
%D    t3 t4 <->
%D    t4 t5 <->
%D ))
%D enddiagram
%D
$$\diag{currying-long-names}$$

and usually when we are speaking with humans

we can gloss over the details, and say just:

%:
%:   a  b  c  f
%:   ==========¯{apps}
%:      d,e
%:
%:      ^cln-1
%:
$$\ded{cln-1}$$

For $f$ being any of the `$f_i$'s above.

\msk

$f_3$ --- the ``totally curried'' version of $f$ ---

has the simplest type:

$$f_3 : åa¨A_a.åb¨B_a.åc¨C_{ab}.Æd¨D_{abc}.E_{abcd}$$

and the way to obtain $d, e$ from $a,b,c,f_3$ is the shortest:

$$\begin{array}{rcl}
  (d,e) &=& f_1 \, \ang{a,\ang{b,c}} \\
  (d,e) &=& f_2 \, a \, \ang{b,c} \\
  (d,e) &=& f_3 \, a \, b \, c \\
  (d,e) &=& f_4 \, \ang{a, b} \, c \\
  (d,e) &=& f_5 \, \ang{\ang{a, b},c} \\
  \end{array}
$$

so the ``totally curried versions'' are usually preferred

in implementations (where we {\sl cannot} gloss over those details)...

\msk

Usually in mathematical practice we say $\Hom_\catC(A,B)$ ($= \Hom_\catC \ang{A,B}$)

but in our implementation of (proto-)CT in type theory

we will use $\Hom_\catC A \, B$.



% --------------------
% «typing-proto-cats»  (to ".typing-proto-cats")
% (s "Typing proto-categories" "typing-proto-cats")
\myslide {Typing proto-categories} {typing-proto-cats}

It should be possible to type

$$\catC \equiv (\catC_0, \Hom_\catC, \id_\catC, ¢_\catC)$$

from the equations:

\def\Sets{¯{Sets}}

$$\begin{array}{rcl}
  A,\;B,\;C &:& \catC_0 \\
  A \to A &:=& \Hom_\catC A \, A \;\;:\;\; \Sets \\
  A \to B &:=& \Hom_\catC A \, B \;\;:\;\; \Sets \\
  B \to C &:=& \Hom_\catC B \, C \\
  A \to C &:=& \Hom_\catC A \, C \\
  \Hom_\catC &:& \E[ðA.ðB.\Hom_\catC A \, B] \\
  \id_A      &:=& \id_\catC A \;\;:\;\; A \to A \\
  \id_\catC  &:& \E[ðA.\id_A] \\
  g¢f        &:=& ¢_\catC \,A\,B\,C\,g\,f \;\;:\;\; A \to C \\
  ¢_\catC    &:& \E[ðA.ðB.ðCðg.ðf.(g¢f)] \\
  \end{array}
$$

\msk

And it should be possible

to extract some of them

from this diagram:
%
%D diagram ???
%D 2Dx     100 +30 +30
%D 2D  100 A   B   C
%D 2D
%D (( A B -> .plabel= a f B C -> .plabel= a g
%D    A C -> sl__ .plabel= b g¢f
%D    A loop (ul,ur)^{\id_A}
%D
%D ))
%D enddiagram
%D
$$\diag{???}$$

\bsk

(Note: I'm ignoring all questions of size,

and I'm not saying where $\catC_0$ lives).

\bsk

After that we should have a constant, $\E[\catC]$,

that we can use to declare arbitrary (proto-)categories:

a proto-category is an element of $\E[\catC]$.

\msk

The result should be something like:

$$\begin{array}{rcl}
  \E[\catC_0]    &:=& ¯{Classes} \\
  \E[\Hom_\catC] &:=& \catC_0 \to (\catC_0 \to ¯{Sets}) \\
  \E[\id_\catC]  &:=& åA¨\catC_0.\Hom_\catC A\,A \\
  \E[¢_\catC]    &:=& åA¨\catC_0.åB¨\catC_0.åC¨\catC_0. \\
                 &  & \;\; (\Hom_\catC B\,C \to (\Hom_\catC A\,B \to \Hom_\catC A\,C)) \\
  \E[\catC]      &:=& \E[\catC_0, \Hom_\catC, \id_\catC, ¢_\catC] \\
  \end{array}
$$




% --------------------
% «ETC»  (to ".ETC")
% (sec "Etc" "ETC")
\mysection {Etc} {ETC}


% --------------------
% «HAs-intro»  (to ".HAs-intro")
% (s "Introduction to Heyting Algebras" "HAs-intro")
\myslide {Introduction to Heyting Algebras} {HAs-intro}

\def\bbV{\mathbb{V}}

% (find-LATEX "2008graphs.tex" "heyting-algebras")
% (find-dvipage "~/LATEX/2008graphs.dvi" 3)
% (find-LATEX "2008graphs.tex" "minimal-dag")
% (find-dvipage "~/LATEX/2008graphs.dvi" 12)

Let's identify `true' with with 1 and with the singleton set,

and `false' with 0 and with the empty set.

Now all our truth-values (i.e., 0 and 1) are subsets

of a ``top'' set, $§$, and we have an arrow $0 \to 1$,

but there's no arrow $1 \to 0$.

The arrows are ``non-decreasing''.

In the category $\Set^{***}$ we have 8 truth-values,

and in the category $\Set^\bbV$ just five:
%
%D diagram three-HAs
%D 2Dx     100   +40 +20 +20      +30 +20 +20   
%D 2D  100 1         111              X         
%D 2D            
%D 2D  +20       110 101 011      U       V    
%D 2D            
%D 2D  +20       100 010 001          W
%D 2D            
%D 2D  +20 0         000             \emp       
%D 2D
%D 2D  +20 \Set   \Set^{***}        \Set^\bbV
%D 2D
%D (( 0 1 ->
%D ))
%D (( 000 001 -> 000 010 -> 000 100 ->
%D    001 011 -> 001 101 ->
%D    010 011 -> 010 110 ->
%D    100 101 -> 100 110 ->
%D    011 111 -> 101 111 -> 110 111 ->
%D ))
%D (( X .tex= \dagVee111
%D    U .tex= \dagVee101
%D    V .tex= \dagVee011
%D    W .tex= \dagVee001
%D    \emp .tex= \dagVee000
%D    \emp W -> W U -> W V -> U X -> V X -> 
%D ))
%D (( \Set       place
%D    \Set^{***} place
%D    \Set^\bbV  place
%D ))
%D enddiagram
%D
$$\diag{three-HAs}$$

$\bbV$ is the DAG 
%
$$\bbV := (W, R) := (\sof{\aa,\bb,\cc}, \sof{\aa\to\cc, \bb\to\cc})$$
%
regarded as a category:
%
%D diagram Vee-dag
%D 2Dx     100 +15 +15
%D 2D  100 \aa     \bb
%D 2D
%D 2D  +20     \cc
%D 2D
%D (( \aa \cc -> \bb \cc -> ))
%D enddiagram
%D
$$\bbV \quad \equiv \diag{Vee-dag}$$

In each category $\Set^\bbD$, where $\bbD$ is a DAG,

the structure $(\Sub(1_\bbD), ∧, §, ⊃)$ is a CCC,

and even more: $(\Sub(1_\bbD), ∧, §, ⊃, ∨, ®)$ a (bi-)Heyting Algebra.

Its objects behave as {\sl intuitionistic truth-values}...

In $\Set^\bbV$, if we take $P=\dagVee001$ we have

$¬¬P = (P⊃®)⊃® = \dagVee111 = §$, so $P \neq ¬¬P$.



% --------------------
% «LT-intro»  (to ".LT-intro")
% (s "Introduction to Lawvere-Tierney Topologies" "LT-intro") 
\myslide {Introduction to Lawvere-Tierney Topologies} {LT-intro}

% (find-dvipage "~/LATEX/2008graphs.dvi" 22)
% (find-LATEX "2008graphs.tex" "LT-modalities-and")

%:****^{**}*
%:***^**

The operation $P \mto P^* := ¬¬P$ on a HA obeys these three rules:
%:
%:                 P|-Q         
%:   ----         ------        -------
%:   |-§*         P*|-Q*        P**|-P*
%:
%:   ^ax*-1       ^ax*-2        ^ax*-3
%:
$$\ded{ax*-1} \qquad \ded{ax*-2} \qquad \ded{ax*-3}$$

Anything obeying these three rules [in the HA of a topos] 

is called a {\sl Lawvere-Tierney topology}.

These three rules are the cheap presentation, of course.

The nicer equivalent expensive presentations for LT-topologies

include how the `${}^*$' interacts with $∧$, $§$, $⊃$, $∨$, $®$,


%D diagram and-cube
%D 2Dx      100 +20    +25  +20	       +40 +20     +25  +20	 
%D 2D  100  P∧Q        P∧Q*	       P∧Q'        P∧Q*'	 
%D 2D  +20     (P∧Q)*     (P∧Q*)*         (P∧Q)*'     (P∧Q*)*'
%D 2D      			      			 
%D 2D  +20 P*∧Q       P*∧Q*	      P*∧Q'       P*∧Q*'	 
%D 2D  +20    (P*∧Q)*    (P*∧Q*)*        (P*∧Q)*'    (P*∧Q*)*'
%D 2D
%D ((  P∧Q    P*∧Q    P∧Q*    P*∧Q*
%D    (P∧Q)* (P*∧Q)* (P∧Q*)* (P*∧Q*)*
%D    @ 0 @ 1  -> @ 0 @ 2  -> @ 1 @ 3  -> @ 2 @ 3  ->
%D    @ 4 @ 5  =  @ 4 @ 6  =  @ 5 @ 7  =  @ 6 @ 7  = 
%D    @ 0 @ 4  -> @ 1 @ 5  -> @ 2 @ 6  -> @ 3 @ 7  = 
%D ))
%D ((  P∧Q'    P*∧Q'    P∧Q*'    P*∧Q*'
%D    (P∧Q)*' (P*∧Q)*' (P∧Q*)*' (P*∧Q*)*'
%D    @ 0 .tex= \dagVee001 @ 1 .tex= \dagVee101
%D    @ 2 .tex= \dagVee011 @ 3 .tex= \dagVee111
%D    @ 4 .tex= \dagVee111 @ 5 .tex= \dagVee111
%D    @ 6 .tex= \dagVee111 @ 7 .tex= \dagVee111
%D    @ 0 @ 1  -> @ 0 @ 2  -> @ 1 @ 3  -> @ 2 @ 3  ->
%D    @ 4 @ 5  =  @ 4 @ 6  =  @ 5 @ 7  =  @ 6 @ 7  = 
%D    @ 0 @ 4  -> @ 1 @ 5  -> @ 2 @ 6  -> @ 3 @ 7  = 
%D ))
%D enddiagram
%D
$$\diag{and-cube}$$

%D diagram or-cube
%D 2Dx      100 +20    +25  +20	       +40 +20     +25  +20	 
%D 2D  100  P∨Q        P∨Q*	       P∨Q'        P∨Q*'	 
%D 2D  +20     (P∨Q)*     (P∨Q*)*         (P∨Q)*'     (P∨Q*)*'
%D 2D      			      			 
%D 2D  +20 P*∨Q       P*∨Q*	      P*∨Q'       P*∨Q*'	 
%D 2D  +20    (P*∨Q)*    (P*∨Q*)*        (P*∨Q)*'    (P*∨Q*)*'
%D 2D
%D ((  P∨Q    P*∨Q    P∨Q*    P*∨Q*
%D    (P∨Q)* (P*∨Q)* (P∨Q*)* (P*∨Q*)*
%D    @ 0 @ 1  -> @ 0 @ 2  -> @ 1 @ 3  -> @ 2 @ 3  ->
%D    @ 4 @ 5  =  @ 4 @ 6  =  @ 5 @ 7  =  @ 6 @ 7  = 
%D    @ 0 @ 4  -> @ 1 @ 5  -> @ 2 @ 6  -> @ 3 @ 7  ->
%D ))
%D ((  P∨Q'    P*∨Q'    P∨Q*'    P*∨Q*'
%D    (P∨Q)*' (P*∨Q)*' (P∨Q*)*' (P*∨Q*)*'
%D    @ 0 .tex= \dagHouse00011 @ 1 .tex= \dagHouse00111
%D    @ 2 .tex= \dagHouse01011 @ 3 .tex= \dagHouse01111
%D    @ 4 .tex= \dagHouse11111 @ 5 .tex= \dagHouse11111
%D    @ 6 .tex= \dagHouse11111 @ 7 .tex= \dagHouse11111
%D    @ 0 @ 1  -> @ 0 @ 2  -> @ 1 @ 3  -> @ 2 @ 3  ->
%D    @ 4 @ 5  =  @ 4 @ 6  =  @ 5 @ 7  =  @ 6 @ 7  = 
%D    @ 0 @ 4  -> @ 1 @ 5  -> @ 2 @ 6  -> @ 3 @ 7  ->
%D ))
%D enddiagram
%D
$$\diag{or-cube}$$

%D diagram imp-cube-Aor
%D 2Dx      100 +20    +25  +20	       +40 +20     +25  +20	 
%D 2D  100  P⊃Q        P⊃Q*	       P⊃Q'        P⊃Q*'	 
%D 2D  +20     (P⊃Q)*     (P⊃Q*)*         (P⊃Q)*'     (P⊃Q*)*'
%D 2D      			      			 
%D 2D  +20 P*⊃Q       P*⊃Q*	      P*⊃Q'       P*⊃Q*'	 
%D 2D  +20    (P*⊃Q)*    (P*⊃Q*)*        (P*⊃Q)*'    (P*⊃Q*)*'
%D 2D
%D ((  P⊃Q    P*⊃Q    P⊃Q*    P*⊃Q*
%D    (P⊃Q)* (P*⊃Q)* (P⊃Q*)* (P*⊃Q*)*
%D    @ 0 @ 1 <-  @ 0 @ 2  -> @ 1 @ 3  -> @ 2 @ 3  =
%D    @ 4 @ 5 <-  @ 4 @ 6  -> @ 5 @ 7  -> @ 6 @ 7  =
%D    @ 0 @ 4  -> @ 1 @ 5  -> @ 2 @ 6  =  @ 3 @ 7  =
%D ))
%D ((  P⊃Q'    P*⊃Q'    P⊃Q*'    P*⊃Q*'
%D    (P⊃Q)*' (P*⊃Q)*' (P⊃Q*)*' (P*⊃Q*)*'
%D    @ 0 .tex= \dagSqr0101 @ 1 .tex= \dagSqr0000
%D    @ 2 .tex= \dagSqr1111 @ 3 .tex= \dagSqr1111
%D    @ 4 .tex= \dagSqr0111 @ 5 .tex= \dagSqr0011
%D    @ 6 .tex= \dagSqr1111 @ 7 .tex= \dagSqr1111
%D    @ 0 @ 1 <-  @ 0 @ 2  -> @ 1 @ 3  -> @ 2 @ 3  =
%D    @ 4 @ 5 <-  @ 4 @ 6  -> @ 5 @ 7  -> @ 6 @ 7  =
%D    @ 0 @ 4  -> @ 1 @ 5  -> @ 2 @ 6  =  @ 3 @ 7  =
%D ))
%D enddiagram
%D
$$\diag{imp-cube-Aor}$$



% --------------------
% «LT-intro-2»  (to ".LT-intro-2")
% (s "Introduction to Lawvere-Tierney Topologies (2)" "LT-intro-2") 
\myslide {Introduction to Lawvere-Tierney Topologies (2)} {LT-intro-2}

...plus how the `${}^*$' interacts with $ý$ and $Î$,

plus the notions of {\sl ${}^*$-sheaf} and {\sl sheafification},

among lots of other things.

With just a little bit more we get {\sl forcing}

and {\sl geometric maps between toposes}.

\msk

This all looks very technical, and it is.

However toposes of the form $\Set^\bbD$,

where $\bbD$ is a small DAG,

seem to be {\sl archetypal}, in a sense...



% --------------------
% «map-of-obvious-places»  (to ".map-of-obvious-places")
% (s "Map of the world" "map-of-obvious-places")
\myslide {Map of the world} {map-of-obvious-places}

This is the map of the ``obvious'' places

where my work can be presented.

\bsk


% (find-dn4 "dednat4.lua" "diag-words")
% (find-dn4 "dednat4.lua" "diag-forth-parser")
% (find-dn4 "dednat4.lua" "diag-arrows")

%L tbox_wrap = function (body)
%L     return -- "\\fbox{"..
%L            -- "\\!\\!\\!"..
%L            "\\begin{tabular}{c}"..
%L            body
%L            .."\\end{tabular}"
%L            -- .."\\!\\!\\!"
%L            -- .."}"
%L   end
%L forths[".tbox:"] = function ()
%L     ds[1].tex = tbox_wrap(getrestofline())
%L     forths["place"]()
%L   end

%D diagram places-and-people
%D 2Dx     100   +30   +30    +30
%D 2D  100 CT-js CS-js ALG-js LOG-js
%D 2D  +25 CT-bs CS-bs ALG-bs LOG-bs
%L xs = {}
%D 2Dx       120   +45    +50
%D 2D  +25   IC-p NC-p		    
%D 2D  +32   IC-t NC-t   proof-assists
%L xs = {}
%D 2Dx       145   +40
%D 2D  +32   MS-o MS-u
%L xs = {}
%D 2Dx     100   +30   +30    +30    +30
%D 2D  +32 CT-ls CS-ls ALG-ls LOG-ls
%D 2D  +32 CT-pp CS-pp ALG-pp LOG-pp TOP-pp
%L xs = {}
%D 2Dx          120
%D 2D  +22   grads
%D 2D  +10   ini-ci
%D 2D  +10   undergrads
%D 2D
%D (( CT-js  .tbox:  CT      \\ journals
%D    CS-js  .tbox:  CompSci \\ journals
%D    ALG-js .tbox:  Alg     \\ journals
%D    LOG-js .tbox:  Logic   \\ journals
%D    CT-bs  .tbox:  CT      \\ books
%D    CS-bs  .tbox:  CS/TT   \\ books
%D    ALG-bs .tbox:  Alg     \\ books
%D    LOG-bs .tbox:  Logic   \\ books
%D    IC-p   .tbox:  international \\ conferences \\ (papers)
%D    NC-p   .tbox:       national \\ conferences \\ (papers)
%D    IC-t   .tbox:  international \\ conferences \\ (tutorial)
%D    NC-t   .tbox:       national \\ conferences \\ (tutorial)
%D    proof-assists .tbox:   proof \\ assistants
%D    MS-o   .tbox:  math \\ seminars \\    PUC/IMPA/ \\ UFRJ/etc
%D    MS-u   .tbox:  math \\ seminars \\ at UFF
%D    CS-ls  .tbox:  local \\ comspci \\ seminars
%D    CT-ls  .tbox:  local \\ CT      \\ seminars
%D    ALG-ls .tbox:  local \\ algebra \\ seminars
%D    LOG-ls .tbox:  local \\ logic   \\ seminars
%D    CS-pp  .tbox:  local \\ CompScis
%D    CT-pp  .tbox:  local \\ categor- \\ ists
%D    ALG-pp .tbox:  local \\ algebra- \\ ists
%D    LOG-pp .tbox:  local \\ logic-   \\ ians
%D    TOP-pp .tbox:  local \\ topolog- \\ ists
%D    grads  .tbox:  grad students
%D    ini-ci .tbox:  iniciação científica
%D    undergrads  .tbox: undergrads
%D ))
%D enddiagram
%D
$$\diag{places-and-people}$$

\par However it makes more sense to use it to connect these ``places''
\par than to think of it as belonging to one or a few of them in particular...
\par For example, it can be used to discuss, in local seminar with non-CT-ists,
\par how CT and Type Theory texts are written, and how to approach them.

% {\myttchars
% \footnotesize
% \begin{verbatim}
% CT           CompSci  algebra      logic     
% journals     journals journals     journals
% 
% CT           CS/TT    algebra      logic
% books        books    books        books
% 
%         international
%         conferences
%         (paper)           national   
%                          conferences 
%         international     (paper)           proof
%         conferences                       assistants
%         (tutorial)        national   
%                         conferences 
%                          (tutorial) 
% 
%              general interest
%              math seminars at
%              other univerisities
% 
%               general interest
%              math seminars at UFF
% 
%              local    local        local
%              compsci  algebra      logic
%              seminar  seminar      seminar
% 
% local        local    local        local      local        
% categorists  compscis algebraists  logicians  topologists
% 
%                grad students
% 
%                 undergrads/
%                 iniciação
%                 científica
% \end{verbatim}
% }



% --------------------
% «no-theorems»  (to ".no-theorems")
% (s "There are no (new) theorems in these slides" "no-theorems")
\myslide {There are no (new) theorems in these slides} {no-theorems}

\par ...because the things that we usually call ``theorems''
\par in Category Theory belong to the real world ---
\par they are a construction {\sl plus something more}.
\msk
\par Take for example the Yoneda Lemma.
\par It says that given a functor $R: \catB \to \Set$
\par and an object $B$ of $\catB$ we have a bijection between the set $RB$
\par and the set of natural transformations $C \TNto ((B \to C) \to RC)$.
\par Here we are working in the syntactical world only
\par --- we {\sl mention} liftings to the real world,
\par but we don't do any such liftings explicitly,
\par and so what we get is just the projection of that bijection,
\par which is a proto-iso between $RB$
\par and the set of proto-NTs $C \TNto ((B \to C) \to RC)$.
\par Usually a ``theorem'' involving a such construction
\par would have to either show that it is always a bijection,
\par or to show a case where it is {\sl not} a bijection.
\msk
\par What we do have here is the definition of the two worlds
\par (mostly via examples, but whatever...), of the projections,
\par of the liftings, some ideas of how to work with this
\par splitting of worlds, and examples.
\msk
\par This is not the kind of work that usually gets published.





% --------------------
% «typing-proto-adjs»  (to ".typing-proto-adjs")
% (s "Typing proto-adjunctions" "typing-proto-adjs")
\myslide {Typing proto-adjunctions} {typing-proto-adjs}

\def\prod    {Ð{prod}}
\def\prodnat {Ð{prod}^\nat}
\def\exp     {Ð{prod}}
\def\expnat  {Ð{prod}^\nat}
\def\coev    {Ð{coev}}
\def\ulift   {Ð{ulift}}
\def\cart    {Ð{cart}}
\def\cleavage{Ð{cleavage}}

%:*||-*\Vdash *
%:*-|*\dashv *

%L dntprint(unabbrev([[
%L \def\CFTadjtypes{\begin{array}{ll}
%L   \Hom_\catC := A,B |-> (A->B)          \\
%L   \id_\catC  := A |-> \id_A             \\
%L   ¢_\catC    := A,B,C,f,g |-> h         \\
%L   \catC := (\catC_0, \Hom_\catC, \id_\catC, ¢_\catC)    \\
%L                                         \\
%L   F_0 := A |-> FA                       \\
%L   F_1 := A,B,f |-> Ff                   \\
%L   F   := (F_0, F_1)                     \\
%L                                         \\
%L   T_0 := A \mto T_A                     \\
%L   T   := (T_0)                          \\
%L                                         \\
%L   \flat_{AB}  := g \mto f               \\
%L   \sharp_{AB} := f \mto g               \\
%L   \flat  := A,B \mto \flat_{AB}         \\
%L   \sharp := A,B \mto \sharp_{AB}        \\
%L   \eta := A \mto \eta_A                 \\
%L   \ee  := B \mto \ee_B                  \\
%L   (L-|R) := (\flat,\sharp,\eta,\ee)     \\
%L \end{array}}
%L ]]))

$$\hss\CFTadjtypes
  \hss
$$


% --------------------
% «typing-proto-CCCs»  (to ".typing-proto-CCCs")
% (s "Typing proto-CCCs" "typing-proto-CCCs")
\myslide {Typing proto-CCCs} {typing-proto-CCCs}

%L dntprint(unabbrev([[
%L \def\CCCtypes{\begin{array}{ll}
%L   \prodnat := A,h |- f,g                \\
%L   \prod    := A,f,g |-> h               \\
%L   B×C      := (P,,',\prod)            \\
%L   ×_0      := B,C |-> B×C               \\
%L   ×_1      := B,C,B',C',\bb,\cc |-> \bb×\cc    \\
%L   ×        := (×_0,×_1)                 \\
%L                                         \\
%L   ! := A |-> t                          \\
%L   1 := (T,!)                            \\
%L                                         \\
%L   \uncur_{BC} := A,g |-> f              \\
%L   \cur_{BC}   := A,f |-> g              \\
%L   B{->}C      := E,\ev_{BC},\cur_{BC}   \\
%L   ->_0        := B,C |-> B{->}C         \\
%L   \\
%L   (×B)_0      := A        |-> A×B        \\
%L   (×B)_1      := A',A,\aa |-> \aa×B      \\
%L   (B{->})_0   := C        |-> (B{->}C)   \\
%L   (B{->})_1   := C,C',\cc |-> (B{->}\cc) \\
%L   \uncur_B    := A,C,g    |-> f          \\
%L   \cur_B      := A,C,f    |-> g          \\
%L   (×B)        := ((×B)_0, (×B)_1)        \\
%L   (B{->})     := ((B{->})_0, (B{->})_1)  \\
%L   \eta_B      := A |-> \coev_{AB}        \\
%L   \ee_B       := C |-> \ev_{BC}          \\
%L   ((×B)-|(B{->})) := (\uncur_B, \cur_B, \eta_B, \ee_B)  \\
%L   -> \;       := B |-> (B{->}),((×B)-|(B{->})) \\
%L   \\
%L   (\catC,×,1,->) \\
%L \end{array}}
%L ]]))

$$\hss\CCCtypes
  \hss
$$


% --------------------
% «typing-proto-fibs»  (to ".typing-proto-fibs")
% (s "Typing proto-fibrations" "typing-proto-fibs")
\myslide {Typing proto-fibrations} {typing-proto-fibs}

%L dntprint(unabbrev([[
%L \def\BEtypes{\begin{array}{ll}
%L   \bbB        := (\bbB_0, \Hom_\bbB, \id_\bbB, ¢_\bbB) \\
%L   \bbE_0      := B |-> \bbE_{B0}                       \\
%L   \Hom_\bbE   := A,B,f,P,Q |-> \Hom_\bbE(P,Q,f)        \\
%L   \id_\bbE    := A,P |-> \id_P                         \\
%L   ¢_\bbE      := A,B,C,f,g,P,Q,R,f',g' |-> h'          \\
%L   \bbE        := (\bbE_0, \Hom_\bbE, \id_\bbE, ¢_\bbE) \\
%L   \\
%L   \ulift_{h'g'} := f |-> f'                 \\
%L   \cart_{g'}  := A,h,P,h' |-> \ulift_{h'g'} \\
%L   \ov{g}_0    := R |-> Q,g',\cart_{g'}      \\
%L   \cleavage   := B,C,g |-> \ov{g}_0         \\
%L   \end{array}}
%L ]]))


$$\hss\BEtypes
  \hss
$$





%*

\end{document}




% Downcasing types 1: hyperdoctrines
% Downcasing types 2: monadicity
% Downcasing types 3: toposes
% Downcasing types 4: sheaves
% Downcasing types 5: Begriffschrifft
% Downcasing types 6: differential categories














% Local Variables:
% coding:           raw-text-unix
% ee-anchor-format: "«%s»"
% End: