chiark / gitweb /
Largeexists
[topbloke-formulae.git] / article.tex
index f40f6a2c508b4877d8fe619685ff8f810f20a63a..2dc644fc140c32fc9f59552bb70cbb1ec5ac72e7 100644 (file)
@@ -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}
@@ -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,16 +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{Test more symbols}
+\section{Merge}
 
-$ C \haspatch \p $
+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}
 
-$ C \nothaspatch \p $
+\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}
+}\]
 
-$ \p \patchisin C $
+\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.
 
-$ \p \notpatchisin C $
+\subsubsection{For $D \neq C \land D \not\isin L \land D \not\isin R$:}
+$D \not\isin C$.  OK.
 
-$ \{ B \} \areparents C $
+\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}