Petri's approach to the study of the ideal associated to a special divisor