# Thermodynamic functions of state for freely jointed polymer chain derived from partition function

I'm reading a stat thermo text (Terrel Hill) about the freely jointed chain problem. It all goes well until I hit the thermodynamic function of state derived from the canonical partition function. The problem goes like the following:

Consider a linear polymer chain made up of M units, where M is large enough so that one chain can be considered a thermodynamic system. Each unit can exist in the states $$i = 1, 2, . . . , n$$ with partition functions $$j_i(T)$$ and lengths $$l_i$$. The total length of the chain is $$l$$. The system (chain) is characterized thermodynamically by $$l, M, T$$.

Because this is a freely jointed chain, the canonical ensemble partition function for the system follows the formalism of the mixture of ideal gas species. Therefore, the partition function $$Q$$ is then:

$$Q(l, M, T)=\sum_M M!\prod^n_{i=1}\frac{j_i^{M_i}}{M_i!} \tag{1}$$

where $$M_i$$ is the number of units with length $$l_i$$, and the sum is over all sets $$M=\{M_1, M_2, ..., M_n\}$$ consistent with the restrictions:

\begin{align*}\sum_{i=1}^nM_i &=M, \tag{2} \\ \sum_{i=1}^nl_iM_i &=l \tag{3}\end{align*}

If we choose $$l$$ as an independent variable, the text says that the appropriate thermodynamic equation is:

$$dA=-SdT+\tau dl+\mu dM \tag{4}$$

With $$\tau$$ being the force pulling on the chain. My question is:

Why "$$+\tau dl$$" rather than "$$-\tau dl$$"? Since we have $$dA=-SdT -pdV + \mu dM$$ for ideal gas.