I think it would be very reasonable to add a line at the end of the paper to the effect that "Acknowledgments: Discussions with X, Y, and Z were helpful in developing the ideas in this paper." Sometimes that is enough, even for a crucial result, even if it is of the nature that they gave the one-line key to the entire theory.
If you feel yourself that something more than acknowledgment is necessary (you feel their contribution to the primary result of the proof is substantial), then you might consider contacting those people directly to see if they want to be co-authors.
Those who are anonymous I feel give up any claims. Those who have their email one can immediately contact. It is those in the middle that may be problematic. Maybe the above statement can be rewritten to:
"Acknowledgments: Discussions with X and two anonymous readers were helpful in developing the ideas in this paper."