Electronic Structure: Density functional theory: foundations