Coupled Bogoliubov equations for electrons and phonons