]> matita.cs.unibo.it Git - fireball-separation.git/commitdiff
New ac's attempt at defining distinction with garbage
authoracondolu <andrea.condoluci@unibo.it>
Tue, 12 Jun 2018 10:27:25 +0000 (12:27 +0200)
committeracondolu <andrea.condoluci@unibo.it>
Tue, 12 Jun 2018 13:19:29 +0000 (15:19 +0200)
notes.tex

index 084c9e2aefe5ad807d3211f60d6a11c21e394833..4c1dd4f3ad7280a64590306f25e22bca2577ef44 100644 (file)
--- a/notes.tex
+++ b/notes.tex
 \r
 \clearpage\r
 \section*{Separation}\r
+% Paths:\r
+\newcommand{\PathEmpty}{\epsilon}\r
+\newcommand{\PathAbs}[1]{\mathtt{abs}(#1)}\r
+\newcommand{\PathArg}[3]{\mathtt{arg}_{#1}^{#2}(#3)}\r
+\newcommand{\PathHd}{\mathtt{hd}}\r
+\r
+\newcommand{\GarbageOf}[1]{\operatorname{Garb}(#1)}\r
 \newcommand{\HeadOf}[1]{\operatorname{head}(#1)}\r
 \newcommand{\FstOf}[1]{\operatorname{fst}(#1)}\r
 \newcommand{\DegOf}[1]{\operatorname{deg}(#1)}\r
 \newcommand{\SubtmOf}[2]{#1\preceq #2}\r
+\newcommand{\OfHead}[2]{#1_{{\mid}#2}}\r
+\newcommand{\SubtmsOf}[1]{\operatorname{Sub}(#1)}\r
+\newcommand{\Div}{\mathtt{d}}\r
+\newcommand{\Conv}{\mathtt{c}}\r
+\newcommand{\Const}{\mathtt{K}}\r
+\newcommand{\NamedBoundVar}[1]{\texttt{bvar(}#1\texttt{)}}\r
+\newcommand{\AC}[1]{{\color{violet}#1}}\r
 \begin{itemize}\r
   % \item \textbf{$\boldsymbol\sigma$-separation.}\r
   %  \textcolor{red}{come definirlo? con le variabili? con i termini?\r
@@ -60,6 +74,7 @@
    % (in deep normal form)\r
    \item \textbf{Subterm:} $\SubtmOf\tm\tmtwo$ means that $\tm$ is an ($\eta/\Omega$)-subterm of $\tmtwo$.\r
    \item \textbf{Subterm at position $\boldsymbol\pi$:} TODO\r
+   \item $\boldsymbol\sim_{\boldsymbol\pi}$\r
    \item \textbf{Distinction:} Let $\var\defeq \HeadOf D$. Let $T_{\var} \defeq \{\tm \preceq T \mid \HeadOf{\tm} = \var \}$.\r
   $C_{\var}$ is $D$--\emph{distinct} iff it is empty, or there exists path $\pi$ s.t.:\r
   \begin{itemize}\r
     \item $\{\tm\in C_\var \mid \tm \sim_\pi D\}$ is $D$--distinct.\r
   \end{itemize}\r
 \r
+\clearpage\r
+  \item $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$\r
+  $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$\r
+  $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$\r
+  \texttt{ prove di nuove definizioni di ac:}\r
+\r
+  \item \textbf{Set of subterms:} %$\SubtmsOf{\tm} \defeq \{ \tmtwo \mid \SubtmOf\tmtwo\tm \}$\r
+  \[\begin{array}{ll}\r
+    \SubtmsOf{\var} & \defeq \{\var\} \\\r
+    \SubtmsOf{\tm\,\tmtwo} & \defeq \SubtmsOf\tm \cup \SubtmsOf\tmtwo \cup \{\tm\,\tmtwo\} \\\r
+    \SubtmsOf{\lambda \var.\, \vec\tm} & \defeq \{\tmtwo\{\Const/\var\} \mid \tmtwo \in\SubtmsOf{\vec\tm}\} \\\r
+  \end{array}\]\r
+  \AC{Note: $\SubtmsOf\cdot$ replaces bound variables with $\Const$ when going under abstractions.}\r
+  \item \textbf{Subterm at position:}\r
+  \[\begin{array}{ll}\r
+    \text{Paths: } \pi & ::= \PathEmpty \mid \PathHd \mid \PathArg i \var \pi \mid \PathAbs\pi\r
+  \end{array}\]\r
+  \AC{\r
+   Given a path, one can retrieve from a term (if possible) the subterm at that position.\r
+\r
+   Since the path may go through abstraction, bound variables that become free\r
+   are renamed to variables of the form $\NamedBoundVar\pi$\r
+   (where $\pi$ is the path in the original inert leading to the abstraction binding that variable).\r
+  }\r
+  \[\begin{array}{ll}\r
+    \tm_\pi & \defeq \tm_\pi^{\Box} \\\r
+    t_{\PathEmpty}^{-} & \defeq t \\\r
+    (x\,t_1\cdots t_n)_{\PathHd}^{-} & \defeq x \\\r
+    (x\,t_1\cdots t_n)_{\PathArg i \var \pi}^{\rho} & \defeq\r
+      (t_i)_\pi^{\rho[\PathArg i \var \Box]} \mbox{(if } 1 \leq i\leq n \mbox{)} \\\r
+    (\lambda x.\, t)_{\PathAbs \pi}^{\rho} & \defeq t_\pi^{\rho[\PathAbs\Box]} \{\var\mapsto\NamedBoundVar{\rho[\PathEmpty]}\} \\\r
+    (t)_{\PathAbs \pi}^{\rho} & \defeq (\lambda x.\, t\, x)_{\PathAbs \pi}^{\rho} \text{ (with } x \text{ fresh) (eta)}\\\r
+    % \Omega_-^- & \defeq \Omega \\\r
+  \end{array}\]\r
+  \item \textbf{Head restriction:} $\OfHead T \var \defeq \{\tm \in T \mid \HeadOf{\tm} (\defeq \tm_{\PathHd}) = \var \}$\r
+  \item \textbf{Distinction:} \underline{$S,R$ is $\Div$--distinct} iff:\r
+   $S$ is empty, or there exists a path $\pi$ \emph{effective} for $\{\Div\}\cup \OfHead{\GarbageOf\Div}{\HeadOf\Div}$, s.t. EITHER:\r
+ \begin{itemize}\r
+   \item $\forall \tm\in \OfHead{\SubtmsOf{\Div}}{\HeadOf\Div}$, $\tm_\pi$ is defined;\r
+   % \item 1. $\exists s\in S$ s.t. $s \not\sim_\pi \Div$;\r
+   \item $\{s\in S \mid s \sim_\pi \Div\},R$ is $\Div$--distinct.\r
+ \end{itemize}\r
+ OR:\r
+\begin{itemize}\r
+   \item $\Div_\pi = \lambda\var.\, -, g$\r
+    (note that $\Div$ has recursively only one garbage);\r
+   % \item $\Div_\pi \neq \Omega$\r
+   \item there is $\Div'\in\SubtmsOf g$ s.t.\r
+    $S',R'$ is $\Div'$--distinct, where:\r
+    $R'\defeq R\cup \bigcup\{\text{subtms of } s \text{ along } \pi \mid s\in S\}$ and\r
+    $S' \defeq \OfHead{R'}{\HeadOf{\Div'}}$.\r
+ \end{itemize}\r
+\r
+ \item \textbf{Semi-$\sigma$-separability: } $(\Div,\Conv)$ are semi-$\sigma$-separable\r
+  IF $\OfHead{\SubtmsOf{\Conv}}{\HeadOf{\Div'}}, \SubtmsOf{\Conv}$ is $\Div'$--distinct for some $\Div'\in\SubtmsOf\Div$.\r
+\r
+ \clearpage\r
  \item $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$\r
  $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$\r
  $\bullet$ $\bullet$ $\bullet$ $\bullet$ $\bullet$\r