The category of opetopes and the category of opetopic sets
Eugenia Cheng
Department of Pure Mathematics
We give an explicit construction of the category \cat{opetope} of opetopes. We prove that the category of opetopic sets is equivalent to the category of presheaves over \cat{opetope}
macros1.tex

\input{diagrams}

\newcommand{\op}{\ensuremath{\mbox{\hspace{1pt}{\scriptsize op}}}}
\newcommand{\set}{\ensuremath{\mbox{\bfseries Set}}}
\newcommand{\Set}{\ensuremath{\mbox{\bfseries Set}}}
\newcommand{\cat}[1]{\ensuremath{\mbox{\bfseries {\upshape {#1}}}}}
\newcommand{\free}[1]{\ensuremath{{\mathcal F} \hspace{-1.5pt}
    {#1}^{\op}}}
\newcommand{\freee}[1]{\ensuremath{{\mathcal F} \hspace{-1.5pt}
    {#1}}}
\newcommand{\elt}[1]{\ensuremath{\mbox{\upshape elt} \hspace{1pt} {#1}}}
\newcommand{\sfree}[1]{\ensuremath{{\mathcal F} \hspace{-1.5pt}
    {#1}^{\mbox{\hspace{1pt}{\tiny op}}}}}
\newcommand{\cl}[1]{\ensuremath{\mathcal {#1}}}
\newcommand{\bb}[1]{\ensuremath{\mathbb {#1}}}

\newcommand{\xxx}{\ensuremath{
    \mbox{elt}\hspace{1pt}Q \times_{{\mathcal
    F}\hspace{-1pt}S^{\mbox{{\tiny op}}}}{\mathcal
    F}\hspace{-1pt}X^{\mbox{{\scriptsize op}}}}}

\newcommand{\xx}[3]{\ensuremath{
\mbox{elt}\hspace{1pt}{#1} \times_{{\mathcal
F}\hspace{-1pt}{#2}^{\mbox{{\tiny op}}}}{\mathcal
F}\hspace{-1pt}{#3}^{\mbox{{\scriptsize op}}}}}

\newcommand{\xv}[1]{\ensuremath{{#1}_1,\ldots,{#1}_n}}
\newcommand{\xvr}[2]{\ensuremath{{#1}_1,\ldots,{#1}_{#2}}}
\newcommand{\pr}{{\bfseries Proof.  }}
\newcommand{\kml}{Kelly-Mac~Lane }

\newcommand{\vect}[3]{\renewcommand{\arraystretch}{0.5}\ensuremath{
    \left(\begin{array}{@{} c @{\hspace{0pt}}l @{}} {#1} \\
    \downarrow & {#2} \\ {#3} \end{array}\right)}}

\newcommand{\tomspan}[8]
{\begin{picture}(80,50)      %
\put(8,10){${#2}\vect{#3}{#4}{#1}$}  %  bottom left
\put(29.5,35){$\vect{#5}{#6}{#1}$}  %  top
\put(47,10){$\vect{#3}{#4}{#1}$}  %  bottom right

\put(29,35){\vector(-2,-3){10}}  %
\put(40,35){\vector(2,-3){10}}  %
\put(24,30){\makebox(0,0)[r]{${#7}$}} %  left
\put(45,30){\makebox(0,0)[l]{${#8}$}}%  right

\end{picture}}


\newcommand{\tensordot}{\ensuremath{\otimes \cdots \otimes}}




\newcommand{\lra}{\ensuremath{\longrightarrow}}
\newcommand{\map}[1]{\ensuremath{\stackrel{{#1}}{\lra}}}
\newcommand{\simarr}{\ensuremath{\stackrel{\sim}{\longrightarrow}}}
\newcommand{\sm}{symmetric multicategory{}}
\newcommand{\sms}{symmetric multicategories{}}
\newcommand{\topd}{$(\cl{E},T)$-operad}
\newcommand{\tmcat}{$(\cl{E},T)$-multicategory}
\newcommand{\tmcats}{$(\cl{E},T)$-multicategories{}}
\newcommand{\tqopd}{$(\cl{E}_Q,T_Q)$-operad}
\newcommand{\tqmcat}{$(\cl{E}_Q,T_Q)$-multicategory}
\newcommand{\Topd}{\ensuremath{(\cl{E}, T)\mbox{-\cat{Operad}}}}
\newcommand{\Tmcat}{\ensuremath{(\cl{E},
    T)\mbox{-\cat{Multicat}}}}
\newcommand{\Tqopd}{\ensuremath{(\cl{E}_Q,
    T_Q)\mbox{-\cat{Operad}}}}
\newcommand{\Tqmcat}{\ensuremath{(\cl{E}_Q,
    T_Q)\mbox{-\cat{Multicat}}}}
\newcommand{\st}{\ensuremath{(\cl{E},T)}}
\newcommand{\mcat}{multicategory }
\newcommand{\mcats}{multicategories }
\newcommand{\sqtq}{\ensuremath{(\cl{E}_Q, T_Q){}}}
\newcommand{\monic}{\ensuremath{\succ \hspace{-3pt}
    \longrightarrow}}
\newcommand{\tqplus}{\ensuremath{(\cl{E}_{Q^+},T_{Q^+})}}
\newcommand{\tqprime}{\ensuremath{({\cl{E}_Q}', {T_Q}')}}
\newcommand{\tpr}{\ensuremath{{T_Q}'}}
\newcommand{\tpl}{\ensuremath{T_{Q^+}}}
\newcommand{\cspl}{\ensuremath{\cl{E}_{Q^+}}}
\newcommand{\cspr}{\ensuremath{{\cl{E}_Q}'}}
\newcommand{\spl}{\ensuremath{S_{Q^+}}}
\newcommand{\spr}{\ensuremath{{S_Q}'}}
\newcommand{\iso}{isomorphism{}}
\newcommand{\uto}{up to isomorphism{}}
\newcommand{\tck}{\ensuremath{T(C^{(k)})}}
\newcommand{\catck}{\ensuremath{\bb{C}^{(k)}}}
\newcommand{\ck}{\ensuremath{C^{(k)}}}
\newcommand{\id}{\ensuremath{\mbox{\em id}}}
\newcommand{\qeed}{\hfill $\Box$}

\newcommand{\nspan}[5]
{\setlength{\unitlength}{1mm}
\begin{center}
\begin{picture}(30,30)(15,15)      %
\put(17,23){\makebox(0,0)[t]{${#1}$}}  %  bottom left
\put(32,37){\makebox(0,0)[b]{${#3}$}}  %  top
\put(45,23){\makebox(0,0)[t]{${#5}$}}  %  bottom right

\put(29,35){\vector(-1,-1){10}}  %
\put(33,35){\vector(1,-1){10}}  %
\put(23,32){\makebox(0,0)[r]{${#2}$}} %  left
\put(39,32){\makebox(0,0)[l]{${#4}$}}%  right

\end{picture}
\end{center}}

\newcommand{\ope}{\cat{Ope}}
\newcommand{\oset}{\cat{OSet}}
\newcommand{\pshf}[1]{\ensuremath{{#1}^{\op} \lra \cat{Set}}}
\newcommand{\pshfcat}[1]{\ensuremath{[{#1}^{\op},\cat{Set}]}}
\newcommand{\lope}[1]{\ensuremath{\cat{LOpe}_{#1}}}


\newcommand{\bpoint}[1]{
\begin{itemize}
\item {#1}	
\end{itemize}}

\newcommand{\bs}{\ensuremath{\backslash}}
macros2.tex



\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{definitions}[theorem]{Definitions}
\newtheorem{example}[theorem]{Example}
\newtheorem{examples}[theorem]{Examples}
\newtheorem{remarks}[theorem]{Remarks}

\newenvironment{prf}{\vspace{2ex}\begin{sloppypar}{\noindent\upshape
{\bfseries Proof. }}} {{\hspace*{\fill}
$\Box$}\end{sloppypar}\vspace{2ex}}

\newenvironment{prfof}[1]{\vspace{2ex}\begin{sloppypar}{\noindent
\upshape{\bfseries Proof of {#1}. }}} {{\hspace*{\fill}
$\Box$}\end{sloppypar}\vspace{2ex}}


\newcommand{\numroman}{\renewcommand{\labelenumi}{\roman{enumi})}}
\newcommand{\numarabic}{\renewcommand{\labelenumi}{\arabic{enumi})}}
\newcommand{\numAlph}{\renewcommand{\labelenumi}{\Alph{enumi}.}}
\newcommand{\pica}{\begin{center} \input}
\newcommand{\picz}{\end{center}}
\newcommand{\length}[1]{\setlength{\unitlength}{#1}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%5%%%



%\renewcommand{\labelenumi}{\roman{enumi})}

\newcommand{\bibref}{\renewcommand{\bibname}{References}}		% don't need if we're in article
\newcommand{\mybibstyle}{\bibliographystyle{alphanum}}

\newlength{\leng}
\newlength{\fontleng}
\newcommand{\sunit}{\setlength{\unitlength}{1mm}}
\newcommand{\setleng}[1]{\setlength{\leng}{#1}
    \setlength{\unitlength}{\leng}}
\newcommand{\setunit}[1]{\setlength{\unitlength}{#1}}

opics.tex

%This file contains commands for opic diags
%must be used in picture environment
%xcoord, ycoord, length measurement including mm


\newcommand{\gridit}{
\put(0,0){*} \put(0,10){*} \put(10,0){*}}

%%%%%%%%%%%%%a

\newcommand{\diaga}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{1.3\leng} %

\put(1,2){\line(1,0){5}} %
\put(1,3){\line(1,0){5}} %
\put(1,4){\line(1,0){5}} %
\put(1,5){\line(1,0){5}} %
\put(1,6){\line(1,0){5}} %
\put(4,0){\line(1,1){4}} %
\put(4,8){\line(1,-1){4}} }}



%%%%%%%%%%%%%b

\newcommand{\diagb}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{1.3\leng} %

\put(3,1){\line(0,1){5}} %
\put(4,1){\line(0,1){5}} %
\put(5,1){\line(0,1){5}} %
\put(6,1){\line(0,1){5}} %
\put(7,1){\line(0,1){5}} %
\put(1,4){\line(1,1){4}} %
\put(5,8){\line(1,-1){4}}}}

%%%%%%%%%%%%%c

\newcommand{\diagc}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(1,2){\line(1,0){5}} %
\put(1,3){\line(1,0){5}} %
\put(1,4){\line(1,0){5}} %
\put(1,1){\line(1,0){5}} %
\put(3.5,-1.5){\line(1,1){4}} %
\put(3.5,6.5){\line(1,-1){4}}}}

%%%%%%%%%%%%%%%%d

\newcommand{\diagd}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{0.7\leng} %

\put(0,6){\line(1,-2){3}} %
\put(2,7){\line(1,-2){3}} %
\put(4,8){\line(1,-2){3}} %
\put(6,9){\line(1,-2){3}} %
\put(0,0){\line(1,0){7}} %
\put(7,0){\line(2,3){4}}}}

%%%%%%%%%%%%%%%%e

\newcommand{\diage}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{0.7\leng} %

\put(0,-6){\line(1,2){3}} %
\put(2,-7){\line(1,2){3}} %
\put(4,-8){\line(1,2){3}} %
\put(6,-9){\line(1,2){3}} %
\put(0,0){\line(1,0){7}} %
\put(7,0){\line(2,-3){4}} }}

%%%%%%%%%%%%%%%%%f

\newcommand{\diagf}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}}}}


%%%%%%%%%%%%%%%%%g
\newcommand{\diagg}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(0,0)(2,1)(4,0) }}

%%%%%%%%%%%%%%%%%h

\newcommand{\diagh}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(0,0)(2,1)(4,0)   %
\qbezier(0,0)(2,2)(4,0) %
}}
%%%%%%%%%%%%%%%%%i

\newcommand{\diagi}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(0,0)(2,1)(4,0)   %
\qbezier(0,0)(2,2)(4,0) %
\qbezier(0,0)(2,3)(4,0) %
}}

%%%%%%%%%%%%%%%%%j
\newcommand{\diagj}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\qbezier(0,0)(2,2)(4,0) }}

%%%%%%%%%%%%%%%%%k
\newcommand{\diagk}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\qbezier(0,0)(2,1)(4,0)   %
\qbezier(0,0)(2,2)(4,0) %
}}

%%%%%%%%%%%%%%%%%l
\newcommand{\diagl}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\qbezier(0,0)(2,1)(4,0)   %
\qbezier(0,0)(2,2)(4,0) %
\qbezier(0,0)(2,3)(4,0) %
}}

%%%%%%%%%%%%%%%%%m
\newcommand{\diagm}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(2,3)(4,2)(4,0)}}



%%%%%%%%%%%%%%%%%n
\newcommand{\diagn}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(2,3)(4,2)(4,0)  %
\qbezier(2,3)(4.9,2.6)(4,0)  }}

%%%%%%%%%%%%%%%%%o
\newcommand{\diago}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(2,3)(4,2)(4,0)  %
\qbezier(2,3)(4.9,2.6)(4,0)  %
\qbezier(2,3)(5.6,3.4)(4,0)}}

%%%%%%%%%%%%%%%%%p

\newcommand{\diagp}[3]{

\put(#1,#2){

\setlength{\unitlength}{#3}  %
\fontsize{#3}{20}

\put(0,0){\makebox(0,0){$\equiv$}}  %
\put(0.35,0){\makebox(0,0){$\rangle$}}}}

%%%%%%%%%%%%%%%%%q

\newcommand{\diagq}[3]{

\put(#1,#2){

\setlength{\unitlength}{#3}  %

\qbezier(0.5,0)(2.5,0.5)(3,4)   %
\put(3,4){\makebox(0,0)[bc]{{\tiny $\Delta$}}} }}


%%%%%%%%%%%%%%%%%r
\newcommand{\diagr}[3]{

\put(#1,#2){\setlength{\leng}{#3}

\setlength{\unitlength}{1.4\leng}

\qbezier(0.5,0)(2.5,1)(3,4)   %
\put(0.5,-0){\makebox(0,0)[c]{{\tiny $\Delta$}}} }}

%%%%%%%%%%%%%%%%%%s

\newcommand{\diags}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagj{0}{0}{2\leng}     %
\diagj{7}{0}{2\leng}        %
\diagp{5.5}{0.5}{3\leng}}}


%%%%%%%%%%%%%%%%%%t

\newcommand{\diagt}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagk{0}{0}{2\leng}       %
\diagj{7}{0}{2\leng}         %
\diagp{5.5}{0.5}{3\leng} }}

%%%%%%%%%%%%%%%%%%u

\newcommand{\diagu}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagl{0}{0}{2\leng}       %
\diagj{7}{0}{2\leng}         %
\diagp{5.5}{0.5}{3\leng} }}

%%%%%%%%%%%%%%%%%%v

\newcommand{\diagv}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagf{0}{0}{2\leng}       %
\diagf{7}{0}{2\leng}         %
\diagp{5.5}{1.5}{3\leng} }}

%%%%%%%%%%%%%%%%%%w

\newcommand{\diagw}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagm{0}{0}{2\leng}       %
\diagf{7}{0}{2\leng}         %
\diagp{5.5}{1.5}{3\leng} }}

%%%%%%%%%%%%%%%%%%x

\newcommand{\diagx}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diago{0}{0}{2\leng}       %
\diagf{7.3}{0}{2\leng}         %
\diagp{6}{1.5}{3\leng} }}

%%%%%%%%%%%%%%%%%%y

\newcommand{\diagy}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diago{0}{0}{2\leng}       %
\diagf{7.4}{0}{2\leng}         %
\diagp{6.4}{1.5}{3\leng} }}


%%%%%%%%%%%%%%%%%%z

\newcommand{\diagz}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagg{0}{0}{2\leng}       %
\diagf{7}{0}{2\leng}         %
\diagp{5.5}{1.5}{3\leng} }}

%%%%%%%%%%%%%%%%%aa

\newcommand{\diagaa}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagh{0}{0}{2\leng}       %
\diagf{7}{0}{2\leng}         %
\diagp{5.5}{1.5}{3\leng} }}


%%%%%%%%%%%%%%%%%%ab

\newcommand{\diagab}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagi{0}{0}{2\leng}       %
\diagf{7}{0}{2\leng}         %
\diagp{5.5}{1.5}{3\leng} }}


%%%%%%%%%%%%%%%%%%%%ad

\newcommand{\diagad}[3]{

\put(#1,#2){

\setlength{\unitlength}{#3}  %

\qbezier(0.5,0)(2.5,-0.5)(3,-4)   %
\put(3,-4){\makebox(0,0)[t]{{\tiny $\nabla$}}}}}


%%%%%%%%%%%%%%%%%%%%ac

\newcommand{\diagac}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diags{0}{0}{\leng}       %
\diagt{0}{6}{\leng}         %
\diagt{9}{3}{\leng}    %
\diagq{9}{0.5}{\leng} %
\diagad{9}{6.2}{\leng}}}



%%%%%%%%%%%%%%%%%%%%ae

\newcommand{\diagae}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagac{0}{0}{\leng}       %
\diagt{0}{6}{\leng}         %
\diagu{28}{3}{\leng}    %
\diagc{22}{2.5}{\leng}}} %


%%%%%%%%%%%%%%%%%%%%af

\newcommand{\diagaf}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagv{0}{0}{\leng}       %
\diagv{17}{0}{\leng}         %
\diagc{12}{0}{\leng}}} %

%%%%%%%%%%%%%%%%%%%%ag


\newcommand{\diagag}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagw{0}{0}{\leng}       %
\diagy{17}{0}{\leng}         %
\diagc{12}{0}{\leng}    %
\diagu{-4.5}{5}{\leng}    %
\diagr{3}{2.5}{\leng}}} %


%%%%%%%%%%%%%%%%%%%%ah


\newcommand{\diagah}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagv{0}{0}{\leng}       %
\diagy{17}{0}{\leng}         %
\diagc{12}{0}{\leng}    %
\diagy{-5}{4.5}{\leng}    %
\diagr{2}{2.2}{\leng}}} %


%%%%%%%%%%%%%%%%%%%%ai

\newcommand{\diagai}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagv{0}{0}{\leng}       %
\diagab{17}{0}{\leng}         %
\diagc{12}{0}{\leng}    %
\diagab{-5}{4.5}{\leng}    %
\diagr{2}{2.2}{\leng}}} %


%%%%%%%%%%%%%%%%%%%%aj

\newcommand{\diagaj}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagz{0}{0}{\leng}       %
\diagab{17}{0}{\leng}         %
\diagc{12}{0}{\leng}    %
\diagu{-7.5}{-3}{\leng}    %
\diagq{1}{-2.5}{\leng}}} %


%%%%%%%%%%%%%%%%%ak
\newcommand{\diagak}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(2,3)(4.9,2.6)(4,0)}}


%%%%%%%%%%%%%%%%%al
\newcommand{\diagal}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(0,0)(2,2)(4,0) }}


%%%%%%%%%%%%%%%%%%am

\newcommand{\diagam}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagak{0}{0}{2\leng}       %
\diagf{7.3}{0}{2\leng}         %
\diagp{6}{1.5}{3\leng} }}


%%%%%%%%%%%%%%%%%%an

\newcommand{\diagan}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{2\leng} %

\diagal{0}{0}{2\leng}       %
\diagf{7.3}{0}{2\leng}         %
\diagp{6}{1.5}{3\leng} }}




%%%%%%%%%%%%%%%%%%%%as

\newcommand{\diagas}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %

\diagag{-15}{0}{\leng}       %
\diagae{-35}{25}{\leng}       %
\diaga{45}{10}{\leng}       %
\diagw{75}{7}{\leng}       %
\diagc{100}{7}{\leng}       %
\diagy{110}{7}{\leng}       %
\diagac{57}{20}{\leng}       %
\diagy{85}{-30}{\leng}       %
\diagd{75}{-12}{\leng}       %
\diage{115}{-7}{\leng}       %
\diagb{90}{-15}{\leng}       %


\qbezier(94,27)(92,15)(83.3,11.7)  %
\put(84,11.5){\makebox(0,0)[r]{{\tiny $\Delta$}}}

\qbezier(32.5,32)(29,26)(12,24)  %
\qbezier(12,24)(-9,21)(-13,13)  %
\put(-13,13){\makebox(0,0)[t]{{\scriptsize $\nabla$}}}}}


%%%%%%%%%%%%%%%%%%%%at

\newcommand{\diagat}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %

\diagah{-15}{25}{\leng}       %
\diagaf{-30}{0}{\leng}       %
\diaga{45}{10}{\leng}       %
\diagah{75}{7}{\leng}       %
\diagy{85}{-30}{\leng}       %
\diagd{75}{-12}{\leng}       %
\diage{115}{-7}{\leng}       %
\diagb{90}{-15}{\leng}       %

\qbezier(14.5,4)(14,8)(5,13)  %
\qbezier(5,13)(-4,19)(-4.5,26)  %
\put(-4,26){\makebox(0,0)[b]{{\scriptsize $\Delta$}}}}}

%%%%%%%%%%%%%%%%%%%%au

\newcommand{\diagau}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %

\diagai{-15}{25}{\leng}       %
\diagaf{-30}{0}{\leng}       %
\diaga{45}{10}{\leng}       %
\diagai{75}{7}{\leng}       %
\diagab{85}{-30}{\leng}       %
\diagd{75}{-12}{\leng}       %
\diage{115}{-7}{\leng}       %
\diagb{90}{-15}{\leng}       %

\qbezier(14.5,4)(14,8)(5,13)  %
\qbezier(5,13)(-4,19)(-4.5,26)  %
\put(-4,26){\makebox(0,0)[b]{{\scriptsize $\Delta$}}}}}


%%%%%%%%%%%%%%%%%%%%av

\newcommand{\diagav}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %

\diagaj{-15}{30}{\leng}       %
\diagae{-35}{-5}{\leng}       %
\diaga{45}{10}{\leng}       %
\diagz{75}{25}{\leng}       %
\diagc{100}{25}{\leng}       %
\diagab{110}{25}{\leng}       %
\diagac{57}{5}{\leng}       %
\diagab{85}{-30}{\leng}       %
\diagd{75}{-12}{\leng}       %
\diage{115}{-7}{\leng}       %
\diagb{90}{-15}{\leng}      %


\qbezier(79,24)(80,20)(86,18)  %
\qbezier(86,18)(92,16)(93,12)   %
\put(79,24){\makebox(0,0)[b]{{\tiny $\Delta$}}}

\qbezier(-19,23)(-18,15)(5,12)  %
\qbezier(5,12)(30,10)(31.5,3)  %
\put(-19,23){\makebox(0,0)[b]{{\scriptsize $\Delta$}}}}}

%%%%%%%%%%%%%%%%%aw

\newcommand{\diagaw}[3]{
\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{4\leng} %
\fontsize{3.8\leng}{15}

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}}
\put(0.3,1.6){$f$}   %
\put(3.4,1.6){$g$}   %
\put(2,-1){$\bar{g}$} %
\put(1.8,1){$\Downarrow$}

}}


%%%%%%%%%%%%%%%%%ax


\newcommand{\diagax}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{4\leng} %
\fontsize{3.8\leng}{15}

\diagam{0}{0}{2\leng}  %
\put(0.4,1.6){$f$}          %
\put(3.3,1.5){$\phi$}          %
\put(5.5,2.8){$u_{31}$} }}

%%%%%%%%%%%%%%%%%ay

\newcommand{\diagay}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{4\leng} %
\fontsize{3.8\leng}{15}

\diagan{0}{0}{2\leng}  %
\put(0.4,1.6){$f$}          %
\put(1.7,0.5){{\small $\bar\phi$}}          %
\put(5.5,2.8){$u_{32}$} }}

%%%%%%%%%%%%%%%%%az

\newcommand{\diagaz}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagay{0}{0}{\leng}  %
\diagax{0}{20}{\leng} %
\put(36.5,15){$\|$}     %
\put(36,4){$\phi_1$}   %
\put(36,24){$\phi_1$}  %
\put(7,6){$u_2$}  %
\put(7,24){$u_2'$} }}


%%%%%%%%%%%%%%%%%ba


\newcommand{\diagba}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagag{0}{0}{\leng}  %
\put(1,14){$\phi$}     %
\put(25,8){$u_{41}$}   %
\put(45,7){$\phi_1$}   %
\put(10,-2){$u_{31}$}     %

}}

%%%%%%%%%%%%%%%%%bb

\newcommand{\diagbb}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagah{0}{0}{\leng}  %
\put(10,-2){$\phi_2$}     %
\put(25,8){$u_{42}$}   %
\put(45,7){$\phi_1$}   %


   }}

%%%%%%%%%%%%%%%%%bc

\newcommand{\diagbc}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagai{0}{0}{\leng}  %
\put(10,-2){$\phi_2$}     %
\put(25,8){$u_{43}$}   %
\put(43,7){$\phi_3$}   %
}}

