  A combinatorial theory of associative $n$-categories has recently been
proposed, with strictly associative and unital composition in all dimensions,
and the weak structure arising as a combinatorial notion of homotopy with a
natural geometrical interpretation. Such a theory has the potential to serve as
an attractive foundation for a computer proof assistant for higher category
theory, since it allows composites to be uniquely described, and relieves
proofs from the bureaucracy of associators, unitors and their coherence.
However, this basic theory lacks a high-level way to construct homotopies,
which would be intractable to build directly in complex situations; it is not
therefore immediately amenable to implementation.
  We tackle this problem by describing a contraction operation, which
algorithmically constructs complex homotopies that reduce the lengths of
composite terms. This contraction procedure allows building of nontrivial
proofs by repeatedly contracting subterms, and also allows the contraction of
those proofs themselves, yielding in some cases single-step witnesses for
complex homotopies. We prove correctness of this procedure by showing that it
lifts connected colimits from a base category to a category of zigzags, a
procedure which is then iterated to yield a contraction mechanism in any
dimension. We also present homotopy.io, an online proof assistant that
implements the theory of associative $n$-categories, and use it to construct a
range of examples that illustrate this new contraction mechanism.
