Please provide an explanation of CAP theorem and its relevance in distributed systems, including a discussion of the trade-offs between consistency, availability, and partition tolerance. Provide examples to illustrate your answer.
This prompt doesn't seem malicious.