From: acondolu Date: Wed, 13 Jun 2018 10:20:00 +0000 (+0200) Subject: Yet another attempt at defining distinction with garbage X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=30a5ca005792d224d78e3044847b74356ffee818;p=fireball-separation.git Yet another attempt at defining distinction with garbage --- diff --git a/notes.tex b/notes.tex index 4c1dd4f..489869f 100644 --- a/notes.tex +++ b/notes.tex @@ -46,7 +46,7 @@ % Paths: \newcommand{\PathEmpty}{\epsilon} \newcommand{\PathAbs}[1]{\mathtt{abs}(#1)} -\newcommand{\PathArg}[3]{\mathtt{arg}_{#1}^{#2}(#3)} +\newcommand{\PathArg}[3]{\mathtt{arg}_{#2}^{#1}(#3)} \newcommand{\PathHd}{\mathtt{hd}} \newcommand{\GarbageOf}[1]{\operatorname{Garb}(#1)} @@ -104,41 +104,51 @@ \AC{ Given a path, one can retrieve from a term (if possible) the subterm at that position. - Since the path may go through abstraction, bound variables that become free + Since the path may go through abstractions, bound variables that become free are renamed to variables of the form $\NamedBoundVar\pi$ (where $\pi$ is the path in the original inert leading to the abstraction binding that variable). } + % \newcommand{\GetSubtm}[2]{\operatorname{GetSubtm}(#1\texttt{;}#2)} + \newcommand{\GetSubtm}[2]{{#1}_{#2}} \[\begin{array}{ll} - \tm_\pi & \defeq \tm_\pi^{\Box} \\ - t_{\PathEmpty}^{-} & \defeq t \\ - (x\,t_1\cdots t_n)_{\PathHd}^{-} & \defeq x \\ - (x\,t_1\cdots t_n)_{\PathArg i \var \pi}^{\rho} & \defeq - (t_i)_\pi^{\rho[\PathArg i \var \Box]} \mbox{(if } 1 \leq i\leq n \mbox{)} \\ - (\lambda x.\, t)_{\PathAbs \pi}^{\rho} & \defeq t_\pi^{\rho[\PathAbs\Box]} \{\var\mapsto\NamedBoundVar{\rho[\PathEmpty]}\} \\ - (t)_{\PathAbs \pi}^{\rho} & \defeq (\lambda x.\, t\, x)_{\PathAbs \pi}^{\rho} \text{ (with } x \text{ fresh) (eta)}\\ + \GetSubtm\tm\pi & \defeq \GetSubtm\tm{\underline\pi} \\ + \GetSubtm\tm{\rho[\underline\PathEmpty]} & \defeq \tm \\ + \GetSubtm{(x\,t_1\cdots t_n)}{\rho[\underline\PathHd]} & \defeq x \\ + \GetSubtm{(x\,t_1\cdots t_n)}{\rho[\underline{\PathArg i \var \pi}]} & \defeq + \GetSubtm{(t_i)}{\rho[\PathArg i \var {\underline\pi}]} \mbox{(if } 1 \leq i\leq n \mbox{)} \\ + \GetSubtm{(\lambda x.\, t)}{\rho[\underline {\PathAbs \pi}]} & \defeq + \GetSubtm\tm{\rho(\PathAbs{\underline\pi})} + \{\var\mapsto\NamedBoundVar{\rho[\PathEmpty]}\} \\ + \GetSubtm{\tm}{\rho(\underline{\PathAbs \pi})} & + \defeq \GetSubtm{(\lambda \var.\, \tm\,\var)}{\rho(\PathAbs {\underline\pi})} \text{ (with } x \text{ fresh) (eta)}\\ % \Omega_-^- & \defeq \Omega \\ \end{array}\] \item \textbf{Head restriction:} $\OfHead T \var \defeq \{\tm \in T \mid \HeadOf{\tm} (\defeq \tm_{\PathHd}) = \var \}$ - \item \textbf{Distinction:} \underline{$S,R$ is $\Div$--distinct} iff: - $S$ is empty, or there exists a path $\pi$ \emph{effective} for $\{\Div\}\cup \OfHead{\GarbageOf\Div}{\HeadOf\Div}$, s.t. EITHER: + \item \textbf{Telescopic garbage chain:} $\{\langle\tm_1,\pi_1\rangle,\ldots,\langle\tm_n,\pi_n\rangle\}$ is a $-$ if $\forall i$: + \[\tm_{i+1} \in \SubtmsOf{\text{garbage of } \GetSubtm{(\tm_i)}{\pi_i}}\] + \item \textbf{Distinction:} \underline{$S$ is $\{\langle\Div_1,\pi_1\rangle,\ldots,\langle\Div_n,\pi_n\rangle\}$--distinct} iff (one of the following three): + \begin{itemize} + \item $\OfHead S {\HeadOf \Div}$ is empty and $n=1$ + \end{itemize} + OR: let $\Div\defeq\Div_1$ in: \begin{itemize} - \item $\forall \tm\in \OfHead{\SubtmsOf{\Div}}{\HeadOf\Div}$, $\tm_\pi$ is defined; - % \item 1. $\exists s\in S$ s.t. $s \not\sim_\pi \Div$; - \item $\{s\in S \mid s \sim_\pi \Div\},R$ is $\Div$--distinct. + \item there exists a path $\pi$ s.t. + \item (Effective) $\pi$ is \emph{effective} for all $\Div_i$ s.t. $\HeadOf{\Div_i} = \HeadOf{\Div}$ + \item $\forall \tm\in \OfHead{\SubtmsOf{\Div_i}}{\HeadOf\Div}$, $\tm_\pi \neq \Omega$; + \item (Useful) $\exists s\in \OfHead S{\HeadOf\Div}$ s.t. $s \not\sim_\pi \Div$; + \item $S\setminus\{s\in \OfHead S{\HeadOf\Div} \mid s \not\sim_\pi \Div\}$ is $D$--distinct. \end{itemize} OR: \begin{itemize} - \item $\Div_\pi = \lambda\var.\, -, g$ - (note that $\Div$ has recursively only one garbage); - % \item $\Div_\pi \neq \Omega$ - \item there is $\Div'\in\SubtmsOf g$ s.t. - $S',R'$ is $\Div'$--distinct, where: - $R'\defeq R\cup \bigcup\{\text{subtms of } s \text{ along } \pi \mid s\in S\}$ and - $S' \defeq \OfHead{R'}{\HeadOf{\Div'}}$. + \item $S'$ is $\{\langle\Div_2,\pi_2\rangle,\ldots,\langle\Div_n,\pi_n\rangle\}$--distinct, where: + \[S' \defeq S \mathrel{\cup} \SubtmsOf{\{\text{garbage of } s \text{ along } \pi_1 \mid s\in \OfHead{S}{\HeadOf\Div}\}} \] \end{itemize} \item \textbf{Semi-$\sigma$-separability: } $(\Div,\Conv)$ are semi-$\sigma$-separable - IF $\OfHead{\SubtmsOf{\Conv}}{\HeadOf{\Div'}}, \SubtmsOf{\Conv}$ is $\Div'$--distinct for some $\Div'\in\SubtmsOf\Div$. + IFF there is $\Div_1$ (an $\Omega$--approximation of a subterm of $\Div$ with + at most one garbage, and without stuck variables) + and a telescopic garbage chain $D\defeq\{\langle\Div_1,\pi_1\rangle,\ldots,\langle\Div_n,\pi_n\rangle\}$ s.t. + $\SubtmsOf\Conv$ is $D$--distinct. \clearpage \item $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$