X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=blobdiff_plain;f=article.tex;h=642190f9f823431a058f3aa1b5793bc3f1751396;hp=32164de0f7c0c4ab51f14c0b99a2965ddf355fd5;hb=ae1885abbd4836b6e20ac7b7157e3cabec1d25a3;hpb=53f9c060d6ef0257657fe8aa9ddb2bb11f18d3bc diff --git a/article.tex b/article.tex index 32164de..642190f 100644 --- a/article.tex +++ b/article.tex @@ -59,10 +59,18 @@ {\hbox{\scriptsize$\forall$}}}% } +\newcommand{\Largeexists}{\mathop{\hbox{\Large$\exists$}}} +\newcommand{\Largenexists}{\mathop{\hbox{\Large$\nexists$}}} \newcommand{\qed}{\square} \newcommand{\proof}[1]{{\it Proof.} #1 $\qed$} +\newcommand{\gathbegin}{\begin{gather} \tag*{}} +\newcommand{\gathnext}{\\ \tag*{}} + +\newcommand{\true}{t} +\newcommand{\false}{f} + \begin{document} \section{Notation} @@ -108,7 +116,7 @@ which are in $\set P$. \item[ $ \pendsof{C}{\set P} $ ] $ \{ E \; | \; E \in \pancsof{C}{\set P} \land \mathop{\not\exists}_{A \in \pancsof{C}{\set P}} - A \neq E \land E \le A \} $ + E \neq A \land E \le A \} $ i.e. all $\le$-maximal commits in $\pancsof{C}{\set P}$. \item[ $ \baseof{C} $ ] @@ -215,12 +223,15 @@ by the LHS. And $A \le A''$. \section{Commit annotation} We annotate each Topbloke commit $C$ with: -\begin{gather} -\tag*{} \patchof{C} \\ -\tag*{} \baseof{C}, \text{ if } C \in \py \\ -\tag*{} \bigforall_{\pa{Q}} - \text{ either } C \haspatch \pa{Q} \text{ or } C \nothaspatch \pa{Q} \\ -\tag*{} \bigforall_{\pay{Q} \not\ni C} \pendsof{C}{\pay{Q}} +\gathbegin + \patchof{C} +\gathnext + \baseof{C}, \text{ if } C \in \py +\gathnext + \bigforall_{\pa{Q}} + \text{ either } C \haspatch \pa{Q} \text{ or } C \nothaspatch \pa{Q} +\gathnext + \bigforall_{\pay{Q} \not\ni C} \pendsof{C}{\pay{Q}} \end{gather} We do not annotate $\pendsof{C}{\py}$ for $C \in \py$. Doing so would @@ -270,23 +281,95 @@ For $D = C$: $D \in \pn$ so $D \not\in \py$. OK. For $D \neq C$: $D \isin C \equiv D \isin A$, so by Base Acyclic for $A$, $D \isin C \implies D \not\in \py$. $\qed$ -\subsection{Coherence} +\subsection{Coherence and patch inclusion} + +Need to consider $D \in \py$ \subsubsection{For $A \haspatch P, D = C$:} -\[ D \isin C \equiv \ldots \lor t \text{ so } D \haspatch C \] -\[ D \le C \] -OK -\section{Test more symbols} +Ancestors of $C$: +$ D \le C $. + +Contents of $C$: +$ D \isin C \equiv \ldots \lor \true \text{ so } D \haspatch C $. + +\subsubsection{For $A \haspatch P, D \neq C$:} +Ancestors: $ D \le C \equiv D \le A $. + +Contents: $ D \isin C \equiv D \isin A \lor f $ +so $ D \isin C \equiv D \isin A $. -$ C \haspatch \p $ +So: +\[ A \haspatch P \implies C \haspatch P \] -$ C \nothaspatch \p $ +\subsubsection{For $A \nothaspatch P$:} -$ \p \patchisin C $ +Firstly, $C \not\in \py$ since if it were, $A \in \py$. +Thus $D \neq C$. -$ \p \notpatchisin C $ +Now by contents of $A$, $D \notin A$, so $D \notin C$. -$ \{ B \} \areparents C $ +So: +\[ A \nothaspatch P \implies C \nothaspatch P \] +$\qed$ + +\subsection{Foreign inclusion:} + +If $D = C$, trivial. For $D \neq C$: +$D \isin C \equiv D \isin A \equiv D \le A \equiv D \le C$. $\qed$ + +\section{Merge} + +Merge commits $L$ and $R$ using merge base $M$ ($M < L, M < R$): +\gathbegin + C \hasparents \{ L, R \} +\gathnext + \patchof{C} = \patchof{L} +\gathnext + D \isin C \equiv + \begin{cases} + (D \isin L \land D \isin R) \lor D = C : & \true \\ + (D \not\isin L \land D \not\isin R) \land D \neq C : & \false \\ + \text{otherwise} : & D \not\isin M + \end{cases} +\end{gather} + +\subsection{Conditions} + +\[ \eqn{ Tip Merge }{ + L \in \py \implies + \begin{cases} + R \in \py : & \baseof{R} \ge \baseof{L} + \land [\baseof{L} = M \lor \baseof{L} = \baseof{M}] \\ + R \in \pn : & R \ge \baseof{L} + \land M = \baseof{L} \\ + \text{otherwise} : & \false + \end{cases} +}\] + +\subsection{No Replay} + +\subsubsection{For $D=C$:} $D \isin C, D \le C$. OK. + +\subsubsection{For $D \isin L \land D \isin R$:} +$D \isin C$. And $D \isin L \implies D \le L \implies D \le C$. OK. + +\subsubsection{For $D \neq C \land D \not\isin L \land D \not\isin R$:} +$D \not\isin C$. OK. + +\subsubsection{For $D \neq C \land D \not\isin L \land D \not\isin R$:} +$D \not\isin C$. OK. + +\subsubsection{For $D \neq C \land (D \isin L \equiv D \not\isin R) + \land D \not\isin M$:} +$D \isin C$. Also $D \isin L \lor D \isin R$ so $D \le L \lor D \le +R$ so $D \le C$. OK. + +\subsubsection{For $D \neq C \land (D \isin L \equiv D \not\isin R) + \land D \isin M$:} +$D \not\isin C$. Also $D \isin L \lor D \isin R$ so $D \le L \lor D \le +R$ so $D \le C$. OK. + +$\qed$ \end{document}