def lin_poly_solve(L, M):
    """
    Return the point defined as the intersection of two lines
    (given as degree-one polynomials in some field).
    """
    x0,x1,x2 = M.parent().gens()
    a0 = L.coefficient(x0)
    a1 = L.coefficient(x1)
    a2 = L.coefficient(x2)
    b0 = M.coefficient(x0)
    b1 = M.coefficient(x1)
    b2 = M.coefficient(x2)
    # a0 a1 a2
    # b0 b1 b2
    return [a1*b2-a2*b1, -a0*b2+a2*b0, a0*b1-a1*b0]