chiark / gitweb /
strategy: wip reachable etc.
[topbloke-formulae.git] / trav-proofs.tex
1 \section{Traversal phase --- proofs}
2
3 For each operation called for by the traversal algorithms, we prove
4 that the commit generation preconditions are met.
5
6 WIP WHAT ABOUT PROVING ALL THE TRAVERSAL RESULTS
7
8 \subsection{Traversal Lemmas}
9
10 Firstly, some lemmas.
11 \statement{Tip Correct Contents}{
12   \tipcy \haspatch \pa E
13     \equiv
14   \pa E = \pc \lor \pa E \isdep \pc
15 }
16 \proof{
17   For $\pc = \pa E$, Tip Own Contents suffices.
18   For $\pc \neq \pa E$, Exclusive Tip Contents
19   gives $D \isin \tipcy \equiv D \isin \baseof{\tipcy}$
20   which by Correct Base $\equiv D \isin \tipcn$.
21 }
22
23 \subsection{Base Dependency Merge, Base Sibling Merge}
24
25 We do not prove that the preconditions are met.  Instead, we check
26 them at runtime.  If they turn out not to be met, we abandon
27 \alg{Merge-Base} and resort to \alg{Recreate-Base}.
28
29 TODO COMPLETE MERGE-BASE STUFF
30
31 WIP WHAT ABOUT PROVING ALL THE TRAVERSAL RESULTS
32
33 \subsection{Recreate Base Beginning}
34
35 To recap we are executing Create Base with
36 $L = \tipdy$ and $\pq = \pc$.
37
38 \subsubsection{Create Acyclic}
39
40 By Tip Correct Contents of $L$,
41 $L \haspatch \pa E \equiv \pa E = \pd \lor \pa E \isdep \pd$.
42 Now $\pd \isdirdep \pc$,
43 so by Coherence, and setting $\pa E = \pc$,
44 $L \nothaspatch \pc$. I.e. $L \nothaspatch \pq$. OK.
45
46 That's everything for Create Base.  $\qed$
47
48 \subsection{Recreate Base Final Declaration}
49
50 \subsubsection{Base Only} $\patchof{W} = \patchof{L} = \pn$.  OK.
51
52 \subsubsection{Unique Tips}
53
54 Want to prove that for any $\p \isin C$, $\tipdy$ is a suitable $T$.
55
56 WIP
57
58 \subsection{Tip Base Merge}
59
60 $L = W$, $R = \tipcn$.
61
62 TODO TBD
63
64 Afterwards, $\baseof{W} = \tipcn$.
65
66 \subsection{Tip Source Merge}
67
68 In fact, we do this backwards: $L = S$, $R = W$.  Since $S \in \pcy$,
69 the resulting $C \in \pcy$ and the remaining properties of the Merge
70 commit construction are symmetrical in $L$ and $R$ so this is fine.
71
72 By the results of Tip Base Merge, $\baseof{W} = \tipcn$.
73
74 By Base Ends Supreme, $\tipcn \ge \baseof{S}$ i.e.
75 $\baseof{R} \ge \baseof{L}$.
76
77 Either $\baseof{L} = \baseof{M}$, or we must choose a different $M$ in
78 which case $M = \baseof{S}$ will suffice.
79