chiark / gitweb /
pseudomerge: Bases' Children wip ?
[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  \patchof{L} \neq \py
19 }\]
20
21 \[ \eqn{ Unique Tips }{
22  C \haspatch \p \implies
23   \bigexists_T
24     \pendsof{C}{\py} = \{ T \}
25 }\]
26
27 \[ \eqn{ Foreign Unaffected }{
28  \pendsof{C}{\foreign} = \pendsof{L}{\foreign}
29 }\]
30
31 \subsection{Lemma: Foreign Identical}
32
33 $\isforeign{D} \implies \big[ D \le C \equiv D \le L \big]$.
34
35 \proof{
36 Trivial by Foreign Unaffected and the definition of $\pends$
37 }
38
39 \subsection{No Replay}
40
41 Ingredients Prevent Replay applies:
42 $A = L$ always satisfies the $\exists$.  $\qed$
43
44 \subsection{Unique Base}
45
46 Not applicable, by Base Only.
47
48 \subsection{Tip Contents}
49
50 Not applicable, by Base Only.
51
52 \subsection{Base Acyclic}
53
54 Relevant only if $L \in \pn$.  For $D = C$, $D \in \pn$; OK.
55 For $D \neq C$, OK by Base Acyclic for $L$. $\qed$
56
57 \subsection{Coherence and Patch Inclusion}
58
59 $$
60 \begin{cases}
61   L \haspatch    \p : & C \haspatch    \p \\
62   L \nothaspatch \p : & C \nothaspatch \p
63 \end{cases}
64 $$
65
66 \proof{
67 Consider some $D \in \py$.  $D \neq C$ by Base Only.
68 So $C \has \p \equiv L \has \p$.
69 }
70
71 \subsection{Unique Tips}
72
73 Explicitly dealt with by our Unique Tips condition.
74
75 \subsection{Foreign Inclusion}
76
77 True by Foreign Identical, and Foreign Inclusion of $L$.
78
79 \subsection{Foreign Contents}
80
81 Not applicable.
82
83 \subsection{Bases' Children}
84
85 We need to consider this for $D=L$ and also for $D=R$ ($R \in \set
86 R$).
87
88 For $D=L$, if $L \in \pn$ then $C \in \pn$, OK; whereas if
89 $L \not \in \pn$ Bases' Children is inapplicable.
90
91 For $D=R$, 
92 xxx up to here?
93
94 If $L \in \py, R \in \py$: not applicable for either $D=L$ or $D=R$.
95
96 If $L \in \py, R \in \pn$: not applicable for $L$, OK for $R$.
97
98 Other possibilities for $L \in \py$ are excluded by Tip Merge.
99
100 If $L \in \pn, R \in \pn$: satisfied for both $L$ and $R$.
101
102 If $L \in \pn, R \in \foreign$: satisfied for $L$, not applicable for
103 $R$.
104
105 If $L \in \pn, R \in \pqy$: satisfied for $L$, not applicable for
106 $R$.
107
108 Other possibilities for $L \in \pn$ are excluded by Base Merge.
109
110 If $L \in \foreign$: not applicable for $L$; nor for $R$, by Foreign Merges.
111
112