# How to create a subalgebra generated by certain elements

I'm working in the group algebra of the symmetric group and I would like to be able to create the subalgebra generated by the Jucys-Murphy elements: X_i = (1 i) + (2 i) + ... + (i-1 i) for i = 1, ... ,n.

I can't seem to find a simple way to create a subalgebra generated by elements of an algebra. Any suggestions? I'm happy to give more context, but I'm pretty new to Sage so at the moment I'm not sure how to elaborate more.