chiark / gitweb /
foreign notation: introduce \isforeign
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 May 2012 23:03:06 +0000 (00:03 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 27 May 2012 23:03:06 +0000 (00:03 +0100)
perl -i~ -pe 's/\\patchof(\{[^{}]+\})\s+=\s+\\foreign\b/\\isforeign$1/g' *.tex

and then add the definition in article.tex

anticommit.tex
article.tex
invariants.tex
lemmas.tex
merge.tex
pseudomerge.tex
simple.tex

index 72469b80d69fa67aa410381faf5768262d15964e..39d13e5500c4d268375480aa92a623615c8a0a71 100644 (file)
@@ -131,7 +131,7 @@ Single Parent Unique Tips applies.  $\qed$
 
 \subsection{Foreign Inclusion}
 
-Consider some $D$ s.t. $\patchof{D} = \foreign$.  $D \neq C$.
+Consider some $D$ s.t. $\isforeign{D}$.  $D \neq C$.
 So by Desired Contents $D \isin C \equiv D \isin L$.
 By Foreign Inclusion of $D$ in $L$, $D \isin L \equiv D \le L$.
 
index ffd940fbb32410e9fbf755a4c0615ed31b170f08..67f78900141398a04b4c7aca9dddec33c53190c7 100644 (file)
@@ -97,6 +97,7 @@
 \newcommand{\depsreqof}[1]{\depsreq ( #1 ) }
 
 \newcommand{\foreign}{\bot}
+\newcommand{\isforeign}[1]{\patchof{#1} = \foreign}
 
 \newcommand{\allpatches}{\Upsilon}
 \newcommand{\assign}{\leftarrow}
index 736fb8ee569ed5a2791bfae5b1c817cd95cfaa23..6cebb053d65db879fe6ad327ab58f434bef93d74 100644 (file)
@@ -22,11 +22,11 @@ We maintain these each time we construct a new commit. \\
   \bigforall_{C,\p} C \haspatch \p \implies \pendsof{C}{\py} = \{ T \}
 }\]
 \[\eqn{Foreign Inclusion}{
-  \bigforall_{D \text{ s.t. } \patchof{D} = \foreign} D \isin C \equiv D \leq C
+  \bigforall_{D \text{ s.t. } \isforeign{D}} D \isin C \equiv D \leq C
 }\]
 \[\eqn{Foreign Contents}{
-  \bigforall_{C \text{ s.t. } \patchof{C} = \foreign}
-    D \le C \implies \patchof{D} = \foreign
+  \bigforall_{C \text{ s.t. } \isforeign{C}}
+    D \le C \implies \isforeign{D}
 }\]
 
 We also assign each new commit $C$ to zero or one of the sets $\p$, as
index 72e00d61fc5b23d82252989bc578c8f18596a289..83fc3f69d6048a9446271e5e235bc3dcae792afc 100644 (file)
@@ -175,12 +175,12 @@ $$
   \right]
  \implies
   \left[
-   \bigforall_{D \text{ s.t. } \patchof{D} = \foreign}
+   \bigforall_{D \text{ s.t. } \isforeign{D}}
      D \isin C \equiv D \le C
   \right]
 $$
 \proof{
-Consider some $D$ s.t. $\patchof{D} = \foreign$.
+Consider some $D$ s.t. $\isforeign{D}$.
 If $D = C$, trivially true.  For $D \neq C$,
 by Foreign Inclusion of $D$ in $L$, $D \isin L \equiv D \le L$.
 And by Exact Ancestors $D \le L \equiv D \le C$.
@@ -192,20 +192,20 @@ Given conformant commits $A \in \set A$,
 $$
    \left[
     C \hasparents \set A \land
-    \patchof{C} = \foreign \land
-      \bigforall_{A \in \set A} \patchof{A} = \foreign
+    \isforeign{C} \land
+      \bigforall_{A \in \set A} \isforeign{A}
    \right]
   \implies
    \left[
   \bigforall_{D}
     D \le C
    \implies
-    \patchof{D} = \foreign
+    \isforeign{D}
    \right]
 $$
 \proof{
-Consider some $D \le C$.  If $D = C$, $\patchof{D} = \foreign$ trivially.
+Consider some $D \le C$.  If $D = C$, $\isforeign{D}$ trivially.
 If $D \neq C$ then $D \le A$ where $A \in \set A$.  By Foreign
-Contents of $A$, $\patchof{D} = \foreign$.
+Contents of $A$, $\isforeign{D}$.
 }
 
index 6ba1387886a8bc6f90fb4cd5254ce544f962e4e7..54f83daf6fe47e93fd22c8b3fc02fd32b468bd06 100644 (file)
--- a/merge.tex
+++ b/merge.tex
@@ -56,19 +56,19 @@ satisfied; in particular, provided that $L \ge \baseof{R}$.
     , \text{where} \{J,K\} = \{L,R\}
 }\]
 \[ \eqn{ Foreign Merges }{
-    \patchof{L} = \foreign \implies \patchof{R} = \foreign
+    \isforeign{L} \implies \isforeign{R}
 }\]
 
 \subsection{Non-Topbloke merges}
 
-We require both $\patchof{L} = \foreign$ and $\patchof{R} = \foreign$
+We require both $\isforeign{L}$ and $\isforeign{R}$
 (Foreign Merges, above).
 I.e. not only is it forbidden to merge into a Topbloke-controlled
 branch without Topbloke's assistance, it is also forbidden to
 merge any Topbloke-controlled branch into any plain git branch.
 
 Given those conditions, Tip Merge and Merge Acyclic do not apply.
-By Foreign Contents of $L$, $\patchof{M} = \foreign$ as well.
+By Foreign Contents of $L$, $\isforeign{M}$ as well.
 So by Foreign Contents for any $A \in \{L,M,R\}$,
 $\forall_{\p, D \in \py} D \not\le A$
 so $\pendsof{A}{\py} = \{ \}$ and the RHS of both Merge Ends
@@ -280,7 +280,7 @@ $\qed$
 
 \subsection{Foreign Inclusion}
 
-Consider some $D$ s.t. $\patchof{D} = \foreign$.
+Consider some $D$ s.t. $\isforeign{D}$.
 By Foreign Inclusion of $L, M, R$:
 $D \isin L \equiv D \le L$;
 $D \isin M \equiv D \le M$;
@@ -311,6 +311,6 @@ $\qed$
 
 \subsection{Foreign Contents}
 
-Only relevant if $\patchof{L} = \foreign$, in which case
-$\patchof{C} = \foreign$ and by Foreign Merges $\patchof{R} = \foreign$,
+Only relevant if $\isforeign{L}$, in which case
+$\isforeign{C}$ and by Foreign Merges $\isforeign{R}$,
 so Totally Foreign Contents applies.  $\qed$
index d884be84896b2ded5681bf2026f093c8f45db009..9318c30cd6e4d72d21d6907631a0ec7ee16e6fe8 100644 (file)
@@ -25,7 +25,7 @@ but whose contents are exactly those of $L$.
 }\]
 
 \[ \eqn{ Foreign Unaffected }{
- \bigforall_{ D \text{ s.t. } \patchof{D} = \foreign }
+ \bigforall_{ D \text{ s.t. } \isforeign{D} }
   \left[ \bigexists_{A \in \set A} D \le A \right]
    \implies
   D \le L
@@ -34,7 +34,7 @@ but whose contents are exactly those of $L$.
 
 \subsection{Lemma: Foreign Identical}
 
-$\patchof{D} = \foreign \implies \big[ D \le C \equiv D \le L \big]$.
+$\isforeign{D} \implies \big[ D \le C \equiv D \le L \big]$.
 
 \proof{
 If $D \le L$, trivially $D \le C$; so conversely
index f714edbc54562e454fe3cb912ac9b073546e4ec1..297103adf419b066cb5269773de20409c14c0135 100644 (file)
@@ -100,6 +100,6 @@ Simple Foreign Inclusion applies.  $\qed$
 
 \subsection{Foreign Contents:}
 
-Only relevant if $\patchof{C} = \foreign$, and in that case Totally
+Only relevant if $\isforeign{C}$, and in that case Totally
 Foreign Contents applies. $\qed$