Towards a Rigorous Analysis of Mutual Information in Contrastive Learning