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=bd68fb10b8624ddecb0e2ed04f5f72f0ba758e1a;hb=ae1885abbd4836b6e20ac7b7157e3cabec1d25a3;hpb=18147ae0332aeb40db73ae823476d4e4b535fce9 diff --git a/article.tex b/article.tex index bd68fb1..642190f 100644 --- a/article.tex +++ b/article.tex @@ -59,6 +59,8 @@ {\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$} @@ -66,6 +68,9 @@ \newcommand{\gathbegin}{\begin{gather} \tag*{}} \newcommand{\gathnext}{\\ \tag*{}} +\newcommand{\true}{t} +\newcommand{\false}{f} + \begin{document} \section{Notation} @@ -111,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} $ ] @@ -286,7 +291,7 @@ Ancestors of $C$: $ D \le C $. Contents of $C$: -$ D \isin C \equiv \ldots \lor t \text{ so } D \haspatch 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 $. @@ -313,4 +318,58 @@ $\qed$ 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}