Theory of Bose–Einstein condensation for trapped atoms