Context: The presence of water in the wind of the extreme carbon star
IRC+10216 has been confirmed by the Herschel telescope. The regions where the
high-J H2O lines have been detected are close to the star at radii r \geq 15
R\ast. Aims: We investigate the formation of water and related molecules in the
periodically-shocked inner layers of IRC+10216 where dust also forms and
accelerates the wind. Methods: We describe the molecular formation by a
chemical kinetic network involving carbon-and oxygen-based molecules. We then
apply this network to the physical conditions pertaining to the dust-formation
zone which experiences the passage of pulsation- driven shocks between 1 and 5
R\ast. We solve for a system of stiff, coupled, ordinary, and differential
equations. Results: Non-equilibrium chemistry prevails in the dust-formation
zone. H2O forms quickly above the photosphere from the synthesis of hydroxyl OH
induced by the thermal fragmentation of CO in the hot post-shock gas. The
derived abundance with respect to H2 at 5 R\ast is 1.4\times10-7, which
excellently agrees the values derived from Herschel observations. The
non-equilibrium formation process of water will be active whatever the stellar
C/O ratio, and H2O should then be present in the wind acceleration zone of all
stars on the Asymptotic Giant Branch.Comment: 5 pages, 2 figures. Accepted for publication in A&A Letter