Skip to content

Commit

Permalink
Removed let1-pair rule
Browse files Browse the repository at this point in the history
  • Loading branch information
imbrem committed Dec 1, 2024
1 parent ac767d1 commit 7c428fd
Showing 1 changed file with 20 additions and 51 deletions.
71 changes: 20 additions & 51 deletions paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ \subsection{Expressions}
separate rule since, while it follows trivially from $\beta$ for pure $a$, we also want to
consider \emph{impure} expressions with some effect $e \neq \bot$.

\item Rules \brle{let$_1$-op}, \brle{let$_1$-pair}, \brle{let$_1$-inl}, and \brle{let$_1$-inr},
\item Rules \brle{let$_1$-op}, \brle{let$_1$-inl}, and \brle{let$_1$-inr},
\brle{let$_1$-abort}, and \brle{let$_1$-case} which allow us to ``pull'' a let-statement out of
any of the other expression constructors; operationally, this is saying that the bound expression
we pull out is evaluated before the rest of the \ms{let}-binding.
Expand Down Expand Up @@ -1485,15 +1485,15 @@ \subsection{Expressions}
{\letexpr{y}{(\letexpr{x}{a}{b})}{c}}
{\letexpr{x}{a}{\letexpr{y}{b}{c}}}{C}}
\\
\prftree[r]{\rle{let$_1$-pair}}
{\hasty{\Gamma}{\epsilon}{a}{A}}
{\hasty{\Gamma}{\epsilon}{b}{B}}
{\hasty{\Gamma, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}}
{\tmeq{\Gamma}{\epsilon}
{\letexpr{z}{(a, b)}{c}}
{\letexpr{x}{a}{
\letexpr{y}{b}{\letexpr{z}{(x, y)}{c}}}}{C}}
\\
% \prftree[r]{\rle{let$_1$-pair}}
% {\hasty{\Gamma}{\epsilon}{a}{A}}
% {\hasty{\Gamma}{\epsilon}{b}{B}}
% {\hasty{\Gamma, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}}
% {\tmeq{\Gamma}{\epsilon}
% {\letexpr{z}{(a, b)}{c}}
% {\letexpr{x}{a}{
% \letexpr{y}{b}{\letexpr{z}{(x, y)}{c}}}}{C}}
% \\
\prftree[r]{\rle{let$_1$-let$_2$}}
{\hasty{\Gamma}{\epsilon}{e}{A \times B}}
{\hasty{\Gamma, \bhyp{x}{A}, \bhyp{y}{C}}{\epsilon}{c}{C}}
Expand Down Expand Up @@ -1675,7 +1675,7 @@ \subsection{Regions}
\begin{itemize}
\item \brle{let$_1$-$\beta$} allows us to perform $\beta$-reduction of \emph{pure} expressions
into regions; unlike for terms, we do not need an $\eta$-rule
\item Exactly like for \ms{let}-expressions, \brle{let$_1$-op}, \brle{let$_1$-pair},
\item Exactly like for \ms{let}-expressions, \brle{let$_1$-op},
\brle{let$_1$-inl}, \brle{let$_1$-inr}, \brle{let$_1$-abort}, and \brle{let$_1$-case} allow us
to pull out nested subexpressions of the bound value of a \ms{let}-statement into their own
unary \ms{let}-statement
Expand Down Expand Up @@ -1747,15 +1747,15 @@ \subsection{Regions}
{\haslb{\Gamma, \bhyp{y}{B}}{r}{\ms{L}}}
{\lbeq{\Gamma}{\letstmt{y}{(\letexpr{x}{a}{b})}{r}}{\letstmt{x}{a}{\letstmt{y}{b}{r}}}{\ms{L}}}
\\
\prftree[r]{\rle{let$_1$-pair}}
{\hasty{\Gamma}{\epsilon}{a}{A}}
{\hasty{\Gamma}{\epsilon}{b}{B}}
{\haslb{\Gamma, \bhyp{z}{A \otimes B}}{r}{\ms{L}}}
{\lbeq{\Gamma}
{\letstmt{z}{(a, b)}{r}}
{\letstmt{x}{a}{\letstmt{y}{b}{\letstmt{z}{(x, y)}{r}}}}
{\ms{L}}}
\\
% \prftree[r]{\rle{let$_1$-pair}}
% {\hasty{\Gamma}{\epsilon}{a}{A}}
% {\hasty{\Gamma}{\epsilon}{b}{B}}
% {\haslb{\Gamma, \bhyp{z}{A \otimes B}}{r}{\ms{L}}}
% {\lbeq{\Gamma}
% {\letstmt{z}{(a, b)}{r}}
% {\letstmt{x}{a}{\letstmt{y}{b}{\letstmt{z}{(x, y)}{r}}}}
% {\ms{L}}}
% \\
\prftree[r]{\rle{let$_{1}$-let$_2$}}
{\hasty{\Gamma}{\epsilon}{e}{A \otimes B}}
{\hasty{\Gamma, \bhyp{x}{A}, \bhyp{y}{B}}{\epsilon}{c}{C}}
Expand Down Expand Up @@ -7876,37 +7876,6 @@ \subsection{Equational Theory}
& = \dnt{\hasty{\Gamma}{\epsilon}{\letexpr{x}{a}{\letexpr{y}{b}{c}}}{C}}
\end{align*}
as desired.
\item \brle{let$_1$-pair}: we have that
\begin{align*}
& \dnt{\hasty{\Gamma}{\epsilon}{\letexpr{x}{a}{\letexpr{y}{b}{\letexpr{z}{(x, y)}{c}}}}{C}} \\
& = \lmor{\dnt{\hasty{\Gamma}{\epsilon}{a}{A}}}
; \lmor{\dnt{\hasty{\Gamma, \bhyp{x}{A}}{\epsilon}{b}{B}}}
; \\ & \qquad
\lmor{\dnt{\hasty{\Gamma, \bhyp{x}{A}, \bhyp{y}{B}}{\epsilon}{(x, y)}{A \otimes B}}}
; \dnt{\hasty{\Gamma, \bhyp{x}{A}, \bhyp{y}{B}, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}} \\
& = \lmor{\dnt{\hasty{\Gamma}{\epsilon}{a}{A}}}
; \lmor{\pi_l ; \dnt{\hasty{\Gamma}{\epsilon}{b}{B}}}
; \lmor{\alpha ; \pi_r}
; (\pi_l ; \pi_l) \otimes (\dnt{A} \otimes \dnt{B})
; \dnt{\hasty{\Gamma, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}} \\
& = \lmor{\dnt{\hasty{\Gamma}{\epsilon}{a}{A}}}
; \lmor{\lmor{\pi_l ; \dnt{\hasty{\Gamma}{\epsilon}{b}{B}}} ; \alpha ; \pi_r}
; \pi_l \otimes (\dnt{A} \otimes \dnt{B})
; \dnt{\hasty{\Gamma, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}} \\
& = \lmor{
\lmor{\dnt{\hasty{\Gamma}{\epsilon}{a}{A}}}
; \lmor{\pi_l ; \dnt{\hasty{\Gamma}{\epsilon}{b}{B}}}
; \alpha ; \pi_r
}
; \dnt{\hasty{\Gamma, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}} \\
& = \lmor{
\dmor{\Gamma}
; \dnt{\hasty{\Gamma}{\epsilon}{a}{A}} \ltimes \dnt{\hasty{\Gamma}{\epsilon}{b}{B}}
}
; \dnt{\hasty{\Gamma, \bhyp{z}{A \otimes B}}{\epsilon}{c}{C}} \\
& = \dnt{\hasty{\Gamma}{\epsilon}{\letexpr{z}{(a, b)}{c}}{C}}
\end{align*}
as desired.
\item \brle{let$_1$-let$_2$}: we have that
\begin{align*}
& \dnt{\hasty{\Gamma}{\epsilon}{\letexpr{z}{(\letexpr{(x, y)}{e}{c})}{d}}{D}} \\
Expand Down

0 comments on commit 7c428fd

Please sign in to comment.