Causal Inference I: Foundations