I am trying to understand the inference procedure of collapsed Gibbs sampling for LDA model. I refer to this document and LDA wiki page. I cannot figure out how does it simplify the sample equation especially the last two rows of the following equations to get the final result:
Which part of them can be dropped and why?
The inference procedure in the wiki seems slightly different, but how can they get the same result?