Bayes' Theorem help! How can I prove that P(A) in the denominator is equivalent to the Total Probability Theorem? As I understand it, the formula of Bayes' Theorem is generally expressed as:
$$\mathsf P(B_i\mid A) ~=~ \dfrac{\mathsf P(A\mid B_i)~\mathsf P(B_i)}{\mathsf P(A)}$$
Yet some reference material says that the theorem can also be expressed as the following since we do not always know the value of $P(A)$:

$$\mathsf P(B_i\mid A) ~=~ \dfrac{\mathsf P(A\mid B_i)~\mathsf P(B_i)}{\sum\limits_{i=1}^{n}\mathsf P(A\mid B_i)~\mathsf P(B_i)}$$

I noticed that this denominator is essentially the Total Probability Theorem. Could somebody please provide a proof showing that $~\mathsf P(A) = \sum\limits_{i=1}^{n}\mathsf P(A\mid B_i)~\mathsf P(B_i)~$ by the Total Probability Theorem? I am very lost on this and would love some guidance.
Thank you very much!

The formulae above aren't correct. In the first I suppose you meant to write $B_i$ on the left hand side? In the second, the numerator should read $\sum_{i=1}^n P(B_i)P(A \mid B_i)$.
Pending these two changes, the second formula holds if the events $B_i$ are mutually exclusive and $$A \subset \bigcup_{i=1}^n B_i.$$ This result is milder than the total probability theorem. To prove it, simply note that if $A \subset \bigcup_{i=1}^n B_i$ then $$P(A) = P\left(A \cap \bigcup_{i=1}^n B_i\right) = P\left(\bigcup_{i=1}^n (A \cap B_i)\right).$$ Given that $B_i$ are mutually exclusive, so are $A \cap B_i$, and as a result $$P(A) = P\left(\bigcup_{i=1}^n (A \cap B_i)\right) = \sum_{i=1}^n P(A \cap B_i) = \sum_{i=1}^n P(B_i) P(A \mid B_i).$$
