  Most gamma-ray bursts (GRBs) observed by the Swift satellite show an early
rapid decay phase (RDP) in their X-ray lightcurve, which is usually a smooth
continuation of the prompt gamma-ray emission, strongly suggesting that it is
its tail. However, the mechanism behind it is still not clear. The most popular
model for this RDP is High Latitude Emission (HLE). While HLE is expected in
many models for the prompt GRB emission, such as the popular internal shocks
model, there are models in which it is not expected, such as sporadic magnetic
reconnection events. Therefore, testing whether the RDP is consistent with HLE
can help distinguish between different prompt emission models. We address this
question by modeling the prompt emission as the sum of its individual pulses
with their HLE tails. Analytic expressions for the observed flux density are
obtained for power-law and Band function emission spectra. For internal shocks
the observed instantaneous spectrum is very close to the emitted one, and
should be well described by a Band function also during the RDP. Our model
naturally produces, the observed spectral softening and steepening of the flux
decay. The observed flux during the RDP is initially dominated by the tail of
the last pulse, but the tails of one or more earlier pulses can become dominant
later on. Moreover, modeling several overlapping pulses as a single wider pulse
would over-predict the emission tail. Thus, one should be very careful when
testing the predictions of HLE and do a combined temporal and spectral fit of
the prompt GRB emission and the RDP.
