
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{array}

%% xy
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% xy-pic
\usepackage[all,arc,ps,dvips]{xy}
\NoRules
\SelectTips{cm}{12}
\UseTips


\let\objectstyle=\displaystyle
\let\labelstyle=\displaystyle
\newenvironment{mygraph}{
  \objectmargin={3mm}
  \labelmargin={2mm}
  \begin{graph}
   !~*{+[o]}%
 }{%
   \end{graph}
 }

%% geometry and headers


%%% text macros
\newcommand{\pic}{$\pi$\nobreak-\nobreak calculus}
\newcommand{\lac}{$\lambda$\nobreak-\nobreak calculus}
\usepackage{xspace}
\newcommand{\ie}{i.e.\@\xspace}
\newcommand{\eg}{e.g.\@\xspace}
%%% end of text macros

%%% syntactic macros

\newcommand{\synbar}{\;\;\mathrel{\text{\large${|}$}}\;\;}

\newcommand{\EvalCxt}{{\cal E}}

\newcommand{\vvec}{\vec{v}}
\newcommand{\wvec}{\vec{w}}
\newcommand{\xvec}{\vec{x}}
\newcommand{\yvec}{\vec{y}}
\newcommand{\zvec}{\vec{z}}

\newcommand{\newp}[2]{\newact{#1}.{#2}}  % e.g. \hide{L}{P}
\newcommand{\bangp}[1]{\bangact #1}  % e.g. \repl{P}
\newcommand{\zerop}{{\boldsymbol 0}}
\newcommand{\parp}{\mathbin{|}}
\newcommand{\matchp}[3]{\matchact{#1}{#2}.{#3}}
\newcommand{\mismatchp}[3]{\mismatchact{#1}{#2}.{#3}}

\newcommand{\taup}[1]{\tau.{#1}}

\newcommand{\outp}[3]{\outact{#1}{#2}.{#3}}                 % \outp x y P           x-y.P
\newcommand{\outact}[2]{\zoutact{#1}{#2}}                   % \outact x y           x-y

\newcommand{\polyoutp}[3]{\polyoutact{#1}{#2}.{#3}}         % \polyoutp x {y,z} P   x-<y,z>.P
\newcommand{\polyoutact}[2]{\zoutact{#1}{\langle#2\rangle}} % \polyoutact x {y,z}   x-<y,z>
\newcommand{\zoutact}[1]{\bar{#1}}                          % \zoutact x            x-
\newcommand{\zoutp}[2]{\bar{#1}.{#2}}                       % \zoutp x P            x-.P

\newcommand{\inp}[3]{\inact{#1}{#2}.{#3}}
\newcommand{\inact}[2]{\zinact{#1}({#2})}

\newcommand{\polyinp}[3]{\polyinact{#1}{#2}.{#3}}
\newcommand{\polyinact}[2]{\inact{#1}{#2}}
\newcommand{\zinp}[2]{\zinact{#1}.{#2}}
\newcommand{\zinact}[1]{#1}

\newcommand{\outlab}[2]{\outact{#1}{#2}}
\newcommand{\boutlab}[2]{\outact{#1}{(#2)}}

\newcommand{\inlab}[2]{{#1}{#2}}
\newcommand{\matchact}[2]{[{#1}={#2}]}
\newcommand{\mismatchact}[2]{[{#1}\neq{#2}]}
\newcommand{\newact}[1]{{\boldsymbol\nu}{#1}}
\newcommand{\bangact}{\text{!}}

\newcommand{\pabs}[2]{({#1}).{#2}}
\newcommand{\pconcr}[2]{{#1}\langle{#2}\rangle}

\newcommand{\sub}[2]{\{\sublet{#1}{#2}\}} % \sub x y means x for y
\newcommand{\sublet}[2]{{#1}/{#2}}
\newcommand{\multisub}[1]{\{{#1}\}}

\newcommand{\red}[1]{\mathrel{\overset{#1}{\longrightarrow}}} % e.g. \red{a}
\newcommand{\redstar}[1]{\mathrel{\smash{\overset{#1}{{\longrightarrow}}{}^{*}}}} % e.g. \redstar{}
\newcommand{\nored}[1]{\not\red{#1}} % e.g. \red{a}

\newcommand{\congsuper}{^{\circ}}

\newcommand{\barb}[1]{{\downarrow} {#1}}
\newcommand{\wbarb}[1]{{\Downarrow} {#1}}

\newcommand{\nbarb}[1]{{\not{}{\!\downarrow}} {#1}}
\newcommand{\nwbarb}[1]{{\not{}{\!\Downarrow}} {#1}}

\newcommand{\beep}{\mathbf{beep}}


\newcommand{\sublab}{_{\ell}}

\newcommand{\strongbisim}{\mathrel{\sim\sublab}}
\newcommand{\fullstrongbisim}{\mathrel{\simeq\sublab}}

\newcommand{\notstrongbisim}{\mathrel{\not\sim\sublab}}

\newcommand{\weakbisim}{\mathrel{\approx\sublab}}
\newcommand{\fullweakbisim}{\mathrel{\cong\sublab}}

\newcommand{\notweakbisim}{\mathrel{\not\approx\sublab}}

\newcommand{\strongbbisim}{\mathrel{\dot{\sim}}}
\newcommand{\strongbequiv}{\mathrel{\dot{\sim}\congsuper}}
\newcommand{\strongredbequiv}{\mathrel{{\sim}}}
\newcommand{\strongbcong}{\mathrel{\dot{\simeq}\congsuper}}
\newcommand{\strongredbcong}{\mathrel{\simeq}}

\newcommand{\weakbbisim}{\mathrel{\dot{\approx}}}
\newcommand{\weakbequiv}{\mathrel{{\dot{\approx}}\congsuper}}
\newcommand{\weakredbequiv}{\mathrel{{\approx}}}

\newcommand{\weakbcong}{\mathrel{\dot{\cong}\congsuper}}
\newcommand{\weakredbcong}{\mathrel{{\cong}}}


\newcommand{\infer}[2]{\frac{\displaystyle {#1}}{\displaystyle {#2}}}
\newcommand{\defeq}{\mathrel{\overset{\text{def}}{=}}}
\newcommand{\id}[1]{\mathit{#1}} % multi-letter identifiers
\newcommand{\RR}{\mathcal{R}}
\newcommand{\TT}{\mathcal{T}}
\newcommand{\FF}{\mathcal{F}}


\newcommand{\streq}{\equiv}

\newcommand{\strongprog}{\rightsquigarrow}

\renewcommand{\bar}{\overline}

\newcommand{\fn}[1]{\mathsf{fn}({#1})}
\newcommand{\bn}[1]{\mathsf{bn}({#1})}
\newcommand{\bind}[1]{\mathsf{bind}({#1})}

\renewcommand{\emptyset}{\varnothing}

\newcommand{\setst}{\;/\;}

\newcommand{\maketag}[1]{{\text{\sf(#1)}}}
\newcommand{\eqtag}[1]{\tag*{\maketag{#1}}}

