The index of singularities of vector fields and finite jets