Is someone who solely contributes negative feedback to a paper considered an author? Say person A and person B are collaborating on a mathematics paper. It goes like this: person A repeatedly suggests proofs, and person B repeatedly finds flaws in them. Over time, this process culminates in a correct proof.

Does person B deserve to be an author on this paper? One might argue that the final paper would not have existed without B, so they deserve authorship. On the other hand, they did not actually contribute anything in the final work - each successive proof was generated by A alone.

Wikipedia says that the development of RSA went something like this: "Rivest and Shamir, as computer scientists, proposed many potential functions while Adleman, as a mathematician, was responsible for finding their weaknesses," until Rivest hit on the final answer. But that might be overly reductive, and I don't know of any other examples.

(As a final note, I'm not A or B in this scenario - I'm just curious.)
To moderate Yemon Choi's comment:  yes.  Your first assertion is that A and B are collaborating, which means they should be co-authors, unless one actively backs out.  

For a mathematical project, it's easy to have lots of ideas but not enough time to pursue them all to see which (if any) work.  If someone can shoot down ideas and tell you they definitely (or with high likelihood) won't work, this can help put you on the right track.  So in your situation I would say B was instrumental in finding a correct solution.  

(In a somewhat different abstract scenario where B dismisses some approaches to a problem that A suggests, and B does not otherwise actively work on the project, it may depends on the situation and they should have a discussion about whether B is a co-author or not.  And some people will have different opinions about the same situation, e.g. RS versus A in the RSA example.)

In general in a mathematical collaboration, if there's one key idea it's unlikely that both collaborators arrive at it together.  Maybe through discussion they enhance each other's understanding of the problem, and then one will have the key idea and the other will encourage/validate it.  That doesn't mean was the other person was unnecessary, even if you can't
pinpoint parts of the final paper as being "their contribution."

(And if collaborations became competitive to the point of dropping co-authors just because the didn't see the final solution first, who would want to collaborate?)