  In finitely cocomplete homological categories, co-smash products give rise to
(possibly higher-order) commutators of subobjects. We use binary and ternary
co-smash products and the associated commutators to give characterisations of
internal crossed modules and internal categories, respectively. The ternary
terms are redundant if the category has the Smith is Huq property, which means
that two equivalence relations on a given object commute precisely when their
normalisations do. In fact, we show that the difference between the Smith
commutator of such relations and the Huq commutator of their normalisations is
measured by a ternary commutator, so that the Smith is Huq property itself can
be characterised by the relation between the latter two commutators. This
allows to show that the category of loops does not have the Smith is Huq
property, which also implies that ternary commutators are generally not
decomposable into nested binary ones.
  Thus, in contexts where Smith is Huq need not hold, we obtain a new
description of internal categories, Beck modules and double central extensions,
as well as a decomposition formula for the Smith commutator. The ternary
commutator now also appears in the Hopf formula for the third homology with
coefficients in the abelianisation functor.
