This question is about the computer algebra system Magma (not the linear algebra library), and is crossposted from scicomp.SE.
Please forgive if this is off-topic; I am a regular user of the StackExchange network but this is my first post on StackOverflow. I am looking for the right home for this kind of question. (In principle it seems to me to be scicomp.SE but it hasn't gotten an answer in 4 days so I wanted to know if StackOverflow yielded a different result.)
Suppose one has constructed a polynomial algebra A over a ring R in Magma. How does one construct the sub-R-algebra of A generated by a given list of elements of A?
This seems to me to be a very basic operation so I can't believe there isn't a way to do it, but I haven't so far found it in the handbook. (I see functionality to construct subalgebras of matrix algebras and of endomorphism rings of abelian varieties, but not polynomial rings.)