chiark / gitweb /
strategy: Define H in notation
[topbloke-formulae.git] / anticommit.tex
1 \section{Anticommit}
2
3 Given $L$ which contains $\pr$ as represented by $R^+, R^-$.
4 Construct $C$ which has $\pr$ removed.
5 Used for removing a branch dependency.
6 \gathbegin
7  C \hasparents \{ L \}
8 \gathnext
9  \patchof{C} = \patchof{L}
10 \gathnext
11  \commitmergeof{C}{L}{R^+}{R^-}
12 \end{gather}
13
14 \subsection{Conditions}
15
16 \[ \eqn{ Ingredients }{
17 R^+ \in \pry \land R^- = \baseof{R^+}
18 }\]
19 \[ \eqn{ Into Base }{
20  L \in \pln
21 }\]
22 \[ \eqn{ Correct Tip }{
23  \pendsof{L}{\pry} = \{ R^+ \}
24 }\]
25 \[ \eqn{ Currently Included }{
26  L \haspatch \pry
27 }\]
28
29 \subsection{Ordering of Ingredients:}
30
31 By Correct Tip, $R^+ \le L$.  By definition of $\base$, $R^- \le R^+$
32 so $R^- \le L$.  So $R^+ \le C$ and $R^- \le C$.
33 $\qed$
34
35 (Note that $R^+ \not\le R^-$, i.e. the merge base
36 is a descendant, not an ancestor, of the 2nd parent.)
37
38 \subsection{No Replay}
39
40 By \commitmergename,
41 $D \isin C \implies D \isin L \lor D \isin R^- \lor D = C$.
42 So, by Ordering of Ingredients,
43 Ingredients Prevent Replay applies.  $\qed$
44
45 \subsection{Desired Contents}
46
47 \[ D \isin C \equiv [ D \notin \pry \land D \isin L ] \lor D = C \]
48 \proofstarts
49
50 \subsubsection{For $D = C$:}
51
52 Trivially $D \isin C$.  OK.
53
54 \subsubsection{For $D \neq C, D \not\le L$:}
55
56 By No Replay for $L$, $D \not\isin L$.
57 Also, by Ordering of Ingredients, $D \not\le R^-$ hence
58 $D \not\isin R^-$.  Thus $D \not\isin C$.  OK.
59
60 \subsubsection{For $D \neq C, D \le L, D \in \pry$:}
61
62 By Currently Included, $D \isin L$.
63
64 By Tip Own Contents for $R^+$, $D \isin R^+ \equiv D \le R^+$, but
65 by Correct Tip, $D \le R^+ \equiv D \le L$.
66 So $D \isin R^+$.
67
68 By Base Acyclic for $R^-$, $D \not\isin R^-$.
69
70 Apply \commitmergename: $D \not\isin C$.  OK.
71
72 \subsubsection{For $D \neq C, D \le L, D \notin \pry$:}
73
74 By Tip Contents for $R^+$, $D \isin R^+ \equiv D \isin R^-$.
75
76 Apply \commitmergename: $D \isin C \equiv D \isin L$.  OK.
77
78 $\qed$
79
80 \subsection{Unique Base}
81
82 Into Base means that $C \in \pln$, so Unique Base is not
83 applicable.
84
85 \subsection{Tip Contents}
86
87 Again, not applicable.
88
89 \subsection{Base Acyclic}
90
91 By Into Base and Base Acyclic for $L$, $D \isin L \implies D \not\in \ply$.
92 And by Into Base $C \not\in \ply$.
93 Now from Desired Contents, above, $D \isin C
94 \implies D \isin L \lor D = C$, which thus
95 $\implies D \not\in \ply$.  $\qed$.
96
97 \subsection{Coherence and Patch Inclusion}
98
99 $$
100 \begin{cases}
101   \p = \pr                            : & C \nothaspatch \p  \\
102   \p \neq \pr \land L \nothaspatch \p : & C \nothaspatch \p  \\
103   \p \neq \pr \land L \haspatch    \p : & C \haspatch    \p
104 \end{cases}
105 $$
106 \proofstarts
107 ~ Need to consider some $D \in \py$.  By Into Base, $D \neq C$.
108
109 \subsubsection{For $\p = \pr$:}
110 By Desired Contents, above, $D \not\isin C$.
111 OK.
112
113 \subsubsection{For $\p \neq \pr$:}
114 By Desired Contents, $D \isin C \equiv D \isin L$
115 (since $D \in \py$ so $D \not\in \pry$).
116
117 If $L \nothaspatch \p$, $D \not\isin L$ so $D \not\isin C$.
118 OK.
119
120 Whereas, if $L \haspatch \p$, $D \isin L \equiv D \le L$,
121 so $C \zhaspatch \p$;
122 and $\exists_{F \in \py} F \le L$ and this $F \le C$.
123 Thus $C \haspatch \p$.
124 OK.
125
126 $\qed$
127
128 \subsection{Unique Tips:}
129
130 Single Parent Unique Tips applies.  $\qed$
131
132 \subsection{Foreign Inclusion}
133
134 Consider some $D \in \foreign$.  $D \neq C$.
135 So by Desired Contents $D \isin C \equiv D \isin L$.
136 By Foreign Inclusion of $D$ in $L$, $D \isin L \equiv D \le L$.
137
138 And $D \le C \equiv D \le L$.
139 Thus $D \isin C \equiv D \le C$.
140
141 $\qed$
142
143 \subsection{Foreign Ancestry}
144
145 Not applicable.
146
147 \subsection{Bases' Children}
148
149 Trivial.
150