%%%%%%%%%%%%%%%%%bd

\newcommand{\diagbd}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagaj{0}{0}{\leng}  %
\put(-5,-11){$\bar\phi$}     %
\put(25,8){$u_{44}$}   %
\put(43,7){$\phi_3$}   %
\put(10,7){$u_{32}$}     %
}}


%%%%%%%%%%%%%%%%%be

\newcommand{\diagbe}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagae{0}{0}{\leng}  %
\put(47,15){$\phi$}

}}

%%%%%%%%%%%%%%%%%bf

\newcommand{\diagbf}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagas{0}{0}{\leng}  %
\put(12,40){$\phi$} %
\put(10,-6){$u_{41}$} %
\put(48,23){$u_{51}$} %
\put(103,17){$\phi_1$} %
\put(123,-15){$\phi_2$} %
\put(103,-12){$u_{52}$}  %


}}


%%%%%%%%%%%%%%%%%bg

\newcommand{\diagbg}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagat{0}{0}{\leng}  %
\put(-4,-7){$\phi_4$} %
\put(11,33){$u_{42}$} %
\put(48,23){$u_{54}$} %
\put(101,17){$\phi_3$} %
\put(123,-15){$\phi_2$} %
\put(103,-12){$u_{53}$}  %


}}

%%%%%%%%%%%%%%%%%bh

\newcommand{\diagbh}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagau{0}{0}{\leng}  %
\put(-4,-7){$\phi_4$} %
\put(11,33){$u_{43}$} %
\put(48,23){$u_{55}$} %
\put(101,17){$\phi_5$} %
\put(123,-15){$\phi_6$} %
\put(103,-12){$u_{56}$}  %
}}



%%%%%%%%%%%%%%%%%bi

\newcommand{\diagbi}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %
\fontsize{3.8\leng}{15}

\diagav{0}{0}{\leng}  %
\put(10,40){$u_{44}$} %
\put(11,-6){$\bar\phi$} %
\put(48,23){$u_{58}$} %
\put(103,35){$\phi_7$} %
\put(123,-15){$\phi_6$} %
\put(103,-12){$u_{57}$}  %
}}

%%%%%%%%%%%%%%%%%%%%%%%%bj
%has to be 1mm

\newcommand{\diagbj}[3]{

\put(#1,#2){ \setlength{\leng}{#3} %
\setlength{\unitlength}{1.2\leng} %
\setlength{\fontleng}{\leng}   %
\fontsize{\fontleng}{15}

\put(3.5,0){\line(-3,2){3}} %
\put(4,0.5){\line(-3,2){3}} %
\put(3.35,0){\makebox(0,0)[c]{$\underline{\hspace{0.5em}}$}}  %
\put(4.1,0.65){\makebox(0,0)[c]{$\mid$}}  }}

%%%%%%%%%%%%%%%%%%%%%%%%bk
%has to be 1mm

\newcommand{\diagbk}[3]{

\put(#1,#2){ \setlength{\leng}{#3} %
\setlength{\unitlength}{1.2\leng} %
\setlength{\fontleng}{\leng}   %
\fontsize{\fontleng}{15}

\put(-3.5,0){\line(3,2){3}} %
\put(-4,0.5){\line(3,2){3}} %
\put(-3.35,0.0){\makebox(0,0)[c]{$\underline{\hspace{0.5em}}$}}  %
\put(-4,0.65){\makebox(0,0)[c]{$\mid$}}  }}

%%%%%%%%%%%%%%%%%%%%%%%onetwo
%unary 2-cell

\sunit

