Complete semilattices in category theory A complete semilattice is a partially ordered set $A$ in which every subset has a least upper bound (join). Then, regarded as a category (there is a morphism $x\longrightarrow y$ iff $x\leq y$ in $A$), $A$ is a complete semilattice if $A$ is cocomplete. 
Then, $A$ is a complete semilattice iff $A^\text{op}$ is.
The proof is as follows:
If $A$ is cocomplete, $A^J=\prod_{j\in \text{Ob}j}A$ is cocomplete, and $A_{J}\colon A \longrightarrow A^J$ preserves joins (i.e., preserves colimits).
Then, by the Primitive Adjoint Functor Theorem, $A_{J}$ has a right adjoint for all $J$, so $A$ is complete as a category.
I do not understand why is $A^J$ cocomplete. Which is the order defined there? Moreover, why does having a right adjoint imply completeness?
Can someone help me understand the proof, please? Thanks in advance.
 A: Here $J$ is presumably supposed to be a discrete category.  The category $A^J$ is just the usual functor category: objects are functors $J\to A$ and morphisms are natural transformations.  Since $J$ is discrete, a functor $J\to A$ is just a function from the objects of $J$ to the objects of $A$.  For a natural transformation between two such functors $F$ and $G$, there is only one possible natural transformation since $A$ is a poset, and it exists iff $F(j)\leq G(j)$ for every $j$.  In other words, $A^J$ is a poset, with the order defined coordinatewise by $F\leq G$ iff $F(j)\leq G(j)$ for all $j$.
The existence of colimits in $A^J$ is just because colimits can be computed separately on each coordinate (this holds for any functor category).  Very concretely in this case, if you want to find the join of a collection of functors $F_i$, just define $F(j)=\bigvee_i F_i(j)$ for each $j$.  What you call $A_J$ is just the diagonal map, sending $a\in A$ to the constant functor with value $a$.  Since colimits are computed coordinatewise, this preserves colimits.
So, $A_J$ has a right adjoint.  But a right adjoint to $A_J$ is the same thing as limits of diagrams indexed by $J$.  That is, the right adjoint $R:A^J\to A$ of $A_J$ (if it exists) is exactly the functor that takes a diagram $F:J\to A$ to its limit.  So if this right adjoint exists, every diagram $F:J\to A$ has a limit.  Since this is true for any discrete category $J$, this means $A$ has all meets, so it is complete.

Incidentally, there is a much quicker way to prove this result without using the language of category theory (though the argument is essentially the same).  Given any subset $S\subseteq A$, you can find its meet by just taking the join of the set of all lower bounds of $S$.
