**Background: **

For a quantum integrable system the aim is, given some Hamiltonian, to write down its spectrum exactly. The canonical example is the Heisenberg XXX spin chain. The most commonly used method is the algebraic Bethe ansatz. However, this method works by pulling a generating object, the R-matrix, which satisfies the Yang-Baxter equation, out of nowhere and using it to construct a tower of commuting operators, one of which is the Hamiltonian we are seeking to diagonalise (even though it isn't, but this is what everything written on the subject says).

**Question:**

The Hamiltonian in question is generally invariant under some symmetry algebra, or more precisely, commutes with at least some of the elements of the algebra. Is it possible to write down an R-matrix satisfying the Yang-Baxter Equation and producing the Hamiltonian we seek by some method without the guesswork? In other words, can one go from

Input parameters: Hamiltonian, Lie algebra

to

Output: R-matrix for the system