Computing the differential output rank of a nonlinear system