Net torque on a frictionless pulley

If we consider a system comprising a massless string over a frictionless pulley,then we write the torque equation as $(T_2-T_1)R=I a$ ,where $T_2$ and $T_1$ are tensions on either side of the pulley.

The tangential force acting on the pulley is the friction $F$ between the pulley and the string. How is that the torque applied by friction is equal to the torque applied by the difference in tensions ? In other words how is the friction equal to the difference in the tensions ?

If we consider the pulley and the string over it as one system such that the string does not slip then the net force acting is the difference in the tensions and net torque $(T_2-T_1)R$.

But when we consider pulley in isolation then the force which applies torque is the friction between the string and pulley.

Could someone help me understand mathematically how do we calculate net torque on the pulley by considering pulley as the system i.e how is friction $F =T_2-T_1$ ?

-
If the pulley is frictionless, where is the torque of friction coming from? Do you mean massless pulley, because that's when torque of friction equals torque due to tension. – udiboy1209 Aug 23 '13 at 17:04
You are contradicting yourself, since in your first sentence you are stating that the pulley is frictionless. Or do you mean between the pulley and the bearing? – fibonatic Aug 23 '13 at 17:10
A frictionless pulley means friction is absent between the pulley and the axle(bearings).There is sufficient friction present between the pulley and the string such that no slipping occurs. – Tanya Sharma Aug 23 '13 at 17:26
I am pretty surprised that my question has been downvoted.I am curious to know who has given it a negative vote.Is there a way to know which member has downvoted or upvoted you ? – Tanya Sharma Aug 24 '13 at 6:52

The tangential force acting on the pulley is the friction F between the pulley and the string.How is that the torque applied by friction is equal to the torque applied by the difference in tensions ?

Consider an elemental length of string wrapped around the pulley. We know that the string is massless(light - its an approximation). There is a tension acting on the string $T+dT$ from one side and $T$ from the other side.(There is a small change in tension because we have considered a small part of the string only). There is a small amount of friction $df$ acting on this string.
$$T+dT-T-df=dm\cdot a$$ We know that $dm=0$ so, $$dT=df$$ Integrate both sides and you get $$f_{\mathrm{total}}=\Delta T=T_2-T_1$$