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