In his paper On certain Arithmetical Functions published in Transactions of the Cambridge Philosophical Society, XXII, No. 9, 1916, 159-184, Ramanujan makes some bold claims about the tau function defined as follows: $$\sum_{n=1}^{\infty} \tau(n) q^n=q\prod_{n=1}^{\infty} (1-q^n)^{24}\tag{1}$$ To quote him
It appears that $$\sum_{n=1}^{\infty} \frac{\tau(n)} {n^s} =\prod_{p} \frac{1}{1-\tau(p)p^{-s} +p^{11-2s}}\tag{2}$$ This assertion is equivalent to the assertion that, if $$n=p_1^{a_1}p_2^{a_2}\dots p_r^{a_r} $$ where $p_1,p_2,\dots,p_r$ are the prime divisors of $n$, then $$n^{-11/2}\tau(n)=\frac{\sin((1+a_1)\theta_{p_1})}{\sin\theta_{p_1}}\cdot\frac{\sin((1+a_2)\theta_{p_2})}{\sin\theta_{p_2}}\dots\frac{\sin((1+a_r)\theta_{p_r})}{\sin\theta_{p_r}}\tag{3}$$ where $\cos\theta_p=\frac{1}{2}p^{-11/2}\tau(p)$.
It would follow that, if $n$ and $n'$ are prime to each other, we must have $$\tau(nn') =\tau(n) \tau(n') \tag{4}$$ Let us suppose that $(3)$ is true, and also that (as appears to be highly probable) $$\{2\tau(p)\}^2\leq p^{11}\text{ (see note at the end)} \tag{5}$$ so that $\theta_p$ is real.
It is rather very remarkable that Ramanujan starts with a proposed equation $(2)$ without any proof (only God knows how he guessed it) and then draws conclusions like $(3),(4)$.
IMHO Ramanujan uses empirical evidence and his hope that $\theta_p$ should be real to make the bold conjecture $(5)$ which was finally proved by Deligne using very sophisticated tools (of which I have no inkling).
Identity $(4)$ was proved by Mordell and his proof is replicated here. Based on these ideas one can prove the identity $(2)$.
My question is regarding equation $(3)$. It appears that Ramanujan uses some general theory of Dirichlet series and their expression into infinite products to derive $(3)$ and he has used that approach to derive many similar identities based on Dirichlet series in the same paper.
Is there any general theory which which allows us to deduce $(3)$ from $(2)$? I am hoping that this is the easy part in whatever is presented above and expect some sort of a general proof here which can work of other Dirichlet series and its corresponding infinite product representation.
Note: Equation $(5)$ has a typo in the original paper also (or perhaps in my copy of Collected Papers of Ramanujan). It should be fixed as $$\{\tau(p) \} ^{2}\leq 4p^{11}\tag{6}$$