Ramsey Combinatorics and linear order Prove that the following are equivalent for an infinite cardinal $\kappa$.
(1) $\kappa \to (\kappa)^2_2$
(2) In any linearly ordered set of cardinality $\kappa$ there is either a well-ordered or a reversely-well-ordered subset of cardinality $\kappa$.
I already proved (1) implies (2) - which is fairly straight - but I'm having problems on the reverse direction.
Any advice would be appreciated.
 A: First show that $\kappa \to (\kappa)^2_2$ holds iff $\kappa$ is inaccessible and every $\kappa$ tree has a branch - This is one of the characterizations of a weakly compact cardinal and a proof can be found in Kanamori. Now assume that every linear order on $\kappa$ has a subset of size $\kappa$ which is well ordered or reverse well ordered. Note that this immediately implies $2^{\delta} < \kappa$ for every $\delta < \kappa$ - Otherwise consider the lexicographic ordering on $2^{\delta}$ for least such $\delta$. Now fix a $\kappa$ tree $T$. We can assume that $T \subseteq {}^{< \kappa} \kappa$, $|T| = \kappa$ and each level of $T$ has size $< \kappa$. For $f, g \in T$, let $f \prec g$ if either $g$ properly extends $f$ or $f \upharpoonright \alpha = g \upharpoonright \alpha$ and $f(\alpha) < g(\alpha)$ for some $\alpha \in dom(f) \cap dom(g)$. $\prec$ is a linear order on $T$ so there is some $\prec$-increasing or $\prec$-decreasing sequence $ \langle f_i : i < \kappa \rangle$ in $T$. Now show that for every $\delta < \kappa$, there exists $i_{\delta} < \kappa$ such that for all $i_{\delta} < i < j < \kappa$, $f_i \upharpoonright \delta = f_j \upharpoonright \delta$ and use this to construct a cofinal branch in $T$.