\newcommand{\onetwo}[8]{

\put(#1,#2){ \setlength{\leng}{#3} %
\setlength{\unitlength}{\leng} %

\diagj{0}{0}{6\leng} %
\put(-1,0){\makebox(0,0)[r]{#4}} %
\put(26,0){\makebox(0,0)[l]{#5}} %
\put(12,7){\makebox(0,0)[b]{#6}} %
\put(12,-2){\makebox(0,0)[t]{#7}} %
\put(12,2.5){\makebox(0,0)[c]{$\Downarrow$}}  %
\put(14,2.5){\makebox(0,0)[l]{#8}} }}

%%%%%%%%%%%%%%%%%%%%%%%onetwob
%unary 2-cell with no arrow drawn

\sunit

\newcommand{\onetwob}[8]{

\put(#1,#2){ \setlength{\leng}{#3} %
\setlength{\unitlength}{\leng} %

\diagj{0}{0}{6\leng} %
\put(-1,0){\makebox(0,0)[r]{#4}} %
\put(26,0){\makebox(0,0)[l]{#5}} %
\put(12,7){\makebox(0,0)[b]{#6}} %
\put(12,-2){\makebox(0,0)[t]{#7}} %
\put(12,2.5){\makebox(0,0)[c]{#8}}   }}




%%%%%%%%%%%%%%%%%%%%%%%%bl

\newcommand{\diagbl}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{.4\leng} %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(0,0){\line(1,0){40}}}}


%%%%%%%%%%%%%%%%%%%%%%%%bm

\newcommand{\diagbm}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{\leng} %

\diagbl{0}{0}{\leng}  %
\diagp{21}{3}{6\leng}  %
\diagbl{26}{0}{\leng}}}

%%%%%%%%%%%%%%%%%%%%%%%%bn

\newcommand{\diagbn}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{1.2\leng} %
\fontsize{3.5\leng}{15}

\put(5,0){\vector(1,0){10}}  %
\put(10,9){\makebox(0,0)[c]{.}}  %
\put(10,3.5){\makebox(0,0)[c]{$\Downarrow$}}}} %

%%%%%%%%%%%%%%%%%%%%%%%nulltwo
%nullary 2-cell

\sunit

\newcommand{\nulltwo}[6]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{1.2\leng} %
\fontsize{3.5\leng}{15}

\put(5,0){\vector(1,0){10}}  %
\put(10,9){\makebox(0,0)[c]{.}}  %
\put(10,3.5){\makebox(0,0)[c]{$\Downarrow$}}

\fontsize{11pt}{15} %
\put(4,0){\makebox(0,0)[r]{#4}}  %
\put(16.5,0){\makebox(0,0)[l]{#4}}  %
\put(10,-2){\makebox(0,0)[t]{#5}}  %
\put(12,3.5){\makebox(0,0)[l]{#6}}  %


}} %


%%%%%%%%%%%%%%%%%%%%%%%onecell
% 1-cell

\sunit

\newcommand{\onecell}[6]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{1.2\leng} %

\put(4,0){\makebox(0,0)[r]{#4}}  %
\put(16.5,0){\makebox(0,0)[l]{#5}}  %
\put(10,1.5){\makebox(0,0)[b]{#6}}  %

\put(5,0){\vector(1,0){10}}}}  %

%%%%%%%%%%%%%%%%%threetwo
%labelled 3-ary 2-cells for specifically p.22 (no scaling possible)

\newcommand{\threetwo}[9]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\diagbl{0}{0}{\leng}  %

\put(-2,-1){\makebox(0,0)[c]{#1}}  %
\put(2,9){\makebox(0,0)[c]{#2}}  %
\put(15,9){\makebox(0,0)[c]{#3}}  %
\put(19,-1){\makebox(0,0)[c]{#4}}  %

\put(0,5){\makebox(0,0)[c]{#5}}  %
\put(8.5,11){\makebox(0,0)[c]{#6}}  %
\put(17,5){\makebox(0,0)[c]{#7}}  %
\put(8.5,-3){\makebox(0,0)[c]{#8}}  %

\put(8.5,4){\makebox(0,0)[c]{$\Downarrow$}}  %
\put(11,4){\makebox(0,0)[c]{#9}} }} %

%%%%%%%%%%%%%%%%%threetwob
%labelled 3-ary 2-cells for specifically p.22 (no scaling possible)

\newcommand{\threetwob}[9]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\diagbl{0}{0}{\leng}  %

\put(-2,-1){\makebox(0,0)[c]{#1}}  %
\put(2,9){\makebox(0,0)[c]{#2}}  %
\put(15,9){\makebox(0,0)[c]{#3}}  %
\put(19,-1){\makebox(0,0)[c]{#4}}  %

\put(0,5){\makebox(0,0)[c]{#5}}  %
\put(8.5,11){\makebox(0,0)[c]{#6}}  %
\put(17,5){\makebox(0,0)[c]{#7}}  %
\put(8.5,-3){\makebox(0,0)[c]{#8}}  %

\put(8.5,4){\makebox(0,0)[c]{#9}}   }} %

%%%%%%%%%%%%%%%%%%%%%%%%bo

\newcommand{\diagbo}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{0.4\leng} %

\diagp{68}{12}{6\leng}

\begin{picture}(100,40)
\put(0,0){

\begin{picture}(50,30)      %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,1){10}}  %
\put(20,30){\line(1,-1){10}}  %
\put(30,20){\line(1,0){15}}  %
\put(45,20){\line(1,-2){5}}  %
\put(40,0){\line(1,1){10}}  %
\put(0,0){\line(1,0){40}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
%\put(20,10){\makebox(0,0){$a$}}  %
%\put(42,12){\makebox(0,0){$b$}}  %
%\put(20,23){\makebox(0,0){$c$}}  %

\end{picture}}

\put(80,0){
\begin{picture}(50,30)      %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,1){10}}  %
\put(20,30){\line(1,-1){10}}  %
\put(30,20){\line(1,0){15}}  %
\put(45,20){\line(1,-2){5}}  %
\put(40,0){\line(1,1){10}}  %
\put(0,0){\line(1,0){40}}  %
%\put(25,10){\makebox(0,0){$d$}}  %

\end{picture}}


\end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%%boo

\newcommand{\diagboo}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{0.4\leng} %

\diagp{68}{12}{6\leng}

\begin{picture}(100,40)
\put(0,0){

\begin{picture}(50,30)      %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,1){10}}  %
\put(20,30){\line(1,-1){10}}  %
\put(30,20){\line(1,0){15}}  %
\put(45,20){\line(1,-2){5}}  %
\put(40,0){\line(1,1){10}}  %
\put(0,0){\line(1,0){40}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(0,0){\line(3,2){30}} 
\put(40,0){\line(1,4){5}}

\end{picture}}

\put(80,0){
\begin{picture}(50,30)      %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,1){10}}  %
\put(20,30){\line(1,-1){10}}  %
\put(30,20){\line(1,0){15}}  %
\put(45,20){\line(1,-2){5}}  %
\put(40,0){\line(1,1){10}}  %
\put(0,0){\line(1,0){40}}  %
%\put(25,10){\makebox(0,0){$d$}}  %

\end{picture}}


\end{picture}}}


%%%%%%%%%%%%%%%%%%%%%%%%threethree

\newcommand{\threethree}[5]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{0.4\leng} %

\diagp{68}{12}{6\leng} %
\put(70,20){\makebox(0,0)[b]{#5}}


\begin{picture}(100,40)
\put(0,0){

\begin{picture}(50,30)      %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,1){10}}  %
\put(20,30){\line(1,-1){10}}  %
\put(30,20){\line(1,0){15}}  %
\put(45,20){\line(1,-2){5}}  %
\put(40,0){\line(1,1){10}}  %
\put(0,0){\line(1,0){40}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(20,10){\makebox(0,0){#3}}  %
\put(42,12){\makebox(0,0){#2}}  %
\put(21,23){\makebox(0,0){#1}}  %

\end{picture}}

\put(80,0){
\begin{picture}(50,30)      %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,1){10}}  %
\put(20,30){\line(1,-1){10}}  %
\put(30,20){\line(1,0){15}}  %
\put(45,20){\line(1,-2){5}}  %
\put(40,0){\line(1,1){10}}  %
\put(0,0){\line(1,0){40}}  %
\put(25,10){\makebox(0,0){#4}}  %

\end{picture}}



\end{picture}}}




%%%%%%%%%%%%%%%%%%%%%%%%bp

\newcommand{\diagbp}[3]{

\put(#1,#2){\setlength{\leng}{#3}
\setlength{\unitlength}{0.4\leng} %

\begin{picture}(40,30)      %

\put(0,0){\line(1,4){5}}  %
\put(5,20){\line(3,2){15}}  %
%\put(20,30){\line(3,-2){15}}  %

\qbezier[2](26,31)(29,28)(32,25) %

\put(35,20){\line(1,-4){5}}  %
\put(0,0){\line(1,0){40}}  %

\put(20,13){\makebox(0,0){$\Downarrow$}}  %

\end{picture}}}

%%%%%%%%%%%%%%%%%%%%%%%three
%labelled 3-arrow

\sunit

\newcommand{\three}[4]{
\put(#1,#2){ \setlength{\leng}{#3} %
\setlength{\unitlength}{\leng} %
\diagp{0}{0}{6\leng}  %
\put(0,4){\makebox(0,0)[b]{#4}} }}

%%%%%%%%%%%%%%%%%%%%%%%nullthree
%nullary 3-cell

\sunit

\newcommand{\nullthree}[3]{

\put(0,0){ \setlength{\leng}{1mm} %
\setlength{\unitlength}{\leng} %

\onecell{0}{0}{\leng}{}{}{#1}   %
\three{24}{2}{\leng}{#3}  %
\onetwo{31}{0}{0.7\leng}{}{}{#1}{#1}{#2}

 }}

 %%%%%%%%%%%%%%%%%%%%%%%nullthreeb
%nullary 3-cell with no 2-arrow drawn

\sunit

\newcommand{\nullthreeb}[3]{

\put(0,0){ \setlength{\leng}{1mm} %
\setlength{\unitlength}{\leng} %

\onecell{0}{0}{\leng}{}{}{#1}   %
\three{24}{2}{\leng}{#3}  %
\onetwob{31}{0}{0.7\leng}{}{}{#1}{#1}{#2}

 }}



%%%%%%%%%%%%%%%%%%%%%%%twotwo
%2-ary 2-cell

\sunit

\newcommand{\twotwo}[7]{

\put(0,0){ \setlength{\leng}{1mm} %
\setlength{\unitlength}{\leng} %
\diagf{0}{0}{4\leng}  %
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,6){\makebox(0,0)[br]{#4}}   % 1-cells
\put(14,6){\makebox(0,0)[bl]{#5}}  %
\put(8,-2){\makebox(0,0)[t]{#6}}  %

\put(8,5){\makebox(0,0)[c]{$\Downarrow$}}  %
\put(9,5){\makebox(0,0)[l]{#7}}  %
}}

%%%%%%%%%%%%%%%%%%%%%%%twotwob
%2-ary 2-cell with no arrow drawn

\sunit

\newcommand{\twotwob}[7]{

\put(0,0){ \setlength{\leng}{1mm} %
\setlength{\unitlength}{\leng} %
\diagf{0}{0}{4\leng}  %
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,6){\makebox(0,0)[br]{#4}}   % 1-cells
\put(14,6){\makebox(0,0)[bl]{#5}}  %
\put(8,-2){\makebox(0,0)[t]{#6}}  %

\put(8,5){\makebox(0,0)[c]{#7}}  %

}}

%%%%%%%%%%%%%%%%%assleft
%2-pd of 2 triangles, 1-cells labelled

\newcommand{\assleft}[5]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(0,0){\line(1,0){40}}   %
\put(10,20){\line(3,-2){30}}}

\put(0,5){\makebox(0,0)[c]{#1}}  %
\put(8.5,11){\makebox(0,0)[c]{#2}}  %
\put(17,5){\makebox(0,0)[c]{#3}}  %
\put(8.5,-3){\makebox(0,0)[c]{#5}}  %

\put(8.5,3.3){\makebox(0,0)[c]{#4}}   }}


%%%%%%%%%%%%%%%%%assright
%2-pd of 2 triangles, 1-cells labelled

\newcommand{\assright}[5]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(0,0){\line(1,0){40}}   %
\put(0,0){\line(3,2){30}}}

\put(0,5){\makebox(0,0)[c]{#1}}  %
\put(8.5,11){\makebox(0,0)[c]{#2}}  %
\put(17,5){\makebox(0,0)[c]{#3}}  %
\put(8.5,-3){\makebox(0,0)[c]{#5}}  %

\put(8.5,3.3){\makebox(0,0)[c]{#4}}   }}

%%%%%%%%%%%%%%%%%assrightb
%2-pd of 2 triangles, 2-cells labelled

\newcommand{\assrightb}[2]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(0,0){\line(1,0){40}}   %
\put(0,0){\line(3,2){30}}}

\put(5,5){\makebox(0,0)[c]{#1}}  %

\put(10,2.5){\makebox(0,0)[c]{#2}}   }}

%%%%%%%%%%%%%%%%%assleftb
%2-pd of 2 triangles, 2-cells labelled

\newcommand{\assleftb}[2]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %

\put(0,0){\line(1,2){10}}  %
\put(10,20){\line(1,0){20}}  %
\put(30,20){\line(1,-2){10}}  %
\put(0,0){\line(1,0){40}}   %
\put(10,20){\line(3,-2){30}}}

\put(11,5){\makebox(0,0)[c]{#1}}  %

\put(5.5,2.5){\makebox(0,0)[c]{#2}}   }}


%%%%%%%%%%%%%%%%%%%%%%%%%diagbq

\newcommand{\diagbq}[5]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %

\onetwob{0}{0}{\leng}{#1}{#1}{#2}{#3}{#5}
\put(12,21){\makebox(0,0)[c]{.}}  %
\put(12,15.5){\makebox(0,0)[c]{$\Downarrow$}} %
\put(14,15.5){\makebox(0,0)[l]{#4}}  }}

%%%%%%%%%%%%%%%%%%%%%%%%%diagbr

\newcommand{\diagbr}[9]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %

\diagal{0}{0}{4\leng}
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,6){\makebox(0,0)[br]{#4}}   % 1-cells
\put(14,6){\makebox(0,0)[bl]{#5}}  %
\put(8,-2){\makebox(0,0)[t]{#7}}  %

\put(8,7){\makebox(0,0)[c]{#8}}  %

\put(10,3.3){\makebox(0,0)[bl]{#6}}  %
\put(8,1.6){\makebox(0,0)[c]{#9}}  %
}}

%%%%%%%%%%%%%%%%%bs
\newcommand{\diagbs}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(2,3)(4.9,2.6)(4,0)}}



%%%%%%%%%%%%%%%%%%%%%%%%%diagbt

\newcommand{\diagbt}[9]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %

\diagbs{0}{0}{4\leng}
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,6){\makebox(0,0)[br]{#4}}   % 1-cells
\put(12,4){\makebox(0,0)[c]{#6}}  %
\put(8,-2){\makebox(0,0)[t]{#7}}  %

\put(8,6){\makebox(0,0)[c]{#9}}  %

\put(15,6){\makebox(0,0)[c]{#8}}  %
\put(17,9){\makebox(0,0)[bl]{#5}}  %
}}

%%%%%%%%%%%%%%%%%bu
\newcommand{\diagbu}[3]{

\put(#1,#2){
\setlength{\unitlength}{#3} %

\put(0,0){\line(1,0){4}}  %
\put(0,0){\line(2,3){2}}  %
\put(4,0){\line(-2,3){2}} %
\qbezier(2,3)(-0.9,2.6)(0,0)}}

%%%%%%%%%%%%%%%%%%%%%%%%%%bv

\newcommand{\diagbv}[9]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %

\diagbu{0}{0}{4\leng}
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,3){\makebox(0,0)[c]{#5}}   % 1-cells
\put(13,6){\makebox(0,0)[bl]{#6}}  %
\put(8,-2){\makebox(0,0)[t]{#7}}  %

\put(8,6){\makebox(0,0)[c]{#9}}  %

\put(2,7){\makebox(0,0)[c]{#8}}  %
\put(0,8){\makebox(0,0)[br]{#4}}  %
}}

%%%%%%%%%%%%%%%%%%%%%%%bw

\newcommand{\diagbw}[8]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %

\twotwob{#1}{#2}{#3}{#4}{#5}{#6}{#8} %
\diagbj{-6}{10}{\leng}   %
\put(-9,16){.}   %
\put(-3,13){\makebox(0,0)[bl]{#7}} %
}}

%%%%%%%%%%%%%%%%%%%%%%%bx

\newcommand{\diagbx}[8]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %

\twotwob{#1}{#2}{#3}{#4}{#5}{#6}{#8} %
\diagbk{22}{10}{\leng}   %
\put(25,15){.}   %
\put(18,13){\makebox(0,0)[br]{#7}} %
}}

%%%%%%%%%%%%%%%%%%%%%%%%%diagby
%for sticking to any of the triangles

\newcommand{\diagby}[2]{

\setlength{\leng}{#1}
\setlength{\unitlength}{\leng} %
\qbezier(0,0)(8,-8)(16,0)      %
\put(8,-2){\makebox(0,0)[c]{#2}} }

%%%%%%%%%%%%%%%%%%%%%%%%%diagbz

\newcommand{\diagbz}[1]{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %
\put(0,0){
\setlength{\unitlength}{4\leng} %
\qbezier(0,0)(2,-4)(4,0) }}
\put(8,-6.5){\makebox(0,0)[c]{#1}}  %
}

%%%%%%%%%%%%%%%%%%%%%%%%%diagca

\newcommand{\diagca}{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %
\put(0,0){
\setlength{\unitlength}{4\leng} %
\qbezier(2,3)(6.7,4.1)(4,0)}}}

%%%%%%%%%%%%%%%%%%%%%%%%%diagcb

\newcommand{\diagcb}{

\put(0,0){\setlength{\leng}{1mm}
\setlength{\unitlength}{\leng} %
\put(0,0){
\setlength{\unitlength}{4\leng} %
\qbezier(2,3)(-2.7,4.1)(0,0)}} }


%%%%%%%%%%%%%%%%%cc

\newcommand{\diagcc}[4]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(0,0)(20,13)(40,0) %
\put(20,13){\makebox(0,0)[c]{#1}}
\put(20,2.4){\makebox(0,0)[c]{#4}}}  %
\put(10,4){\makebox(0,0)[c]{#3}}  %
\put(5.5,4){\makebox(0,0)[c]{#2}} %
}}

%%%%%%%%%%%%%%%%%cd

\newcommand{\diagcd}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(0,0)(20,-13)(40,0) %
\put(20,-3){\makebox(0,0)[c]{#1}}}  %
 }}

%%%%%%%%%%%%%%%%%ce

\newcommand{\diagce}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(0,0)(20,-28)(40,0) %
\put(20,-10){\makebox(0,0)[c]{#1}}}  %
 }}

%%%%%%%%%%%%%%%%%cf

\newcommand{\diagcf}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(0,0)(-8,18)(10,20) %
\put(2,12){\makebox(0,0)[c]{#1}}}  %
 }}

%%%%%%%%%%%%%%%%%cg

\newcommand{\diagcg}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(40,0)(48,18)(30,20) %
\put(38,12){\makebox(0,0)[c]{#1}}}  %
 }}

 %%%%%%%%%%%%%%%%%ch

\newcommand{\diagch}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(40,0)(58,23)(30,20) %
\put(45,14){\makebox(0,0)[c]{#1}}}  %
 }}

 %%%%%%%%%%%%%%%%%ci

\newcommand{\diagci}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(10,20)(20,34)(30,20) %
\put(20,23){\makebox(0,0)[c]{#1}}}  %
 }}

 %%%%%%%%%%%%%%%%%cj

\newcommand{\diagcj}[2]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(0,0)(10,20)(30,20) %
\put(11,16){\makebox(0,0)[c]{{\tiny #1}}} %
\put(15,14){\makebox(0,0)[c]{{\small #2}}} %
}}}

%%%%%%%%%%%%%%%%%ck

\newcommand{\diagck}[2]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(40,0)(30,20)(10,20) %
\put(29,16){\makebox(0,0)[c]{{\tiny #1}}} %
\put(25,14){\makebox(0,0)[c]{{\small #2}}} %
}}}

%%%%%%%%%%%%%%%%%cl

\newcommand{\diagcl}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\put(20,28){\makebox(0,0)[c]{$\Downarrow$}} %
\put(20,37){\makebox(0,0)[c]{.}}
\put(25,28){\makebox(0,0)[c]{#1}} %
}}}

%%%%%%%%%%%%%%%%%cm

\newcommand{\diagcm}{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\put(10,20){\line(1,1){10}}  %
\put(30,20){\line(-1,1){10}}

 }}}

 %%%%%%%%%%%%%%%%%mtwo
% m-ary 2-cell

\newcommand{\mtwo}[5]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){ \setlength{\unitlength}{.4\leng} %
\put(0,0){\line(1,0){40}}  %
\put(0,0){\line(1,4){5}}  %
\put(5,20){\line(1,1){10}}  %
\put(40,0){\line(-1,4){5}}  %

%
\put(0,12){\makebox(0,0)[r]{#1}}  %
\put(8,27){\makebox(0,0)[br]{#2}}  %
\put(40,12){\makebox(0,0)[l]{#3}}  %
\put(20,-2){\makebox(0,0)[t]{#4}}  %
\put(20,15){\makebox(0,0)[c]{$\Downarrow$}}  %
\put(23,15){\makebox(0,0)[l]{#5}}  %
\qbezier[2](23,30)(28,27)(33,24)

 }}}

 %%%%%%%%%%%%%%%%%mtwob
% m-ary 2-cell without arrow

\newcommand{\mtwob}[5]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){ \setlength{\unitlength}{.4\leng} %
\put(0,0){\line(1,0){40}}  %
\put(0,0){\line(1,4){5}}  %
\put(5,20){\line(1,1){10}}  %
\put(40,0){\line(-1,4){5}}  %

%
\put(0,12){\makebox(0,0)[r]{#1}}  %
\put(8,27){\makebox(0,0)[br]{#2}}  %
\put(40,12){\makebox(0,0)[l]{#3}}  %
\put(20,-2){\makebox(0,0)[t]{#4}}  %
\put(20,15){\makebox(0,0)[c]{#5}}  %
\qbezier[2](23,30)(28,27)(33,24)

 }}}

 %%%%%%%%%%%%%%%%%cn

\newcommand{\diagcn}[1]{

\put(0,0){\setlength{\leng}{1.3mm}
\setlength{\unitlength}{\leng} %

\put(0,0){
\setlength{\unitlength}{.4\leng} %
\qbezier(0,0)(-18,23)(10,20) %
\put(-3,14){\makebox(0,0)[c]{#1}}}  %
 }}


%%%%%%%%%%%%%%%%%%%%%%%%%diagcz

\newcommand{\diagcz}[1]{

\setlength{\leng}{#1}
\setlength{\unitlength}{\leng} %

\put(0,0){\line(1,0){16}}}



%%%%%%%%%%%%%%%%%%%%%%%%%diagco

\newcommand{\diagco}[2]{

\setlength{\leng}{#1}
\setlength{\unitlength}{\leng} %

\put(0,0){\line(1,0){16}} %
\qbezier(0,0)(8,8)(16,0)  %
\put(8,2){\makebox(0,0)[c]{#2}}}


%%%%%%%%%%%%%%%%%%%%%onetwo

\newcommand{\onetwoc}[5]{

\put(0,0){ \setlength{\leng}{1mm} %
\setlength{\unitlength}{\leng} %

\diagj{0}{0}{6\leng} %
\put(0,0){ \setlength{\unitlength}{6\leng}
\put(0,0){  %
\qbezier(0,0)(2,-2)(4,0) }}
\put(12,7){\makebox(0,0)[b]{#1}} %
\put(7,0){\makebox(0,0)[b]{#2}} %
\put(12,2.5){\makebox(0,0)[c]{#4}}
\put(12,-7){\makebox(0,0)[t]{#3}} %
\put(12,-3){\makebox(0,0)[c]{#5}}

 }}


%%%%%%%%%%%%%%%%%%%%%%%%%scaleby
%for sticking to any of the triangles

\newcommand{\scaleby}[1]{
\setlength{\unitlength}{\leng} %
\qbezier(0,0)(8,-8)(16,0)      %
\put(8,-2){\makebox(0,0)[c]{#1}} }

%%%%%%%%%%%%%%%%%%%%%%%%%%scalebv

\newcommand{\scalebv}[9]{

\put(0,0){
\setlength{\unitlength}{\leng} %

\diagbu{0}{0}{4\leng}
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,3){\makebox(0,0)[c]{#5}}   % 1-cells
\put(13,6){\makebox(0,0)[bl]{#6}}  %
\put(8,-2){\makebox(0,0)[t]{#7}}  %

\put(8,6){\makebox(0,0)[c]{#9}}  %

\put(2,7){\makebox(0,0)[c]{#8}}  %
\put(0,8){\makebox(0,0)[br]{#4}}  %
}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalebt

\newcommand{\scalebt}[9]{

\put(0,0){
\setlength{\unitlength}{\leng} %

\diagbs{0}{0}{4\leng}
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,6){\makebox(0,0)[br]{#4}}   % 1-cells
\put(13,3.5){\makebox(0,0)[c]{#6}}  %
\put(8,-2){\makebox(0,0)[t]{#7}}  %

\put(8,6){\makebox(0,0)[c]{#9}}  %

\put(15,6){\makebox(0,0)[c]{#8}}  %
\put(17,9){\makebox(0,0)[bl]{#5}}  %
}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalebr

\newcommand{\scalebr}[9]{

\put(0,0){
\setlength{\unitlength}{\leng} %

\diagal{0}{0}{4\leng}
\put(-1,-1){\makebox(0,0)[tr]{#1}}   % 0-cells
\put(8,14){\makebox(0,0)[b]{#2}}  %
\put(18,-1){\makebox(0,0)[tl]{#3}}  %

\put(3,6){\makebox(0,0)[br]{#4}}   % 1-cells
\put(14,6){\makebox(0,0)[bl]{#5}}  %
\put(8,-2){\makebox(0,0)[t]{#7}}  %

\put(8,7){\makebox(0,0)[c]{#8}}  %

\put(10,3){\makebox(0,0)[bl]{#6}}  %
\put(8,1){\makebox(0,0)[c]{#9}}  %
}}

%%%%%%%%%%%%%%%%%%%%%%%%%scaleco

\newcommand{\scaleco}[1]{

\setlength{\unitlength}{\leng} %

\put(0,0){\line(1,0){16}} %
\qbezier(0,0)(8,8)(16,0)  %
\put(8,2){\makebox(0,0)[c]{#1}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecp

\newcommand{\scalecp}{

\put(0,0){
\setlength{\unitlength}{\leng} %
\put(0,0){\line(1,0){40}} %
\put(0,0){\line(0,1){20}} %
\put(0,20){\line(2,1){20}} %
\put(20,30){\line(2,-1){20}} %
\put(40,0){\line(0,1){20}}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecq

\newcommand{\scalecq}{

\put(0,0){
\setlength{\unitlength}{0.3\leng} %

\put(20,90){\line(0,1){20}}      %
\put(40,90){\line(0,1){20}}      %
\put(80,90){\line(0,1){20}}      %

\put(20,90){\line(1,0){60}}      %
\put(20,90){\line(1,-1){30}}     %
\put(80,90){\line(-1,-1){30}}    %
\put(50,40){\line(0,1){20}}      %
\put(60,104){\makebox[0pt]{$\cdots$}} }}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecr

\newcommand{\scalecr}[5]{

\put(0,0){
\setunit{0.3\leng} %
\scalecq
\put(20,114){\makebox[0pt]{#1}}   %
\put(40,114){\makebox[0pt]{#2}}   %
\put(80,114){\makebox[0pt]{#3}}   %
\put(50,76){\makebox(0,0){#5}}      % label in the middle
\put(45,38){\makebox(0,0)[t]{#4}}  }} % label at the bottom

%%%%%%%%%%%%%%%%%%%%%%%%%scalecs

\newcommand{\scalecs}[9]{

\put(0,0){
\setunit{0.3\leng} %
\put(20,0){ \scalecq
\put(20,114){\makebox[0pt]{#4}}   %
\put(40,114){\makebox[0pt][r]{#5}}   %
\put(80,114){\makebox[0pt]{#6}}   %
\put(50,76){\makebox(0,0){#9}}      % label in the middle
\put(50,36){\makebox(0,0)[t]{#7}}} \setunit{0.2\leng}
\put(39.8,124){\setleng{0.67\leng} \scalecr{#1}{#2}{#3}{}{#8}}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalect

\newcommand{\scalect}[4]{
\setlength{\unitlength}{0.3\leng} %

\put(20,0){\line(0,1){20}} %
\put(20,20){\line(-2,3){20}} %
\put(20,20){\line(2,3){20}}  %
\put(0,50){\line(1,0){40}}  %
\put(0,50){\line(0,1){20}}  %
\put(40,50){\line(0,1){20}} %

\put(15,0){\makebox(0,0)[r]{#3}} %
\put(0,75){\makebox(0,0)[b]{#1}}  %
\put(40,75){\makebox(0,0)[b]{#2}}  %
\put(20,40){\makebox(0,0)[c]{#4}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecu

\newcommand{\scalecu}[3]{
\setlength{\unitlength}{0.3\leng} %

\put(20,0){\line(0,1){20}} %
\put(20,20){\line(-2,3){20}} %
\put(20,20){\line(2,3){20}}  %
\put(0,50){\line(1,0){40}}  %
\put(20,50){\line(0,1){20}} %

\put(15,0){\makebox(0,0)[r]{#2}} %
\put(20,75){\makebox(0,0)[b]{#1}}  %
\put(20,40){\makebox(0,0)[c]{#3}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecv

\newcommand{\scalecv}[6]{
\put(3,0){\scalect{}{#3}{#4}{#6}} %
\put(-1.5,21){\setleng{0.75\leng} \scalecu{#1}{#2}{#5}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecw

\newcommand{\scalecw}[6]{
\put(3,0){\scalect{#2}{}{#4}{#6}} %
\put(10.5,21){\setleng{0.75\leng} \scalecu{#1}{#3}{#5}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecx

\newcommand{\scalecx}[6]{
\put(0,12){\scalect{#1}{#2}{#3}{#5}} %
\put(1.5,-2.5){\setleng{0.75\leng} \scalecu{}{#4}{#6}}}

%%%%%%%%%%%%%%%%%%%%%%%%%scalecy

\newcommand{\scalecy}[7]{
\put(-9,0){\scalecr{#1}{#2}{#3}{#4}{#6}} %
\put(1.5,-2.5){\setleng{0.75\leng} \scalecu{}{#5}{#7}}}

%fff

pic01.tex
% Drawing generated by LaTeX-CAD 1.9 - requires latexcad.sty 
% (c) 1998 John Leis leis@usq.edu.au 
\begin{picture}(48,60)
\thinlines
\drawthickdot{26.0}{16.0}
\drawthickdot{26.0}{26.0}
\drawthickdot{26.0}{36.0}
\drawthickdot{14.0}{36.0}
\drawthickdot{40.0}{32.0}
\drawpath{14.0}{36.0}{10.0}{44.0}
\drawpath{14.0}{36.0}{14.0}{44.0}
\drawpath{14.0}{36.0}{18.0}{44.0}
\drawpath{26.0}{36.0}{24.0}{44.0}
\drawpath{26.0}{36.0}{28.0}{44.0}
\drawpath{26.0}{26.0}{14.0}{36.0}
\drawpath{26.0}{26.0}{26.0}{36.0}
\drawpath{26.0}{26.0}{34.0}{44.0}
\drawpath{26.0}{16.0}{26.0}{26.0}
\drawpath{26.0}{16.0}{26.0}{4.0}
\drawpath{26.0}{16.0}{4.0}{44.0}
\drawpath{40.0}{32.0}{38.0}{44.0}
\drawpath{40.0}{32.0}{42.0}{44.0}
\drawpath{26.0}{16.0}{40.0}{32.0}
\drawpath{10.0}{44.0}{4.0}{56.0}
\drawpath{18.0}{44.0}{10.0}{56.0}
\drawpath{14.0}{56.0}{24.0}{44.0}
\drawpath{18.0}{56.0}{4.0}{44.0}
\drawpath{24.0}{56.0}{28.0}{44.0}
\drawpath{28.0}{56.0}{38.0}{44.0}
\drawpath{34.0}{56.0}{14.0}{44.0}
\drawpath{38.0}{56.0}{34.0}{44.0}
\drawpath{42.0}{56.0}{42.0}{44.0}
\drawcenteredtext{16.0}{36.0}{1}
\drawcenteredtext{28.0}{26.0}{2}
\drawcenteredtext{24.0}{36.0}{3}
\drawcenteredtext{42.0}{32.0}{4}
\drawcenteredtext{30.0}{16.0}{5}
\end{picture}

pic53.tex
% Drawing generated by LaTeX-CAD 1.9 - requires latexcad.sty
% (c) 1998 John Leis leis@usq.edu.au
\begin{picture}(14,24)
\thinlines
\drawpath{4.0}{20.0}{4.0}{4.0}
\end{picture}

pic75.tex
% Drawing generated by LaTeX-CAD 1.9 - requires latexcad.sty 
% (c) 1998 John Leis leis@usq.edu.au 
\begin{picture}(42,34)
\thinlines
\drawcenteredtext{20.0}{28.0}{$t$}
\drawcenteredtext{8.0}{18.0}{$t'$}
\drawcenteredtext{32.0}{18.0}{$t''$}
\drawcenteredtext{20.0}{6.0}{$t'''$}
\drawdashline{10.0}{16.0}{18.0}{8.0}
\drawdashline{30.0}{16.0}{22.0}{8.0}
\drawvector{16.0}{10.0}{2.0}{1}{-1}
\drawvector{18.0}{26.0}{8.0}{-3}{-2}
\drawvector{22.0}{26.0}{8.0}{3}{-2}
\drawvector{24.0}{10.0}{2.0}{-1}{-1}
\end{picture}

pic76.tex
% Drawing generated by LaTeX-CAD 1.9 - requires latexcad.sty 
% (c) 1998 John Leis leis@usq.edu.au 
\begin{picture}(40,22)
\thinlines
\drawcenteredtext{18.0}{16.0}{$t$}
\drawcenteredtext{8.0}{6.0}{$t'$}
\drawcenteredtext{30.0}{6.0}{$t''$}
\drawvector{16.0}{14.0}{8.0}{-3}{-2}
\drawvector{20.0}{14.0}{8.0}{3}{-2}
\end{picture}

pub3.tex
%%%%%%%%%%% che9
\documentclass[a4paper,11pt]{article}


\input{pubsettings}

\begin{document}






\title{The category of opetopes and the category of opetopic sets}

\author{Eugenia Cheng\\ \\Department of Pure Mathematics, University
of Cambridge\\E-mail: e.cheng@dpmms.cam.ac.uk}
\date{October 2002}
\maketitle



\begin{abstract} 

We give an explicit construction of the category
\cat{opetope} of opetopes.  We prove that the category of opetopic
sets is equivalent to the category of presheaves over \cat{opetope}

\end{abstract}



\setcounter{tocdepth}{3}
\tableofcontents

\section*{Introduction}
\addcontentsline{toc}{section}{Introduction}


In \cite{bd1}, Baez and Dolan give a definition of weak $n$-category
in which the underlying shapes of cells are `opetopes' and the
underlying data is given by `opetopic sets'.  The idea is that
opetopic sets should be presheaves over the category of opetopes. 
However Baez and Dolan do not explicitly construct the category of
opetopes, so opetopic sets are defined directly instead.  A
relationship between this category of opetopic sets and a category of
presheaves is alluded to but not proved.  

The main result of this paper is that the category of opetopic sets is
equivalent to the category of presheaves over the category of
opetopes.  However, we do not use the opetopic definitions exactly as
given in \cite{bd1} but continue to use the modifications given in our
earlier work (\cite{che7}, \cite{che8}).  In these papers we use a
generalisation along lines which the original authors began, but chose
to abandon for reasons which are unclear.  This generalisation enables
us, in \cite{che7}, to exhibit a relationship with the work of Hermida,
Makkai and Power (\cite{hmp1}) and, in \cite{che8}, with the work of
Leinster (\cite{Lei5}).  Given these useful results, we continue to
study the modified theory in this work.  


We begin, in Section~\ref{opecat} by giving an explicit construction
of the category of opetopes.  The idea is as follows.  In \cite{che7} we constructed, for each $k
\geq 0$, a category $\bb{C}_k$ of $k$-opetopes.  For the category
$\cat{Opetope}$ of opetopes of all dimensions, each category
$\bb{C}_k$ should be a full subcategory of \cat{Opetope}; furthermore
there should be `face maps' exhibiting the constituent $m$-opetopes,
or `faces' of a $k$-opetope, for $m \le k$. We refer to the
$m$-opetope faces as $m$-faces.  Note that there are no degeneracy maps.  

The $(k-1)$-faces of a $k$-opetope $\alpha$ should be the
$(k-1)$-opetopes of its source and target; these should all be
distinct.  Then each of these faces has its own $(k-2)$-faces, but
all these $(k-2)$-opetopes should not necessarily be considered as
distinct $(k-2)$-faces in $\alpha$. For $\alpha$ is a
configuration for composing its $(k-1)$-faces at their
$(k-2)$-faces, so the $(k-2)$-faces should be identified with one
another at places where composition is to occur.  That is, the
composite face maps from these $(k-2)$-opetopes to $\alpha$ should
therefore be equal.  Some further details are then required to
deal with isomorphic copies of opetopes.

Recall that a `configuration' for composing $(k-1)$-opetopes is
expressed as a tree (see \cite{che7}) whose nodes
are labelled by the $(k-1)$-opetopes in question, with the edges
giving their inputs and outputs.  So composition occurs along each
edge of the tree, via an object-morphism label, and thus the tree
tells us which $(k-1)$-opetopes are identified.

In order to express this more precisely, we first give a more
formal description of trees (Section~\ref{treeformal}).  In fact,
this leads to an abstract description of trees as certain
Kelly-Mac~Lane graphs; this is the subject of \cite{che12}.  The
results of Section~\ref{treeformal} thus arise as preliminary
results in \cite{che12} and we refer the reader to this paper for
the full account and proofs.  

In Section~\ref{osets}, we examine the theory of opetopic sets. 
We begin by following through our modifications to the opetopic
theory to include the theory of opetopic sets.  (Our previous work
has only dealt with the theory of opetopes.)  We then use results of
\cite{kel3} to prove that the category of opetopic sets is indeed
equivalent to the category of presheaves on $\cl{O}$, the category of
opetopes defined in Section~\ref{opecat}.  This is the main result of
this work.  

Finally, a comment is due on the notion of `multitope' as
defined in \cite{hmp1}.  In this work, Hermida, Makkai and Power
begin a definition of $n$-category explicitly analogous to that of
\cite{bd1}, the analogous concepts being `multitopes' and `multitopic
sets'.  In \cite{che7} we prove that `opetopes and multitopes are the
same up to isomorphism', that is, for each $k \geq 0$ the category of
$k$-opetopes is equivalent to the (discrete) category of
$k$-multitopes.  In \cite{hmp1}, Hermida, Makkai and Power do go on
to give an explicit definition of the analogous category
\cat{Multitope}, of multitopes.  Given the above equivialences, and
assuming the underlying idea is the same, this would be equivalent to
the category \cat{Opetope}, but we do not attempt to prove it in this
work.




\subsubsection*{Terminology}

\renewcommand{\labelenumi}{\roman{enumi})}
\begin{enumerate}

\item Since we are concerned chiefly with {\em weak}
$n$-categories, we follow Baez and Dolan (\cite{bd1}) and omit the
word `weak' unless emphasis is required; we refer to {\em strict}
$n$-categories as `strict $n$-categories'.

\item We use the term `weak $n$-functor' for an $n$-functor where
functoriality holds up to coherent isomorphisms, and `lax' functor
when the constraints are not necessarily invertible.

\item In \cite{bd1} Baez and Dolan use the terms `operad' and
`types' where we use `multicategory' and `objects'; the latter
terminology is more consistent with Leinster's use of `operad' to
describe a multicategory whose `objects-object' is 1.

\item In \cite{hmp1} Hermida, Makkai and Power use the term
`multitope' for the objects constructed in analogy with the
`opetopes' of \cite{bd1}.  This is intended to reflect the fact
that opetopes are constructed using operads but multitopes using
multicategories, a distinction that we have removed by using the
term `multicategory' in both cases.  However, we continue to use
the term `opetope' and furthermore, use it in general to refer to
the analogous objects constructed in each of the three theories.
Note also that Leinster uses the term `opetope' to describe
objects which are analogous but not {\em a priori} the same; we
refer to these as `Leinster opetopes' if clarification is needed.

\item We regard sets as sets or discrete categories with no
notational distinction.


\end{enumerate}

\bigskip {\bfseries Acknowledgements}

This work was supported by a PhD grant from EPSRC.  I would like to thank
Martin Hyland and Tom Leinster for their support and guidance.




\section{The category of opetopes}
\label{opecat}

In this section we give an explicit construction of the category
\cat{Opetope} of opetopes.  This construction will enable us, in
Section~\ref{osets}, to prove that the category of opetopic sets
is in fact a presheaf category.

We begin with a brief account of the trees used to construct
higher-dimensional opetopes from lower-dimensional ones; we refer the
reader to \cite{che12} for the full account, with proofs and examples.

\sunit
\subsection{Informal description of trees} \label{treeback}

Recall the trees introduced in \cite{che7} to
describe the morphisms of a slice multicategory.  These are
`labelled combed trees' with ordered nodes.  In fact, we will
first consider the {\em unlabelled} version of such trees, since
the labelled version follows easily.  For example the following is
a tree:

\begin{center}
\input pic01.tex
\end{center}

\renewcommand{\labelenumi}{\roman{enumi})}

Explicitly, a tree $T=(T, \rho, \tau)$ consists of
\begin{enumerate}
\item A planar tree $T$
\item A permutation $\rho \in \cat{S}_l$ where $l=$ number of leaves of
$T$
\item A bijection $\tau: \{\mbox{nodes of $T$}\} \lra \{1, 2,
\ldots, k\}$ where $k=$ number of nodes of $T$; equivalently an
ordering on the nodes of $T$.
\end{enumerate}

%Then, given a category \bb{C} a {\em labelled tree} consists of
%\begin{enumerate}
%\item A tree $(T, \rho, \tau)$
%\item For each edge of the tree a morphism in \bb{C}, considered to
%be pointing `down' towards the root of the tree.
%\end{enumerate}

Note that there is a `null tree' with no nodes
\begin{center}
\input pic53.tex .
\end{center}

%so for each morphism $f \in \bb{C}$ there is a labelled tree
%
%\begin{center}
%\input pic54.tex
%.\end{center}

\subsection{Formal description of trees}
\label{treeformal}

In this section we give a formal description of the above trees,
characterising them as connected graphs with no closed loops (in
the conventional sense of `graph').  This will enable us, in
Section~\ref{loopy}, to determine which faces of faces are
identified in an opetope.

Note that the material in this section is presented fully in
\cite{che12}.  It enables us to express a tree as a Kelly-Mac~Lane
graph; it also enables us to show that all
{\em allowable} Kelly-Mac~Lane graphs of the correct shape arise in this way.

We consider a tree with $k$ nodes $N_1, \ldots, N_k$ where $N_i$
has $m_i$ inputs and one output. Let $N$ be a node with
$(\sum\limits_i m_i )- k+1$ inputs; $N$ will be used to represent
the leaves and root of the tree.

Then a tree is given by a bijection
    \[\coprod_i\{\mbox{inputs of $N_i$}\} \coprod \{\mbox{output of $N$}\} \lra
    \coprod_i\{\mbox{output of $N_i$}\} \coprod \{\mbox{inputs of
    $N$}\}\]
since each input of a node is either connected to a unique output
of another node, or it is a leaf, that is, input of $N$. Similarly
each output of a node is either attached to an input of another
node, or it is the root, that is, output of $N$.

We express this formally as follows.

\begin{lemma} \label{tree1}
Let $T$ be a tree with nodes $N_1, \ldots, N_k$, where $N_i$ has
inputs $\{x_{i1}, \ldots, x_{im_i}\}$ and output $x_i$.  Let $N$
be a node with inputs $\{z_1, \ldots, z_l\}$ and output $z$, with
    \[l=(\sum\limits_{i=1}^k m_i) - k +1.\]
    Then $T$ is given by a
bijection
    \[\alpha \ : \ \coprod_i\{x_{i1},\ldots, x_{im_i}\} \coprod \{z\} \lra
    \coprod_i\{x_i\} \coprod \{z_1, \ldots, z_l\}.\]
\end{lemma}

For the converse, every such bijection gives a graph, but it is not
necessarily a tree.  We need to
ensure that the resulting graph has no closed loops; the use of
the `formal' node $N$ then ensures connectedness.  We express this
formally as follows.

\begin{lemma} \label{loopspropb}
Let $N_1, \ldots, N_k, N$ be nodes where $N_i$ has inputs
$\{x_{i1}, \ldots, x_{im_i}\}$ and output $x_i$, and $N$ has
inputs $\{z_1, \ldots, z_l\}$ and output $z$, with
$l=(\sum\limits_{i=1}^k m_i) - k +1$. Let $\alpha$ be a bijection
    \[\coprod_i\{x_{i1},\ldots, x_{im_i}\} \coprod \{z\} \lra
    \coprod_i\{x_i\} \coprod \{z_1, \ldots, z_l\}.\]
Then $\alpha$ defines a graph with nodes $N_1, \ldots, N_k$.
\end{lemma}

\begin{lemma} \label{loopspropb2}
Let $\alpha$ be a graph as above.  Then $\alpha$ has a closed loop
if and only if there is a non-empty sequence of indices
    \[\{t_1 , \ldots, t_n \} \subseteq \{1, \ldots, k\}\]
such that for each $2 \leq j \leq n$
    \[\alpha( x_{t_jb_j})=x_{t_{j-1}} \]
for some $1 \leq b_j \leq m_j$, and
    \[\alpha(x_{t_1b_1})= x_{t_n}\]
for some $1 \leq b_1 \leq m_1$.  \end{lemma}


\begin{corollary} \label{loopspropb3}
A tree with nodes $N_1, \ldots, N_k$ is precisely a bijection
$\alpha$ as in Lemma~\ref{loopspropb}, such that there is no
sequence of indices as in Lemma~\ref{loopspropb2}.
\end{corollary}


\subsection{Labelled trees}
\label{labeltree}

For the construction of opetopes we require the `labelled' version
of the trees presented in Section~\ref{treeback}.  A tree labelled
in a category \bb{C} is a tree as above, with each edge labelled
by a morphism of \bb{C} considered to be pointing `down' towards
the root.

\begin{proposition} Let $N_1, \ldots, N_k, N$ be nodes where $N_i$ has inputs
\[\{x_{i1}, \ldots, x_{im_i}\}\] and output $x_i$, and $N$ has inputs
$\{z_1, \ldots, z_l\}$ and output $z$, with
\[l=(\sum\limits_{i=1}^k m_i) - k +1.\] Then a labelled tree with
these nodes is given by a bijection
    \[\alpha: \coprod_i\{x_{i1},\ldots, x_{im_i}\} \coprod \{z\} \lra
    \coprod_i\{x_i\} \coprod \{z_1, \ldots, z_l\}\]
satisfying the conditions as above, together with, for each
    \[y \in  \coprod_i\{x_{i1},\ldots, x_{im_i}\} \coprod \{z\}\]
a morphism $f \in \bb{C}$ giving the label of the edge joining $y$
and $\alpha(y)$.  Then $y$ is considered to be labelled by the
object $\mbox{{\upshape cod}}(f)$ and $\alpha(y)$ by the object
$\mbox{{\upshape dom}}(f)$.
\end{proposition}

\begin{prf} Follows immediately from Corollary~\ref{loopspropb3} and
the definition. \end{prf}


\subsection{The category of opetopes} \label{loopy}

In our earlier work (\cite{che7}) we constructed for each $k\geq 0$ the
category $\bb{C}_k$ of $k$-opetopes.  We now construct a category
\cat{Opetope} of opetopes of all dimensions whose morphisms are,
essentially, face maps.  Each category $\bb{C}_k$ is to be a full
subcategory of \cat{Opetope}, and there are no morphisms from an
opetope to one of lower dimension.


We construct the category $\cat{Opetope} = \cl{O}$ as follows.
Write $\cl{O}_k = \bb{C}_k$.

For the objects:
    \[\mbox{ob\ }\cl{O} = \coprod_{k\geq 0} \cl{O}_k.\]

The morphisms of \cl{O} are given by generators and relations as
follows.

\begin{itemize}
\item Generators
\end{itemize}

\numarabic
\begin{enumerate}

\item For each morphism $f: \alpha \lra \beta \in \cl{O}_k$ there
is a morphism
    \[f: \alpha \lra \beta \in \cl{O}.\]

\item Let $k \geq 1$ and consider $\alpha \in \cl{O}_k = o(I^{k+}) =
\elt{(I^{(k-1)+})}$.  Write $\alpha \in I^{(k-1)+}(x_1, \ldots,
x_m;x)$.  Then for each $1 \leq i \leq m$ there is a morphism
    \[s_i: x_i \lra \alpha \in \cl{O}\]
and there is also a morphism
    \[t: x \lra \alpha \in \cl{O}.\]
We write $G_k$ for the set of all generating morphisms of this
kind.

\end{enumerate}

Before giving the relations on these morphisms we make the
following observation about morphisms in $\cl{O}_k$.  Consider
    \begin{eqnarray*} \alpha & \in & I^{(k-1)+}(x_1, \ldots, x_m; x)\\
    \beta & \in & I^{(k-1)+}(y_1, \ldots, y_m; y) \end{eqnarray*}
A morphism $\alpha \map{g} \beta \in \cl{O}_k$ is given by a
permutation $\sigma$ and morphisms
    \[\begin{array}{ccccl} x_i & \map{f_i} & y_{\sigma(i)} &&\\
    x & \map{f} & y & \in & \cl{O}_{k-1} \end{array}\]
So for each face map $\gamma$ there is a unique `restriction' of
$g$ to the specified face, giving a morphism $\gamma g$ of
$(k-1)$-opetopes.

Note that, to specify a morphism in the category
$\free{\cl{O}_{k-1}} \times \cl{O}_{k-1}$ the morphisms $f_i$
above should be in the direction $y_{\sigma(i)} \lra x_i$, but
since these are all unique isomorphisms the direction does not
matter; the convention above helps the notation.  We now give the
relations on the above generating morphisms.

\begin{itemize}
\item{Relations}
\end{itemize}

\begin{enumerate}

\item For any morphism
    \[\alpha \map{g} \beta  \ \in \cl{O}_k\]
and face map
    \[x_i \map{s_i} \alpha\]
the following diagrams commute
    \[\begin{diagram} x_i & \rTo^{s_i} & \alpha && x & \rTo^{t} & \alpha \\
    \dTo{s_i(g)}{} & & \dTo{}{g} &&  \dTo{t(g)}{} & & \dTo{}{g} \\
    y_{\sigma(i)} & \rTo_{s_{\sigma(i)}} & \beta && y & \rTo_{t} & \beta \end{diagram}\]

We write these generally as
    \[\begin{diagram} x & \rTo^{\gamma} & \alpha \\
    \dTo{\gamma g}{} & & \dTo{}{g} \\
    y & \rTo_{\gamma'} & \beta \end{diagram}\]

\item Faces are identified where composition occurs: consider
$\theta \in \cl{O}_k$ where $k\geq 2$.  Recall that
$\theta$ is constructed as an arrow of a slice multicategory, so
is given by a labelled tree, with nodes labelled by its
$(k-1)$-faces, and edges labelled by object-morphisms, that is,
morphisms of $\cl{O}_{k-2}$.

So by the formal description of trees (Section~\ref{treeformal}),
$\theta$ is a certain bijection, and the elements that are in
bijection with each other are the $(k-2)$-faces of the
$(k-1)$-faces of $\theta$; they are given by composable pairs of
face maps of the second kind above.  That is, the node labels are
given by face maps $\alpha \map{\gamma} \theta$ and then the
inputs and outputs of those are given by pairs
    \[x \map{\gamma_1} \alpha \map{\gamma_2} \theta\]
where $\gamma_2 \in G_k$ and $\gamma_1 \in G_{k-1}$.  Now, if
\[\begin{array}{rccccc}  & x & \map{\gamma_1} & \alpha &
    \map{\gamma_2} & \theta \\
    \mbox{and } & y & \map{\gamma_3} & \beta & \map{\gamma_4} & \theta
\end{array}\]
correspond under the bijection, there must be a unique
object-morphism
    \[f:x \lra y\]
labelling the relevant edge of the tree.  Then for the composites
in $\cl{O}$ we have the relation: the following diagram commutes

    \[\begin{diagram}
        x     & \rTo^{\gamma_1} &   \alpha   &             & \\
    \dTo{f}{} &      &            & \rdTo(2,1)^{\gamma_2}  & \theta \\
        y     & \rTo^{\gamma_3} &    \beta   & \ruTo(2,1)_{\gamma_4}  & \end{diagram}.\]

\item Composition in $\cl{O}_k$ is respected, that is, if $g \circ
f = h \in \cl{O}_k$ then $g \circ f = h \in \cl{O}$.

\item Identities in $\cl{O}_k$ are respected, that is, given any
morphism $x \map{\gamma} \alpha \in \cl{O}$ we have $\gamma \circ
1_x = \gamma$.

\end{enumerate}

Note that only the relation (2) is concerned with the
identification of faces with one another; the other relations are
merely dealing with isomorphic copies of opetopes.

We immediately check that the above relations have not identified
any morphisms of $\cl{O}_k$.

\begin{lemma} Each $\cl{O}_k$ is a full subcategory of \cl{O}.
\end{lemma}

\begin{prf}  Clear from definitions.  \end{prf}

We now check that the above relations have not identified any
$(k-1)$-faces of $k$-opetopes.

\begin{proposition}\label{normal} Let $x \in \cl{O}_{k-1}$, $\alpha \in
\cl{O}_k$ and $\gamma_1, \gamma_2 \in G_k$ with
    \[\gamma_1,\ \gamma_2 : x \lra \alpha\]
Then $\gamma_1 = \gamma_2 \in \cl{O} \implies \gamma_1 = \gamma_2
\in G_k$.  \end{proposition}

We prove this by expressing all morphisms from $(k-1)$-opetopes to
$k$-opetopes in the following ``normal form''; this is a simple
exercise in term rewriting (see \cite{kv1}).

\begin{lemma} Let $x \in \cl{O}_{k-1}$, $\alpha \in \cl{O}$.  Then
a morphism
    \[x \lra \alpha \ \in \cl{O}\]
is uniquely represented by
    \[x \map{\gamma} \alpha\]
or a pair
    \[x \map{f} y \map{\gamma} \alpha\]
where $f \in \cl{O}_{k-1}$ and $\gamma \in G_k$. \end{lemma}

\begin{prf}  Any map $x \lra \alpha$ is represented by terms of
the form
    \[x \map{f_1} x_1 \map{f_2} \cdots \map{f_m} x_m \map{\gamma}
    \alpha_1 \map{g_1} \cdots \map{g_{j-1}}
    \alpha_j \map{g_j} \alpha\]
where each $f_i \in \cl{O}_{k-1}$ and each $g_r \in \cl{O}_k$.
Equalities are generated by equalities in components of the
following forms: \numarabic
\[\begin{diagram}
    1) &{}& \rTo^{\gamma} &{}& \rTo^{g} & = & \rTo^{\gamma g} &{}&
    \rTo^{\gamma'}&{} \\
    2) &{}& \rTo^f &{}& \rTo^{f'} & = & \rTo^{f' \circ f} &{} & \in
    \cl{O}_{k-1} & \\
    3) &{}& \rTo^g &{}& \rTo^{g'} & = & \rTo^{g' \circ g} &{} & \in
    \cl{O}_{k} & \\
    4) &{}& \rTo^1 &{}& \rTo^{\gamma} & = & \rTo^{\gamma} &{} & &
\end{diagram}\]
where $\gamma \in G_k$ and $\gamma g$ and $\gamma'$ are as defined
above.  That is, equalities in terms are generated by equations $t
= t'$ where $t'$ is obtained from $t$ by replacing a component of
$t$ of a left hand form above, with the form in the right hand
side, or vice versa.

We now orient the equations in the term rewriting style in the
direction
    \[\begin{diagram} {}& \implies &{} \end{diagram}\]
from left to right in the above equations.  We then show two
obvious properties:

\begin{enumerate}

\item Any reduction of $t$ by $\Longrightarrow$ terminates in at
most $2j+m$ steps.

\item If we have \pica pic76.tex \picz then there exists $t'''$ with
\pica pic75.tex \picz where the dotted arrows indicate a chain of
equations (in this case of length at most 2).
\end{enumerate}

The first part is clear from the definitions; for the second part
the only non-trivial case is for a component of the form
    \[\begin{diagram} {}& \rTo^{\gamma} &{}& \rTo^{g_1} &{}&
    \rTo^{g_2} &{} \end{diagram}.\]
This reduces uniquely to
    \[\begin{diagram} {}& \rTo^{\gamma(g_2 \circ g_1)} & {} & \rTo
    ^{\gamma'} &{} \end{diagram}\]
since `restriction' is unique, as discussed earlier.

It follows that, for any terms $t$ and $s$, $t=s$ if and only if
$t$ and $s$ reduce to the same normal form as above.  \end{prf}

\begin{prfof}{Proposition \ref{normal}  } $\gamma_1$ and $\gamma_2$
are in normal form.  \end{prfof}

% Some low-dimensional examples of face maps are given in
% Appendix~\ref{dafloops}.


\section{Opetopic Sets} \label{osets}

In this section we examine the theory of opetopic sets. We begin by
following through our modifications to the opetopic theory to include
the theory of opetopic sets.  We then use results of \cite{kel3} to
prove that the category of opetopic sets is indeed equivalent to the
category of presheaves on $\cl{O}$, the category of opetopes defined
in Section~\ref{opecat}.

Recall that, by the equivalences proved in the \cite{che7} and
\cite{che8}, we have equivalent categories of opetopes, multitopes
and Leinster opetopes.  So we may define equivalent categories of
opetopic sets by taking presheaves on any of these three categories. 
In the following definitions, although the opetopes we consider are
the `symmetric multicategory' kind, the concrete description of an
opetopic set is not {\em precisely} as a presheaf on the category of
these opetopes.  The sets given in the data are indexed not by
opetopes themselves but by {\em isomorphism classes} of opetopes; so
at first sight this resembles a presheaf on the category of Leinster
opetopes.  However, we do not pursue this matter here, since the
equivalences proved in our earlier work are sufficient for the
purposes of this article.

We adopt this presentation in order to avoid naming the same cells
repeatedly according to the symmetries; that is, we do not keep
copies of cells that are isomorphic by the symmetries. 


\subsection{Definitions}
\label{osetnewdef}

In \cite{bd1}, weak $n$-categories are defined as opetopic sets
satisfying certain universality conditions. However, opetopic sets
are defined using only \sms\ with a {\em set} of objects; in the
light of the results of our earlier work, we seek a
definition using \sms\ with a {\em category} of objects. The
definitions we give here are those given in \cite{bd1} but with
modifications as demanded by the results of our previous work.

\label{bicatopicsets}

The underlying data for an opetopic $n$-category are given by an
opetopic set. Recall that, in \cite{bd1}, given a symmetric multicategory $Q$ 
a $Q$-opetopic set $X$ is given by, for each $k \geq 0$, a \sm\ $Q(k)$ and a 
set $X(k)$ over $o(Q(k))$, where
\[\begin{array}{c}
    Q(0) = Q\\
    \mbox{and \ \ } Q(k+1) = {Q(k)_{X(k)}}^+.
\end{array}\]  An opetopic set is then an $I$-opetopic set, where $I$ is the
\sm\ with one object and one (identity) arrow.

The idea is that the category of opetopic sets should be
equivalent to the presheaf category \[[\mbox{{\bfseries
Opetope}}^{\op},\mbox{{\bfseries Set}}]\] and we use this to
motivate our generalisation of the Baez-Dolan definitions.


%%%%question 1: where IS this comment going to go?

%Note that, as in \cite{bd1} we do not even give the construction
%of the category {\bf Opetope} of opetopes. In \cite{hmp1} Hermida,
%Makkai and Power explicitly define \cat{Multitope}, the category
%of multitopes.  We can define an analogous category of opetopes
%(or Leinster opetopes) via the above equivalences, giving
%\cat{Opetope} and $\mbox{\cat{Opetope}}_L$, categories of
%Baez-Dolan and Leinster opetopes respectively, such that
%    \[\mbox{\cat{Multitope}} \simeq \mbox{\cat{Opetope}}
%    \simeq \mbox{\cat{Opetope}}_L.\]


Recall that we have for each $k \geq 0$ a category $\bb{C}(k)$
of $k$-opetopes, and each $\bb{C}(k)$ is a full subcategory of
{\bf Opetope}. A functor \[\mbox{{\bfseries Opetope}}^{\op}
\longrightarrow \mbox{{\bfseries Set}}\] may be considered as
assigning to each opetope a set of `labels'.

Recall that for each $k$, $\bb{C}(k)$ is equivalent to a discrete
category.  So it is sufficient to specify `labels' for each
isomorphism class of opetopes. 

Recall (\cite{che7}) that we call a \sm\ $Q$ {\em tidy} if
it is freely symmetric with a category of objects \bb{C}
equivalent to a discrete category.  Throughout this section we say
`$Q$ has object-category \bb{C} equivalent to $S$ discrete' to
mean that $S$ is the set of isomorphism classes of \bb{C}, so
\bb{C} is equipped with a morphism $\bb{C} \simarr S$.  We begin
by defining the construction used for `labelling' as discussed
above.  The idea is to give a set of labels as a set over the
isomorphism classes of objects of $Q$, and then to `attach' the
labels using the following pullback construction.


\begin{definition} Let $Q$ be a tidy symmetric multicategory with
category of objects \bb{C} equivalent to $S$ discrete.  Given a
set $X$ over $S$, that is, equipped with a function $f:X \lra S$,
we define the {\em pullback multicategory} $Q_X$ as follows.

\begin{itemize}

\item Objects: $o(Q_X)$ is given by the pullback

\setlength{\unitlength}{0.2em}
\begin{center}
\begin{picture}(45,35)(5,7)       %

\put(10,10){\makebox(0,0){$X$}}  %  bottom left
\put(10,35){\makebox(0,0){.}}  %  top left
\put(45,35){\makebox(0,0){$\bb{C}$}}  %  top right
\put(45,10){\makebox(0,0){$S$}}  %  bottom right

\put(15,35){\vector(1,0){27}}  %  top
\put(15,10){\vector(1,0){27}}  %  bottom
\put(10,32){\vector(0,-1){19}} %  left
\put(45,32){\vector(0,-1){19}} %  right

\put(29,8){\makebox(0,0)[t]{$f$}}  %
\put(50,22){\makebox(0,0){$\sim$}} %
\put(52,9){\makebox(0,0){.}}

\end{picture}
\end{center}  Observe that the morphism on the left is an
equivalence, so $o(Q_X)$ is equivalent to $X$ discrete.  Write $h$
for this morphism.

\item Arrows: given objects $a_1, \ldots a_k, a \in o(Q_X)$ we
have
    \[Q_X(a_1, \ldots, a_k; a) \cong Q(fh(a_1), \ldots, fh(a_k);
    fh(a)).\]

\item Composition, identities and symmetric action are then
inherited from $Q$.

\end{itemize}
\end{definition}

We observe immediately that since $Q$ is tidy, $Q_X$ is tidy. Also
note that if $Q$ is object-discrete this definition corresponds to
the definition of pullback symmetric multicategory given in
\cite{bd1}.

We are now ready to describe the construction of opetopic sets.

\begin{definition}  Let $Q$ be a tidy \sm\ with object-category
\bb{C} equivalent to $S$ discrete.  A $Q$-{\em opetopic set} $X$
is defined recursively as a set $X(0)$ over $S$ together with a
${Q_X}^+$-opetopic set $X_1$.
\end{definition}

So a $Q$-opetopic set consists of, for each $k \geq 0$:
\begin{itemize}
\item a tidy \sm\ $Q(k)$ with object-category $\bb{C}(k)$
equivalent to $S(k)$ discrete
\item a set $X(k)$ and function $X(k)
\stackrel{f_k}{\longrightarrow} S(k)$
\end{itemize}
where
\begin{eqnarray*} Q(0) &=& Q\\
     \mbox{and \ \ } Q(k+1) &=& {Q(k)_{X(k)}}^+. \end{eqnarray*} We refer to
$X_1$ as the underlying ${Q(k)_{X(k)}}^+$-opetopic set of $X$.
%1

We now define morphisms of opetopic sets.  Suppose we have
opetopic sets $X$ and $X'$ with notation as above, together with a
morphism of symmetric multicategories
    \[F: Q \lra Q'\]
and a function
    \[F_0: X(0) \lra X'(0)\]
such that the following diagram commutes

\setlength{\unitlength}{0.2em}
\begin{center}
\begin{picture}(45,40)(5,5)        %


\put(10,10){\makebox(0,0){$X'(0)$}}  %  bottom left
\put(10,35){\makebox(0,0){$X(0)$}}  %  top left
\put(45,35){\makebox(0,0){$S(0)$}}  %  top right
\put(45,10){\makebox(0,0){$S'(0)$}}  %  bottom right

\put(17,35){\vector(1,0){21}}  %  top
\put(17,10){\vector(1,0){21}}  %  bottom
\put(10,30){\vector(0,-1){15}} %  left
\put(45,30){\vector(0,-1){15}} %  right

\put(8,23){\makebox(0,0)[r]{$F_0$}} %  left
\put(47,23){\makebox(0,0)[l]{$F$}} %  right
\put(27,37){\makebox(0,0)[b]{$f_0$}} %  top
\put(27,8){\makebox(0,0)[t]{$f'_0$}} %  bottom

%\put(55,9){\makebox(0,0){.}} % punctuation

\end{picture}
\end{center}where the morphism on the right is given by the action of $F$ on
objects. This induces a morphism
    \[Q_{{X(0)}} \lra Q'_{X'(0)}\]
and so a morphism
    \[{Q_{{X(0)}}}^+ \lra {Q'_{{X'(0)}}}^+.\]
We make the following definition.

\begin{definition} A {\em morphism of $Q$-opetopic sets}
    \[F: X \lra X'\]
is given by:

\begin{itemize}

\item an underlying morphism of \sms\ and function $F_0$ as above

\item a morphism $X_1 \lra X'_1$ of their underlying opetopic
sets, whose underlying morphism is induced as above.

\end{itemize}
\end{definition}

\sunit

\noindent So $F$ consists of
\begin{itemize}
\item a morphism $Q \lra Q'$
\item for each $k \geq 0$ a function $F_k : X(k) \lra X'(k)$ such
that the following diagram commutes
\end{itemize}

\setlength{\unitlength}{0.2em}

\begin{center}
\begin{picture}(45,40)(5,5)      %

\put(10,10){\makebox(0,0){$X'(k)$}}  %  bottom left
\put(10,35){\makebox(0,0){$X(k)$}}  %  top left
\put(45,35){\makebox(0,0){$S(k)$}}  %  top right
\put(45,10){\makebox(0,0){$S'(k)$}}  %  bottom right

\put(17,35){\vector(1,0){21}}  %  top
\put(17,10){\vector(1,0){21}}  %  bottom
\put(10,30){\vector(0,-1){15}} %  left
\put(45,30){\vector(0,-1){15}} %  right

\put(8,23){\makebox(0,0)[r]{$F_k$}} %  left
\put(47,23){\makebox(0,0)[l]{}} %  right
\put(27,37){\makebox(0,0)[b]{$f_k$}} %  top
\put(27,8){\makebox(0,0)[t]{$f'_k$}} %  bottom

%\put(55,9){\makebox(0,0){.}} % punctuation

\end{picture}
\end{center} where the map on the right hand side is induced as appropriate.

Note that the above notation for a $Q$-opetopic set $X$ and
morphism $F$ will be used throughout this section, unless
otherwise specified.

\begin{definition} An {\em opetopic set} is an $I$-opetopic set.
A morphism of opetopic sets is a morphism of $I$-opetopic sets. We
write \cat{OSet} for the category of opetopic sets and their
morphisms.
\end{definition}

Eventually, a weak $n$-category is defined as an opetopic set with
certain properties.  The idea is that $k$-cells have underlying
shapes given by the objects of $I^{k+}$.  These are `unlabelled'
cells.  To make these into fully labelled $k$-cells, we first give
labels to the 0-cells, via the function $X(0) \longrightarrow
S(0)$, and then to 1-cells via $X(1) \longrightarrow S(1)$, and so
on.  This idea may be captured in the following `schematic'
diagram.

\sunit
\begin{picture}(140,100)(0,-10)
\put(0,20){\makebox(0,0)[c]{${Q(2)_{{X(2)}}}^+$}}
\put(0,40){\makebox(0,0)[c]{$Q(2)_{{X(2)}}$}}
\put(37,40){\makebox(0,0)[c]{$Q(2) = {Q(1)_{{X(1)}}}^+$}}
\put(43,60){\makebox(0,0)[c]{${Q(1)_{{X(1)}}}$}}
\put(77,60){\makebox(0,0)[c]{$Q(1)={Q(0)_{{X(0)}}}^+$}}
\put(83,80){\makebox(0,0)[c]{$Q(0)_{{X(0)}}$}}
\put(113,80){\makebox(0,0)[c]{$Q(0)=I$}}
\put(120,60){\makebox(0,0)[c]{$I^+$}}
\put(120,40){\makebox(0,0)[c]{$I^{2+}$}}
\put(120,20){\makebox(0,0)[c]{$I^{3+}$}}

\put(119,76){\vector(0,-1){12}}  % down arrows
\put(119,56){\vector(0,-1){12}}  %
\put(119,36){\vector(0,-1){12}}  %
\put(119,16){\vector(0,-1){12}}  %
\put(79,76){\vector(0,-1){12}}  %
\put(39,56){\vector(0,-1){12}}  %
\put(-1,36){\vector(0,-1){12}}  %

\put(121,70){\makebox(0,0)[l]{$+$}}  %
\put(121,50){\makebox(0,0)[l]{$+$}}  %
\put(121,30){\makebox(0,0)[l]{$+$}}  %
\put(121,10){\makebox(0,0)[l]{$+$}}  %
\put(81,70){\makebox(0,0)[l]{$+$}}  %
\put(41,50){\makebox(0,0)[l]{$+$}}  %
\put(1,30){\makebox(0,0)[l]{$+$}}  %

\put(92,80){\vector(1,0){11}}   % along arrows
\put(51,60){\vector(1,0){10}}   %
\put(9,40){\vector(1,0){11}}   %

\put(60,0){$\vdots$}

\end{picture}


%2

Bearing in mind our modified definitions, we use the Baez-Dolan
terminology as follows.

\begin{definitions} \
\begin{itemize}
\item A $k$-{\em dimensional cell} (or $k$-{\em cell}) is an element
of $X(k)$ \\ (i.e. an isomorphism class of objects of
$Q(k)_{{X(k)}}$\,).
\item A $k$-{\em frame} is an isomorphism class of objects of
$Q(k)$ \\ (i.e. an \iso\ class of arrows of
$Q(k-1)_{{X(k-1)}}$\,).
\item A $k$-{\em opening} is an isomorphism class of arrows of
$Q(k-1)$, for $k \geq 1$.
\end{itemize}
\end{definitions}

So a $k$-opening may acquire $(k-1)$-cell labels and become a
$k$-frame, which may itself acquire a label and become a $k$-cell.
We refer to such a cell and frame as being {\em in} the original
$k$-opening.

On objects, the above schematic diagram becomes:

\sunit

\begin{picture}(140,120)(0,-30)
\put(15,20){\makebox(0,0)[c]{3-frames}}
\put(15,40){\makebox(0,0)[c]{2-cells}}
\put(50,20){\makebox(0,0)[c]{3-openings}}  %
\put(50,40){\makebox(0,0)[c]{2-frames}}  %
\put(50,60){\makebox(0,0)[c]{1-cells}}  %
\put(84,20){\makebox(0,0)[c]{.}}  %
\put(85,40){\makebox(0,0)[c]{2-openings}}  %
\put(85,60){\makebox(0,0)[c]{1-frames}}  %
\put(85,80){\makebox(0,0)[c]{0-cells}}  %
\put(120,20){\makebox(0,0)[c]{3-opetopes}}  %
\put(120,40){\makebox(0,0)[c]{2-opetopes}}  %
\put(120,60){\makebox(0,0)[c]{1-opetopes}}  %
\put(120,80){\makebox(0,0)[c]{0-opetopes}}  %


\put(119,76){\vector(0,-1){12}}  % down arrows
\put(119,56){\vector(0,-1){12}}  %
\put(119,36){\vector(0,-1){12}}  %
\put(119,16){\vector(0,-1){12}}  %
\put(84,76){\vector(0,-1){12}}  %
\put(49,56){\vector(0,-1){12}}  %
\put(14,36){\vector(0,-1){12}}  %

\put(121,70){\makebox(0,0)[l]{$+$}}  %
\put(121,50){\makebox(0,0)[l]{$+$}}  %
\put(121,30){\makebox(0,0)[l]{$+$}}  %
\put(121,10){\makebox(0,0)[l]{$+$}}  %
\put(86,70){\makebox(0,0)[l]{$+$}}  %
\put(51,50){\makebox(0,0)[l]{$+$}}  %
\put(16,30){\makebox(0,0)[l]{$+$}}  %
\put(86,50){\makebox(0,0)[l]{$+$}}  %
\put(51,30){\makebox(0,0)[l]{$+$}}  %
\put(16,10){\makebox(0,0)[l]{$+$}}  %


\qbezier[15](84,56)(84,50)(84,45) % dotted arrows
\put(84,46){\vector(0,-1){2}}  %
\qbezier[15](84,36)(84,30)(84,25) %
\put(84,26){\vector(0,-1){2}}  %
\qbezier[15](49,36)(49,30)(49,25) %
\put(49,26){\vector(0,-1){2}}  %
\qbezier[15](84,16)(84,10)(84,5) %
\put(84,6){\vector(0,-1){2}}  %
\qbezier[15](49,16)(49,10)(49,5) %
\put(49,6){\vector(0,-1){2}}  %
\qbezier[15](14,16)(14,10)(14,5) %
\put(14,6){\vector(0,-1){2}}  %

\put(96,80){\vector(1,0){12}}   % along arrows
\put(61,60){\vector(1,0){12}}   %
\put(26,40){\vector(1,0){12}}   %
\put(-9,20){\vector(1,0){12}}   %

\qbezier[15](96,60)(102,60)(107,60) % dotted arrows
\put(106,60){\vector(1,0){2}}  %
\qbezier[15](96,40)(102,40)(107,40) % dotted arrows
\put(106,40){\vector(1,0){2}}  %
\qbezier[15](96,20)(102,20)(107,20) % dotted arrows
\put(106,20){\vector(1,0){2}}  %
\qbezier[15](61,40)(67,40)(72,40) % dotted arrows
\put(71,40){\vector(1,0){2}}  %
\qbezier[15](61,20)(67,20)(72,20) % dotted arrows
\put(71,20){\vector(1,0){2}}  %
\qbezier[15](26,20)(32,20)(37,20) % dotted arrows
\put(36,20){\vector(1,0){2}}  %
%\qbezier[40](13,110)(28,110)(41,110)%

%%%bottom bit

\put(20,-10){\line(1,0){25}}   % along arrows
\put(45,-10){\makebox(0,0)[l]{$\rhd$}}  %
\put(55,-10){\line(1,0){25}}   % along arrows
\put(80,-10){\makebox(0,0)[l]{$\rhd$}}  %
\put(90,-10){\line(1,0){25}}   % along arrows
\put(115,-10){\makebox(0,0)[l]{$\rhd$}}  %

\put(32.5,-15){\makebox(0,0)[c]{{\em labels for 2-cells}}}  %
\put(67.5,-15){\makebox(0,0)[c]{{\em labels for 1-cells}}}  %
\put(102.5,-15){\makebox(0,0)[c]{{\em labels for 0-cells}}}  %


\end{picture}.

Horizontal arrows represent the process of labelling, as shown;
vertical arrows represent the process of `moving up' dimensions.
Starting with a $k$-opetope, we have from right to left the
progressive labelling of 0-cells, 1-cells, and so on, to form a
$k$-cell at the far left, the final stages being:

\sunit
\begin{center}
\begin{picture}(70,60)(0,-10)

\put(10,40){\makebox(0,0)[c]{$k$-opening}}  %
\put(10,20){\makebox(0,0)[c]{$k$-frame}}  %
\put(10,0){\makebox(0,0)[c]{$k$-cell}}  %

\put(15,30){\makebox(0,0)[l]{labels for constituent $(k-1)$-cells}}  %
\put(15,10){\makebox(0,0)[l]{label for $k$-cell itself}}  %

\put(10,6){\line(0,1){10}}  %
\put(10,6){\makebox(0,0)[t]{$\triangledown$}}  %
\put(10,26){\line(0,1){10}}  %
\put(10,26){\makebox(0,0)[t]{$\triangledown$}}  %

\end{picture}
\end{center} A $k$-opening acquires labels as an arrow of $Q(k-1)$, becoming a
$k$-frame as an arrow of $Q(k-1)_{{X(k-1)}}$\,.  That is, it has
$(k-1)$-cells as its source and a $(k-1)$-cell as its target.

\begin{definition}
A $k$-{\em niche} is a $k$-opening (i.e. arrow of $Q(k-1)$)
together with labels for its source only.
\end{definition}


We may represent these notions as follows.  Let $f$ be an arrow of
$Q(k-1)$, so $f$ specifies a $k$-opening which we might represent
as

\setleng{1mm}
\begin{center}
\begin{picture}(18,30)(8,8)
\scalecq
\end{picture}.
\end{center}

\noindent Then a niche in $f$ is represented by

\begin{center}
\begin{picture}(18,30)(8,8)
\scalecr{$a_1$}{$a_2$}{$a_r$}{\ \ ?}{?}
\end{picture}
\end{center}

\noindent where $a_1, \ldots a_r$ are `valid' labels for the
source elements of $f$; a $k$-frame is represented by

\begin{center}
\begin{picture}(18,30)(8,8)
\scalecr{$a_1$}{$a_2$}{$a_r$}{\ \ $a$}{?}
\end{picture}
\end{center}

\noindent where $a$ is a `valid' label for the target of $f$.
Finally a $k$-cell is represented by

\begin{center}
\begin{picture}(18,30)(8,8)
\scalecr{$a_1$}{$a_2$}{$a_r$}{\ \ $a$}{$\alpha$}
\end{picture}.
\end{center}

Since all \sms\ in question are tidy, we may in each case
represent the same isomorphism class by any symmetric variant of
the above diagrams.  Also, we refer to $k$-cells as labelling
$k$-opetopes, rather than isomorphism classes of $k$-opetopes.

\subsection{\cat{OSet} is a presheaf category} \label{presheaf}

In this section we prove the main result of this work, that the
category of opetopic sets is a presheaf category, and moreover, that
it is equivalent to the presheaf category \[\pshfcat{\cl{O}}.\] To
prove this we use \cite{kel3}, Theorem 5.26, in the case $\cl{V} =
\Set$.  This theorem is as follows.

\begin{theorem} \label{kel} Let \cl{C} be a \cl{V}-category.
In order that $\cl{C}$ be equivalent to $[\cl{E}^{\op}, \cl{V}]$
for some small category $\cl{E}$ it is necessary and sufficient
that $\cl{C}$ be cocomplete, and that there be a set of
small-projective objects in $\cl{C}$ constituting a strong
generator for $\cl{C}$. \end{theorem}

We see from the proof of this theorem that if $E$ is such a set
and $\cl{E}$ is the full subcategory of $\cl{C}$ whose objects are
the elements of $E$, then
    \[\cl{C} \simeq [\cl{E}^{\op}, \cl{V}].\]
We prove the following propositions; the idea is to ``realise''
each isomorphism class of opetopes as an opetopic set; the set of
these opetopic sets constitutes a strong generator as required.

\begin{proposition} \label{pshf1}
\oset\ is cocomplete.
\end{proposition}

\begin{proposition} \label{pshf2}
There is a full and faithful functor
    \[G:\cl{O} \lra \oset.\]
\end{proposition}

\begin{proposition} \label{pshf3}
Let $\alpha \in \cl{O}$.  Then $G(\alpha)$ is small-projective in
\oset.
\end{proposition}

\begin{proposition} \label{pshf4}
Let
    \[E = \coprod\{G(\alpha)\ |\ \alpha \in \cl{O}\} \subseteq
    \oset.\]
Then $E$ is a strongly generating set for \oset.
\end{proposition}

\begin{corollary} \label{pshf5}
\oset\ is a presheaf category.
\end{corollary}

\begin{corollary} \label{pshf6}
    \[\oset \simeq \pshfcat{\cl{O}}.\]
\end{corollary}

\begin{prfof}{Proposition \ref{pshf1}}  Consider a diagram
    \[D: \bb{I} \lra \oset\]
where \bb{I} is a small category.  We seek to construct a limit
$Z$ for $D$; the set of cells of $Z$ of shape $\alpha$ is given by
a colimit of the sets of cells of shape $\alpha$ in each $D(I)$.

We construct an opetopic set $Z$ as follows.  For each $k \geq 0$,
$Z(k)$ is a colimit in \set:
    \[Z(k) = \int\nolimits^{I\in \bb{I}} D(I)(k).\]
Now for each $k$ we need to give a function
    \[F(k):Z(k) \lra o(Q(k))\]
where
    \[Q(k) = {Q(k-1)_{Z(k-1)}}^+\]
    \[Q(0)=I.\]
That is, for each $\alpha \in Z(k)$ we need to give its frame.
Now
    \[ \begin{array} {r} Z(k) = \coprod\limits_{I\in\bb{I}} D(I)(k) \\ \  \end{array}
    \left/ \begin{array}{l} \\ \sim \end{array} \right.  \]
where $\sim$ is the equivalence relation generated by
    \[ \begin{array} {cc} D(u)(\alpha_{I'})\sim \alpha_I & \mbox{\
    for all } u:I \lra I' \in \bb{I} \\
    & \mbox{and } \alpha_I \in D(I)(k). \end{array}\]
So $\alpha \in Z(k)$ is of the form $[\alpha_I]$ for some
$\alpha_I \in D(I)(k)$ where $[\alpha_I]$ denotes the equivalence
class of $\alpha_I$ with respect to $\sim$.

Now suppose the frame of $\alpha_I$ in $D(I)$ is
    \[(\beta_1, \ldots, \beta_j) \map{?} \beta\]
where $\beta_i, \beta \in D(I)(k-1)$ label some $k$-opetope $x$.
We set the frame of $[\alpha_I]$ to be
    \[(\ [\beta_1], \ldots, [\beta_j]\ ) \map{?} [\beta]\]
labelling the same opetope $x$.  This is well-defined since a
morphism of opetopic sets preserves frames of cells, so the frame
of $D(u)(\alpha_I)$ is
    \[(\ D(u)(\beta_1)\ , \ldots,\ D(u)(\beta_j)\ ) \map{?} D(u)(\beta)\]
also labelling $k$-opetope $x$.  It follows from the universal
properties of the colimits in \set\ that $Z$ is a colimit for $D$,
with coprojections induced from those in \set.  Then, since \set\
is cocomplete, \oset\ is cocomplete.  \end{prfof}

\begin{prfof}{Proposition \ref{pshf2}}  Let $\alpha$ be a
$k$-opetope.  We express $\alpha$ as an opetopic set
$G(\alpha)=\hat{\alpha}$ as follows, using the usual notation for
an opetopic set.  The idea is that the $m$-cells are given by the
$m$-faces of $\alpha$.

For each $m \geq 0$ set
    \[\begin{array}{cl} X(m) = \{\ [(x,f)]\ \  | & \mbox{ $x \in
    \cl{O}_m$ \ and $x \map{f} \alpha \in \cl{O}$}\\
    & \mbox{ where $[\ ]$ denotes isomorphism class in
    $\cl{O}/\alpha$} \}. \end{array}\]
So in particular we have
    \[X(k) = \{[(\alpha, 1)]\}\]
and for all $m>k$, $X(m) = \emptyset$. It remains to specify the
frame of $[(x,f)]$.  The frame is an object of
    \[Q(m) = {Q(m-1)_{X(m-1)}}^+\]
so an arrow of
    \[{Q(m-2)_{X(m-2)}}^+\]
labelled with elements of $X(m-1)$. Now such an arrow is a
configuration for composing arrows of $Q(m-2)_{X(m-2)}$; for the
frame as above, this is given by the opetope $x$ as a labelled
tree. Then the $(m-1)$-cell labels are given as follows. Write
    \[x :y_1, \ldots, y_j \lra y\]
say, and so we have for each $i$ a morphism
    \[y_i \lra x\]
and a morphism
    \[y \lra x \in \cl{O}.\]
Then the labels in $X(m-1)$ are given by
    \[[y_i \lra x \map{f} \alpha] \in X(m-1)\]
and
    \[[y \lra x \map{f} \alpha] \in X(m-1).\]
Now, given a morphism
    \[h: \alpha \lra \beta \in \cl{O}\]
we define
    \[\hat{h}: \hat{\alpha} \lra \hat{\beta} \in \cat{OSet}\]
by
    \[[(x,f)] \mapsto [(x, h \circ f)]\]
which is well-defined since if $(x,f) \cong (x', f')$ then $(x,
hf) \cong (x', hf')$ in $\cl{O}/\alpha$.  This is clearly a
morphism of opetopic sets.

Observe that any morphism $\hat{\alpha} \lra \hat{\beta}$ must be
of this form since the faces of $\alpha$ must be preserved.
Moreover, if $\hat{h} = \hat{g}$ then certainly
$[(\alpha,h)]=[(\alpha,g)]$.  But this gives $(\alpha,h) =
(\alpha,g)$ since there is a unique morphism $\alpha \lra \alpha
\in \cl{O}$ namely the identity. So $G$ is full and faithful as
required.  \end{prfof}

\begin{prfof}{Proposition \ref{pshf3}}  For any $\alpha \in \cl{O}_k$
we show that $\hat{\alpha}$ is small-projective, that is that the
functor
    \[\psi=\oset(\hat{\alpha},-): \oset \lra \set\]
preserves small colimits.  First observe that for any opetopic set
$X$
    \[ \begin{array}{ccl} \psi(X) = \oset(\hat{\alpha},X)& \cong &
    \{ \mbox{$k$-cells in $X$ whose underlying $k$-opetope is $\alpha$} \}\\
    & \subseteq & X(k) \end{array}\]
and the action on a morphism $F:X \lra Y$ is given by
    \[\begin{array}{cccc} \psi(F) = \oset(\hat{\alpha},F): & \oset(\hat{\alpha},X)&
    \lra & \oset(\hat{\alpha},Y) \\
    &x & \mapsto & F(x). \end{array}\]
So $\psi$ is the `restriction' to the set of cells of shape
$\alpha$.  This clearly preserves colimits since the cells of
shape $\alpha$ in the colimit are given by a colimit of the sets
cells of shape $\alpha$ in the original diagram. \end{prfof}

\begin{prfof}{Proposition \ref{pshf4}}  First note that
    \[\hat{\alpha} = \hat{\beta} \iff \alpha \cong \beta \in
    \cl{O}\]
so
    \[E \cong \coprod_k S_k\]
where for each $k$, $S_k$ is the set of $k$-dimensional Leinster
opetopes.  Since each $S_k$ is a set it follows that $E$ is a set.

We need to show that, given a morphism of opetopic sets $F:X \lra
Y$, we have
    \[\oset(\hat{\alpha},F) \mbox{ is an isomorphism for all
    $\hat{\alpha}$\ } \Longrightarrow \mbox{\ $F$ is an
    isomorphism.}\]
Now, we have seen above that
    \[\oset(\hat{\alpha}, X) \cong \{ \mbox{cells of $X$ of shape
     $\alpha$} \}\]
so
    \[\oset(\hat{\alpha},F) = F|_\alpha = \mbox{ $F$ restricted to
    cells of shape $\alpha$}.\]
So
    \[ \begin{array}{l} \oset(\hat{\alpha},F) \mbox{ is an isomorphism for all
    $\hat{\alpha}$\ \hspace{20mm}} \\
    \mbox{\hspace{20mm}} \iff  \mbox{ $F|_\alpha$ is an isomorphism for
    all $\alpha \in \cl{O}$} \\
    \mbox{\hspace{20mm}} \iff \mbox{$F$ is an isomorphism}. \end{array}\]
\end{prfof}

\begin{prfof}{Corollary \ref{pshf5}}  Follows from Propositions
\ref{pshf1}, \ref{pshf2}, \ref{pshf3}, \ref{pshf4} and \cite{kel3}
Theorem 5.26.  \end{prfof}

\begin{prfof}{Corollary \ref{pshf6}}  Let \cl{E} be the full
subcategory of \oset\ whose objects are those of $E$.  Since $G$
is full and faithful, $\cl{E}$ is the image of $G$ and we have
    \[\cl{O} \simeq \cl{E}\]
and hence
    \[\oset \simeq \pshfcat{\cl{E}} \simeq \pshfcat{\cl{O}}.\]
\end{prfof}


\addcontentsline{toc}{section}{References}
\bibliography{bib0209}



\nocite{bd2}

\nocite{hmp2} \nocite{hmp3} \nocite{hmp4}

\nocite{bae1}




\end{document}

pubsettings.tex

\input{macros1}
\input{macros2}
\input{opics}
\input{settings1}

%\mybibstyle

\bibliographystyle{plain}

settings1.tex
%%%%%%%%%%%%%%%%%%%%%%%%% use packages 


\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
%\usepackage{amsthm}
\usepackage{fancyheadings}
\usepackage{latexcad}



pub3.bbl
\begin{thebibliography}{10}

\bibitem{bae1}
John Baez.
\newblock An introduction to $n$-categories.
\newblock In {\em 7th Conference on Category Theory and Computer Science},
  volume 1290 of {\em Springer Lecture Notes in Computer Science}, 1997.
\newblock Also available via {\tt http://math.ucr.edu/home/baez}.

\bibitem{bd2}
John Baez and James Dolan.
\newblock Letter to {R}. {Street}, {Nov}. 30, 1995.
\newblock Corrected version as of {D}ec. 3, 1995. {A}vailable via {\tt
  http://math.ucr.edu/home/baez}.

\bibitem{bd1}
John Baez and James Dolan.
\newblock Higher-dimensional algebra {I}{I}{I}: $n$-categories and the algebra
  of opetopes.
\newblock {\em Adv. Math.}, 135(2):145--206, 1998.
\newblock Also available via {\tt http://math.ucr.edu/home/baez}.

\bibitem{che12}
Eugenia Cheng.
\newblock A relationship between trees and {K}elly-{M}ac~{L}ane graphs, October 2002.
\newblock E-print {\tt math.CT/0304287}.

\bibitem{che8}
Eugenia Cheng.
\newblock Weak $n$-categories: comparing opetopic foundations, October 2002.
\newblock E-print {\tt math.CT/0304279}.


\bibitem{che7}
Eugenia Cheng.
\newblock Weak $n$-categories: opetopic and multitopic foundations, October
  2002.
\newblock E-print {\tt math.CT/0304277}.


\bibitem{hmp1}
Claudio Hermida, Michael Makkai, and John Power.
\newblock On weak higher dimensional categories, 1997.
\newblock Available via {\tt http://triples.math.mcgill.ca}.

\bibitem{hmp2}
Claudio Hermida, Michael Makkai, and John Power.
\newblock Higher dimensional multigraphs.
\newblock {\em Thirteenth {A}nnual {I}{E}{E}{E} {S}ymposium on {L}ogic in
  {C}omputer {S}cience}, pages 199--206, 1998.
\newblock {I}{E}{E}{E} Computer Soc., Los Alamitos, CA.

\bibitem{hmp3}
Claudio Hermida, Michael Makkai, and John Power.
\newblock On weak higher-dimensional categories {I}: Part 1.
\newblock {\em Journal of Pure and Applied Algebra}, 154:221--246, 2000.

\bibitem{hmp4}
Claudio Hermida, Michael Makkai, and John Power.
\newblock On weak higher-dimensional categories {I} -- 2.
\newblock {\em Journal of Pure and Applied Algebra}, 157:247--277, 2001.

\bibitem{kv1}
R.~C. De~Vrijer J.~W.~Klop.
\newblock {\em Term Rewriting Systems}.
\newblock Number~25 in Cambridge Tracts in Theoretical Computer Science.
  Cambridge University Press, 1999.

\bibitem{kel3}
G.~M. Kelly.
\newblock {\em Basic Concepts of Enriched Category Theory}.
\newblock Number~64 in London Mathematical Society Lecture Note Series.
  Cambridge University Press, 1982.

\bibitem{Lei5}
Tom Leinster.
\newblock {\em Operads in Higher Dimensional Category Theory}.
\newblock PhD thesis, University of Cambridge, July 2000.
\newblock E-print {\tt math.CT/0011106}.

\end{thebibliography}
