Say I am person A who has built up some degree of expertise in mathematical topic X. Person B works on mathematical topic Y and realizes she needs a result from topic X. She asks me if I know how to prove this result. I work for a bit and prove this result, which person B works into their paper.
Now, I'm confident about my work on topic X, and am confident that person B is not manhandling its use for topic Y - i.e., they're very clear about the assumptions my result uses and what it implies. However, my knowledge of topic Y is not very deep, and it would take a significant amount of time for me to comfortably grasp exactly how the paper's use of topic Y works.
Is it then dishonest to proceed as an author? Is it expected that every author knows every aspect of the paper?