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