chiark / gitweb /
notation: strip word "merge" from \setmergeof etc.; use new definition of \commitmerg...
[topbloke-formulae.git] / invariants.tex
1 \section{Invariants}
2
3 We maintain these each time we construct a new commit. \\
4 \[ \eqn{No Replay}{
5   C \has D \implies C \ge D
6 }\]
7 \[\eqn{Unique Base}{
8  \bigforall_{C \in \py} \pendsof{C}{\pn} = \{ B \}
9 }\]
10 \[\eqn{Tip Contents}{
11   \bigforall_{C \in \py} D \isin C \equiv
12     { D \isin \baseof{C} \lor \atop
13       (D \in \py \land D \le C) }
14 }\]
15 \[\eqn{Base Acyclic}{
16   \bigforall_{C \in \pn} D \isin C \implies D \notin \py
17 }\]
18 \[\eqn{Coherence}{
19   \bigforall_{C,\p} C \haspatch \p \lor C \nothaspatch \p
20 }\]
21 \[\eqn{Unique Tips}{
22   \bigforall_{C,\p} C \haspatch \p \implies \pendsof{C}{\py} = \{ T \}
23 }\]
24 \[\eqn{Foreign Inclusion}{
25   \bigforall_{D \in \foreign} D \isin C \equiv D \leq C
26 }\]
27 \[\eqn{Foreign Contents}{
28   \bigforall_{C \in \foreign}
29     D \le C \implies \isforeign{D}
30 }\]
31
32 We also assign each new commit $C$ to zero or one of the sets $\p$, as
33 stated in the definition of $\patchof{C}$ in the summary for each kind
34 of commit.
35
36 A commit $C$ which satisfies all of the above is said to be
37 ``conformant''.
38
39 For each operation we will perform which generates a new commit, we
40 will assume the conformance of the existing history and prove the
41 conformance of the new commit.