  Understanding the role of charge density wave (CDW) in high-temperature
superconductivity is a longstanding challenge in condensed matter physics. We
construct a holographic superconductor model in which the $U(1)$ symmetry is
spontaneously broken only due to the presence of CDWs, rather than previously
known free charges with constant density. Below the critical temperature of
superconductivity, CDW phase and superconducting phase coexist, which is also
justified by the numerical results of optical conductivity. The competitive and
cooperative relations between CDW phase and superconducting phase are observed.
This work supports the opinion that the appearance of pseudo-gap in CDW phase
promotes the pre-pairing of electrons as well as holes such that the formation
of superconductivity benefits from the presence of CDW.
