Ideal switch acting on a capacitor

Let's consider this circuit:

and suppose that the capacitor C1, charged at the input voltage Vin, at time t=0 is connected by the switch to the virtual ground. Assume also that C and C0 are initially discharged.

First question: How does the book I'm reading show that:

Second question: If C1 has an initial voltage vin, how can the switch modify the voltage of C1 to the virtual ground? I know that the voltage across a capacitor cannot change instantly.

Thanks

• The switch doesn't bring C1 to virtual ground, the op amp does. Also, the voltage of an ideal capacitor can change instantaneously, in response to a current impulse ($i = C \frac{dV}{dt}$ , $V=\frac{1}{C}\int{i dt}$) – Scott Seidman Aug 24 '18 at 13:08