chiark / gitweb /
1cf0e76e61e8b48c3eb083eafdcf590929e74891
[topbloke-formulae.git] / article.tex
1 \documentclass[a4paper,leqno]{strayman}
2 \let\numberwithin=\notdef
3 \usepackage{amsmath}
4 \usepackage{mathabx}
5 \usepackage{stmaryrd}
6 \usepackage{slashed}
7 \usepackage{txfonts}
8 \usepackage{amsfonts}
9 \usepackage{mdwlist}
10 %\usepackage{accents}
11
12 \renewcommand{\ge}{\geqslant}
13 \renewcommand{\le}{\leqslant}
14
15 \newcommand{\has}{\sqsupseteq}
16 \newcommand{\isin}{\sqsubseteq}
17
18 \newcommand{\nothaspatch}{\mathrel{\,\not\!\not\relax\haspatch}}
19 \newcommand{\notpatchisin}{\mathrel{\,\not\!\not\relax\patchisin}}
20 \newcommand{\haspatch}{\sqSupset}
21 \newcommand{\patchisin}{\sqSubset}
22
23 \newcommand{\set}[1]{\mathbb #1}
24 \newcommand{\pa}[1]{\varmathbb #1}
25 \newcommand{\pay}[1]{\pa{#1}^+}
26 \newcommand{\pan}[1]{\pa{#1}^-}
27
28 \newcommand{\p}{\pa{P}}
29 \newcommand{\py}{\pay{P}}
30 \newcommand{\pn}{\pan{P}}
31
32 %\newcommand{\hasparents}{\underaccent{1}{>}}
33 %\newcommand{\hasparents}{{%
34 %  \declareslashed{}{_{_1}}{0}{-0.8}{>}\slashed{>}}}
35 \newcommand{\hasparents}{>_{\mkern-7.0mu _1}}
36 \newcommand{\areparents}{<_{\mkern-14.0mu _1\mkern+5.0mu}}
37
38 \renewcommand{\implies}{\Rightarrow}
39
40 \newcommand{\pancs}[2]{{\mathcal A} ( #1 , #2 ) }
41 \newcommand{\pends}[2]{{\mathcal E} ( #1 , #2 ) }
42
43 \renewcommand{\land}{\wedge}
44
45 \begin{document}
46
47 \section{Notation}
48
49 \begin{basedescript}{
50 \desclabelwidth{5em}
51 \desclabelstyle{\nextlinelabel}
52 }
53 \item[ $ C \hasparents \set X $ ]
54 The parents of commit $C$ are exactly the set
55 $\set X$.
56
57 \item[ $ C \ge D $ ]
58 $C$ is a descendant of $D$ in the git commit
59 graph.  This is a partial order, namely the transitive closure of 
60 $ D \in \set X $ where $ C \hasparents \set X $.
61
62 \item[ $ C \has D $ ]
63 Informally, the tree at commit $C$ contains the change
64 made in commit $D$.  Does not take account of deliberate reversions by
65 the user or in non-Topbloke-controlled branches; these are considered
66 normal, forward, commits.  For merges and Topbloke-generated
67 anticommits, the ``change made'' is only to be thought of as any
68 conflict resolution.  This is not a partial order because it is not
69 transitive.
70
71 \item[ $ \p, \py, \pn $ ]
72 A patch $\p$ consists of two sets of commits $\pn$ and $\py$, which
73 are respectively the base and tip git branches.  $\p$ may be used
74 where the context requires a set, in which case the statement
75 is to be taken as applying to both $\py$ and $\pn$.
76 All these sets are distinct.
77
78 \item[ $ \pancs{C}{\set P} $ ]
79 $ \{ A \; | \; A \le C \land A \in \set P \} $ 
80 i.e. all the ancestors of $C$
81 which are in $\set P$.
82
83 \item[ $ \pends{C}{\set P} $ ]
84 $ \{ E \; | \; E \in \pancs{C}{\set P}
85   \land \mathop{\not\exists}_{A \in \pancs{C}{\set P}}
86   A \neq E \land E \le A \} $ 
87 i.e. all $\le$-maximal commits in $\pancs{C}{\set P}$.
88
89 \end{basedescript}
90
91 \section{Invariants}
92
93 \[ C \has D \implies C \ge D \tag*{\mbox{No replay:}} \]
94
95 Unique base: \[ \mathop{\forall}_{C \in \py} \pends{C}{\pn} = \{ B \} \]
96
97 \section{Test more symbols}
98
99 $ C \haspatch \p $
100
101 $ C \nothaspatch \p $
102
103 $ \p \patchisin C $
104
105 $ \p \notpatchisin C $
106
107 $ \{ B \} \areparents C $
108
109 \end{document}