import sympy as sp


def main():
    x1,x2,x3 = sp.symbols("x_1 x_2 x_3")

    x = sp.Matrix([x1, x2, x3])
    F = sp.Matrix([1 - x1**2, 1 - x2**2, 1 - x3**2, 1 - x1*x2, 1 - x1*x3])
    print(F.jacobian(x))
    print(F.jacobian(x).rank())

if __name__=="__main__":
    main()
