title: Derivative in InfinitePolynomialRing
body: <p>I am attempting to take a derivative of an element in the class InfinitePolynomialRing. Some digging led me to the following way to do this:</p>
  <pre><code>X.&lt;p&gt; = InfinitePolynomialRing(QQ)
  f= p[3]
  f.derivative(f.variables()[f.variables().index(p[3])])
  </code></pre>
  <p>So my polynomial is just p_3 and I wish to take it's derivative with respect to p_3. However upon doing so I get the following error:</p>
  <pre><code>TypeError: provided variable is not in same ring as self
  </code></pre>
  <p>Even more bizarre is that the derivative with respect to any other variable works well:</p>
  <pre><code>X.&lt;p&gt; = InfinitePolynomialRing(QQ)
  f=p[1]
  f.derivative(f.variables()[f.variables().index(p[1])])
  </code></pre>
  <p>Gives me 1, the error only arises for p_3 and I cannot seem to figure out why.</p>