Skip to content

Commit

Permalink
ctx application
Browse files Browse the repository at this point in the history
  • Loading branch information
xnning committed Dec 11, 2017
1 parent 1667348 commit b3082c7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions doc/unify/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
\bibliographystyle{ACM-Reference-Format}
\citestyle{acmauthoryear}

\usepackage{multirow}

\begin{document}

Expand Down
4 changes: 2 additions & 2 deletions doc/unify/paper_utility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
\newcommand{\byapp}{\vdash}
\newcommand{\bywt}{\vDash}
\newcommand{\toctx}{\dashv \ctxl}
\newcommand{\toctxo}{\dashv \tctx}
\newcommand{\toctxo}{\dashv \lctx}
\newcommand{\toctxr}{\dashv \ctxr}
\newcommand{\dpreinf}[1][]{\dctx {#1} \byinf}
\newcommand{\dprechk}[1][]{\dctx {#1} \bychk}
Expand Down Expand Up @@ -236,7 +236,7 @@
\newcommand{\erase}[1]{|{#1}|}
\newcommand{\etaeq}{\rightsquigarrow_{\eta id}}

\newcommand{\applye}[2]{[{#1}] #2}
\newcommand{\applye}[2]{\llbracket{#1}\rrbracket #2}
\newcommand{\glb}{\rightsquigarrow}


Expand Down
24 changes: 15 additions & 9 deletions doc/unify/sections/rules.tex
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,21 @@ \section{Algorithm}
\end{mathpar}

\begin{figure}[t]
\begin{tabular}{llp{3cm}lll}
$\applye \tctx x $ & = & $x$ \\
$\applye \tctx \star $ & = & $\star$ \\
$\applye \tctx {e_1 ~ e_2} $ & = & ${\applye \tctx {e_1}} ~ {\applye \tctx {e_2}}$ \\
$\applye \tctx {\erlam x e} $ & = & $\erlam x {\applye \tctx e}$ \\
$\applye \tctx {\blam x A e} $ & = & $\blam x {\applye \tctx A} {\applye \tctx e}$ \\
$\applye \tctx {\bpi x A B} $ & = & $\bpi x {\applye \tctx A} {\applye \tctx B}$ \\
$\applye {\tctx[\genA[\sctx_2]]} {(\genA[\sctx_1])} $ & = & $\genA[\sctx_1] $ \\
$\applye {\tctx[\genA[\sctx_2] = e]} {(\genA[\sctx_1])} $ & = & $\applye \tctx {(e \subst {\sctx_2} {\sctx_1})} $ \\
\begin{tabular}{lll}
\multicolumn{3}{l}{Meta Context Application on terms}\\
$\applye \lctx x $ & = & $x$ \\
$\applye \lctx \star $ & = & $\star$ \\
$\applye \lctx {e_1 ~ e_2} $ & = & ${\applye \lctx {e_1}} ~ {\applye \lctx {e_2}}$ \\
$\applye \lctx {\erlam x e} $ & = & $\erlam x {\applye \lctx e}$ \\
$\applye \lctx {\blam x A e} $ & = & $\blam x {\applye \lctx A} {\applye \lctx e}$ \\
$\applye \lctx {\bpi x A B} $ & = & $\bpi x {\applye \lctx A} {\applye \lctx B}$ \\
$\applye {\lctx[\genA[\sctx]]} {(\genA[\sigma])} $ & = & $\genA[\sigma'] $ \\
& & where $\sigma' = \applye {\lctx[\genA[\sctx]]} \sigma$\\
$\applye {\lctx[\genA[\sctx] = e]} {(\genA[\sigma])} $ & = & ${(e \subst {\sctx} {\sigma'})} $ \\
& & where $\sigma' = \applye {\lctx[\genA[\sctx] = e]} \sigma$\\
\multicolumn{3}{l}{Meta Context Application on suspended substitution}\\
$\applye \lctx {\cdot} $ & = & $\cdot$ \\
$\applye \lctx {(\sigma, e)} $ & = & $\applye \lctx \sigma, \applye \lctx e$ \\
\end{tabular}
\caption{Meta Context Application}
\label{figure:erasure}
Expand Down

0 comments on commit b3082c7

Please sign in to comment.