  A fundamental problem from invariant theory is to describe the endomorphism
algebra of multilinear functions on a representation V invariant under the
action of a group G. According to Weyl's classic, a first main (later:
fundamental) theorem of invariant theory provides a finite spanning set for
this algebra, whereas a a second main theorem describes the linear relations
between those basic invariants.
  We use diagrammatic methods to carry Weyl's programme a step further,
providing explicit bases for the subspace of the r-th tensor powers of V
invariant under the action of G, that are additionally preserved by the action
of the long cycle of the symmetric group on r letters. The representations we
study are essentially those that occur in Weyl's book: the defining
representations of the symplectic groups, the defining representations of the
symmetric groups considered as linear representations, and the adjoint
representations of the linear groups.
  In particular, we present a transparent, combinatorial proof of a second
fundamental theorem for the defining representation of the symplectic groups
Sp(2n). Our formulation is explicit and provides a very precise link to
(n+1)-noncrossing perfect matchings, going beyond a dimension count. Extending
our argument to the k-th symmetric powers of these representations, the
combinatorial objects involved turn out to be (n+1)-noncrossing k-regular
graphs. As corollaries we obtain instances of the cyclic sieving phenomenon for
these objects and the natural rotation action.
  In general, we derive branching rules for the diagram algebras corresponding
to the representations in a uniform way. We also compute the Frobenius
characteristics of modules of the diagram algebras restricted to the action of
the symmetric group and obtain the isotypic decomposition of the r-th tensor
power of V when n is large enough in comparison to r.
