2$^\text{nd}$ law of thermodynamics: equivalence of statements Consider the following statements:

Clausius statement (according to Wikipedia):

No process is possible whose sole result is the transfer of heat from a body of lower temperature to a body of higher temperature.


Clausius equality:
$$\oint \frac{\delta Q}{\theta} = 0$$ (which implies existence of entropy $S$: $dS = \frac{\delta Q}{\theta}$)

They both are the statements of the second law of thermodynamics. How can one prove their equivalence? This proof seems to be frequently omitted from books (I don't know why).
Frankly speaking, the Clausius statement may be easily derived from the Clausius equality. The question is then the derivation of the equality from the statement.
 A: Not sure if this is the 'proof' you're looking for, but here goes:
Imagine we have a system $S$ that undergoes a cyclic process (which can be reversible or irreversible). During the process, S takes in amounts of heat $Q_1, Q_2, \dots, Q_n$ (which may of course be negative) from thermal reservoirs at temperatures $T_1, T_2, \dots, T_n$. The sum of these constitutes the only heat $S$ exchanges during the cycle. Let $W_S$ denote the work performed by $S$.
Introduce also a thermal reservoir at temperature $T_0$ (just to be clear: there's no ordering implied amongst the $T_0, T_1, T_2, \dots$).
Now, we insert $n$ Carnot (or any type of reversible) engines working between the thermal reservoir at $T_0$ and each of the $n$ other thermal reservoirs. Call $C_i$ the Carnot engine running between $T_0$ and $T_i$.
The size of $C_i$ is chosen so that it dumps into the reservoir at $T_i$ an amount of heat equal to $Q_i$ (the amount of heat given to $S$ by the reservoir at $T_i$). The important point of this is that each of the $n$ reservoirs ends up with no net heat exchange (the $i^{th}$ reservoir gives $Q_i$ to the system $S$, but then gains $Q_i$ from $C_i$). Each such Carnot engine requires a work $W_i$ to be performed on it to keep it running (though of course $W_i$ may be negative).

So, then, how much heat does the reservoir at $T_0$ give $C_i$? Let's call this unknown heat $Q_{i,0}$. For any reversible engine, the ratio between the two heats it exchanges is equal to the ratio of the two temperatures between which it works. For the Carnot engine $C_i$ this means $\frac{Q_{i,0}}{Q_i} = \frac{T_0}{T_i}$, or
$$Q_{i,0} = \frac{T_0}{T_i}Q_i$$
So the total heat that the reservoir at $T_0$ gives to all of the Carnot engines is then $\sum_iQ_{i,0} = T_0\sum_i\frac{Q_i}{T_i}$.
Now consider the composite system, call it $\bar{S}$, made up of the original $S$, plus each of the thermal reservoirs at $T_1, T_2, \dots$ (but not the reservoir at $T_0$), plus all the Carnot engines $C_1, C_2, \dots$. Since these were all cyclic processes, there has been no change in internal energy. So after one cycle, the net effect is 1) some amount of work has been done (let's call it $W=W_S-\sum_i W_i$; it's the sum of whatever work was done by $S$ as well as all of the works done on all the Carnot engines), and 2) the reservoir at temperature $T_0$ has given to $\bar{S}$ an amount of heat $T_0\sum_i\frac{Q_i}{T_i}$.
The first law requires that $W=T_0\sum_i\frac{Q_i}{T_i}$.
Now here's the crux (finally): if this quantity were positive, we could freely take the work $W$ and convert it fully to heat a body at any temperature (there is no restriction on how work can be converted into heat). Specifically, we could convert it all into heat transferred to a body whose temperature is greater than $T_0$, violating the Clausius statement.
Thus, if the Clausius inequality does NOT hold (i.e. it's possible for $\sum_i{\frac{Q_i}{T_i}}$ to be greater than $0$), this would imply that the Clausius statement also does NOT hold (i.e. it's possible to transfer heat from a lower temperature to a higher temperature, with no other consequences). You can think of this as a proof by contrapositive of the proposition that the Clausius statement implies the Clausius inequality.
(It becomes an equality if no net work is done in this process.)
(Of course, in the limit as $n\to\infty$, which means the heats exchanged become infinitesimals $\delta Q_i$, the sum becomes an integral. Also, I used $T$, whereas $\theta$ was used in the question; both denote the absolute thermodynamic temperature.)
(I freely admit this is all taken from Fermi's Thermodynamics book).
A: you are actually mixing entropy thing and clausius inequality , ds = dq/t is not valid always it's only for the quasi-static process while clausius inequality can be applied to any process to determine the feasibility of the process or equilibrium condition. i have seen about 8 books nowhere there's mention about clausius statement can be derived from clausius inequality  , one thing can be done that if a system violates clausius statement it also violates entropy law , also clausius is corollary of the second it's not like statement of 2nd law as per as i know ,plz correct me if i am wrong .
if the proof that if system violates clausius statement it also violates the entropy statement of 2nd law or entropy law is suffice for u then i am having text for that do reply 
A: ds = dq/T is only for a reversible process while the clausius inequality is for all types of process also 2nd law of thermodynamics can be expressed in many forms depending upon the directional constraint of a given process and each expression are in a way same
