# CAP Theorem

Record: `arch:cap-theorem`
Kind: model
Layer: [Causality Core](https://banes-lab.com/records/layer/causality-core.md)
Severity: mandatory for distributed systems
Scope: distributed state, consistency, availability
Canonical: https://banes-lab.com/ontology#arch-cap-theorem

## Repair

- Refactored by: Choose CP or AP explicitly per data class under partition
- Detected by: split-brain writes or stalls during network partitions
- Violated by: a distributed store assumed to be both strongly consistent and fully available under partition
- Measured by: consistency/availability violations during partition events
- Enforced by: distributed-systems review

## requires

- [Network Partition Possibility](https://banes-lab.com/records/lex/network-partition-possibility.md)

## reinforces

- [Causal Consistency](https://banes-lab.com/records/arch/causal-consistency.md)
- [Eventual Consistency](https://banes-lab.com/records/arch/eventual-consistency.md)

## enables

- [Explicit Consistency/Availability Choice Under Partition](https://banes-lab.com/records/lex/explicit-consistency-availability-choice-under-partition.md)

## conflicts-with

- [Assumed Total Consistency And Availability](https://banes-lab.com/records/lex/assumed-total-consistency-and-availability.md)

## tensions-with

- [Latency](https://banes-lab.com/records/arch/latency.md)

## tensions

- [CAP Theorem Latency](https://banes-lab.com/records/tension/cap-theorem-latency.md)

## referenced-by

- [PACELC Theorem](https://banes-lab.com/records/arch/pacelc-theorem.md)
