
\section{\label{sec:overview}Overview}

In this document we present a description of a darcs-like patch theory.
We do not describe exactly the theory that darcs 2 is built on, as it is
known to have some problems, but our theory is similar to darcs 2's. We
hope that darcs 3 will be based on it.

In Section~\ref{sec:notation} we quickly introduce some general
notation that we will be using.

In Section~\ref{sec:patches} we say what we require ``patches'' to
satisfy. The behaviour of patches are specified as axioms, which we will
build on top of.

In Section~\ref{sec:named_patches} we add unique names to our patches.

In Section~\ref{sec:patch_sequences} we define patch sequences, and some
properties that they satisfy.

In Section~\ref{sec:patch_merge} we take a break from the formal
definition, and give a description of how merges work (when conflicts
are not involved).

In Section~\ref{sec:contexted_patches} we introduce a ``contexted
patch'' datastructure.

In Section~\ref{sec:catches} we define catches and repos, and make
conjectures that they satisfy properties that we want them to satisfy.

