# Q.e.d. Code

## QED 9: The CAP Theorem

### Sinopsis

In 2000, Eric Brewer presented the CAP Conjecture to the Symposium on Principles of Distributed Computing. This states that a distributed system cannot simultaneously guarantee consistency, availability, and partition tolerance. It can, however, guarantee two of the three. It makes little sense to talk about guaranteeing consistency and availability while sacrificing partition tolerance. Network partitions are going to occur, so we must choose whether we are going to give up consistency or availability when that happens. Mathematical induction is a style of proof whereby you prove the base case (typically N = 1), and then you prove the inductive step (that if it's true for N, it's true for N+1). In programming, mathematical induction is used when writing recursive functions. First, implement the function for the base case. Then, assuming that the function works for smaller cases, reuse it to implement the function for larger ones. Constructors can be used to prove that one thing happens before another, and fu