Inversion of Bayes' Formula for Events

In standard notation, let {H1,H2, · · · ,Hm} and {A1, A2, · · · , An} be two distinct partitions of the sample space, or equivalently two sets of events satisfying three properties: (i) each event is non-void, (ii) events in the same set are mutually exclusive (i.e. P (Hj ∪Hk) = P (Hj)+P (Hk) for j 6= k), and (iii) each set is collectively exhaustive, (i.e. P (∪i=1Hj) = 1). The Bayes formula in general form is, for j = 1, · · · ,m, i = 1, · · · , n,