Skip to content

Commit 7331f17

Browse files
committed
coq_rules: subtyping rules
1 parent 74f3359 commit 7331f17

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

prover/coq_rules/coq_rules.pdf

2.23 KB
Binary file not shown.

prover/coq_rules/coq_rules.tex

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ \subsection{Conversion Rules}
343343
\end{center}
344344
In addition to the above convertibility rules, we also allow identifying a term
345345
$t$ of type $\cfa{x}{t}{U}$ with its \emph{$\eta$-expansion} $\clm{x}{T}{(t x)}$
346-
for $x$ fresh in $t$. Note \emph{$\eta$-reduction} is deliberately not defined
347-
(TODO: show example?).
346+
for $x$ fresh in $t$. Note \emph{$\eta$-reduction} is deliberately not defined.
347+
% TODO: show example?
348348

349349
\begin{notation}
350350
We write $E[\Gamma] \vdash t \red u$ for the contextual closure of the rules
@@ -365,7 +365,22 @@ \subsection{Conversion Rules}
365365
\[ E[\Gamma] \vdash t_1 \red \ldots \red u_1 \text{ and } E[\Gamma] \vdash t_2 \red \ldots \red u_2 \]
366366
and either $u_1$ and $u_2$ are identical up irrelevant subterms, or they are
367367
convertible up to $\eta$-exxpansion. We denote this as
368-
$E[\Gamma] \vdash t_1 =_{\beta\delta\iota\zeta\eta} t_2$
368+
$E[\Gamma] \vdash t_1 \conveq t_2$
369369
\end{definition}
370370

371+
\subsection{Subtyping Rules}
372+
The \emph{subtyping} relation is inductively defined as follows:
373+
% TODO: display as proof rules?
374+
\begin{itemize}
375+
\item if $E[\Gamma] \vdash t \conveq u$, then $E[\Gamma] \vdash t \subty u$
376+
\item if $i \leq j$, then $E[\Gamma] \vdash \Type(i) \subty \Type(j)$
377+
\item $E[\Gamma] \vdash \Set \subty \Type(i)$ for all $i$
378+
\item $E[\Gamma] \vdash \Prop \subty \Set$
379+
\item if $E[\Gamma] \vdash T \conveq U$ and
380+
$E[\Gamma \dcln (\lasm{x}{T})] \vdash T' \subty U'$, then
381+
$E[\Gamma] \vdash \cfa{x}{T}{T'} \subty \cfa{x}{U}{U'}$
382+
\end{itemize}
383+
384+
\subsection{Conversion/Subtyping: Polymorphic Universes}
385+
371386
\end{document}

prover/coq_rules/newcommands.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@
3535
\newcommand{\sd}[1]{{{\color{JungleGreen} #1}}}
3636

3737
\newcommand{\red}{\triangleright}
38+
\newcommand{\conveq}{=_{\beta\delta\iota\zeta\eta}}
39+
\newcommand{\subty}{\leq_{\beta\delta\iota\zeta\eta}}

0 commit comments

Comments
 (0)