Title: A general implicit function theorem with an application to problems of relative minima