Assume that I'm given two lists of vectors $l_1$ and $l_2$, where all the vectors have equal dimension. I want to compute a basis for the intersection of their spans. What is the easiest setup for computing this in a computer algebra system? I remember there being some way of computing this using augmented matrices, where $l_1$ forms one part $l_2$ another and then adding something and row reducing and picking up certain columns.
To be clear, I know how to set this up mathematically, but I'm looking for a way of doing it that won't require very much code. The reason I want this is that it looks like this is not an operation that's built into Mathematica.
There are many systems capable of doing this. In GAP (which is distributed freely under GPL) you may do, for example, the following: