TITLE: capturing small sets in small factors
QUESTION [15 upvotes]: Suppose $\kappa$ is a regular cardinal and $P$ is a $\kappa$-c.c. partial order.  I want to know when are small sets added by subforcings of size $<\kappa$.  The following seems well-known:

Fact: If $\kappa$ is weakly compact, and $P$ has size $\kappa$ and is $\kappa$-c.c., then for any $P$-name $\tau$ for a set of ordinals of size $<\kappa$, there is a $Q \lhd P$ and a $Q$-name $\sigma$ such that $|Q| < \kappa$, and $1 \Vdash_P \sigma = \tau$.

I think the easiest way to see the fact is to use the extension property.  Every such $P$ can be coded as a set of ordinals $A \subseteq \kappa$, and there is some transitive $X$ of rank > $\kappa$ and a set $B$ such that $(V_\kappa,\in,A) \prec (X,\in,B)$.  Any $P$-name for a small set is seen by the larger structure as captured by $P$, so this reflects.
Question 1: Are there counterexamples for some large cardinals which are weaker than weakly compact?
If $\kappa$ is supercompact, then the same conclusion holds for all $\kappa$-c.c. $P$.  This is easy to see by taking a supercompactness embedding $j$ with closure at least $|P|$ and noting that $j[P]$ is a regular suborder of $j(P)$.  Supercompactness must be a total overkill hypothesis.
Question 2: For what cardinals $\kappa$ do we have that every $\kappa$-c.c. partial order captures small sets in small factors?

Update:  I think I have a partial answer to Question 2.  Supercompactness is indeed overkill, and weak compactness is enough after all.  Let $\kappa$ be weakly compact, and $P$ be $\kappa$-c.c.  Let $\theta > \kappa$ be regular such that $P \in H_\theta$.  Let $\tau$ be any $P$-name for a $<\kappa$ sized set of ordinals.  Let $M \prec H_\theta$ be such that $P,\tau \in M$, $|M| \leq \kappa$, and $M^{<\kappa} \subseteq M$.  This is possible just because $\kappa$ is inaccessible.  Then $P \cap M$ is a regular suborder of $P$, since all antichains contained in $P \cap M$ are members of $M$, and $M$ knows which ones are maximal.  By the Fact, there is $Q \lhd P \cap M \lhd P$ and a $Q$-name $\sigma$ such that $|Q| < \kappa$ and $\Vdash_{P \cap M} \tau = \sigma$.

REPLY [7 votes]: We now have a full answer.  The capturing property is equivalent to weak compactness.
Yair already covered the non-inaccessible case.  Now we show that this property implies the tree property at $\kappa$.  If there is a $\kappa$-Aronszajn tree $T$, then there is a $\kappa$-c.c. forcing due to Baumgartner that makes $\kappa = \aleph_1$ and makes $T$ special.  Conditions consist of finite partial functions from $T$ into $\omega$ with the property that comparable nodes are assigned different colors.  Call this forcing $\mathbb P$ and let $\dot f$ be the canonical name for the generic specializing function.
Assume there is a regular $\mathbb Q \subseteq \mathbb P$ that captures $\dot f \restriction T_\omega$.  WLOG $\mathbb Q$ is upward-closed in $\mathbb P$ (we can weaken conditions).  Let $S$ be the set of nodes in $T$ that appear in any condition in $\mathbb Q$.
First we claim that for all $n \in \omega$ and all $s \in S$, $\{ (s,n) \} \in \mathbb Q$.  If not, then for some $n$, $\Vdash_\mathbb Q \dot f(\check s) \not= n$.  But we can take a generic $G \subseteq \mathbb P$ with $\dot f(\check s) = n$ and $G \cap \mathbb Q$ is generic, contradiction.
Second, if $X \subseteq S$ is any infinite ground model set, then a density argument shows that $\Vdash_{\mathbb Q} \mathrm{ran}(\dot f \restriction \check X) = \omega$.
Therefore take any $t \in T \setminus S$, and let $X = \{ s \in S : s < t \}$, which is infinite.  If $G \subseteq \mathbb Q$ is generic, then a further forcing adds the specializing function on all of $T$.  But there is no possible value left for $f(t)$.