# Problem with constraint (Lagragian mechanics) [closed]

I'm working on this problem where there is a small cylinder with radius $r$ rolling inside a bigger cylinder with radius $R$. I'm asked to solve the lagrange equation. It looks like this:

I looked at the solution and it says that the constraint for "rolling" is $$Rd\varphi=rd\vartheta$$It then says

$$\Rightarrow\frac{d\vartheta}{dt}=-\frac{R}{r}\frac{d\varphi}{dt}$$ My question is where does the minus sign come from?

If you roll the smaller cylinder mentally to the left, you will see that while $\phi$ is getting larger, $\theta$ is getting smaller. Similarly, if you roll the smaller cylinder to the right, $\phi$ gets smaller while $\theta$ gets larger. This is why the changes of the two angles must have opposite signs.