def check_x_set(all_x, A, b):
    """
    Get all x's that are valid solutions to Ax = b
    """
    valid_x = set()
    for x_vector in all_x:
        if (A @ x_vector == b).all():
            valid_x.add(tuple(x_vector))  # Make x-vectors immutable

    return list(valid_x)