X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topbloke-formulae.git;a=blobdiff_plain;f=invariants.tex;h=28647658cb30190e30a2f93a658757a81f8ddf59;hp=25d51c508c167005c48d7642108e961785aa1258;hb=35d8920c70badf3ea6556ad6cf53ea96ef6aec0c;hpb=7dc335c17ae313c006e2283a35ca214b213ffcd9 diff --git a/invariants.tex b/invariants.tex index 25d51c5..2864765 100644 --- a/invariants.tex +++ b/invariants.tex @@ -1,27 +1,46 @@ \section{Invariants} We maintain these each time we construct a new commit. \\ -\[ \eqn{No Replay:}{ +\[ \eqn{No Replay}{ C \has D \implies C \ge D }\] -\[\eqn{Unique Base:}{ +\[\eqn{Unique Base}{ \bigforall_{C \in \py} \pendsof{C}{\pn} = \{ B \} }\] -\[\eqn{Tip Contents:}{ +\[\eqn{Tip Contents}{ \bigforall_{C \in \py} D \isin C \equiv { D \isin \baseof{C} \lor \atop (D \in \py \land D \le C) } }\] -\[\eqn{Base Acyclic:}{ - \bigforall_{B \in \pn} D \isin B \implies D \notin \py +\[\eqn{Base Acyclic}{ + \bigforall_{C \in \pn} D \isin C \implies D \notin \py }\] -\[\eqn{Coherence:}{ +\[\eqn{Coherence}{ \bigforall_{C,\p} C \haspatch \p \lor C \nothaspatch \p }\] -\[\eqn{Foreign Inclusion:}{ - \bigforall_{D \text{ s.t. } \patchof{D} = \bot} D \isin C \equiv D \leq C +\[\eqn{Unique Tips}{ + \bigforall_{C,\p} C \haspatch \p \implies \pendsof{C}{\py} = \{ T \} }\] -\[\eqn{Foreign Contents:}{ - \bigforall_{C \text{ s.t. } \patchof{C} = \bot} - D \le C \implies \patchof{D} = \bot +\[\eqn{Foreign Inclusion}{ + \bigforall_{D \in \foreign} D \isin C \equiv D \leq C }\] +\[\eqn{Foreign Contents}{ + \bigforall_{C \in \foreign} + D \le C \implies \isforeign{D} +}\] +\[\eqn{Bases' Children}{ + C \hasparent D \land D \in \pdn + \implies + C \in \pdn \lor C \in \pdy +}\] + +We also assign each new commit $C$ to zero or one of the sets $\p$, as +stated in the definition of $\patchof{C}$ in the summary for each kind +of commit. + +A commit $C$ which satisfies all of the above is said to be +``conformant''. + +For each operation we will perform which generates a new commit, we +will assume the conformance of the existing history and prove the +conformance of the new commit.