express left adjoint as a limit in MacLane's CWM, P.234 there is this theorem

Theorem. A functor $G: A \rightarrow X$ has a left adjoint if and only if

*

*$G$ preserves limits.

*for any $x \in X$, $\lim (Q:(x \downarrow G) \rightarrow A)$ exists.

And in this case, the left adjoint of $G$ is given by $Fx := \lim (Q:(x \downarrow G) \rightarrow A)$.

My question is:
If this is true then left adjoint commutes with limits since itself is a limit. But this is weird, coz generally left adjoint only commutes with colimits.
 A: When we say "limits commute" what we mean is that given index categories $\mathcal{I}$ and $\mathcal{J}$ and a bifunctor $D:\mathcal{I}\times\mathcal{J}\to\mathcal{C}$, $\int_{I:\mathcal{I}}\int_{J:\mathcal{J}}D(I^+,J^+)\cong\int_{J:\mathcal{J}}\int_{I:\mathcal{I}}D(I^+,J^+)$ where here I'm using end notation. These particular ends correspond to limits. But think about what is happening in this case. Call the left adjoint $F$. We are saying $FX=\int_{Y:(X\downarrow G)}Q(Y^+)$ where $Q:(X\downarrow G)\to\mathcal{A}$ is the projection from the comma category. Now let's say we wanted to say that $F$ preserves limits. That would mean, for every diagram $D:\mathcal{I}\to\mathcal{X}$, $\int_{I:\mathcal{I}}F(D(I^+))\cong F(\int_{I:\mathcal{I}}D(I^+))$. The left side is then $\int_{I:\mathcal{I}}\int_{Y:(D(I^+)\downarrow G)}Q(Y^+)$ where it doesn't even make sense to commute the ends as that would give you $\int_{Y:(D(I^+)\downarrow G)}\int_{I:\mathcal{I}}Q(Y^+)$ where the $I^+$ is no longer in scope. To put it another way, the "bifunctor" you'd need would need a domain like a dependent sum, $\sum_{I:\mathcal{I}}(D(I)\downarrow G)\to\mathcal{A}$. Meanwhile, the right hand side of the limit preservation isomorphism would look like $\int_{Y:(\int_{I:\mathcal{I}}D(I^+)\downarrow G)}Q(Y^+)$ which doesn't even consist of a composition of limits. So what's happening is that for each $X$, $FX$ is the limit of a differently shaped diagram. We can't commute the limit inward in $\int_{I:\mathcal{I}}F(D(I^+))$ because the outer limit is determining the shape of the inner limit.
This result is also in Kelly's book Basic Concepts of Enriched Category Theory, Theorem 4.81, where it is expressed as: 

$G$ has a left adjoint if and only if $\text{Ran}_G Id$ exists and is
  preserved by $G$ in which case the left adjoint is $\text{Ran}_G Id$
  where $\text{Ran}_G Id$ is the right Kan extension of $Id$ along $G$.

Assuming sufficient completeness of $\mathcal{A}$, we can write $FX\cong\int_{A:\mathcal{\mathcal{A}}}[\mathcal{X}(X,GA^-),A^+]$ where $[S,A]$ is a power, i.e. the $S$-indexed coproduct of $A$, $\coprod_{s\in S}A$, and this end is a genuine end and not just a limit (though it can be expressed as a limit which gives rise to Mac Lane's version). Now we can commute the ends in $\int_{I:\mathcal{I}}F(D(I^+))$, but it still doesn't lead to $F(\int_{I:\mathcal{I}}D(I^+)$. The former is $\int_{I:\mathcal{I}}\int_{A:\mathcal{\mathcal{A}}}[\mathcal{X}(D(I^+),GA^-),A^+]\cong\int_{A:\mathcal{\mathcal{A}}}\int_{I:\mathcal{I}}[\mathcal{X}(D(I^+),GA^-),A^+]$, while the latter is $\int_{A:\mathcal{\mathcal{A}}}[\mathcal{X}(\int_{I:\mathcal{I}}D(I^+),GA^-),A^+]$. If these were isomorphic (which they aren't in general), then it certainly doesn't immediately follow just from commutation of limits/ends.
