def _is_free_var(i, k, m):
    """
    i  current row
    k  index of the variable
    m  matrix as a list of lists
    returns true if the variable `k` does not occur from row `i` on
    """
    for j in range(i, len(m)):
        if m[j][k] != 0:
            return False
    return True