chiark / gitweb /
wip merge before rejoin tip merge condition
[topbloke-formulae.git] / article.tex
index ad68c2ca763c9f9efd2ce59f75301dde9eae624e..d85a022ff8fb8388f380325f4ffd4ed9e4330d5d 100644 (file)
@@ -66,6 +66,9 @@
 \newcommand{\gathbegin}{\begin{gather} \tag*{}}
 \newcommand{\gathnext}{\\ \tag*{}}
 
+\newcommand{\true}{t}
+\newcommand{\false}{f}
+
 \begin{document}
 
 \section{Notation}
@@ -276,23 +279,70 @@ 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 $.
 
-$ C \haspatch \p $
+\subsubsection{For $A \haspatch P, D \neq C$:}
+Ancestors: $ D \le C \equiv D \le A $.
 
-$ C \nothaspatch \p $
+Contents: $ D \isin C \equiv D \isin A \lor f $
+so $ D \isin C \equiv D \isin A $.
 
-$ \p \patchisin C $
+So:
+\[ A \haspatch P \implies C \haspatch P \]
 
-$ \p \notpatchisin C $
+\subsubsection{For $A \nothaspatch P$:}
 
-$ \{ B \} \areparents C $
+Firstly, $C \not\in \py$ since if it were, $A \in \py$.  
+Thus $D \neq C$.
+
+Now by contents of $A$, $D \notin A$, so $D \notin 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{ Merges Exhaustive }{
+ L \in \py => \Bigl[ R \in \py \lor R \in \pn \Bigr]
+}\]
+\[ \eqn{ Tip Merge }{
+ L \in \py \land R \in \py \implies \Bigl[ \text{TBD} \Bigr]
+}\]
+\[ \eqn{ Base Merge }{
+ L \in \py \land R \in \pn \implies \Bigl[ R \ge \baseof{L} \land M =
+   \baseof{L} \Bigr]
+}\]
 
 \end{document}