We have investigated the chemistry of phosphorus-bearing compounds in the c
ircumstellar envelopes of both oxygen-rich and carbon-rich evolved stars. I
n accordance with thermodynamic calculations of photospheric chemistry, we
have assumed that the dominant forms of phosphorus in the inner circumstell
ar envelope (CSE) are PS and HCP in each case. In the C-rich case, we can r
eproduce the observed CP abundance reasonably well if it is the photodaught
er of HCP In the O-rich case we find, for the same amount of P available in
PS, that large abundances of atomic P are available for reaction but that
a low abundance of PO can be produced. We have not extensively explored the
effect of additional neutral processes since our results are partly compro
mised by the fact that neither HCP nor PS is detected in the three CSEs whe
re searches have been made; our models predict column densities in excess o
f the published upper limits. Sensitive searches for these molecules at hig
her frequencies are required before their presence in circumstellar envelop
es can definitely be ruled out. Dust condensation may incorporate all the a
vailable P into refractory grains and so we suggest that searches for P-bea
ring molecules may have the greatest opportunity for success in more evolve
d objects, such as protoplanetary nebulae, where P has been released from g
rains through the action of strong shock waves.