Design of state detectors for nonlinear systems using symmetries and semi-invariants