During the classes of "electric drives" this 2-level inverter was drawn:

I have searched online and tried to understand from book how it works, but I still have some basic (and probably stupid) doubts.
1) I understood that: the input on the left is 3-phase signal (120 phase shift), after the rectifier only the "peaks" of the 3 input sine waves remain, then the capacitor filters and, thanks to the PWM on the gates of the mosfets, the mosfets produce PWM square waves in output (on the right).
Is this correct so far ??
(it's very rough, but it's for understanding).
Take the case of an inverter of an electric car.
2) The inverter converts DC to AC ... but where is the DC battery in the picture? I only see one AC input and one AC output in the picture ...
3) The PWM signals generated by the microcontroller are "connected" to the gate of the transistors, right ??
4) Are the diodes between drain and source of the mosfets used to make the inverter bidirectional ?? ..sending back to the DC supply the power from right to left
Thank you for your patience

I have searched online and tried to understand from book how it works, but I still have some basic (and probably stupid) doubts.
1) I understood that: the input on the left is 3-phase signal (120 phase shift), after the rectifier only the "peaks" of the 3 input sine waves remain, then the capacitor filters and, thanks to the PWM on the gates of the mosfets, the mosfets produce PWM square waves in output (on the right).
Is this correct so far ??
(it's very rough, but it's for understanding).
Take the case of an inverter of an electric car.
2) The inverter converts DC to AC ... but where is the DC battery in the picture? I only see one AC input and one AC output in the picture ...
3) The PWM signals generated by the microcontroller are "connected" to the gate of the transistors, right ??
4) Are the diodes between drain and source of the mosfets used to make the inverter bidirectional ?? ..sending back to the DC supply the power from right to left
Thank you for your patience