chiark / gitweb /
24c05ae68efa63266b20eb3d37dc6b4fce786a1c
[topbloke-formulae.git] / pseudomerge.tex
1 \section{Pseudo-merge}
2
3 Given $L$ and some other commits $\set R$, generate a
4 `fake merge': i.e., a commit which is a descendant of $L$ and $\set R$
5 but whose contents are exactly those of $L$.
6
7 \gathbegin
8  C \hasparents \{ L \} \cup \set R
9 \gathnext
10  \patchof{C} = \patchof{L}
11 \gathnext
12  D \isin C \equiv D \isin L \lor D = C
13 \end{gather}
14
15 \subsection{Conditions}
16
17 \[ \eqn{ Base Only }{
18  L \in \pn
19 }\]
20
21 \[ \eqn{ Ingredients }{
22  \bigforall_{R \in \set R}
23     R \in \pn
24      \lor
25     R \in \foreign
26      \lor
27     R \in \pqy
28 }\]
29
30 \[ \eqn{ Unique Tips }{
31  C \haspatch \p \implies
32   \bigexists_T
33     \pendsof{C}{\py} = \{ T \}
34 }\]
35
36 \[ \eqn{ Foreign Unaffected }{
37  \pendsof{C}{\foreign} = \pendsof{L}{\foreign}
38 }\]
39
40 \subsection{Lemma: Foreign Identical}
41
42 $\isforeign{D} \implies \big[ D \le C \equiv D \le L \big]$.
43
44 \proof{
45 Trivial by Foreign Unaffected and the definition of $\pends$
46 }
47
48 \subsection{No Replay}
49
50 Ingredients Prevent Replay applies:
51 $A = L$ always satisfies the $\exists$.  $\qed$
52
53 \subsection{Unique Base}
54
55 Not applicable, by Base Only.
56
57 \subsection{Tip Contents}
58
59 Not applicable, by Base Only.
60
61 \subsection{Base Acyclic}
62
63 Relevant only if $L \in \pn$.  For $D = C$, $D \in \pn$; OK.
64 For $D \neq C$, OK by Base Acyclic for $L$. $\qed$
65
66 \subsection{Coherence and Patch Inclusion}
67
68 $$
69 \begin{cases}
70   L \haspatch    \p : & C \haspatch    \p \\
71   L \nothaspatch \p : & C \nothaspatch \p
72 \end{cases}
73 $$
74
75 \proof{
76 Consider some $D \in \py$.  $D \neq C$ by Base Only.
77 So $C \has \p \equiv L \has \p$.
78 }
79
80 \subsection{Unique Tips}
81
82 Explicitly dealt with by our Unique Tips condition.
83
84 \subsection{Foreign Inclusion}
85
86 True by Foreign Identical, and Foreign Inclusion of $L$.
87
88 \subsection{Foreign Contents}
89
90 Not applicable.
91
92 \subsection{Bases' Children}
93
94 We need to consider this for $D=L$ and also for $D=R$ ($R \in \set
95 R$).
96
97 For $D=L$, if $L \in \pn$ then $C \in \pn$, OK; whereas if
98 $L \not \in \pn$ Bases' Children is inapplicable.
99
100 For $D=R$, 
101 xxx up to here?
102
103 If $L \in \py, R \in \py$: not applicable for either $D=L$ or $D=R$.
104
105 If $L \in \py, R \in \pn$: not applicable for $L$, OK for $R$.
106
107 Other possibilities for $L \in \py$ are excluded by Tip Merge.
108
109 If $L \in \pn, R \in \pn$: satisfied for both $L$ and $R$.
110
111 If $L \in \pn, R \in \foreign$: satisfied for $L$, not applicable for
112 $R$.
113
114 If $L \in \pn, R \in \pqy$: satisfied for $L$, not applicable for
115 $R$.
116
117 Other possibilities for $L \in \pn$ are excluded by Base Merge.
118
119 If $L \in \foreign$: not applicable for $L$; nor for $R$, by Foreign Merges.
120
121