# Decomposing a Root vector into simple roots

Is there a sage functions which does the following:

Input = Root System / Ambient Lattice or Ambient space of irreducible (or even classical) Root System and a Root vector $v$

Output = a list containing the integers which expresses $v$ as a linear combination of simple roots.

Thank you for your help.